diff --git a/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/c8a26c5e-0817-4a44-93c5-a68fdd1f8157_content_list.json b/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/c8a26c5e-0817-4a44-93c5-a68fdd1f8157_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a5ef52ab326f11407c8d0a82c514e2dbcbc25606 --- /dev/null +++ b/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/c8a26c5e-0817-4a44-93c5-a68fdd1f8157_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d0c826de4aaa05725ff7120a697e6a04bfe63edfeda41d0b6d84e060752bfee +size 85808 diff --git a/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/c8a26c5e-0817-4a44-93c5-a68fdd1f8157_model.json b/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/c8a26c5e-0817-4a44-93c5-a68fdd1f8157_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d1b156e4fef32566dd32d57bed38f045a182eede --- /dev/null +++ b/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/c8a26c5e-0817-4a44-93c5-a68fdd1f8157_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b65956f172251bccf66527c07895549f930ebfbf1f226f38493bbabe0a5ecf2f +size 106721 diff --git a/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/c8a26c5e-0817-4a44-93c5-a68fdd1f8157_origin.pdf b/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/c8a26c5e-0817-4a44-93c5-a68fdd1f8157_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fdd5c078eb4292a01ce8d93ec813fa0381653277 --- /dev/null +++ b/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/c8a26c5e-0817-4a44-93c5-a68fdd1f8157_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a5270193c8498eee935ef83bcd7e24b7e99b15d16d0b131bf8c9f8f0e468685 +size 1229616 diff --git a/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/full.md b/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5b5e01a591f3647ebf19857407a36690daf8fcc7 --- /dev/null +++ b/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/full.md @@ -0,0 +1,304 @@ +# Revisiting the Transferability of Supervised Pretraining: an MLP Perspective + +Yizhou Wang $^{1,3*†}$ , Shixiang Tang $^{2†}$ , Feng Zhu $^{3}$ , Lei Bai $^{2‡}$ , Rui Zhao $^{3,4}$ , Donglian Qi $^{1}$ , Wanli Ouyang $^{2}$ $^{1}$ Zhejiang University, $^{2}$ The University of Sydney, $^{3}$ SenseTime Research, $^{4}$ Qing Yuan Research Institute, Shanghai Jiao Tong University, Shanghai, China + +{yizhouwang, qidl}@zju.edu.cn, stan3906@uni.sydney.edu.au, baisanshi@gmail.com, {zhufeng, zhaorui}@sensetime.com, wanli.ouyang@sydney.edu.au + +# Abstract + +The pretrain-finetune paradigm is a classical pipeline in visual learning. Recent progress on unsupervised pretraining methods shows superior transfer performance to their supervised counterparts. This paper revisits this phenomenon and sheds new light on understanding the transferability gap between unsupervised and supervised pretraining from a multilayer perceptron (MLP) perspective. While previous works [6, 8, 17] focus on the effectiveness of MLP on unsupervised image classification where pretraining and evaluation are conducted on the same dataset, we reveal that the MLP projector is also the key factor to better transferability of unsupervised pretraining methods than supervised pretraining methods. Based on this observation, we attempt to close the transferability gap between supervised and unsupervised pretraining by adding an MLP projector before the classifier in supervised pretraining. Our analysis indicates that the MLP projector can help retain intra-class variation of visual features, decrease the feature distribution distance between pretraining and evaluation datasets, and reduce feature redundancy. Extensive experiments on public benchmarks demonstrate that the added MLP projector significantly boosts the transferability of supervised pretraining, e.g. $+7.2\%$ top-1 accuracy on the concept generalization task, $+5.8\%$ top-1 accuracy for linear evaluation on 12-domain classification tasks, and $+0.8\%$ AP on COCO object detection task, making supervised pretraining comparable or even better than unsupervised pretraining. + +# 1. Introduction + +While Supervised Learning with the cross-entropy loss1 (SL) were the de facto pretraining paradigm in computer vision [14, 20, 26, 39] for a long period, recent unsupervised + +learning methods [3-9, 15, 17, 18, 49, 52] show better transfer learning performance on various visual tasks [17, 22, 53]. This raised the question of why unsupervised pretraining surpasses supervised pretraining even though supervised pretraining uses annotations with rich semantic information. + +Several works have attempted to explain the better transferability of unsupervised pretraining than supervised pretraining by the following two reasons: (1) Learning without semantic information in annotations [16, 37, 45, 53], which makes the backbone less overfit to semantic labels to preserve instance-specific information which may be useful in transfer tasks, and (2) Special design of the contrastive loss [22, 23, 53], which helps the learned features to contain more low/mid-level information for effective transfer to downstream tasks. Starting from the perspective of supervision and loss design, these works provide intuitive explanations for better transferability. + +In this paper, we shed new light on understanding transferability by considering the multilayer perception (MLP) projector. While previous works [6, 8, 17] verified its effectiveness on the unsupervised image classification task: unsupervised training and evaluating the model on the same ImagNet-1K dataset, they did not explore its effectiveness on transfer tasks thoroughly and rigorously. It is not straightforward to extend the effectiveness of MLP on the unsupervised image classification task to downstream tasks if not supported by rigorous experiments or theoretical analysis, because the performance on the pretraining task is not always predictive of the performance on transfer tasks when there exists a large semantic gap [16, 35, 43]. To our best knowledge, we are the first to identify the MLP projector as the core factor for the transferability with deep empirical and theoretical analysis. With this new viewpoint, we find that a simple yet effective method, adding an MLP projector, can promote the transferability of the conventional + +supervised pretraining methods with the cross-entropy loss (SL) to be comparable or even better than representative unsupervised pretraining methods. + +Specifically, we use the concept generalization task [37] on ImageNet-1K, where the pretraining and the evaluation datasets have a large semantic distance, as a probe to analyze the transferability of different models. Our experimental results and corresponding analysis indicate that the MLP projector in unsupervised pretraining methods is important for their better transferability. Motivated by this observation, we insert an MLP projector before the classifier in SL, forming SL-MLP. The added MLP can improve the transferability of supervised pretraining, making supervised pretraining comparable or even better than unsupervised pretraining. Experimental results on SL and SL-MLP show three interesting findings: 1) The added MLP preserves the intra-class variation on the pretraining dataset. 2) The added MLP decreases the feature distribution distance between the pretraining and the evaluation dataset; 3) The added MLP decreases the feature redundancy in the pretraining dataset. We also provide theoretical analysis on how the preserved intra-class variation and the decreased feature distribution distance improve the performance on the target dataset, by adding an MLP projector. + +Extensive experimental results confirm that adding an MLP projector into the supervised pretraining method (SL) can consistently improve the transferability of the model on various downstream tasks. Specifically, on the concept generalization task [37], SL-MLP boosts the top-1 accuracy compared to SL $(55.9\% \rightarrow 63.1\%)$ by $+7.2\%$ . It also achieves better performance $(64.1\%)$ than Byol $(62.3\%)$ by $+1.8\%$ on the 300-epochs pretraining setting. In classification tasks on 12 cross-domain datasets [22], SL-MLP improves SL by $+5.8\%$ accuracy on average. Moreover, SL-MLP shows better transferability than SL on COCO object detection [25] by $+0.8\%$ AP. These improvements brought by the MLP projector can largely bridge the transferability gap between supervised and unsupervised pretraining as detailed in Sec. 5.2. + +The main contributions of our paper are three-fold. (1) We reveal that the MLP projector is the main factor for the transferability gap between existing unsupervised and supervised learning methods. (2) We empirically demonstrate that, by adding an MLP projector, supervised pretraining methods can have comparable or even better transferability than representative unsupervised pretraining methods. (3) We theoretically prove that the MLP projector can improve transferability of pretrained models by preserving intra-class feature variation. + +# 2. Related Works + +MLP in unsupervised learning methods. Adding a multi-layer perceptron (MLP) projector after the encoder was first + +introduced in SimCLR [6] and followed by recent unsupervised learning frameworks [3, 7-9, 17, 49]. SimCLR claims that the MLP can reduce the loss of information caused by the contrastive loss, and various works [6, 8] have verified that the MLP projector can enhance the discriminative ability of unsupervised models on the unsupervised image classification task, where unsupervised training and evaluation are conducted on the same dataset. However, the relation between the MLP and the transferability of unsupervised learning methods is under-explored. In this paper, we reveal that the MLP projector is also important for the desirable transferability of unsupervised learning. + +MLP in supervised learning methods. The typical supervised learning method (SL) only uses the cross-entropy loss and shows inferior performance on various transfer tasks than recent unsupervised learning methods. Inspired by [15, 48], recent works [22, 23] introduced the contrastive loss equipped with an MLP projector into SL to improve its transferability. Nonetheless, those works ignored the ablation on the MLP and attributed the better transfer performance to the contrastive mechanism in the loss. In this paper, we propose that the MLP is important for the improved transferability of recent supervised learning methods [22, 23] with empirical and theoretical analysis. + +Transferability gap between supervised and unsupervised learning. Previous works attributed the superior transferability of unsupervised learning to lack of annotation [16, 37, 45, 53] or special design of the contrastive loss [22, 23, 40, 53]. Different from both reasons, we explain the transferability gap by considering the architectural difference between the supervised and the unsupervised learning frameworks. From this perspective, we analyze the role of the MLP projector in both supervised and unsupervised learning methods, and are the first to identify its key importance to model transferability to the best of our knowledge. + +# 3. Transferability Analysis of the Unsupervised and Supervised Pretraining Methods + +# 3.1. The Concept Generalization Task + +We use the concept generalization task [37] to analyze the transferability gap between the unsupervised and supervised pretraining methods. + +Data preparation. Sariyildiz et al. [37] evaluated the transferability of methods when the pretraining and evaluation dataset have semantic distance. Their experimental results show that larger semantic distance will lead to more accuracy differences among different pretraining methods. Therefore, we enlarge the semantic gap between the pretraining and the evaluation dataset to help us compare different pretraining methods. Sariyildiz et al. [37] use the hierarchy in WordNet [29] and divide ImageNet-21K [13] into six class-exclusive datasets with different semantic distance + +![](images/f3cb62352ca205d0b839843e8a7948b3a6e763a98171d40eb29b95f7b0e28275.jpg) +Figure 1. Schematic illustration of stage-wise evaluation. We flatten intermediate feature maps from different stages and then use them to train stage-wise classifiers. Top-1 accuracy is reported by evaluating images in eval-D with the stage-wise classifiers. + +- one for pretraining, and others for evaluation. Without loss of generality, we construct a smaller pretraining dataset (pre-D) and evaluation dataset (eval-D) based on ImageNet1K [36] to reduce the experimental burden. Pre-D contains 652 classes mostly of organisms, and eval-D contains the other 348 classes of instrumentality. + +Transferability evaluation. Following [37], to assess the transferability, we freeze all parameters in the pretrained backbone ${}^{2}$ ,and finetune the classifier with the ImageNet- 1K training samples in eval-D for reporting top-1 accuracy on ImageNet-1K validation samples in eval-D. + +# 3.2. Stage-wise Evaluation on Existing Methods + +Motivated by works [22, 50, 53] we make a thorough stage-wise investigation of the conventional supervised pretraining method (SL) and the existing representative unsupervised pretraining methods (Mocov1 [18], Mocov2 [8], Byol [17]) by evaluating the transferability of intermediate feature maps (Fig. 1). After pretraining the model on pre-D, we freeze all model parameters and use the extracted intermediate feature maps of images in eval-D to finetune a stage-wise classifier for a stage-wise linear evaluation. + +The evaluation results of these existing methods are depicted in Fig. 2 (underlined on the legend). Our stage-wise evaluation shows two new findings that have not been reported by existing works. First, on stage-wise evaluation from stage 1 to stage 4, SL is consistently higher than Byol, Mocov1, and Mocov2, which suggests that the semantic information in annotations can benefit the transferability of low/middle-level feature maps. Second, on stage-wise evaluation from stage 4 to stage 5, the performance of Byol and Mocov2 still increase while SL and Mocov1 have a transferability drop. By carefully inspecting these methods, we notice an architectural difference between SL, Mocov1, Mocov2, and Byol after stage 5: An MLP projector is in- + +![](images/a811f4dc15d1d1cac11a471de2abadaf8216290bbd1bdf1b48e5a4eb324a9f6c.jpg) +Figure 2. Top-1 accuracy of stage-wise evaluation. All methods use ResNet50 as their backbones and are trained by 300 epochs with the setting in original papers. The results of linear evaluation of layer4-pooled-features (see Fig. 1) are reported in the legend. + +serted after stage 5 in Byol and Mocov2, which does not exist in SL and Mocov1. Such difference, together with the experimental results in Fig. 2, leads to a new hypothesis that the MLP projector might be the core factor of the desirable transferability of unsupervised pretraining. + +# 3.3. MLP Improves the Transferability of Unsupervised Pretraining Methods + +To confirm our hypothesis of the effectiveness on unsupervised pretraining methods, we ablate the MLP projectors on existing unsupervised methods, using stage-wise evaluation. Specifically, we remove the MLP projector in Byol and Mocov2 as Byol w/o MLP and Mocov2 w/o MLP, and add an MLP projector in Mocov1 as Mocov1 w/ MLP. The stage-wise evaluation results of these ablations are summarized in Fig. 2. We use solid lines for methods that have an MLP projector and dash lines for those that do not. + +These ablation results offer us two observations. First, when evaluating the layer4-pooled-features (depicted in the legend), unsupervised learning methods with an MLP projector achieve better transferability than their variants without the MLP projector, e.g., Byol, Mocov1 w/ MLP, Mocov2 achieve higher accuracy than Byol w/o MLP, Mocov1, and Mocov2 w/o MLP by $+23.3\%$ , $+5.1\%$ and $+3.7\%$ , respectively. Second, on stage-wise evaluation from stage 4 to stage 5, the MLP projector can help unsupervised learning methods without the MLP projector to avoid the transferability drop. These consistent improvements by adding an MLP projector empirically show that the MLP projector is important for the transferability of unsupervised pretraining. While there might exist some other non-linear structures that can boost the transferability, we only explore from an MLP perspective in this paper because of its simplicity and demonstrated effectiveness. + +![](images/5316cdf3662e43153ab9499920599233607a989b40c22ae93ecb89f76ec2a037.jpg) +Figure 3. The difference between SL and SL-MLP. Our SL-MLP adds an MLP before the classifier compared to SL. Only the encoders in both methods are utilized for downstream tasks. + +![](images/a8cb2e34d41aff78826586be8422f55552468fb9371a597c47399a9228c97587.jpg) + +# 4. MLP Can Enhance Supervised Pretraining + +# 4.1. SL-MLP: Adding an MLP Projector to SL + +Motivated by the empirical results in Sec. 3, an interesting question is whether the MLP projector can also promote the transferability of supervised pretraining? We attempt to insert an MLP projector before the classifier on SL for better transferability. We denote this supervised pretraining method as SL-MLP (see Fig. 3 for their comparison). Specifically, SL-MLP includes a feature extractor $f(\cdot)$ , an MLP projector $g(\cdot)$ , and a classifier $\mathbf{W}$ . Given an input image $\mathbf{x}$ , the feature extractor outputs a feature $\mathbf{f} = f(\mathbf{x})$ . For example, $f(\mathbf{x})$ transforms an image $\mathbf{x}$ to a 2048 dimensional feature $\mathbf{f}$ when using the ResNet-50 backbone. The MLP projector maps $\mathbf{f}$ into a projection vector $\mathbf{g} = g(\mathbf{f})$ . Following Byol, the MLP projector consists of two fully connected layers, a batch normalization layer, and a ReLU layer, which can be mathematically formulated as $g(\mathbf{f}) = fc_{2}(ReLU(BN(fc_{1}(\mathbf{f})))\in \mathbb{R}^{D_{g}}$ , where $fc_{1}$ and $fc_{2}$ are fully connected layers, the hidden feature dimension in the MLP projector is set to 4096, and $D_{g}$ is set to 256. Given the label denoted by $y$ for image $\mathbf{x}$ , the objective function for SL-MLP can be formulated as + +$$ +\mathcal {L} (\mathbf {x}) = \operatorname {C E} \left(\mathbf {W} \cdot g (f (\mathbf {x})), y\right), \tag {1} +$$ + +where $\mathrm{CE}(\cdot)$ is the cross-entropy loss. Same as SL, only the learned feature extractor $f(\cdot)$ is utilized in downstream transfer tasks after supervised pretraining. + +# 4.2. Empirical Findings of MLP in SL-MLP + +MLP projector avoids transferability drop at stage 5 in supervised pretraining. We conduct stage-wise evaluation as Sec. 3.2 again to see whether the transferability drop from stage 4 to stage 5 exists in SL-MLP. In Fig. 6(a), the transferability of SL-MLP continuously increases from stage 1 to 5, avoiding a decrease at stage 5 as SL. Besides, we observe that the transferability of SL-MLP is higher than that of Byol from stage 1 to 4, indicating that annotations benefit the transferability of intermediate feature maps. + +MLP projector enlarges the intra-class variation of features. According to [22, 53], features with large intra-class variation can preserve more instance discriminative information, which is beneficial for transfer learning. We reveal + +![](images/8aa03bb729e3c8063a71031ac58850d496f6295da629fb4aee9a4178481db558.jpg) +(i) SL + +![](images/9040b6a88926816e953b376b32e669cf0b97579403147c20a746f7f2d7af8842.jpg) +(iii) SupCon w/o MLP + +![](images/fc4121af51463738e2750944c03f7c5038228a5a127e09d7337cdf38e0a31663.jpg) +(v) Byol w/o MLP + +![](images/6ca4cbd30495d11f0de7cb0355d404fcd7e984c19c9e51dc0d0da358a3a7aaac.jpg) +(ii) SL-MLP + +![](images/7ff2d633be1e80cc57dde1bdab68af3c8ae750828205c1d22cfc44556d207677.jpg) +(iv) SupCon + +![](images/00b06132f603875002c5d9b16dfcfdfb9f4317d36e339f2f74b93eefe53c6af8.jpg) +(vi) Byol +Figure 4. Visualization of different methods with 10 randomly selected classes on pre-D. Different colors denote different classes. Features extracted by pretrained models without an MLP projector (top row) have less intra-class variation than those extracted by pretrained models with an MLP projector (bottom row). + +![](images/997f3f4ff14022a2f445ef9af65973dd374ba9ea49d7b003ef4656a01c642605.jpg) +(i) SL + +![](images/24593a43168ba872cd4d323425cef0c60822e19f538f2928f2d68a64e352c998.jpg) +(ii) SL-MLP + +![](images/2846e74625dc3bf4d38e251fe01ef83ebec29f2225a0eb92c43ddca36f05895f.jpg) +(iii) Byol +Figure 5. Visualization of Feature Mixtuneness between pre-D and eval-D. Cold colors denote features from 5 classes that are randomly selected from pre-D, and warm colors denote features from 5 classes that are randomly selected from eval-D. + +that adding an MLP projector also can enlarge the intra-class variation. We compare two supervised pretraining methods, i.e., SL, SupCon [23], and one unsupervised pretraining method, i.e., Byol, with their variants with/without MLP. Qualitatively, we visualize their features learned on pre-D by t-SNE in Fig. 4. The intra-class variation of features from SL-MLP, SupCon, and Byol are larger than that from SL, SupCon w/o MLP, and Byol w/o MLP, respectively. Quantitatively, following LDA [1], we utilize a discriminative ratio $\phi(I^{pre})$ to measure intra-class variation on pre-D, where $I^{pre}$ denotes pre-D (mathematically defined in Sec. 4.3). Smaller discriminative ratio $\phi$ usually means larger intra-class variation $^{4}$ . Comparing Fig. 6(c) with Fig. 6(b), we can see Byol and SL-MLP have smaller $\phi(I^{pre})$ but higher accuracy on eval-D than SL, which shows larger intra-class variation can benefit transferability. Furthermore, when inspecting SL only, we can see a process where the accuracy on eval-D first rises and then descends (after 210 epochs) along with $\phi(I^{pre})$ increasing. This phenomenon can be theoretically explained in Sec. 4.3. We additionally provide the visualization of intra-class variation on different pretraining epochs in Supplementary B.1. MLP projector reduces feature distribution distance be + +![](images/3c267f0df44d7bddc0194fdf7d5d4d3fcea09ae4ccc48843fd09c1c19f448349.jpg) +(a) + +![](images/cdf0f817254a5532000e3d0a25ac0ff2c97fe0b5e45e713cef4a323d5554e94d.jpg) +(b) + +![](images/c03ae9a9dcf009d29823a52f1e06428268eb47644e48377d2f4ed097b1358772.jpg) +(c) + +![](images/b657a8e3547de5b8d2e3ed5db70b97e05e654a6bc9be5d39400658ca230cc522.jpg) +Figure 6. (a) Stage-wise evaluation on eval-D. (b) Linear evaluation accuracy on eval-D. (c) Discriminative ratio of features on pre-D. Following [17, 19], we pretrain SL, SL-MLP, and Byol for 300 epochs. +(a) +Figure 7. (a) Feature Mixtuneness between pre-D and eval-D. (b) Redundancy $\mathcal{R}$ of pretrained features during different epochs. Following [17, 19], we pretrain SL, SL-MLP, and Byol for 300 epochs. + +![](images/b3d0c78b221e76c1b6a2e200ebe540371fb2abd945d351c3420c3f8bce8786f3.jpg) +(b) + +
MethodEPTop-1(↑)R(↓)
SL10055.90.078
SL-MLP10063.10.035
SL30054.40.087
SL-MLP30064.10.034
Byol w/o MLP30039.00.247
Byol30062.30.037
Mocov130054.10.069
Mocov1 w/ MLP30059.20.058
+ +Table 1. Redundancy $\mathcal{R}$ of pretrained features. Methods with an MLP obtain lower channel redundancy and transfer better. + +tween pre-D and eval-D. According to [2, 27], decreasing the feature distribution distance between pre-D and eval-D in the representation space can benefit transfer learning. Intuitively, the distribution distance between two sets of features is small when features are well mixed (visualization provided in Supplementary A). Therefore, we compare the mixtuneness of features in pre-D and eval-D to indicate the feature distribution distance between SL and SL-MLP. Graphically, we visualize features from pre-D and eval-D by t-SNE in Fig. 5. We observe that features from pre-D and eval-D are more mixed comparing SL and SL-MLP, indicating that MLP projector can mitigate the distribution distance between pre-D and eval-D. Quantitatively, we define Feature Mixtuneness II in the feature space as + +$$ +\Pi = 1 - \frac {1}{C} \sum_ {i = 1} ^ {C} \left| \frac {\operatorname {t o p} _ {k} ^ {e v a l} (i)}{k} - \frac {C ^ {e v a l}}{C} \right|, \tag {2} +$$ + +where $C = 1000$ is total number of classes in ImageNet-1K, $C^{eval}$ represents the number of classes in eval-D, and $top_{k}^{eval}(i)$ represents the number of classes in eval-D found by top $k$ neighbors search of any class $i \in C$ . Since the percentage of finding a sample from eval-D in $k$ nearest neighbors is $C^{eval} / C$ when pre-D and eval-D are uniformly mixed, Feature MixTUREness measures the similarity of the current and the uniformly mixed distribution between pre-D and eval-D in the feature space. We examine Feature MixTUREness of SL, SL-MLP, and Byol during different pretrain + +ing epochs in Fig. 7(a). Feature MixTURENess of SL gradually decreases, which indicates that SL will enlarge the distribution difference between pre-D and eval-D. In contrast, SL-MLP and Byol show consistently high Feature MixTUREness, indicating that the MLP projector can reduce the distribution distance between pre-D and eval-D. We visualize the evolution of Feature MixTUREness in Supplementary B.2. MLP projector reduces feature redundancy. Inspired by [52], high channel redundancy limits the capability of feature expression in deep learning. Mathematically, we compute Pearson correlation coefficient among feature channels to evaluate feature redundancy $\mathcal{R}$ , i.e, + +$$ +\mathcal {R} = \frac {1}{d ^ {2}} \sum_ {i = 1} ^ {d} \sum_ {j = 1} ^ {d} | \rho (i, j) |, \quad \rho (i, j) = \frac {\sum_ {n = 1} ^ {N} \mathbf {f} _ {n , i} \cdot \mathbf {f} _ {n , j}}{\sqrt {\sum_ {n = 1} ^ {N} | | \mathbf {f} _ {n , i} | | ^ {2}} \sqrt {\sum_ {n = 1} ^ {N} | | \mathbf {f} _ {n , j} | | ^ {2}}} +$$ + +where $d = 2048$ is the feature dimension, $\rho(i,j)$ is Pearson correlation coefficient of feature channel $i$ and $j$ . As shown in Fig. 7(b), SL-MLP has lower feature redundancy than SL, which indicates that the MLP projector can reduce feature redundancy. In Tab. 1, we further confirm that the MLP projector can reduce the feature redundancy and thus increase the accuracy on eval-D by ablating the MLP projector on various pretraining methods. + +# 4.3. Theoretical Analysis for Empirical Findings + +In this section, we provide a theoretical analysis to reveal that: 1) maximizing the discriminative ratio $\phi(I^{pre})$ of + +![](images/3032868e0e96e9f033f07fe30d8686d001b8be7fc876aa04cbf8698ec6ee7a6a.jpg) +Figure 9. Insights for transferability. $\phi(I^{pre})$ and $\phi(I^{eval})$ are the discriminative ratios (Eq. 4) on the pretraining and evaluation datasets. Higher $\phi(I^{eval})$ indicates better model transferability. Green and Blue line show the performance curve on the evaluation dataset with small and large semantic gap, respectively. + +a model on the pretraining dataset above a certain threshold will lead to a transferability decrease (shown by blue/green lines in Fig. 9); 2) the threshold is smaller when the semantic gap between the pretraining and evaluaion dataset is larger ( $t_{l} < t_{s}$ in Fig. 9). + +Mathematically, the discriminative ratio $\phi(I)$ on the dataset $I$ can be defined by LDA [1] as + +$$ +\phi (I) = D _ {i n t e r} (I) / D _ {i n t r a} (I), \tag {4} +$$ + +where $D_{inter}(I) = \frac{1}{C(C - 1)}\sum_{j = 1}^{C}\sum_{k = 1,k\neq j}^{C}||\mu (I_j) - \mu (I_k)||^2$ is the inter-class distance, $D_{intra}(I) = \frac{1}{C}\sum_{j = 1}^{C}(\frac{1}{|I_j|}\sum_{(x_i,y_i)\in I_j}||\mathbf{f}_i - \mu (I_j)||^2)$ is the intra-class distance, and $C$ is the number of classes. $\mu (I_j) = \frac{1}{I_j}\sum_{(x_i,y_i)\in I_j}\mathbf{f}_i$ is the center of features in class $I_{j}$ , and $\mathbf{f}$ is the feature in Sec. 4.1. Higher discriminative ratio $\phi$ indicates higher classification accuracy. Inspired by [26], we analyze the relation between $\phi (I^{pre})$ and $\phi (I^{eval})$ in Theorem 1 (Supplementary C). + +Theorem 1 Given $\phi_1(I^{pre}) < \phi_2(I^{pre}), \phi_1(I^{eval}) > \phi_2(I^{eval})$ when $\phi_1(I^{pre}) > t$ , where $t$ is a threshold that is negatively related to the feature distribution distance. + +Insights for the intra-class variation. Theorem 1 reveals that continuously minimizing the intra-class variation (maximizing the discriminative ratio) on the pretraining dataset will decrease the transferability of the model when the discriminative ratio $\phi(I^{pre})$ is larger than $t$ . It explains the observation in Fig. 6(b) and Fig. 6(c) that training with more than 210 epochs leads to better performance on pre-D, but a worse transferability on eval-D. This insight suggests that we should not make the intra-class variation on the pretraining dataset too small when designing the objective function or network architecture (e.g., adding an MLP projector). + +Insights for the relation between the feature distribution distance and threshold $t$ . When the feature distribution distance between the pretraining and evaluation dataset is large, the threshold $t$ is small, in which case it is easier to have the undesirable effect of increasing the discriminative + +ratio $\phi(I^{pre})$ on pre-D leading to decreasing the discriminative ratio $\phi(I^{eval})$ on eval-D (and thus the accuracy on the evaluation data). This insight suggests that we should maintain more intra-class variation on the pretraining dataset when transferring the model to a target dataset which has a larger semantic distance from the pretraining dataset. + +# 5. Experiment + +# 5.1. Experimental Setup + +Datasets. For backbone analysis, we keep using the concept generalization setting described in Sec. 3.1. For generalization to other classification tasks, we follow the setup in [22], which pretrains the models on the whole ImageNet-1K dataset and then evaluates the transferability on 12 classification datasets [10-12, 21, 24, 31-34, 41, 42, 44] from different domains. Furthermore, the COCO [25] dataset is used to evaluate the performance of SL-MLP pretrained by ImageNet-1K [36] on object detection task. + +Details. For SL and SL-MLP pretraining, the cross-entropy is deployed as the loss function. The MLP projector deployed in SL-MLP is described in Sec. 4.1. Following [20], we use the SGD optimizer with a cosine decay learning rate of 0.4 to optimize SL and SL-MLP, and set the batch size to 1024. Byol is used as a representative method for comparisons in backbone analysis and object detection. Following [17], we use LARS optimizer [51] with a cosine decay learning rate schedule and a warm-up of 10 epochs to pretrain the network. The initial learning rate is set to 4.8. We set the batch size to 4096 and the initial exponential moving average parameter $\tau$ to 0.99. Except for the backbone analysis, we use ResNet50 as the default backbone. More detailed pretraining setups of different backbones and different methods are provided in Supplementary H.1. + +# 5.2. Experimental Results + +Generalize to unseen concepts with diverse backbones. We verify the effectiveness of the added MLP projector on SL using concept generalization task with different backbones. Following evaluation method mentioned in Sec. 3.1, we train a linear classifier with the frozen backbone for 100 epochs, and report the top-1 accuracy on eval-D in Tab. 2. Firstly, SL-MLP obtains better performance than SL among different backbones. Specifically, with ResNet50, SL-MLP improves SL to $63.1(+7.2\%)$ when we pretrain the model by only 100 epochs, which bridges the performance gap between SL and Byol. In 300 epochs setting, SL has a transferability drop compared to 100 epochs setting $(55.9\% \rightarrow 54.4\%)$ , but the transferability of SL-MLP continue to increase $(63.1\% \rightarrow 64.1\%)$ . Secondly, SL-MLP $(64.1\%)$ performs better than Byol $(62.3\%)$ when both are trained by 300 epochs. Experimental results in Tab. 2 also confirm that SL-MLP can consistently improve the trans + +Table 2. Concept generalization task. We report Top-1 accuracy on eval-D of SL-MLP, Byol, and SL on various backbones. SL-MLP and Byol share the same MLP projector. + +
MethodArchitectureLabelsMLPEpochsTop-1(↑)
SLResNet50✓10055.9
SL-MLPResNet50✓✓10063.1
ByolResNet50✓30062.3
SLResNet50✓30054.4
SL-MLPResNet50✓✓30064.1
SLResNet34✓10050.1
SL-MLPResNet34✓✓10055.0
ByolResNet34✓30054.8
SLResNet34✓30050.2
SL-MLPResNet34✓✓30055.8
SLResNet101✓10056.0
SL-MLPResNet101✓✓10063.6
SLResNet101✓30053.9
SL-MLPResNet101✓✓30064.7
SLSwin-tiny✓10058.9
SL-MLPSwin-tiny✓✓10060.6
SLEfficientNetb2✓10057.6
SL-MLPEfficientNetb2✓✓10064.2
+ +Table 3. Object detection results. All methods are pretrained on ImagNet-1K, then finetuned on COCO using Mask-RCNN (R50-FPN) based on Detectron2 [46]. Sup. and Unsup. are short for supervised learning and unsupervised learning, respectively. Results of methods† are from [48]. + +
MethodSup.Unsup.EpochAPAP50AP75
SL✓10038.959.642.7
SL-MLP✓10039.760.443.1
InsDis† [47]✓20037.457.640.6
PIRL† [30]✓20037.557.641.0
SwAV† [3]✓20038.560.441.4
Mocov2† [8]✓20038.959.442.4
Byol [17]✓30039.460.443.2
SL✓30040.161.143.8
SL-MLP✓30040.761.844.2
+ +ferability of SL on various backbones, e.g. ResNet101 [20], Swin-tiny [28], and EfficientNetb2 [38]. Swin-tiny achieves relatively smaller gain $(+1.7\%)$ due to its good Feature MixTURENess (0.86), which is close to SL-MLP in Fig. 7(a). + +Generalize to other classification tasks. To evaluate if the added MLP can help SL to transfer better on cross-domain tasks, following [22], we pretrain the model on ImageNet-1K, and evaluate the transferability on 12 classification datasets from different domains. As illustrated in Tab. 4, supervised pretraining methods with the MLP projector, i.e., SL-MLP and SupCon [23], outperform their no MLP counterparts, i.e., SL and SupCon w/o MLP on linear evaluation, by $5.79\%$ , $13.71\%$ on the averaged Top-1 accuracy, respectively. Consistent results can be observed on finetuning and few-shot learning settings. More results are + +provided in Supplementary I. Besides, by comparing SupCon, SL-MLP and SupCon w/o MLP, SL, we conclude that the MLP projector instead of the contrastive loss plays the key role in increasing transferability. Our conclusion contrasts with previous works [22, 53] because they ignore the MLP projector before the contrastive loss. + +Generalize to object detection. We assess the transferability improvement by the MLP projector on COCO object detection task. We follow the settings in [18] to finetune the whole network with $1 \times$ schedule. In Tab. 3, we report results using Mask-RCNN (R50-FPN), as detailed in Supplementary H. When both are pretrained over 100 epochs, SL-MLP performs better than SL (without MLP) on object detection by +0.8 AP. If MLP is used by both supervised and unsupervised pretraining, SL-MLP pretrained by 100 epochs achieves better performance than unsupervised pretraining (e.g. SwAV and Mocov2) which are pretrained with 200 epochs. When both pretrained over 300 epochs, SL-MLP shows better performance than Byol with +1.3 AP. + +# 5.3. Ablation Study + +Effectiveness of different components in MLP. In this part, we investigate the influence of different components in the MLP projector. We set the hidden units and output dimension of MLP to be 2048 to retain the dimension of output features the same as SL. Variants are constructed by adding the components incrementally: (a) no MLP projector; (b) only Input FC; (c) Input FC+BN+output FC; (d) Input FC+ReLU+output FC; (e) BN+ReLU. All experiments are pretrained on pre-D over 100 epochs. As shown in Tab. 5, SL-MLP achieves the best accuracy among all variants. We analyze the influence of different components on discriminative ratio $\phi$ on pre-D, Feature MixTUREN II, feature redundancy $\mathcal{R}$ qualitatively and quantitatively in Supplementary D.3. Besides, we also observe an interesting phenomenon on Tab. 5(e) that only inserting a lightweight BN-ReLU also achieves good transfer performance. As this is not our main focus, we will investigate it in future works. + +Epochs and layers. Fig. 10(a) shows that adding one MLP projector achieves the optimal transferability. In addition, larger pretraining epochs benefit the transferability of SL-MLP when one MLP projector is added, but it has little influence when more MLP projectors are used. + +SL-MLP is less sensitive to batch size. Most unsupervised methods depend on big mini-batches to train a representation with strong transferability. To investigate the sensitivity of SL-MLP to batch size, we do experiments with batch size from 256 to 4096 for Byol and to 1024 for SL-MLP over 300 epochs. As shown in Fig. 10(b), the transferability of Byol drops when the batch size decreases. In contrast, the transferability of SL-MLP retains when batch size changes. + +SL-MLP is less sensitive to augmentation. Unsupervised methods benefit from a broader space of colors and more + +Table 4. Linear evaluation on fixed backbone, full network finetuning, and few-shot learning performance on 12 classification datasets in terms of top-1 accuracy. All models are pretrained for 300 epochs with the same code base except for SelfSupCon† (Mocov2) which pretrained for 400 epochs using the results illustrated in [22]. Average results style: best, second best. + +
MethodChestXCropDiseaseDeepWeedsDTDEuroSATFlowers102KaokoreOmniglotResisc45SketchSVHNISICAverage
linear evaluation
SL45.4596.8084.0266.2295.0783.6975.4064.1485.3667.8267.1379.5875.89
SL-MLP49.8999.0287.8672.6196.6393.4681.1276.7391.6674.5175.1681.5381.68
SupCon w/o MLP41.3891.5273.1662.9389.8473.2366.3844.5476.5555.2161.4568.5467.06
SupCon47.7198.7985.6674.2095.8392.2479.4273.4291.1476.8074.2679.7880.77
SelfSupCon†48.0899.0687.8872.7196.9789.6281.6769.6690.8869.1269.9581.5179.70
finetuned with 1000 training samples
SL40.8694.3186.9562.1294.0588.9478.2246.1680.3214.1782.1678.2870.54
SL-MLP42.3494.4889.6463.9095.3090.2077.9846.6683.1317.3280.1978.8271.66
SupCon w/o MLP41.7293.5284.9558.0995.1588.2378.9545.6880.6314.3982.2577.9670.12
SupCon41.8493.4688.7061.8194.5491.2878.3546.0281.6215.8481.8578.5171.15
SelfSupCon†43.0993.9588.1062.9595.4788.9279.4145.3381.1410.5782.3778.2770.88
5-ways 5-shots few-shot classification
SL25.6489.0754.3278.5882.9693.1446.1492.8284.1787.0638.0341.2267.76
SL-MLP26.8993.4559.0883.0487.1696.8850.7795.7389.0089.8441.9646.7671.71
SupCon w/o MLP23.6275.6449.3473.0473.9082.1638.1067.8775.1881.0134.9235.1659.16
SupCon26.1894.0959.3685.0287.9796.5551.0294.4989.0189.7541.6743.4871.55
Top-1 Accuracy vs Epochs & MLPs
Top-1Accuracy on evalD
Top-1 accuracy on evalD
Top-1 accuracy on evalD
Top-1 accuracy on evalD
Top-1 accuracy on evalD
Top-1 accuracy on evalD
Top-1 accuracy on evalD
Top-1 accuracy on evalD
Top-1 accuracy on evalD
Top-1 accuracy on evalD
Top-1 accuracy in evalD
Top-1 accuracy in evalD
Top-1 accuracy in evalD
Top-1 accuracy in evalD
Top-1 accuracy in evalD
Top-1 accuracy in evalD
Top-1 accuracy in evalD
Top-1 accuracy in evalD
Top-1 accuracy in evalD
Top-1 accuracy is evalD
+ +Figure 10. (Left to right) (a) Top-1 accuracy with different pretraining epochs and number of MLP projectors. (b) Top-1 accuracy with different batch sizes. (c) Top-1 accuracy with different pretraining augmentations. +Table 5. Empirical analysis of architectural design of the MLP projector. We pretrain models over 100 epochs and set the output dimension to 2048. Top-1 accuracy on eval-D is reported. + +
ExpComponents+ParamsTop-1
Input FCBNReLUOutput FC
(a)/55.9
(b)✓4.196M56.6
(c)✓✓✓8.395M61.0
(d)✓✓✓8.391M60.1
(e)✓✓0.004M60.5
SL-MLP✓✓✓✓8.395M62.5
+ +intensive augmentations during pretraining, which always lead to undesirable degradation when some augmentations are missing. Supervised models trained only with horizontal flipping may perform well [53]. We set Byol's augmentations as a baseline setting for both SL-MLP and Byol. We then compare the robustness on augmentation between SL-MLP and Byol by removing augmentation step by step. Experiments of SL-MLP and Byol are all constructed on their default condition with only augmentations changed. The results are illustrated on Fig. 10(c). We find that SL-MLP inherits the robustness of SL and shows a little accuracy drop with simple augmentations. + +# 6. Limitations and Conclusions + +In this paper, we study the transferability gap between supervised and unsupervised pretraining. Based on empirical results, we identify that the MLP projector is a key factor for the good transferability of unsupervised pretraining methods. By adding an MLP projector into supervised pretraining methods, we close the gap between supervised and unsupervised pretraining and even make supervised pretraining better. Our finding is confirmed with extensive experiments on diverse backbone networks and various downstream tasks, including the concept generalization tasks, cross-domain image classifications, and objection detection. While the MLP is a simple design for better transferability, there might exist some straightforward designs on the objective function, which we leave for future work. + +# 7. Acknowledgment + +This work is supported by the Key R&D Project of Zhejiang Province (No.2022C01056), Natural Science Foundation of Zhejiang Province (No.LQ21F030017), the National Natural Science Foundation of China (No.62127803) and Hetao Shenzhen-Hong Kong Science and Technology Innovation Cooperation Zone (HZQB-KCZYZ-2021045). + +# References + +[1] Suresh Balakrishnama and Aravind Ganapathiraju. Linear discriminant analysis-a brief tutorial. Institute for Signal and information Processing, 18(1998):1-8, 1998. 4, 6 +[2] John Blitzer, Koby Crammer, Alex Kulesza, Fernando Pereira, and Jennifer Wortman. Learning bounds for domain adaptation. Advances in Neural Information Processing Systems, 20:129-136, 2007. 5 +[3] Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. arXiv preprint arXiv:2006.09882, 2020. 1, 2, 7 +[4] 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. 1 +[5] Kai Chen, Lanqing Hong, Hang Xu, Zhenguo Li, and Dit-Yan Yeung. Multisiam: Self-supervised multi-instance siamese representation learning for autonomous driving. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7546-7554, 2021. 1 +[6] 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, 2 +[7] Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey Hinton. Big self-supervised models are strong semi-supervised learners. arXiv preprint arXiv:2006.10029, 2020. 1 +[8] Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020. 1, 2, 3, 7 +[9] Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 15750-15758, 2021. 1, 2 +[10] Gong Cheng, Junwei Han, and Xiaogjiang Lu. Remote sensing image scene classification: Benchmark and state of the art. Proceedings of the IEEE, 105(10):1865-1883, 2017. 6 +[11] Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3606-3613, 2014. 6 +[12] Noel Codella, Veronica Rotemberg, Philipp Tschandl, M Emre Celebi, Stephen Dusza, David Gutman, Brian Helba, Aadi Kalloo, Konstantinos Liopyris, Michael Marchetti, et al. Skin lesion analysis toward melanoma detection 2018: A challenge hosted by the international skin imaging collaboration (isic). arXiv preprint arXiv:1902.03368, 2019. 6 +[13] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248-255. IEEE, 2009. 2 +[14] 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 +[15] 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. arXiv preprint arXiv:2104.14548, 2021. 1, 2 +[16] Linus Ericsson, Henry Gouk, and Timothy M Hospedales. How well do self-supervised models transfer? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5414-5423, 2021. 1, 2 +[17] 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. arXiv preprint arXiv:2006.07733, 2020. 1, 2, 3, 5, 6, 7 +[18] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9729-9738, 2020. 1, 3, 7 +[19] Kaiming He, Ross Girshick, and Piotr Dollar. Rethinking imagelet pre-training. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4918-4927, 2019. 5 +[20] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 1, 6, 7 +[21] Patrick Helber, Benjamin Bischke, Andreas Dengel, and Damian Borth. Eurosat: A novel dataset and deep learning benchmark for land use and land cover classification. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 12(7):2217-2226, 2019. 6 +[22] Ashraful Islam, Chun-Fu Chen, Rameswar Panda, Leonid Karlinsky, Richard Radke, and Rogerio Feris. A broad study on the transferability of visual representations with contrastive learning. arXiv preprint arXiv:2103.13517, 2021. 1, 2, 3, 4, 6, 7, 8 +[23] Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. arXiv preprint arXiv:2004.11362, 2020. 1, 2, 4, 7 +[24] Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332-1338, 2015. 6 +[25] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dálár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014. 2, 6 +[26] Bin Liu, Yue Cao, Yutong Lin, Qi Li, Zheng Zhang, Mingsheng Long, and Han Hu. Negative margin matters: Understanding margin in few-shot classification. In European + +Conference on Computer Vision, pages 438-455. Springer, 2020. 1, 6 +[27] Hong Liu, Mingsheng Long, Jianmin Wang, and Michael I Jordan. Towards understanding the transferability of deep representations. arXiv preprint arXiv:1909.12031, 2019. 5 +[28] 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, pages 10012-10022, 2021. 7 +[29] George A Miller. WordNet: An electronic lexical database. MIT press, 1998. 2 +[30] Ishan Misra and Laurens van der Maaten. Self-supervised learning of pretext-invariant representations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6707-6717, 2020. 7 +[31] Sharada P Mohanty, David P Hughes, and Marcel Salathé. Using deep learning for image-based plant disease detection. Frontiers in plant science, 7:1419, 2016. 6 +[32] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. NIPS Workshop on Deep Learning and Unsupervised Feature Learning 2011, pages 722-729, 2011. 6 +[33] Maria-Elena Nilsback and Andrew Zisserman. Automated flower classification over a large number of classes. In 2008 Sixth Indian Conference on Computer Vision, Graphics & Image Processing, pages 722-729. IEEE, 2008. 6 +[34] Alex Olsen, Dmitry A Konovalov, Bronson Philippa, Peter Ridd, Jake C Wood, Jamie Johns, Wesley Banks, Benjamin Girgenti, Owen Kenny, James Whinney, et al. Deepweeds: A multiclass weed species image dataset for deep learning. Scientific reports, 9(1):1-12, 2019. 6 +[35] Maithra Raghu, Chiyuan Zhang, Jon Kleinberg, and Samy Bengio. Transfusion: Understanding transfer learning for medical imaging. Advances in Neural Information Processing Systems, 32:3347-3357, 2019. 1 +[36] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision, 115(3):211-252, 2015. 3, 6 +[37] Mert Bulent Sariyildiz, Yannis Kalantidis, Diane Larlus, and Karteek Alahari. Concept generalization in visual representation learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9629-9639, 2021. 1, 2, 3 +[38] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning, pages 6105-6114. PMLR, 2019. 7 +[39] Shixiang Tang, Dapeng Chen, Lei Bai, Kaijian Liu, Yixiao Ge, and Wanli Ouyang. Mutual crf-gnn for few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2329-2339, 2021. 1 +[40] Shixiang Tang, Peng Su, Dapeng Chen, and Wanli Ouyang. Gradient regularized contrastive learning for continual do + +main adaptation. In Proc. 35th AAAI Conf. Artif. Intell., (AAA1), pages 2-13, 2021. 2 +[41] Yingtao Tian, Chikahiko Suzuki, Tarin Clanuwat, Mikel Bober-Irizar, Alex Lamb, and Asanobu Kitamoto. Kaokore: A pre-modern japanese art facial expression dataset. arXiv preprint arXiv:2002.08595, 2020. 6 +[42] Haohan Wang, Songwei Ge, Zachary Lipton, and Eric P Xing. Learning robust global representations by penalizing local predictive power. Advances in Neural Information Processing Systems, 32:10506-10518, 2019. 6 +[43] Hongyu Wang, Henry Gouk, Eibe Frank, Bernhard Pfahringer, and Michael Mayo. A comparison of machine learning methods for cross-domain few-shot learning. In Australasian Joint Conference on Artificial Intelligence, pages 445-457. Springer, 2020. 1 +[44] Xiaosong Wang, Yifan Peng, Le Lu, Zhiyong Lu, Mohammadhadi Bagheri, and Ronald M Summers. Chestxray8: Hospital-scale chest x-ray database and benchmarks on weakly-supervised classification and localization of common thorax diseases. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2097-2106, 2017. 6 +[45] Longhui Wei, Lingxi Xie, Jianzhong He, Jianlong Chang, Xiaopeng Zhang, Wengang Zhou, Houqiang Li, and Qi Tian. Can semantic labels assist self-supervised visual representation learning? arXiv preprint arXiv:2011.08621, 2020. 1, 2 +[46] Yuxin Wu, Alexander Kirillov, Francisco Massa, Wan-Yen Lo, and Ross Girshick. Detector2. https://github.com/facebookresearch/detectron2, 2019.7 +[47] Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3733-3742, 2018. 7 +[48] Enze Xie, Jian Ding, Wenhai Wang, Xiaohang Zhan, Hang Xu, Zhenguo Li, and Ping Luo. Detco: Unsupervised contrastive learning for object detection. arXiv preprint arXiv:2102.04803, 2021. 2, 7 +[49] Zhenda Xie, Yutong Lin, Zheng Zhang, Yue Cao, Stephen Lin, and Han Hu. Propagate yourself: Exploring pixel-level consistency for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 16684-16693, 2021. 1, 2 +[50] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? Advances in Neural Information Processing Systems, 27:3320-3328, 2014. 3 +[51] Yang You, Igor Gitman, and Boris Ginsburg. Scaling sgd batch size to 32k for imagenet training. arXiv preprint arXiv:1708.03888, 6:12, 2017. 6 +[52] Jure Zbontar, Li Jing, Ishan Misra, Yann LeCun, and Stéphane Deny. Barlow twins: Self-supervised learning via redundancy reduction. arXiv preprint arXiv:2103.03230, 2021. 1, 5 +[53] Nanxuan Zhao, Zhirong Wu, Rynson WH Lau, and Stephen Lin. What makes instance discrimination good for transfer \ No newline at end of file diff --git a/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/images.zip b/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..72a060cd0211c2c80052c800993ad0635637349a --- /dev/null +++ b/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05425123d674248cac4ad92a7899c9759ebf8e7f5a645298e73351d5a88b39a0 +size 498894 diff --git a/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/layout.json b/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e44ec6503ff59c27ad453cea8af09419d2168351 --- /dev/null +++ b/revisitingthetransferabilityofsupervisedpretraininganmlpperspective/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36b662a7237fc773aa2d1b117bc21370e191891a3e1a0a74f7957eec64e18939 +size 423676 diff --git a/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/a4a09c91-9f40-4647-900c-db47651fff1b_content_list.json b/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/a4a09c91-9f40-4647-900c-db47651fff1b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d96fc738bd2e8dc1700b8f0fc04b1b6594b0f5ba --- /dev/null +++ b/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/a4a09c91-9f40-4647-900c-db47651fff1b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a472b0f73268e00a8c381271464d798f3632118b58e0cfd5e4e7d376713771a +size 84726 diff --git a/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/a4a09c91-9f40-4647-900c-db47651fff1b_model.json b/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/a4a09c91-9f40-4647-900c-db47651fff1b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6cba078f1b755019cef0605575f5f9c00c5c05b7 --- /dev/null +++ b/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/a4a09c91-9f40-4647-900c-db47651fff1b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cf079a2c45c72be5bdf30f3d4fff0181e540542905a472c78816707c4e26a4b +size 103154 diff --git a/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/a4a09c91-9f40-4647-900c-db47651fff1b_origin.pdf b/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/a4a09c91-9f40-4647-900c-db47651fff1b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c10ff3f2d477ed1144b2a3017854b2fa87fa4772 --- /dev/null +++ b/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/a4a09c91-9f40-4647-900c-db47651fff1b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3326de57cad32aafec54fea34fc0f7ef4834569d4035988a651a5328f174a7ce +size 1571287 diff --git a/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/full.md b/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ebed930950efca9fdd50921038235ab46b4bc278 --- /dev/null +++ b/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/full.md @@ -0,0 +1,382 @@ +# RigidFlow: Self-Supervised Scene Flow Learning on Point Clouds by Local Rigidity Prior + +Ruibo Li $^{1,2}$ , Chi Zhang $^{2}$ , Guosheng Lin $^{1,2*}$ , Zhe Wang $^{3}$ , Chunhua Shen $^{4}$ $^{1}$ S-Lab for Advanced Intelligence, Nanyang Technological University + $^{2}$ School of Computer Science and Engineering, Nanyang Technological University + $^{3}$ SenseTime Research $^{4}$ Zhejiang University +E-mail: ruibo001@e.ntu.edu.sg, gslin@ntu.edu.sg + +# Abstract + +In this work, we focus on scene flow learning on point clouds in a self-supervised manner. A real-world scene can be well modeled as a collection of rigidly moving parts, therefore its scene flow can be represented as a combination of rigid motion of each part. Inspired by this observation, we propose to generate pseudo scene flow for self-supervised learning based on piecewise rigid motion estimation, in which the source point cloud is decomposed into a set of local regions and each region is treated as rigid. By rigidly aligning each region with its potential counterpart in the target point cloud, we obtain a region-specific rigid transformation to represent the flow, which together constitutes the pseudo scene flow labels of the entire scene to enable network training. Compared with most existing approaches relying on point-wise similarities for scene flow approximation, our method explicitly enforces region-wise rigid alignments, yielding locally rigid pseudo scene flow labels. We demonstrate the effectiveness of our self-supervised learning method on FlyingThings3D and KITTI datasets. Comprehensive experiments show that our method achieves new state-of-the-art performance in self-supervised scene flow learning, without any ground truth scene flow for supervision, even outperforming some supervised counterparts. + +# 1. Introduction + +Scene flow [35] is a 3D motion field to describe the motion of every point between two time steps. As an essential representation of dynamics, scene flow can be applied in numerous downstream applications, such as robotics and autonomous driving, for dynamic scene understanding. Due to the wide applications of 3D sensors, scene flow estimation with point clouds as input has attracted broad inter + +![](images/005e811b5eeab757e048273367cf7d04e25af2bf103bef29f5d00a4be9449e7e.jpg) + +![](images/57b53d7976cc0e1ae5dbfb594f774bd86cabad10b743b91de46abd4c45f78321.jpg) + +![](images/7c442d4af4f794710bd3c35517a012ae537093a0b95c7a8a4f8b21063538041a.jpg) +Figure 1. Comparison of the pseudo scene flow labels produced by nearest neighbor search and our proposed method. (a) Input point clouds from two consecutive frames; (b) Pseudo labels generated by the point matching with per-point nearness as a measure; (c) Pseudo labels generated by our proposed method. Green line represents the correct pseudo label with absolute error less than $0.1m$ or relative error less than $10\%$ . Red line represents the incorrect pseudo label. + +est. However, scene flow data is difficult to collect [25], which makes supervised learning approaches suffer from a shortage of real-world training samples. To overcome the reliance on scene flow data, scene flow learning in a self-supervised manner is proposed as a promising solution, which is the focus of our work here. + +To enable deep network training under the self-supervised setting, it is crucial to approximate the scene flow labels given unlabelled point cloud data. To do so, + +most previous approaches [1, 13, 16, 27, 29, 34, 42] perform point matching between two consecutive point clouds to establish point correspondences and treat the 3D coordinate difference between each matching pair as the pseudo scene flow label. However, the point matching strategies applied in these approaches mainly consider point-wise similarities, but often fail to capture potential structured motions of points, leading to inconsistent pseudo scene flow labels. Fig. 1 (b) shows an example of the estimated pseudo scene flow labels based on point matching with per-point nearness as a measure. + +For a real-world scene, most of the structures in this scene are rigid or almost so [23]. This allows us to decompose a non-rigid scene into a collection of rigidly moving parts, such that the entire scene flow can be approximated by estimating the rigid motion of individual parts. Based on this intuition, in this work, we propose to generate the pseudo scene flows from point clouds by piecewise rigid motion estimations. + +To achieve this goal, an over-segmentation approach is employed to decompose the source point cloud into supervoxels and these supervoxels are treated as rigid during the pseudo label generation. By solving an independent rigid registration for each supervoxel, we find a rigid transformation that rigidly aligns this supervoxel with its potential counterpart in the target point cloud. Based on the rigid transformation estimate, we produce the rigid flow of each supervoxel, thereby generating the entire scene flow approximation as pseudo labels for self-supervised learning. Different from most existing self-supervised approaches that neglect potential structured motions of points, our method explicitly enforces region-wise rigid alignments and generates locally rigid pseudo scene flow labels, where the pseudo labels of points in the same supervoxel obey the same rigid motion pattern. + +Main contributions of this paper are listed as follows: + +- We present a new self-supervised scene flow learning approach (RigidFlow) that solves the pseudo scene flow label generation as a piecewise rigid motion estimation task; +- By decomposing the source point cloud into a set of local regions, we propose a piecewise pseudo label generation module that explicitly enforces region-wise rigid alignments and produces rigid pseudo flow for each local region. +- Our proposed RigidFlow achieves state-of-the-art performance in self-supervised scene flow learning, without any ground truth scene flow for supervision, even outperforming some supervised counterparts. + +# 2. Related Work + +Scene flow estimation on images. Scene flow estimation [35] aims to predict a 3D field in a scene to represent the motion of each point. Nowadays, the local rigidity assumption has been widely used in numerous advanced approaches [2, 9-11, 14, 18, 21, 22, 25, 33, 36-38] to estimate scene flow from images. Especially, UnRigidFlow [18] and EffiScene [11] address unsupervised scene flow estimation from images by jointly learning rigidity masks to constrain scene flow predictions. Unlike these methods that use highly regular 2D images as input and employ photometric error as the major loss function, we focus on scene flow estimation from sparse 3D point clouds and explore the application of the local rigidity to pseudo scene flow label generation, so that self-supervised scene flow learning can be achieved by any supervised loss functions with our generated pseudo labels. + +Supervised scene flow estimation on point clouds. With the development of 3D sensors, estimating scene flow from point clouds has been drawing a lot of attention. Various approaches [3, 6-8, 15, 19, 20, 30, 41] have been proposed to estimate scene flow from point clouds by supervised learning. Particularly, the local rigidity has also been applied in some of them [3, 6, 15]. PointFlowNet [3] and Rigid3DSceneFlow [6] propose to directly estimate rigid motion for each 3D object. HCRF-Flow [15] employs the local rigidity to refine scene flow predictions. Different from these fully-supervised approaches learning to refine or constrain predicted flow by the local rigidity, without any ground truth data, we explore how to produce pseudo labels with the guidance of the local rigidity assumption to achieve self-supervised scene flow learning. + +Self-supervised scene flow estimation on point clouds. In self-supervised scene flow learning, without ground truth scene flow, most previous methods [1, 13, 16, 27, 29, 34, 42] propose to establish point correspondences between source and target point clouds by point matching, and treat the 3D coordinate difference between each matching pair as a pseudo scene flow label. Specifically, [1, 27, 34] adopt a nearest neighbor loss and [13, 29, 42] adopt a Chamfer loss for self-supervision. In the two loss functions, point correspondences are built by the nearest search. And, [16] builds point correspondences by solving an optimal transport. However, the two point matching strategies mainly consider point-wise similarities but fail to capture potential structured motions of points, leading to unsatisfactory scene flow approximation. Motivated by the local rigidity assumption, we propose to generate pseudo labels by a piecewise rigid motion estimation. By explicitly enforcing region-wise rigid alignments between the source and the target, our method generate locally rigid pseudo scene flow labels, where the pseudo labels of points in the same supervoxel obey the same rigid motion pattern. Although + +the local rigidity has been considered in some recent self-supervised works [1, 29], the clue of rigidity is limited to smooth or constrain the flow predictions as a regularization. Its ability to improve pseudo label generation is far from being explored. + +# 3. Preliminaries: Rigid registration and ICP + +As a crucial task in computer vision, point cloud registration has been well studied in the literature [4, 5, 31, 32, 39, 40]. Given two point clouds, $\mathbf{X} = \{\pmb{x}_i \in \mathbb{R}^3\}_{i=1}^{N_x}$ and $\mathbf{Y} = \{\pmb{y}_i \in \mathbb{R}^3\}_{i=1}^{N_y}$ , point cloud rigid registration aims to predict a rigid transformation that aligns $\mathbf{X}$ to $\mathbf{Y}$ . The rigid transformation can be written as $[\pmb{R}_{XY}, \pmb{t}_{XY}]$ , where the rotation matrix $\pmb{R}_{XY} \in \mathrm{SO}(3)$ and the translation vector $\pmb{t}_{XY} \in \mathbb{R}^3$ . The objective function of point cloud registration can be expressed as: + +$$ +E \left(\boldsymbol {R} _ {X Y}, \boldsymbol {t} _ {X Y}; \boldsymbol {X}, \boldsymbol {Y}\right) = \frac {1}{n} \sum_ {i = 1} ^ {n} \| \boldsymbol {R} _ {X Y} \boldsymbol {x} _ {i} + \boldsymbol {t} _ {X Y} - \boldsymbol {y} _ {m (i)} \| _ {2} ^ {2}, \tag {1} +$$ + +where $m$ is the point mapping from points in $X$ to their corresponding points in $Y$ . + +Since the point mapping $m$ is unknown, the iterative closest point (ICP) [4] is widely employed to address this problem by alternating between estimating the rigid transformation and finding the point mapping. In each iteration, based on the previous point mapping estimate, the current rigid transformation is updated by solving the least-square problem in Eq. (1). And then, based on the current rigid transformation estimate, the point mapping of each point is updated to its closest match in another point cloud: + +$$ +m (i) = \arg \min _ {j} \| \boldsymbol {R} _ {X Y} \boldsymbol {x} _ {i} + \boldsymbol {t} _ {X Y} - \boldsymbol {y} _ {j} \| _ {2} ^ {2}. \tag {2} +$$ + +Although the ICP is efficient, the performance depends heavily on the initialization of rigid transformation and point matching. + +# 4. Method + +Given a temporal sequence of point clouds, $\pmb{P} = \{\pmb{p}_i \in \mathbb{R}^3\}_{i=1}^N$ at frame $t$ and $\pmb{Q} = \{\pmb{q}_i \in \mathbb{R}^3\}_{i=1}^N$ at frame $t + 1$ , scene flow estimation aims to estimate the 3D motion field $\pmb{F} = \{\pmb{f}_i \in \mathbb{R}^3\}_{i=1}^N$ in a scene. In this paper, we target at self-supervised point cloud scene flow estimation, where no ground truth scene flow annotations $\pmb{D}$ are provided. To enable network training without ground truth labels, we focus on effective pseudo scene flow label generation, such that the scene flow learning can be achieved using the pseudo labels $\widehat{D}$ as supervision. + +In this section, we first introduce how to produce pseudo scene flow for a real-world scene by a piecewise rigid motion estimation. After that, we present the details of our algorithm and explain how to use the generated pseudo labels to achieve self-supervised training. Fig. 2 is the overview of our method. + +# 4.1. Generating Pseudo Labels by Piecewise Rigid Motion Estimation + +Scene flow is the 3D motion field of objects in a scene. If the scene contains only a rigidly moving object, the scene flow from $\pmb{P}_{\text{rigid}}$ to $\pmb{Q}_{\text{rigid}}$ follows the rigid transformation $[R_{PQ}, t_{PQ}]$ between the two point clouds: + +$$ +\boldsymbol {D} = \boldsymbol {R} _ {P Q} \boldsymbol {P} _ {\text {r i g i d}} + \boldsymbol {t} _ {P Q} - \boldsymbol {P} _ {\text {r i g i d}}. \tag {3} +$$ + +Thus, for a rigidly moving object, when the ground truth scene flow is unavailable, we can produce the scene flow by finding its optimal rigid transformation between $P_{rigid}$ and $Q_{rigid}$ . + +For a complex real-world scene, although it is not rigid, most of the structures in this scene are rigid or almost rigid, which makes it possible to approximate a non-rigid scene into a set of rigidly moving regions. Therefore, we can estimate the flow of each rigidly moving region by finding its optimal rigid motion, thereby generating the entire scene flow. In other words, we can generate pseudo scene flows by a piecewise rigid motion estimation. + +Decomposing the point cloud $\pmb{P}$ into $K$ rigid regions $\{P^{(1)}, P^{(2)}, \dots, P^{(K)}\}$ , the piecewise rigid motion estimation from $\pmb{P}$ to $\pmb{Q}$ for the region $P^{(k)}$ can be considered as an independent rigid body registration from $P^{(k)}$ to $Q$ : + +$$ +\left[ \boldsymbol {R} _ {k} ^ {*}, \boldsymbol {t} _ {k} ^ {*} \right] = \arg \min _ {\left[ \boldsymbol {R} _ {k}, \boldsymbol {t} _ {k} \right]} E \left(\boldsymbol {R} _ {k}, \boldsymbol {t} _ {k}; \boldsymbol {P} ^ {(k)}, \boldsymbol {Q}\right), \tag {4} +$$ + +$$ +E \left(\boldsymbol {R} _ {k}, \boldsymbol {t} _ {k}; \boldsymbol {P} ^ {(k)}, \boldsymbol {Q}\right) = \frac {1}{N _ {k}} \sum_ {i = 1} ^ {N _ {k}} \left\| \boldsymbol {R} _ {k} \boldsymbol {p} _ {i} ^ {(k)} + \boldsymbol {t} _ {k} - \boldsymbol {q} _ {m ^ {(k)} (i)} \right\| _ {2} ^ {2}, \tag {5} +$$ + +where $N_{k}$ is the point number in the rigid region $\pmb{P}^{(k)}$ , $m^{(k)}(i)$ is the point mapping from the $i$ -th point in $\pmb{P}^{(k)}$ to its correspondence in $\pmb{Q}$ , and $[\pmb{R}_k^*,\pmb{t}_k^*]$ is the optimal rigid transformation for $\pmb{P}^{(k)}$ . + +Following Eq. (3), with $\left[R_k^*, t_k^*\right]$ , the pseudo rigid scene flow estimate $\widehat{D}^{(k)}$ for this region can be computed by: + +$$ +\hat {\boldsymbol {D}} ^ {(k)} = \boldsymbol {R} _ {k} ^ {*} \boldsymbol {P} ^ {(k)} + \boldsymbol {t} _ {k} ^ {*} - \boldsymbol {P} ^ {(k)}. \tag {6} +$$ + +Combining the pseudo rigid scene flow estimates for all $K$ rigid regions $\{\widehat{D}^{(1)},\widehat{D}^{(2)},\dots,\widehat{D}^{(K)}\}$ , we obtain the final pseudo scene flow labels $\widehat{D}$ for self-supervised training. + +# 4.2. Piecewise pseudo label generation module + +In order to convert pseudo label generation into a piecewise rigid motion estimation, we first employ an oversegmentation method [17] to split the point cloud $P$ into supervoxels and treat these supervoxels as rigid moving regions. After obtaining the supervoxels, we employ a piecewise pseudo label generation module to generate scene flow labels for each supervoxel via finding its rigid transformation from $P^{(k)}$ to $Q$ . In this module, we follow the principle of ICP algorithm [4], i.e., alternately estimating point mapping and rigid transformation, such + +![](images/dbbcd52d15141e1a87d46f6d02a34a3f5f45ee3a8faddb2968393a751f0ac78d.jpg) +Figure 2. Overview of our pseudo scene flow label generation approach. In our approach, we employ an optimization-based oversegmentation method [17] to split the point cloud in the first frame into a set of supervoxels and estimate the rigid transformation of each supervoxel. Based on the rigid transformation estimate, we generate the pseudo labels for each supervoxel, thereby obtaining the pseudo labels for the entire scene. + +Algorithm 1 Pseudo scene flow label generation by piecewise rigid motion estimation + +Input: Source point cloud $P$ , Target point cloud $Q$ , Predicted scene flow from NNs being trained $F$ ; + +Output: Pseudo scene flow labels $\hat{D}$ + +# Procedure: + +1: Split $\pmb{P}$ into a set of supervoxels $\{\pmb{P}^{(1)},\dots,\pmb{P}^{(K)}\}$ ; + +$\triangleright$ Oversegmentation + +2: for $k = 1, \dots, K$ do + +3: $m^{(k)}(i)\gets \arg \min_{j}\| \pmb{p}_{i}^{(k)} + \pmb{f}_{i}^{(k)} - \pmb{q}_{j}\|_{2}^{2}$ + +- Initializing by predicted flow + +4: while not converged do + +5: Find the matches $\mathbf{Q}^{(k)}$ for $P^{(k)}$ based on $\mathbf{m}^{(k)}$ . + +6: $\pmb{H}^{(k)}\gets \sum_{i = 1}^{N_k}(\pmb {p}_i^{(k)} - \overline{\pmb{p}}^{(k)})(\pmb {q}_i^{(k)} - \overline{\pmb{q}}^{(k)})^\top$ + +7: $\pmb{R}_k\gets \pmb{V}^{(k)}\pmb{U}^{(k)^{\top}},\pmb{t}_k\gets -\pmb{R}_k\overline{\pmb{p}}^{(k)} + \overline{\pmb{q}}^{(k)}$ + +$\triangleright$ Updating rigid transformation + +8: $m^{(k)}(i)\gets \arg \min_{j}\| R_{k}\pmb{p}_{i}^{(k)} + \pmb{t}_{k} - \pmb{q}_{j}\|_{2}^{2}$ + +$\triangleright$ Updating point mapping + +9: end while + +10: $\widehat{\pmb{D}}^{(k)}\gets \pmb{R}_k^*\pmb{P}^{(k)} + \pmb{t}_k^* -\pmb{P}^{(k)}$ + +$\triangleright$ Generating pseudo labels + +11: end for +12: $\hat{\pmb{D}}\gets \{\hat{\pmb{D}}^{(1)},\dots,\hat{\pmb{D}}^{(K)}\}$ + +that the region-wise rigid alignment between this region with its counterpart is explicitly enforced. Next, we present the details of this module. + +Initializing point mapping by predicted flow. The performance of ICP relies greatly on the initialization of rigid transformation and point mapping. When solving the registration from $\pmb{P}^{(k)}$ to $\pmb{Q}$ , for each point $\pmb{p}_i^{(k)}$ in $\pmb{P}^{(k)}$ , a + +straightforward way of initialization is to set its closest point in $Q$ as the initial correspondence. Inspired by [16], we establish the initial point mapping based on the predicted scene flow $F$ from neural networks being trained. Specifically, we warp the point $p_i^{(k)}$ by its predicted flow $f_i^{(k)}$ , and then take the closest point of this warped point as the initial match: + +$$ +m _ {i n i t a l} ^ {(k)} (i) = \arg \min _ {j} \| \boldsymbol {p} _ {i} ^ {(k)} + \boldsymbol {f} _ {i} ^ {(k)} - \boldsymbol {q} _ {j} \| _ {2} ^ {2}. \tag {7} +$$ + +As the training progresses, the accuracy of the predicted scene flow will be gradually improved, making the closest search of the warped points more likely to find the correct matches and establish good initial point correspondences. + +Updating rigid transformation estimate. Based on the previous point mapping estimate, we update the rigid transformation for each supervoxel by solving the least-square problem shown in Eq. (4) and Eq. (5) with the point mapping fixed. Specifically, following [4, 39, 40], we apply the singular value decomposition (SVD) to it. + +For the points in supervoxel $\pmb{P}^{(k)}$ , we first select their matches $\pmb{Q}^{(k)}$ from $\pmb{Q}$ according to the point mapping estimate $\pmb{m}^{(k)}$ . The centers of $\pmb{P}^{(k)}$ and $\pmb{Q}^{(k)}$ are defined as $\overline{\pmb{p}}^{(k)} = \frac{1}{N_k}\sum_{i=1}^{N_k}\pmb{p}_i^{(k)}$ and $\overline{\pmb{q}}^{(k)} = \frac{1}{N_k}\sum_{i=1}^{N_k}\pmb{q}_i^{(k)}$ . The cross-covariance matrix for supervoxel $\pmb{P}^{(k)}$ can be written as: + +$$ +\boldsymbol {H} ^ {(k)} = \sum_ {i = 1} ^ {N _ {k}} \left(\boldsymbol {p} _ {i} ^ {(k)} - \overline {{\boldsymbol {p}}} ^ {(k)}\right) \left(\boldsymbol {q} _ {i} ^ {(k)} - \overline {{\boldsymbol {q}}} ^ {(k)}\right) ^ {\top}. \tag {8} +$$ + +Using SVD to decompose $H^{(k)}$ , we have $H^{(k)} = U^{(k)}S^{(k)}V^{(k)^{\top}}$ . The rigid transformation estimate for supervoxel $P^{(k)}$ can be updated in closed-form as: + +$$ +\boldsymbol {R} _ {k} = \boldsymbol {V} ^ {(k)} \boldsymbol {U} ^ {(k) ^ {\top}}, \tag {9} +$$ + +$$ +\boldsymbol {t} _ {k} = - \boldsymbol {R} _ {k} \overline {{\boldsymbol {p}}} ^ {(k)} + \overline {{\boldsymbol {q}}} ^ {(k)}. +$$ + +Updating point mapping estimate. Based on the current rigid transformation estimate, the point mapping of each point in supervoxel $P^{(k)}$ is updated to its closest point in $Q$ : + +$$ +m ^ {(k)} (i) = \arg \min _ {j} \| \boldsymbol {R} _ {k} \boldsymbol {p} _ {i} ^ {(k)} + \boldsymbol {t} _ {k} - \boldsymbol {q} _ {j} \| _ {2} ^ {2}. \tag {10} +$$ + +Generating pseudo labels for each supervoxel. After several alternating iterations between Eq. (9) and Eq. (10), we obtain the final rigid transformation estimates for each supervoxel as the optimal rigid transformation. Following Eq. (6), we generate pseudo rigid scene flow for each supervoxel. The method of our pseudo label generation is sketched in Algorithm 1. + +# 4.3. Self-supervised training with pseudo labels + +Using the generated pseudo labels for supervision, we can achieve the self-supervised training of scene flow estimation networks with supervised loss functions. In this paper, we choose FLOT [30] as the default estimation network and use the $l_{1}$ -norm loss function for self-supervised learning: + +$$ +L = \frac {1}{3 N} \sum_ {i = 1} ^ {N} \| \boldsymbol {f} _ {i} - \widehat {\boldsymbol {d}} _ {i} \| _ {1}, \tag {11} +$$ + +where $\pmb{f}_i$ is the predicted scene flow for point $i$ and $\widehat{d}_i$ is our generated pseudo label. + +# 5. Experiment + +To validate the effectiveness of our self-supervised learning method, we compare our method with the state-of-the-art fully-supervised and self-supervised approaches. Then, we conduct various ablation experiments to analyze the contribution of different components. Finally, we design some quantitative and qualitative experiments to evaluate the generated pseudo labels for further analysis. All experiments are performed on the large-scale synthetic FlyingThings3D [24] dataset and the real-world KITTI 2015 [25, 26] dataset. + +Datasets. 3D data are not directly provided by the two original datasets, thus the point clouds need to be extracted from the original data. Following [30], we denote the two point cloud datasets prepared by HPLFlowNet [7] as FT3Ds and KITTIs, respectively. For FT3Ds and KITTIs, there are no occluded points in the processed point clouds. We denote the two datasets prepared by FlowNet3D [19] as FT3Do and KITTIo, respectively, where occluded points are preserved. Specially, FlowNet3D [19] also splits the KITTIo data to use the first 100 pairs for finetuning and the rest 50 pairs for testing. Here, we denote the finetuning part as KITTIf and the rest testing data as KITTIt. Following the raw data sampling strategy used in [16], we extract some raw point clouds from KITTI dataset as training samples (6026 pairs) and denote them as KITTIr. There is no overlap between KITTIr and KITTIo. + +Implementation details. During evaluation, we conduct two main experiments, one for point clouds without occlusions and one for point clouds with occlusions. + +For the experiment on point clouds without occlusions, we follow the experimental setting in [7, 13, 42]. Specifically, we train a FLOT [30] model by our self-supervised approach on $\mathrm{FT3D_s}$ training set and test it on $\mathrm{FT3D_s}$ testing set and KITTIs. For a pair of point clouds, we randomly sample 8192 points in each point cloud as input. In the pseudo label generation phase, we decompose the source point cloud into 40 supervoxels with an over-segmentation method [17] and set the iteration number in our piecewise pseudo label generation module to 4. We set the batchsize to 1 and use Adam optimizer [12] with an initial learning rate of 0.001. + +For the experiment on point clouds with occlusions, we train a FLOT model on $\mathrm{KITTI_r}$ using our self-supervised method and evaluate it on $\mathrm{KITTI_o}$ and $\mathrm{KITTI_t}$ . For each training sample, we randomly sample 2048 points in each point cloud as input. In the pseudo label generation phase, we split the source point cloud into 40 supervoxels and set the iteration number to 2. We set the batchsize to 4 and use Adam with an initial learning rate of 0.001. + +Our code is implemented based on PyTorch [28], FLOT [30] and S3DPC [17]. + +Evaluation metrics. We evaluate our method on four evaluation metrics adopted in [7, 30]. We denote the ground truth scene flow and predicted scene flow as $D$ and $F$ , respectively. The metrics are defined as follows: EPE(m): $\| D - F \|_2$ , end point error, averaged over all points; AS(%): the ratio of points with EPE < 0.05m or relative error < 5%; AR(%): the ratio of points with EPE < 0.1m or relative error < 10%; Out(%): the ratio of points with EPE > 0.3m or relative error > 10%. + +# 5.1. Comparison with State-of-the-art Methods + +# 5.1.1 Results on FT3Ds and KITTIs + +We evaluate our self-supervised learning method on $\mathrm{FT3D_s}$ testing set and $\mathrm{KITTI_s}$ data, following the experimental setting in [7, 13, 42]. We compare our method with five advanced self-supervised approaches: Ego-motion [34], PointPWC-Net [42], SLIM [1], Self-Point-Flow [16] and FlowStep3D [13]. In Table 1, our approach achieves the best performance on EPE, AS, and AR, and obtains the second best performance on Out, which demonstrates the effectiveness and the generalization ability of our self-supervised learning algorithm. Especially, our method is the only self-supervised approach that achieves an EPE metric below $7cm$ . For this metric, our method outperforms the recent FlowStep3D by $17.6\%$ and $38.3\%$ on $\mathrm{FT3D_s}$ and $\mathrm{KITTI_s}$ respectively, despite the model capacity of our used FLOT is significantly less than that of their FlowStep3D $(0.11\mathrm{M}v.s.0.68\mathrm{M})$ . + +Table 1. Quantitative results on FT3Ds testing set and KITTIs. Full. represents fully-supervised training, Self. represents self-supervised training. Compared with self-supervised approaches, our approach achieve the state-of-the-art performance on three metrics. Especially, our approach is the only self-supervised one that achieves an EPE metric below $7cm$ . Without any ground truth scene flow for supervision, our approach even outperforms some supervised ones. + +
DataMethodSup.EPE ↓AS ↑AR ↑Out ↓
FT3DsFlowNet3D [19]Full.0.086447.8983.9954.64
HPLFlowNet [7]Full.0.080461.4485.5542.87
PointPWC-Net [42]Full.0.058873.7992.7634.24
FLOT [30]Full.0.052073.2092.7035.70
FlowStep3D [13]Full.0.045581.6296.1421.65
Ego-motion [34]Self.0.169625.3255.0180.46
PointPWC-Net [42]Self.0.121332.3967.4268.78
Self-Point-Flow [16]Self.0.100942.3177.4760.58
FlowStep3D [13]Self.0.085253.6382.6241.98
OursSelf.0.069259.6287.1046.42
KITTI_sFlowNet3D [19]Full.0.106450.6580.1140.03
HPLFlowNet [7]Full.0.116947.8377.7641.03
PointPWC-Net [42]Full.0.069472.8188.8426.48
FLOT [30]Full.0.056075.5090.8024.20
FlowStep3D [13]Full.0.054680.5192.5414.92
Ego-motion [34]Self.0.415422.0937.2180.96
PointPWC-Net [42]Self.0.254923.7949.5768.63
SLIM(8192 point) [1]Self.0.120751.7879.5640.24
Self-Point-Flow [16]Self.0.112052.7679.3640.86
FlowStep3D [13]Self.0.102170.8083.9424.53
OursSelf.0.061972.3789.2326.18
+ +We also compare our self-supervised method with some supervised approaches that are trained on $\mathrm{FT3D_s}$ training set. As shown in Table 1, without any ground truth for supervision, our self-supervised method outperforms FlowNet3D [19] and performs on par with HPLFlowNet [7] on $\mathrm{FT3D_s}$ . Evaluated on KITTI $_s$ without fine-tuning, our self-supervised method has better generalization ability than FlowNet3D and HPLFlowNet. Qualitative results on $\mathrm{FT3D_s}$ are shown in Fig. 3. + +# 5.1.2 Results on KITTI $_0$ and KITTI $_t$ + +We evaluate our self-supervised learning method on $\mathrm{KITTI_o}$ and $\mathrm{KITTI_r}$ . In $\mathrm{KITTI_o}$ data, following [30], we remove all points with depth larger than $35m$ for evaluation. As shown in Table 2, our method outperforms Self-Point-Flow [16] on all metrics. The FLOT trained on $\mathrm{KITTI_r}$ via our self-supervised method achieves better performance than the fully-supervised FLOT [30] trained on $\mathrm{FT3D_o}$ , which demonstrates the advantage of our self-supervised learning strategy. That is, compared with learning from labeled synthetic data, the proposed self-supervised learning allows + +Table 2. Quantitative results on KITTI0. Without any ground truth scene flow for supervision, our method outperforms Self-Point-Flow [16], and even performs better than supervised FlowNet3D [19] and FLOT [30]. + +
MethodSup.Train. dataEPE ↓AS ↑AR ↑Out ↓
FlowNet3D [19]Full.FT3D00.17327.660.964.9
FLOT [30]Full.FT3D00.10745.174.046.3
Self-Point-Flow [16]Self.KITTIr0.10541.772.550.1
OursSelf.KITTIr0.10248.475.644.2
+ +Table 3. Quantitative results on $\mathrm{KITTI_t}$ following the test settings in [29]. Without pre-trained on $\mathrm{FT3D_o}$ with supervision, our self-supervised FLOT and FlowNet3D still achieve better performance. + +
MethodPre-trainTraining dataEPE ↓ AS ↑ AR ↑
JGF [27]✓FT3Do + KITTIf0.218 10.17 34.38
WWL [29]✓FT3Do + KITTIf0.169 21.71 47.75
Ours (FlowNet3D)KITTIr0.152 30.17 61.14
Ours (FLOT)KITTIr0.117 38.75 69.73
+ +Table 4. Ablation study for piecewise pseudo label generation module (PPLG). NN: nearest neighbor search. RCA: region-wise center alignment. RRA: region-wise rigid alignment. $\Delta$ denotes the difference in metric with respect to the baseline method. + +
MethodNNRCARRAEPE ↓ΔEPE
nearest neighbor search✓0.2170.000
+ region-wise center alignment✓✓0.089-0.128
+ region-wise rigid align. (Ours)✓✓0.071-0.146
+ +models to learn better representations from unannotated realistic data directly. Some qualitative results on $\mathrm{KITTI_o}$ are shown in Fig. 3. + +Then, we compare the performance of our method with WWL [29] and JGF [27] in a self-supervised learning manner. Following WWL [29], the experiment is conducted on $\mathrm{KITTI_t}$ . As shown in Table 3, without pre-trained on $\mathrm{FT3D_o}$ with full-supervision, the FLOT and the FlowNet3D trained via our proposed self-supervised method still perform better than theirs. + +# 5.2. Ablation study + +We validate the effectiveness of each component in our method. Models are trained on $\mathrm{FT3D_s}$ training set and tested on $\mathrm{FT3D_s}$ testing set. + +Piecewise pseudo label generation module. At the core of our design is the piecewise pseudo label generation module (PPLG). For each supervoxel, this module generates pseudo labels by alternately estimating point mapping and rigid transformation to explicitly enforce region-wise rigid alignments. The module contains three key steps: point mapping initialization, rigid transformation update, and point mapping update. + +![](images/79e6426f2d044757981c688947a516dbe2b48fb27dd44b79ac7147fa59baa451.jpg) + +![](images/405dd1600e3b8d8cd73286d0d10ebce5029d796c7131389823a4bed24e7501ae.jpg) + +![](images/166ec9acd31322986eeaefd10d992c8deb3066b8e72359a3a103f1577e1ceb4e.jpg) + +![](images/8d01ac8f02d2913e974c623fa8433adb1a3b36cb638edda94f5fab11d4f08fab.jpg) +Figure 3. Qualitative results on FT3Ds (top) and KITTIo (bottom). Bule points represent the source point cloud. Green points represent the points translated by the correct scene flow predictions. Red points represent the points translated by the incorrect predictions. The scene flow predictions are measured by AR. + +![](images/b86aac8d7e497cf19bae59e1148bd4023b269f4197a9f63770a6254f832d0a22.jpg) + +![](images/48b8421363bf048bf2f43cc6a055a8c98b4bdb4fb8926afdbcca20a4721331f9.jpg) + +Table 5. Comparison of different strategies in pseudo label generation module. IwoF: point mapping initialization without predicted flow. IwF: point mapping initialization with predicted flow. GC: label generation from correspondence. GR: label generation from rigid motion. + +
MethodIwoFIwFGCGREPE ↓
Strategy I✓✓0.356
Strategy II✓✓0.080
Ours✓✓0.071
+ +To demonstrate the advantage of region-wise rigid alignment in pseudo scene flow generation, we design two baseline methods for comparison: nearest neighbor search, denoted by NN, and region-wise center alignment, denoted by RCA. In nearest neighbor search, for each point, we directly treat the initial match derived from our point mapping initialization (Eq. 7) as the corresponding point to produce a pseudo label without considering any region-wise constraints. As shown in Table 4, compared with the method of nearest neighbor search (NN), by enforcing region-wise alignments, our module significantly reduces the EPE metric by $14.6\text{cm}$ . For the method of region-wise center alignment, when updating transformation, we only encourage the center of each supervoxel to coincide with that of its counterpart rather than enforcing region-wise rigid alignments. Specifically, we fix the rotation matrix $\pmb{R}_k$ in Eq. (6), Eq. (9) and Eq. (10) to an identity matrix. As shown in Table 4, by enforcing region-wise rigid alignments, our module outperforms the method of region-wise center alignment (RCA) by $22.8\%$ on EPE metric, which demonstrates the effectiveness of our region-wise rigid alignment approach. + +We next study the initialization strategy and the label generation strategy in PPLG. In our module, we initialize the point mapping by the predicted flow from neural networks being trained, denoted as $\mathbf{I}\mathbf{w}\mathbf{F}$ , and produce pseudo rigid scene flow from the optimal rigid transformation, + +Table 6. The impact of different update iteration numbers. + +
Iteration No.1234
EPE ↓0.0770.0730.0710.069
+ +Table 7. The impact of different supervoxel numbers. + +
Desired supervoxel No.80604020
EPE ↓0.0740.0730.0710.077
+ +Table 8. Time consumption of our method to generate pseudo labels for a training sample with 8,192 points in each point cloud. + +
ComponentOver-segmentationLabel generationTotal
Time (ms)76.196.4172.5
+ +denoted as GR. To verify the advantages of our design, we include two strategies for comparison: Strategy I initializes the point mapping without using predicted flow, denoted as IwoF, and Strategy II produces pseudo scene flow based on the coordinate difference between each optimal correspondence, denoted as GC. As shown in Table 5, our module outperforms Strategy I and Strategy II by around $80\%$ and $14\%$ on the EPE metric, respectively, which demonstrates the effectiveness of our design. And Table 6 shows the impact of different update iteration numbers on our method. + +Impact of supervoxel number. When generating pseudo labels, we decompose a scene into a set of supervoxels and find the rigid motion of each supervoxel. As shown in Table 7, the model achieves the best performance when our self-supervised method decomposes each scene into 40 supervoxels for label generation. + +Time consumption. We evaluate the running time of our pseudo label generation method for a training sample with 8192 points in each point cloud. In Table 8, the total time + +![](images/d7535055dc30fc042cde3d147b46d479131f12d1bf94df9f9e54da42ffbe9fdb.jpg) +Figure 4. The end point error (EPE, the lower, the better) of model predictions (Blue curve) and generated pseudo labels (Orange curve) on some training samples. During the training, the accuracy of pseudo labels is consistently higher than that of predicted flow. This allows us to apply the pseudo labels as supervision. + +consumption for a training sample is $172.5\mathrm{ms}$ on a single 1080ti GPU. + +# 5.3. Analysis on pseudo labels + +We conduct some quantitative and qualitative experiments to evaluate the generated pseudo labels for further analysis. In Fig. 4, using part of training samples (197 samples) as testing data, we compare the error of our generated pseudo labels and the predictions of the trained network. We can make the following observations from Fig. 4. (1) During the training, the quality of our generated pseudo labels is gradually improved. (2) The accuracy of pseudo labels is consistently higher than that of predicted flow. This allows us to apply the pseudo labels as supervision. (3) The performance gap between pseudo labels and network predictions is gradually reduced. As illustrated in Fig. 5 (c)-(e), the quality of our generated pseudo labels for the airplane and the chair are gradually improved along with training iterations, which demonstrates the effectiveness of our pseudo label generation method. More quantitative and qualitative results are in supplementary. + +# 6. Conclusion + +In this paper, we propose to produce pseudo scene flow labels by a piecewise rigid motion estimation. By solving an independent rigid registration for each region, we find a region-specific rigid transformation to represent the flow, thereby generating the entire scene flow approximation as pseudo labels for self-supervised learning. Comprehensive experiments on FlyingThings3D and KITTI datasets demonstrate that our proposed approach achieves state-of-the-art performance in self-supervised scene flow learning, without any ground truth scene flow for supervision, even outperforming some supervised counterparts. + +![](images/36ad1854babbdf12a682aee7f1b63cce679f35b778944cc0d60028b78d04ea02.jpg) +(a) Input point clouds + +![](images/8a1c7a91c362211e51be242e3aae1d07fae4465723184377d553669e92f90b85.jpg) +(b)Supervoxels + +![](images/23c5a6ef1744138d17912e6aea8db20f977c4be327819888e8e7bea1f33b25fd.jpg) +(c) Pseudo labels after 2e3 iter. + +![](images/a394d9c70dc160f5e070a541cc21d788704d7a6bfc2c5acaadac44ffe0291aa7.jpg) + +![](images/295553dc66725e5dc5f33e6b633386314fed2eb25bb8923b2716b72cc241dfa9.jpg) +(d) Pseudo labels after 2e4 iter. +(e) Pseudo labels after 2e5 iter. + +![](images/8ffcfa76e4d3949ca315c3833a257b18ded06e88b9196b4495f704bd559fea31.jpg) +(f) Ground truth scene flow +Figure 5. Our generated pseudo labels after different training iterations for the same scene. (a) Input point clouds. Blue points represent the source point cloud and gray points represent the target. (b) Supervoxel results of the source point cloud. Different colors indicate different supervoxels. (c) - (e) Our generated pseudo labels after different training iterations. Green line indicates the correct pseudo label measured by AR. Red line indicates the incorrect pseudo label. (f) Ground truth scene flow. The quality of our generated pseudo labels for the airplane and the chair are gradually improved along with training iterations. + +# 7. Limitations + +Although achieving remarkable results, our method still has some limitations. Firstly, our pseudo label generation method is based on the local rigidity assumption. For scenes with strongly non-rigid motion, the local rigidity assumption may be not suitable. In practice, these scenes are not common. Secondly, our method generates pseudo labels by enforcing region-wise alignments. Occluded regions without valid counterparts will affect our method. To evaluate the impact of occlusion issues on our method, in Sec. 5.1.2, we conduct experiments on real-world point cloud data with occluded regions. As shown in Table 2 and Table 3, compared with existing approaches, our method achieve the best results. Dealing with non-rigid motions and occlusion issues is worthy of in-depth exploration in our future work. + +# Acknowledgments + +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), and the Ministry of Education, Singapore, under its Academic Research Fund (Tier-2 research grant: MOE-T2EP20220-0007, Tier-1 research grant: RG95/20). + +# References + +[1] Stefan Andreas Baur, David Josef Emmerichs, Frank Moosmann, Peter Pinggera, Bjorn Ommer, and Andreas Geiger. Slim: Self-supervised lidar scene flow and motion segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 13126-13136, 2021. 2, 3, 5, 6 +[2] Aseem Behl, Omid Hosseini Jafari, Siva Karthik Mustikovela, Hassan Abu Alhaija, Carsten Rother, and Andreas Geiger. Bounding boxes, segmentations and object coordinates: How important is recognition for 3d scene flow estimation in autonomous driving scenarios? In Proceedings of the IEEE International Conference on Computer Vision, pages 2574-2583, 2017. 2 +[3] Aseem Behl, Despoina Paschalidou, Simon Donne, and Andreas Geiger. Pointflownet: Learning representations for rigid motion estimation from point clouds. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7962-7971, 2019. 2 +[4] PJ Besl and Neil D McKay. A method for registration of 3-d shapes. IEEE Transactions on Pattern Analysis & Machine Intelligence, 14(02):239-256, 1992. 3, 4 +[5] Kent Fujiwara, Ko Nishino, Jun Takamatsu, Bo Zheng, and Katsushi Ikeuchi. Locally rigid globally non-rigid surface registration. In 2011 International Conference on Computer Vision, pages 1527-1534. IEEE, 2011. 3 +[6] Zan Gojcic, Or Litany, Andreas Wieser, Leonidas J Guibas, and Tolga Birdal. Weakly supervised learning of rigid 3d scene flow. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5692-5703, 2021. 2 +[7] Xiuye Gu, Yijie Wang, Chongruo Wu, Yong Jae Lee, and Panqu Wang. Hplflownet: Hierarchical permutohedral lattice flownet for scene flow estimation on large-scale point clouds. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3254-3263, 2019. 2, 5, 6 +[8] Pan He, Patrick Emami, Sanjay Ranka, and Anand Rangarajan. Learning scene dynamics from point cloud sequences. International Journal of Computer Vision, pages 1-27, 2022. 2 +[9] Michael Hornacek, Andrew Fitzgibbon, and Carsten Rother. Sphereflow: 6 dof scene flow from rgb-d pairs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3526-3533, 2014. 2 +[10] Mariano Jaimez, Mohamed Souiai, Jorg Stuckler, Javier Gonzalez-Jimenez, and Daniel Cremers. Motion cooperation: Smooth piece-wise rigid scene flow from rgb-d images. In 2015 International Conference on 3D Vision, pages 64-72. IEEE, 2015. 2 +[11] Yang Jiao, Trac D Tran, and Guangming Shi. Effiscene: Efficient per-pixel rigidity inference for unsupervised joint learning of optical flow, depth, camera pose and motion segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5538-5547, 2021. 2 + +[12] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.5 +[13] Yair Kittenplon, Yonina C Eldar, and Dan Raviv. Flow-step3d: Model unrolling for self-supervised scene flow estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4114-4123, 2021. 2, 5, 6 +[14] Suryansh Kumar, Yuchao Dai, and Hongdong Li. Monocular dense 3d reconstruction of a complex dynamic scene from two perspective frames. In Proceedings of the IEEE international conference on computer vision, pages 4649-4657, 2017. 2 +[15] Ruibo Li, Guosheng Lin, Tong He, Fayao Liu, and Chunhua Shen. Hcrf-flow: Scene flow from point clouds with continuous high-order crfs and position-aware flow embedding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 364-373, 2021. 2 +[16] Ruibo Li, Guosheng Lin, and Lihua Xie. Self-point-flow: Self-supervised scene flow estimation from point clouds with optimal transport and random walk. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 15577-15586, 2021. 2, 4, 5, 6 +[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. 3, 4, 5 +[18] Liang Liu, Guangyao Zhai, Wenlong Ye, and Yong Liu. Unsupervised learning of scene flow estimation fusing with local rigidity. In IJCAI, pages 876-882, 2019. 2 +[19] Xingyu Liu, Charles R Qi, and Leonidas J Guibas. Flownet3d: Learning scene flow in 3d point clouds. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 529-537, 2019. 2, 5, 6 +[20] Xingyu Liu, Mengyuan Yan, and Jeannette Bohg. Meteornet: Deep learning on dynamic 3d point cloud sequences. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9246-9255, 2019. 2 +[21] Zhaoyang Lv, Kihwan Kim, Alejandro Troccoli, Deqing Sun, James M Rehg, and Jan Kautz. Learning rigidity in dynamic scenes with a moving camera for 3d motion field estimation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 468-484, 2018. 2 +[22] Wei-Chiu Ma, Shenlong Wang, Rui Hu, Yuwen Xiong, and Raquel Urtasun. Deep rigid instance scene flow. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3614-3622, 2019. 2 +[23] D Man and A Vision. A computational investigation into the human representation and processing of visual information, 1982. 2 +[24] Nikolaus Mayer, Eddy Ilg, Philip Hausser, Philipp Fischer, Daniel Cremers, Alexey Dosovitskiy, and Thomas Brox. A large dataset to train convolutional networks for disparity, optical flow, and scene flow estimation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4040-4048, 2016. 5 +[25] Moritz Menze and Andreas Geiger. Object scene flow for autonomous vehicles. In Proceedings of the IEEE conference + +on computer vision and pattern recognition, pages 3061- 3070, 2015. 1, 2, 5 +[26] Moritz Menze, Christian Heipke, and Andreas Geiger. Joint 3d estimation of vehicles and scene flow. ISPRS Annals of Photogrammetry, Remote Sensing & Spatial Information Sciences, 2, 2015. 5 +[27] Himangi Mittal, Brian Okorn, and David Held. Just go with the flow: Self-supervised scene flow estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11177-11185, 2020. 2, 6 +[28] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017. 5 +[29] Jhony Kaesemodel Pontes, James Hays, and Simon Lucey. Scene flow from point clouds with or without learning. In 2020 International Conference on 3D Vision (3DV), pages 261-270. IEEE, 2020. 2, 3, 6 +[30] 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. 2, 5, 6 +[31] Szymon Rusinkiewicz and Marc Levoy. Efficient variants of the icp algorithm. In Proceedings third international conference on 3-D digital imaging and modeling, pages 145-152. IEEE, 2001. 3 +[32] Aleksandr Segal, Dirk Haehnel, and Sebastian Thrun. Generalized-icp. In Robotics: science and systems, volume 2, page 435. Seattle, WA, 2009. 3 +[33] Zachary Teed and Jia Deng. Raft-3d: Scene flow using rigid-motion embeddings. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8375–8384, 2021. 2 +[34] Ivan Tishchenko, Sandro Lombardi, Martin R Oswald, and Marc Pollefeys. Self-supervised learning of non-rigid residual flow and ego-motion. In 2020 International Conference on 3D Vision (3DV), pages 150-159. IEEE, 2020. 2, 5, 6 +[35] Sundar Vedula, Simon Baker, Peter Rander, Robert Collins, and Takeo Kanade. Three-dimensional scene flow. In Proceedings of the Seventh IEEE International Conference on Computer Vision, volume 2, pages 722-729. IEEE, 1999. 1, 2 +[36] Christoph Vogel, Konrad Schindler, and Stefan Roth. 3d scene flow estimation with a rigid motion prior. In 2011 International Conference on Computer Vision, pages 1291-1298. IEEE, 2011. 2 +[37] Christoph Vogel, Konrad Schindler, and Stefan Roth. Piecewise rigid scene flow. In Proceedings of the IEEE International Conference on Computer Vision, pages 1377-1384, 2013. 2 +[38] Christoph Vogel, Konrad Schindler, and Stefan Roth. 3d scene flow estimation with a piecewise rigid scene model. International Journal of Computer Vision, 115(1):1-28, 2015. 2 +[39] Yue Wang and Justin Solomon. Prnet: self-supervised learning for partial-to-partial registration. In Proceedings of the + +33rd International Conference on Neural Information Processing Systems, pages 8814-8826, 2019. 3, 4 +[40] Yue Wang and Justin M Solomon. Deep closest point: Learning representations for point cloud registration. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3523-3532, 2019. 3, 4 +[41] Yi Wei, Ziyi Wang, Yongming Rao, Jiwen Lu, and Jie Zhou. Pv-raft: Point-voxel correlation fields for scene flow estimation of point clouds. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6954–6963, 2021. 2 +[42] Wenxuan Wu, Zhi Yuan Wang, Zhuwen Li, Wei Liu, and Li Fuxin. Pointpwc-net: Cost volume on point clouds for (self-) supervised scene flow estimation. In European Conference on Computer Vision, pages 88-107. Springer, 2020. 2, 5, 6 \ No newline at end of file diff --git a/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/images.zip b/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a23f56c29c4fb95114e746b7718b0facd7ecf61c --- /dev/null +++ b/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9c5c2de8f92f1f8207acb5b45810b729671ee854e02945ed32a8e677bc35cc7 +size 498215 diff --git a/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/layout.json b/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a4e83172a86fdd38bb7bc140e7078ff68b84c459 --- /dev/null +++ b/rigidflowselfsupervisedsceneflowlearningonpointcloudsbylocalrigidityprior/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:019acf70ed49bf9e2e7eec7595b4ae3226aeda6e0494053f6dc7a8c3cdd02f90 +size 464114 diff --git a/rignerffullycontrollableneural3dportraits/7365e85c-24ed-4a82-aa4f-406f6f24c643_content_list.json b/rignerffullycontrollableneural3dportraits/7365e85c-24ed-4a82-aa4f-406f6f24c643_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..521d3f2e4baa06b570764056ca77d5c32b708b7d --- /dev/null +++ b/rignerffullycontrollableneural3dportraits/7365e85c-24ed-4a82-aa4f-406f6f24c643_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f2477620e780a3e86304fa1c8f183ef66b47737f17f37c13f0a0c67f8da7fa9 +size 73715 diff --git a/rignerffullycontrollableneural3dportraits/7365e85c-24ed-4a82-aa4f-406f6f24c643_model.json b/rignerffullycontrollableneural3dportraits/7365e85c-24ed-4a82-aa4f-406f6f24c643_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7e9efab770aeeef368cae53ac680de3193050d95 --- /dev/null +++ b/rignerffullycontrollableneural3dportraits/7365e85c-24ed-4a82-aa4f-406f6f24c643_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b023c373362cb43927847a83a124d9d403d3d99a02d4f6d2451e8c1145b4fbc +size 92088 diff --git a/rignerffullycontrollableneural3dportraits/7365e85c-24ed-4a82-aa4f-406f6f24c643_origin.pdf b/rignerffullycontrollableneural3dportraits/7365e85c-24ed-4a82-aa4f-406f6f24c643_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cad79352dc6017b34daf3de1d309d5dd58998bd3 --- /dev/null +++ b/rignerffullycontrollableneural3dportraits/7365e85c-24ed-4a82-aa4f-406f6f24c643_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a79db6d17e2c2726160029533fdda0b79976babc3f5ef657bb6cea9eed09f82a +size 9995727 diff --git a/rignerffullycontrollableneural3dportraits/full.md b/rignerffullycontrollableneural3dportraits/full.md new file mode 100644 index 0000000000000000000000000000000000000000..2474820f1fb132d23c9df822406ce7b78bc94e68 --- /dev/null +++ b/rignerffullycontrollableneural3dportraits/full.md @@ -0,0 +1,298 @@ +# RigNeRF: Fully Controllable Neural 3D Portraits + +ShahRukh Athar* +Stony Brook University +sathar@cs.stonybrook.edu + +Zexiang Xu +Adobe Research +zexu@adobe.com + +Kalyan Sunkavalli +Adobe Research +sunkaval@adobe.com + +Eli Shechtman Adobe Research elishe@adobe.com + +Zhixin Shu +Adobe Research +zshu@adobe.com + +![](images/d3976fdf437b60dd85e736c3b9894d5d469c1e1dc1fff6636a6980a6704d55a1.jpg) +(a) Pose Control +Figure 1. Our method, RigNeRF, enables full control of head-posed and facial expression of a human portrait using a 3DMM-guided deformable neural radiance field. With a short portrait video for training, RigNeRF can reanimate the subject with arbitrary (a) head-posed and (b) facial expressions. It also allows controllable viewpoints of the 3D scene (c). Naturally RigNeRF can be used to transfer facial animation from a driving video sequence to the 3D portraits faithfully (d). + +![](images/975a64a758ed3fcf9d34226c5cc4e2025cb03377479fa7f544c61b49eb74b60e.jpg) +(b) Expression Control + +![](images/55d9d498679dc4e803b428644b5d5456708c7bc271d3bafeb91d668907f865d6.jpg) +(c) Novel View Synthesis + +![](images/ba2a5899864a2982432624f6055beaa2ee2e38105d3c932604a5a95c0be564c7.jpg) +(d) Video based reanimation with novel view synthesis + +![](images/002136ca38adbdc6cf48230f1f2b5f2585d70b3a4209fae97b9bcda93c5483e3.jpg) + +![](images/7da1707e41626e50dfcaf6d9382bf868233f0fcc3cd8a066a640a4e32c32060a.jpg) + +# Abstract + +Volumetric neural rendering methods, such as neural radiance fields (NeRFs), have enabled photo-realistic novel view synthesis. However, in their standard form, NeRFs do not support the editing of objects, such as a human head, within a scene. In this work, we propose RigNeRF, a system that goes beyond just novel view synthesis and enables full control of head pose and facial expressions learned from a single portrait video. We model changes in head pose and facial expressions using a deformation field that is guided by a 3D morphable face model (3DMM). The 3DMM effectively acts as a prior for RigNeRF that learns to predict only residuals to the 3DMM deformations and allows us to render novel (rigid) poses and (non-rigid) expressions that were not present in the input sequence. Using only a smartphone-captured short video of a subject for training, we demonstrate the effectiveness of our method on free view synthesis of a portrait scene with explicit head pose and + +expression controls. + +# 1. Introduction + +Photo-realistic editing of human portraits is a longstanding topic in the computer graphics and computer vision community. It is desirable to be able to control certain attributes of a portrait, such as 3D viewpoint, lighting, head pose, and even facial expression, after capturing. It also has great potential in AR/VR applications where a 3D immersive experience is valuable. However, it is a challenging task: modeling and rendering a realistic human portrait with complete control over 3D viewpoint, facial expressions, and head pose in natural scenes remains elusive, despite the longtime interest and recently increased research. + +3D Morphable Face Models (3DMMs) [4] were among the earliest attempts towards a fully controllable 3D human + +head model. 3DMMs use a PCA-based linear subspace to control face shape, facial expressions, and appearance independently. A face model of desired properties can be rendered in any view using standard graphics-based rendering techniques such as rasterization or ray-tracing. However, directly rendering 3DMMs [4], which only models face region, is not ideal for photo-realistic applications as its lacks essential elements of the human head such as hair, skin details, and accessories such as glasses. Therefore, it is better employed as an intermediate 3D representation [21, 47, 48] due to its natural disentanglement of face attributes such as shape, texture, and expression, which makes 3DMMs an appealing representation for gaining control of face synthesis. + +On the other hand, recent advances on neural rendering and novel view synthesis [3,6,13,14,28,29,32,33,35,39,50, 52,53] have demonstrated impressive image-based rendering of complex scenes and objects. Despite that, existing works are unable to simultaneously generate high quality novel views of a given natural scene and control the objects within it, including that of the human face and its various attributes. In this work, we would like to introduce a system to model a fully controllable portrait scene: with camera view control, head pose control, as well as facial expression control. + +Control of head-pose and facial expressions can be enabled in NeRFs via a deformation module as done in [35, 36, 39]. However, since those deformations are learnt in a latent space, they cannot be explicitly controlled. A natural way to add control to head-pose and facial expressions, via deformations, is by parameterizing the deformation field using the 3DMM head-pose and facial expression space. However, as shown in Fig 7, such naive implementation of a deformation field leads to artefacts during the reanimation due to the loss of rigidity and incorrect modelling of facial expressions. To address these issues, we introduce RigNeRF, a method that leverages a 3DMM to generate a coarse deformation field which is then refined by corrective residual predicted by an MLP to account for the non-rigid dynamics, hair and accessories. Beyond giving us a controllable deformation field, the 3DMM acts as an inductive bias allowing our network to generalize to novel head poses and expressions that were not observed in the input video. + +Our model is designed to be trained on a short video captured using a mobile device. Once trained, RigNeRF allows for explicit control of head pose, facial expression and camera viewpoint. Our results capture rich details of the scene along with details of the human head such as the hair, beard, teeth and accessories. Videos reanimated using our method maintain high fidelity to both the driving morphable model in terms of facial expression and head-pose and the original captured scene and human head. + +In summary, our contributions in this paper are as follows: 1) We propose a neural radiance field capable of full control of the human head along with simultaneously modelling the + +full 3D scene it is in. 2) We experimentally demonstrate the loss of rigidity when dynamic neural radiance fields are reanimated. 3) We introduce a deformation prior that ensures rigidity of the human head during reanimation thus significantly improves its quality. + +# 2. Related works + +RigNeRF is a method for full control of head pose, facial expressions, and novel view synthesis of 3D portrait scene. It is closely related to recent work on neural rendering, novel view synthesis, 3D face modeling, and controllable face generation. + +Neural Scene Representations and Novel View Synthesis. RigNeRF is related to recent work in neural rendering and novel view synthesis [3,6,13,14,25,28,29,31-36,39,40,45, 49-53]. Neural Radiance Fields (NeRF) use a Multi-Layer Perceptron (MLP), $F$ , to learn a volumetric representation of a scene. For every 3D point and the direction from which the point is being viewed, $F$ predicts its color and volume density. For any given camera pose, $F$ is first evaluated densely enough throughout the scene using hierarchical volume sampling [33], then volume rendering is used to render the final image. $F$ is trained by minimizing the error between the predicted color of a pixel and its ground truth value. While NeRFs are able to generate photo-realistic images for novel view synthesis, it is only designed for a static scene and is unable to represent scene dynamics. Specifically designed for dynamic portrait video synthesis, our approach not only models the dynamics of human faces, but also allows specific controls on the facial animation. + +Dynamic Neural Scene Representations. Although NeRF [33] is designed for a static scene, several works have attempted to extend it to model dynamic objects or scene. There is a line of work [27, 28, 39, 50] that extend NeRF to dynamic scenes by providing as input a time component and along with it imposing temporal constraints either by using scene flow [28, 50] or by using a canonical frame [39]. Similarly, Nerfies [35] too work with dynamic scenes by mapping to a canonical frame, however it assumes that the movement is small. In [36], authors build upon [35] and use an ambient dimension in order to model topological changes in the deformation field. The deformation fields in these approaches are conditioned on learnt latent codes without specific physical or semantic meaning, and therefore not controllable in an intuitive manner. RigNeRF, similar to [35, 36], models the portrait video by mapping to a canonical frame but in addition also enables full parameterized control of head pose and facial expression. + +Controllable Face Generation. Recent breakthroughs in Generative Adversarial Networks(GANs) [15, 17-20, 55] + +have enabled high-quality image generation and manipulation. They also inspired a large collection of work [2, 7-9, 24, 38, 42, 43, 46, 47] focusing on face image manipulation and editing. However, majority of these work are intrinsically image-based and lack explicit 3D representation. Therefore it is challenging to enable high-quality view synthesis and 3D controls of the portraits such as large pose changes or extreme facial expressions. Another line of work [1, 10, 22, 23] made use of 3D Morphable Model as intermediate 3D face representation to reanimate face images/videos. While being able to model head poses with great detail, thanks to the disentangled representation in 3DMM, they often unable to perform novel view synthesis as they focus on face region but neglect the geometry or appearance of the scene. Similarly, NerFACE [13] uses neural radiance fields to model a 4D face avatar and allows pose/expression control on the head. However, they assume a static background and fixed camera, thus cannot perform view synthesis of the person or the scene. In contrast, our method RigNeRF provides full control over the head pose and facial expressions of the person captured in the portrait video while simultaneously being able to synthesize novel views of the 3D portrait scene. + +Hybrid Representations. The photorealism of volumetric and implicit representations have encouraged works that combine them with classical representations in order to improve reconstruction [5] or lend control over foreground [12, 30, 37]. In [30], authors learn a deformation field along with a texture mapping to reanimate human bodies. Similarly, [37] learns a 3D skinning field to accurately deform points according to the target pose. Neither [30] nor [37] model the full 3D scene. In contrast, RigNeRF models the whole 3D scene with full control of head-pose, facial expressions and viewing directions. + +# 3. RigNeRF + +In this section, we describe our method, RigNeRF, that enables novel view synthesis of 3D portrait scenes and arbitrary control of head pose and facial expressions. A Neural Radiance Field (NeRF) [33] with a per-point deformation is used to control the head pose and facial expressions of the subject. The deformation field deforms the rays of each frame to a canonical space, defined by a the 3DMM in the frontal head-pose and neutral expression, where the colors are sampled. In order to model deformations due to both head-pose (a rigid deformation) and facial expressions (a non-rigid deformation) and to correctly deform facial details such as hair and glasses, the deformation field is defined as the sum of the 3DMM deformation field and a residual deformation predicted by a deformation MLP. + +# 3.1. Deformable Neural Radiance Fields + +A neural radiance field (NeRF) is defined as a continuous function $F: (\gamma_{m}(\mathbf{x}), \gamma_{n}(\mathbf{d})) \to (\mathbf{c}(\mathbf{x}, \mathbf{d}), \sigma(\mathbf{x}))$ , that, given the position of a point in the scene $\mathbf{x}$ and the direction it is being viewed in, $\mathbf{d}$ , outputs the color $\mathbf{c} = (r, g, b)$ and the density $\sigma$ . $F$ is usually represented as a multi-layer perceptron (MLP) and $\gamma_{m}: \mathbb{R}^{3} \to \mathbb{R}^{3 + 6m}$ is the positional encoding [33] defined as $\gamma_{m}(\mathbf{x}) = (\mathbf{x}, \dots, \sin(2^{k}\mathbf{x}), \cos(2^{k}\mathbf{x}), \dots)$ where $m$ is the total number of frequency bands and $k \in \{0, \dots, m - 1\}$ . The expected color of the pixel through which a camera ray passes is calculated via volume rendering. The parameters of $F$ are trained to minimize the L2 distance between the expected color and the ground-truth. + +NeRFs, as defined above, are designed for static scenes and offer no control over the objects within the scene. In order to model a dynamic scene, NeRFs are extended by additionally learning a deformation field to map each 3D point of the scene to a canonical space, where the volumetric rendering takes place [35, 36, 39]. The deformation field is also represented by an MLP $D_{i}:\mathbf{x}\rightarrow \mathbf{x}_{\mathrm{can}}$ where $D_{i}$ is defined as $D(\mathbf{x},\omega_{i}) = \mathbf{x}_{\mathrm{can}}$ and $\omega_{i}$ is a per-frame latent deformation code. In addition to a deformation code, $\omega_{i}$ , a per-frame appearance code is also used [35, 36, 39], $\phi_{i}$ , thus the final radiance field for the $i$ -th frame is as follows: + +$$ +(\mathbf {c} (\mathbf {x}, \mathbf {d}), \sigma (\mathbf {x})) = F (\boldsymbol {\gamma} (D (\mathbf {x}, \omega_ {i})), \boldsymbol {\gamma} (\mathbf {d}), \phi_ {i}) \tag {1} +$$ + +In addition to the parameters of $F$ , each $\omega_{i}$ and $\phi_{i}$ are also optimized through stochastic gradient descent. While the aforementioned modifications are able generate novel views [35, 39] of dynamic videos and handle small movement of objects in the scene [35], the deformations they estimate are conditioned on learnt deformation codes that can be arbitrary. Instead, we seek intuitive deformation controls that explicitly disentangles and controls facial appearance based on camera viewpoint, head pose and expression. + +# 3.2. A 3DMM-guided deformation field + +RigNeRF enables novel view synthesis of dynamic portrait scene and arbitrary control of head pose and facial expressions. For each frame $i$ , we first extract its head-pose and expression parameters $\{\beta_{i,\mathrm{exp}},\beta_{i,\mathrm{pose}}\}$ using DECA [11] and landmark fitting [16]. Next, we shoot rays through each pixel, $p$ , of the frame and deform each point on the ray, $\mathbf{x}$ , to a position in the canonical space, $\mathbf{x}_{\mathrm{can}} = (x^{\prime},y^{\prime},z^{\prime})$ where its color is computed. A natural way to parameterize this canonical space, and any deviations from it, is using 3DMMs [4,26]. Thus, RigNeRF's canonical space is defined as the one where the head has zero head-pose and a neutral facial expression. + +Unfortunately, a 3DMM is only defined accurately for a subset of points on the head—3DMM fitting is often not perfect and they do not model hair, glasses, etc.—and is + +![](images/1acca458b1bcbd2b18e3551fc66ad5071cdb80d22194f7e4bae10ebd8b487a5d.jpg) +Figure 2. Overview of RigNeRF. RigNeRF is a deformable NeRF architecture that consists of two learnable MLPs: a deformation MLP $D$ and a color MLP $F$ . Given an image, we shoot rays through each of its pixels. For every ray, we deform each point on it according to a 3DMM-guided deformation field. This deformation field is the sum of the 3DMM deformation field (see Sect 3.2) and the residual predicted by the deformation MLP, $D$ . Next, the deformed point is given as input to the color MLP, $F$ , which additionally takes as input the pose and expression parameters $\{\beta_{\mathrm{exp}}, \beta_{\mathrm{pose}}\}$ , the viewing direction $\mathbf{d}$ and an appearance embedding $\phi$ to predict the color and density. The final color of the pixel is calculated via volume rendering. + +undefined for point in the rest of 3D space. Hence, a deformation MLP $D_{i}:\mathbf{x}\rightarrow \mathbf{x}_{\mathrm{can}}$ is still necessary to perform the transformation to the canonical space. However, as detailed in Sect 4.3, we find that directly predicting the deformation to the canonical space gives rise to artefacts during reanimation. The artefacts arise due to the inability of $D$ to 1) maintain the rigidity of the head and 2) to model facial expressions correctly. + +![](images/2f501c7035111aa16fccbfade0a42a0a144ba1a4dbbf1db25ee0e5049e20b9a0.jpg) +Figure 3. The 3DMM deformation field. The 3DMM deformation field at any point in space, $\mathbf{x}$ , is equal to the deformation of its closest neighbor on the mesh, $\hat{\mathbf{x}}$ , weighted by the inverse of the exponential of the distance between $\mathbf{x}$ and $\hat{\mathbf{x}}$ . + +In order to fix this and ensure RigNeRF is able to handle both rigid deformations due to head-pose changes and non-rigid deformations due to changes in facial expressions, we use a deformation field prior derived using the 3DMM. For expression and head-pose parameters, $\{\beta_{\mathrm{exp}},\beta_{\mathrm{pose}}\}$ , the value of the 3DMM deformation field at any point $\mathbf{x} = (x,y,z)$ is: + +$$ +3 \mathrm {D M M D e f} (\mathbf {x}, \beta_ {\exp}, \beta_ {\text {p o s e}}) = \frac {3 \mathrm {D M M D e f} (\hat {\mathbf {x}} , \beta_ {\exp} , \beta_ {\text {p o s e}})}{\exp (\operatorname {D i s t T o M e s h} (\mathbf {x}))} \tag {2} +$$ + +where, 3DMMDef(x) is the value of the 3DMM deformation field, $\hat{\mathbf{x}} = (\hat{x},\hat{y},\hat{z})$ is the closest point to $(x,y,z)$ on the mesh and DistToMesh $= ||\mathbf{x} - \hat{\mathbf{x}} ||$ is the distance between $\mathbf{x}$ and $\hat{\mathbf{x}}$ . The 3DMM deformation of any point on the mesh, $\hat{\mathbf{x}}$ , is given by the difference between its position in the canonical space (i.e when the mesh had a zero head-pose and neutral facial expression) and its current articulation, as follows: + +$$ +3 \mathrm {D M M D e f} (\hat {\mathbf {x}}, \beta_ {\exp}, \beta_ {\text {p o s e}}) = \hat {\mathbf {x}} _ {\mathrm {F L A M E} (\mathbf {0}, \mathbf {0})} - \hat {\mathbf {x}} _ {\mathrm {F L A M E} \left(\beta_ {\exp}, \beta_ {\text {p o s e}}\right)} \tag {3} +$$ + +where, $\hat{\mathbf{x}}_{\mathrm{FLAME}}(\mathbf{0},\mathbf{0})$ is the position of $\mathbf{x}$ in the canonical space and $\hat{\mathbf{x}}_{\mathrm{FLAME}}(\beta_{\mathrm{exp}},\beta_{\mathrm{pose}})$ is its position with head pose and facial expression parameters $\{\beta_{\mathrm{exp}},\beta_{\mathrm{pose}}\}$ . + +The RigNeRF deformation field can now be defined as the sum of the 3DMM deformation field and the residual predicted by $D$ , as follows + +$$ +\begin{array}{l} \hat {D} (\mathbf {x}) = 3 \mathrm {D M M D e f} (\mathbf {x}, \beta_ {\mathrm {i , e x p}}, \beta_ {\mathrm {i , p o s e}}) \\ + D \left(\boldsymbol {\gamma} _ {a} (\mathbf {x}), \boldsymbol {\gamma} _ {b} \left(3 \mathrm {D M M D e f} \left(\mathbf {x}, \beta_ {\mathrm {i , e x p}}, \beta_ {\mathrm {i , p o s e}}\right), \omega_ {i}\right) \quad (4) \right. \\ \end{array} +$$ + +$$ +\mathbf {x} _ {\text {c a n}} = \mathbf {x} + \hat {D} (\mathbf {x}) +$$ + +where, $\hat{D} (\mathbf{x})$ is the value of the RigNeRF deformation field at $\mathbf{x}$ , $\{\gamma_{a},\gamma_{b}\}$ is the positional embedding on $\mathbf{x}$ and 3DMMDef(x,...) respectively and $\omega_{i}$ is the deformation embedding for current frame. We use $\omega_{i}$ to model deformations that cannot be accounted for by head-pose and expression changes. Experimentally, we find that conditioning $D$ directly on the expression and pose parameters, $\{\beta_{\mathrm{i,exp}},\beta_{\mathrm{i,pose}}\}$ , leads to overfitting and poor generalization. This is likely due to the high dimensionality of the code (59), that makes it prone to overfitting. Instead, we condition $D$ on the 3DMM + +deformation of the point $\mathbf{x}$ , 3DMMDef $(\mathbf{x}, \beta_{\mathrm{i,exp}}, \beta_{\mathrm{i,pose}})$ . Since 3DMMDef $(\mathbf{x}, \beta_{\mathrm{i,exp}}, \beta_{\mathrm{i,pose}}) \in \mathbb{R}^3$ , it is itself relatively low dimensional, and it can be pushed into higher dimensions by adjusting the number of frequencies of its positional embedding, $\gamma_b$ . We find that using $b = 2$ frequencies in $\gamma_b$ for the 3DMM deformation, 3DMMDef $(\mathbf{x}, \beta_{\mathrm{i,exp}}, \beta_{\mathrm{i,pose}})$ , works the best. In Fig 4, we show renders of both the output of $D$ and the RigNeRF deformation field, $\hat{D}$ , as described in Eq. (4). In Fig 4(c), we see that $D$ generates the accurate deformation around the glasses, which the 3DMM deformation cannot do, for both head-poses. In Fig 4(d), we see that the $\hat{D}$ is only concentrated on the head as it should be. + +![](images/5fbce531f14cfdc8c7f1a264e050e9f160d57b93f6aa67c00ad70c44e304f5b1.jpg) +Figure 4. Visualize learnt depth and deformation in RigNeRF. Here we show the depth, the magnitude of the output of the Deformation MLP $D$ , and magnitude of the $\hat{D}$ i.e the sum of the 3DMM Deformation and $D$ . In (b), we can see that despite large changes in head-pose, the depth remains consistent. Next, in (c), we see $D$ generates a deformation around the glasses for both poses so that it can be accurately deformed along with the head. Finally, in the last column we see how $\hat{D}$ is only concentrated on the head. + +# 3.3. 3DMM-conditioned Appearance + +In order to accurately model expression and head-pose based textures, such as teeth, we condition $F$ on both expression and head-pose parameters and on features extracted from the penultimate layer of the deformation MLP $D(\gamma_{a}(\mathbf{x}),\ldots)$ . We find that using these features as input improves the overall quality of the render, please check the supplementary for details. Thus, once a point $\mathbf{x}$ has been deformed to its location in the canonical space, $\mathbf{x}_{\mathrm{can}}$ , using Eq. (4), its color is calculated as follows: + +$$ +\mathbf {c} (\mathbf {x}, \mathbf {d}), \sigma (\mathbf {x}) = F \left(\gamma_ {c} \left(\mathbf {x} _ {\text {c a n}}\right), \gamma_ {d} (\mathbf {d}), \phi_ {i}, D _ {F, i} \left(\mathbf {x} _ {\text {c a n}}\right), \beta_ {\mathrm {i , e x p}}, \beta_ {\mathrm {i , p o s e}}\right) \tag {5} +$$ + +where, $\mathbf{d}$ is the viewing direction, $\gamma_{c},\gamma_{d}$ is the positional embedding on $\mathbf{x}_{\mathrm{can}}$ and $\mathbf{d}$ , and $D_{F,i}(\mathbf{x}_{\mathrm{can}})$ are features from the penultimate layer of the deformation MLP $D(\pmb{\gamma}_a(\mathbf{x}),\dots)$ . The pixel color for $p$ is then calculated using volume rendering and parameters of RigNeRF are minimized w.r.t to the ground truth color of $p$ . The full architecture is shown in Fig 2. + +# 4. Results + +In this section, we show results of head-pose control, facial expression control, and novel view synthesis using RigNeRF. For each scene, the model is trained on a short portrait video captured using a consumer smartphone. + +Baseline approaches. To the best of our knowledge, RigNeRF is the first method that enables dynamic control of head-pose, facial expressions along with the ability to synthesize novel views of full portrait scenes. Thus, there is no existing work for an apple-to/apple comparison. We qualitatively and quantitatively compare our method to three other methods that perform closely related tasks: (1) HyperNeRF [36]: a state-of-the-art method using NeRFs for novel view synthesis of dynamic portrait scenes, without any control (2) NerFACE [12], a state-of-the-art method using NeRF for face dynamics control without modeling camera viewpoint and the entire scene, and (3) First Order Motion Model (FOMM) [44], a general-purpose image reanimation pipeline. + +When generating renanimation videos, RigNeRF, HyperNeRF [36] and NerFACE [12] require an appearance code for rendering; we use the appearance code of the first frame here. Similarly, RigNeRF and Nerfies [35] require a deformation code and we use the deformation code from the first frame. Full videos of the reanimation can be found in the supplementary material. We strongly urge the readers to refer to the videos to evaluate the quality of the results. + +Training Data Capture and Training details. The training and validation data was captured using an iPhone XR or iPhone 12 for all the experiments in the paper. In the first half of the capture, we ask the subject to enact a wide range of expressions and speech while trying to keep their head still as the camera is panned around them. In the next half, the camera is fixed at head-level and the subject is asked to rotate their head as they enact a wide range of expressions. Camera parameters are calculated using COLMAP [41]. We calculate the expression and shape parameters of each frame in the videos using DECA [11] and further optimize them using via standard landmark fitting using the landmarks predicted by [16] and camera parameters given by COLMAP [41]. All training videos are between 40-70 seconds long ( $\sim$ 1200-2100 frames). Due to compute restrictions, the video is down-sampled and the models are trained at $256 \times 256$ resolution. We use coarse-to-fine and vertex deformation regularization [35] to train the deformation network $D(\mathbf{x}, \omega_i)$ . Please find full details of each experiment in the supplementary. + +# 4.1. Evaluation on Test Data + +We evaluate RigNeRF, HyperNeRF [36], NerFACE [12] and FOMM [44] on held out images on the captured video + +![](images/82e7f881b6be3b3431fec3d685c03bae06e8834c3e7cc396c32af26e88f69c87.jpg) +(a) Fixed view with varying expression and pose + +![](images/74739177844a431f52271b806910492d058a76ea1ba8fd16086f1d53061bfd04.jpg) +(b) Varying expression, pose and view +Figure 5. Qualitative comparison by reanimation with novel facial expression, head-pose, and camera view parameters. Here we reanimate RigNeRF, HyperNeRF [36] and NerFACE [12] using facial expression and head-pose derived from source images (top-row). We observe that while HyperNeRF [36] is able to generate realistic looking images of a portrait, it is unable to control head pose or facial expression in the result. On the other hand, NerFACE [12] attempts to render the correct pose and expression, but is unable to generate plausible face regions. Since, NerFACE [12] lacks an explicit deformation module it is unable to model deformation due to head-pose and facial expression changes. In contrast, our approach RigNeRF can effectively control the head pose, facial expression, and camera view, generating high quality facial appearance. + +
Subject 1Subject 2Subject 3Subject 4
ModelsPSNR ↑LPIPS ↓FaceMSE ↓PSNR ↑LPIPS ↓FaceMSE ↓PSNR ↑LPIPS ↓FaceMSE ↓PSNR ↑LPIPS ↓FaceMSE ↓
RigNeRF (Ours)29.550.1369.6e-529.360.1021e-428.390.1098e-527.00.0922.3e-4
HyperNeRF [36]24.580.228.14e-422.550.15469.48e-419.290.262.74e-321.190.1821.58e-3
NerFACE [13]24.20.2177.84e-424.570.1746.7e-428.000.12921.2e-428.470.1342.7e-4
FOMM [44]11.450.4327.65e-312.70.5826.31e-310.170.6011.7e-211.170.5296.8e-3
+ +Table 1. Quantitative results of Subject 1,2,3 and 4 on test data. Our results are better than HyperNeRF [36], NerFACE [12] and FOMM [44] on most metrics across all subjects. + +sequences. We use the camera view, pose and expression parameters of these images. Since RigNeRF and HyperNeRF [36] use a per-frame deformation $\omega_{i}$ , we can't use the first frame (which is what we use as default for reanimation) to perform a direct comparison with the ground truth image as it may have a different deformation to the canonical space than the first frame. Therefore, we first optimize for the deformation code, $\omega_{v}$ , of a given validation image by minimizing rendering error wrt that frame as follows: + +$$ +\omega_ {v} = \min _ {\omega} | | C _ {p} (\omega ; \mathbf {x}, \mathbf {d}, \theta , \phi_ {0}, \beta_ {\mathrm {i}, \exp}, \beta_ {\mathrm {i}, \text {p o s e}}) - C _ {p} ^ {G T} | | \tag {6} +$$ + +where, $C_p(\omega; \mathbf{x}, \mathbf{d}, \theta, \phi_0)$ is the predicted color at pixel $p$ generated using Eq. (5) and volume-rendering, $\phi_0$ is the appearance code of the first frame, $\theta$ are the parameters of $F$ as defined in Eq. (5) and $C_p^{GT}$ is the ground-truth pixel + +value. Note, we only optimize $\omega$ , all other parameters of the radiance field are kept fixed. We optimize Eq. (6) for 200 epochs which we observe to be more than enough to find the loss plateau. Once the optimization finishes, we report the final MSE, PSNR, LPIPS and Face MSE i.e the MSE only over the face region. We use no such optimization with NerFACE [12] since it does not have a deformation module and on FOMM [44] since it is a image-based method. + +As can be seen in Table 1, our method outperforms HyperNeRF [36], NerFACE [12] and FOMM [44] on held-out test images. RigNeRF, HyperNeRF [36] and NerFACE [12] are trained on dynamic portrait videos with changing headpose and facial expressions, HyperNeRF [36], lacking any head- pose and facial expression control, is unable to generate the head-poses and facial expressions seen in the held-out + +![](images/f0a5a6fd2f64f12ece49645afa9639c3c8b6e6c3ed9cadf74c9b279b86e62ab5.jpg) +(a) Image-driven Reanimation + +![](images/321d8731330059801cd7478ab3bffe1a35b5ba2004a3926ecb731bcfe04dd915.jpg) +(b) Novel-View Synthesis + +![](images/18b0f19c607bba8d39b217635506b8babb8966ef7644d94e63a445682daf3f55.jpg) + +![](images/2e22cda35e41d4f191010f94fbab42863348e84e6ceeba97328a301796fad35d.jpg) +(c) 3DMM-based control of 3D Portraits +Figure 6. Applications of RigNeRF. RigNeRF allows for full control head-pose, facial expressions and viewing direction of 3D portrait scenes. This enables application like (a) Image-driven Reanimation, (b) Novel View Synthesis and (c) 3DMM-based control of 3D Portraits. In (a)-top row, we show images of "driving sequences" from which we extract pose and expression parameters; the results from 4 subjects are shown in (a)-bottom where we synthesize realistic portrait frames that closely matches the driving pose and expression. We show in (b) a set of view synthesis results where we fix the head pose and facial expression, rendering results with varying camera positions, in which we show high-quality results with dramatic view changes. In (c), we demonstrate the application of controlling the portrait appearance with explicit 3DMM parameters. Within each row, (c)-column 1 and (c)-column 2 have the same pose but different expressions; (c)-column 2 and (c)-column 3 have the different poses but share the same expression. The inset shows the input 3DMM pose and expression, both of which are faithfully rendered in the corresponding results. Please find more results in the supplemental document and video. + +test set. Even as we optimized the deformation code of HyperNeRF [36], we found it hard to fit the unseen test images. NerFACE [12], on the other hand, lacking a deformation module, therefore is unable to model the dynamism of head-pose changes solely by concatenating pose and expression parameters as input the NeRF MLP. As a result, NerFACE [12] generates significant artefacts on the face regions (see the third row of Fig 5(a) and Fig 5(b)). FOMM [44], being an image based method, is unable to model novel views. Qualitative results of FOMM [44] can be found in the supplementary. In contrast to other methods, RigNeRF, thanks to the use of a 3DMM-guided deformation module, is able to model head-pose, facial expressions and the full 3D portrait scene with high fidelity, thus giving better reconstructions with sharp details. + +# 4.2. Reanimation with pose and expression control + +In this section we show results of reanimating a portrait video using both RigNeRF, HyperNeRF [36] and Ner- + +FACE [12] using expression and head-pose parameters as the driving parameters. Per-frame expression and head-pose parameters from the driving video are extracted using DECA [11] + Landmark fitting [16] and are given as input to RigNeRF in Eq. (4) and Eq. (5). Since HyperNeRF [36] does not take as input head-pose or expression parameters, it's forward pass remains unchanged. + +First, in Fig 5(a) we show the results of changing head- pose and expression using a driving video while keeping view constant. As one can see, RigNeRF captures the driving head- pose and facial expressions with high fidelity without compromising the reconstruction of the entire 3D scene. In contrast, we see that HyperNeRF [36] is unable to change facial expressions or head- pose due to the lack of controls, while NerFACE [12] generates significant artefacts on the face, especially when head- pose is changed. In Fig 5(b), we show the results of novel view synthesis along with changing head- pose and facial expressions. Again, we see that RigNeRF reanimates the subject with the accurate head- pose and + +![](images/eed3b41d3519fd929b46eaaeb5fd2863ce06425acc0101f5c19cf94806a15000.jpg) +Figure 7. A qualitative comparison between RigNeRF and HyperNeRF+E/P. Here we show a qualitative comparison between RigNeRF and HyperNeRF+E/P when reanimated using source images. We see that HyperNeRF+E/P generates many artefacts during reanimation due to its inability to model deformations correctly. In constraint, RigNeRF generates realistic reanimations with high fidelity to both the head-pose and facial expressions. + +facial expressions and is able to do so regardless of viewing direction and without compromising the reconstruction of the background 3D scene. Again, HyperNeRF is unable to change the head-pose and facial expressions due to the aforementioned reason while NerFACE [12] generates significant artefacts during reanimation. + +In Fig 6, we show more qualitative results of RigNeRF. We use three different applications of RigNeRF to demonstrate its flexibility and full controllability of a portrait scene. In Fig 6-(a), we show additional results of image-driven animation. The result frames (Fig 6-(a)-bottom) closely reproduce the head pose and facial expression shown in the driving frames (Fig 6-(a)-top). In Fig 6-(b), we show results of varying camera views while fixing (an arbitrary) facial expression and head pose. We demonstrate robust view synthesis performance with dramatic view changes. In Fig 6-(c), we show that RigNeRF can take user-specified 3DMM parameters as input to generate high-quality portrait images: each frame faithfully reproduces the face and expression provided by a set of 3DMM parameters shown in the inset. + +# 4.3. Comparison with HyperNeRF+E/P + +In this section we compare against HyperNeRF [36] with added pose and expression control, which we named HyperNeRF+E/P. The forward pass of this model is as follows + +$$ +\begin{array}{l} \mathbf {x} _ {\text {c a n}} = D \left(\boldsymbol {\gamma} _ {a} (\mathbf {x}), \beta_ {\mathrm {i}, \exp}, \beta_ {\mathrm {i}, \text {p o s e}}, \omega_ {i}\right) \\ \mathbf {w} = H \left(\boldsymbol {\gamma} _ {l} (\mathbf {x}), \omega_ {i}\right) \tag {7} \\ \mathbf {c} (\mathbf {x}, \mathbf {d}), \sigma (\mathbf {x}) = F (\boldsymbol {\gamma} _ {c} (\mathbf {x} _ {\text {c a n}}), \boldsymbol {\gamma} _ {d} (\mathbf {d}), \phi_ {i}, \mathbf {w}, \beta_ {i, \exp}, \beta_ {i, \text {p o s e}}) \\ \end{array} +$$ + +where, $H$ is the ambient MLP and $\mathbf{w}$ are the ambient coordinates [36]. In Table 2, we show a quantitative comparison between RigNeRF and HyperNeRF+E/P. We see that RigN- + +
Subject 1Subject 2
ModelsPSNR ↑LPIPS ↓FaceMSE ↓PSNR ↑LPIPS ↓FaceMSE ↓
RigNeRF (Ours)29.550.1369.6e-529.360.1021e-4
HyperNeRF+Exp31.30.1611.3e-4300.1161.9e-4
+ +Table 2. Quantitative comparison between RigNeRF and HyperNeRF+E/P. We see that RigNeRF generates better reconstruction of the face with lower perceptual distance to the ground-truth as compared to HyperNeRF+E/P. + +eRF is able to generate better reconstructions of the face and generates images that are perceptually closer to the ground truth, as measured by LPIPS [54], than those generated by HyperNeRF+E/P. In Fig 7 we show a qualitative comparison when both methods are reanimated using source images, where the head-pose and expression significantly differ from the training set. As can be seen, while HyperNeRF+E/P is able to turn the head, it is unable to do so rigidly (see row 3, column 2 and row 3, column 4 of Fig 7). Further, it is also unable to model facial expressions accurately and generates artefacts on the face region. This further demonstrates the benefit of our 3DMM-guided deformation learning. + +# 5. Limitations and Conclusion + +Our method has certain limitations. First, it is subject specific and trains an individual model for each scene. Due to the need to capture sufficient expression and head-pose variations for training, our method currently requires a training sequences ranging from 40-70 seconds. Additionally, like all other NeRF-based methods, the quality of camera-registration affects the quality of the results. Being a method that allows photorealistic facial reanimation, RigNeRF may have potentially negative societal impact if misused. We discuss this further in the supplementary. + +In conclusion, we present RigNeRF, a volumetric neural rendering model for fully controllable human portraits. Once trained, it allows full control of head-pose, facial expression, and viewing direction. In order to ensure generalization to novel head-pose and facial expression we use 3DMM-guided deformation field. This deformation field allows us to effectively model and control both the rigid deformations caused by head-pose change and non-rigid deformations of changes in facial expressions. Training with a short portrait video, RigNeRF enables applications includes image-based face reanimation, portrait novel-view synthesis, and 3DMM-based control of 3D portraits. + +# 6. Acknowledgements + +We would like to thank the anonymous CVPR reviewers for taking the time to review and suggest improvements to the paper. ShahRukh Athar is supported by a gift from Adobe, Partner University Fund 4DVision Project, and the SUNY2020 Infrastructure Transportation Security Center. + +# References + +[1] ShahRukh Athar, Albert Pumarola, Francesc Moreno-Noguer, and Dimitris Samaras. Facedet3d: Facial expressions with 3d geometric detail prediction. arXiv preprint arXiv:2012.07999, 2020. 3 +[2] S Athar, Z Shu, and D Samaras. Self-supervised deformation modeling for facial expression editing. 2020. 3 +[3] Mojtaba Bemana, Karol Myszkowski, Hans-Peter Seidel, and Tobias Ritschel. X-fields: Implicit neural view-, light-and time-image interpolation. 2020. 2 +[4] Volker Blanz, Thomas Vetter, et al. A morphable model for the synthesis of 3d faces. 1999. 1, 2, 3 +[5] Aggelina Chatziagapi, ShahRukh Athar, Francesc Moreno-Noguer, and Dimitris Samaras. Sider: Single-image neural optimization for facial geometric detail recovery. arXiv preprint arXiv:2108.05465, 2021. 3 +[6] Julian Chibane, Aayush Bansal, Verica Lazova, and Gerard Pons-Moll. Stereo radiance fields (srf): Learning view synthesis for sparse views of novel scenes. In CVPR, 2021. 2 +[7] Yunjey Choi, Minje Choi, Munyoung Kim, Jung-Woo Ha, Sunghun Kim, and Jaegul Choo. Stargan: Unified generative adversarial networks for multi-domain image-to-image translation. In CVPR, 2018. 3 +[8] Yunjey Choi, Youngjung Uh, Jaejun Yoo, and Jung-Woo Ha. Stargan v2: Diverse image synthesis for multiple domains. In CVPR, 2020. 3 +[9] Yu Deng, Jiaolong Yang, Dong Chen, Fang Wen, and Xin Tong. Disentangled and controllable face image generation via 3d imitative-contrastive learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5154–5163, 2020. 3 +[10] M. Doukas, Mohammad Rami Koujan, V. Sharmanska, A. Roussos, and S. Zafeiriou. Head2head++: Deep facial attributes re-targeting. IEEE Transactions on Biometrics, Behavior, and Identity Science, 3:31-43, 2021. 3 +[11] Yao Feng, Haiwen Feng, Michael J. Black, and Timo Bolkart. Learning an animatable detailed 3D face model from in-the-wild images. volume 40, 2021. 3, 5, 7 +[12] Guy Gafni, Justus Thies, Michael Zollhöfer, and Matthias Nießner. Dynamic neural radiance fields for monocular 4d facial avatar reconstruction. In CVPR, June 2021. 3, 5, 6, 7, 8 +[13] Guy Gafni, Justus Thies, Michael Zollhöfer, and Matthias Nießner. Dynamic neural radiance fields for monocular 4d facial avatar reconstruction, 2020. 2, 3, 6 +[14] Chen Gao, Yichang Shih, Wei-Sheng Lai, Chia-Kai Liang, and Jia-Bin Huang. Portrait neural radiance fields from a single image. arXiv preprint arXiv:2012.05903, 2020. 2 +[15] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014. 2 +[16] Jianzhu Guo, Xiangyu Zhu, Yang Yang, Fan Yang, Zhen Lei, and Stan Z Li. Towards fast, accurate and stable 3d dense face alignment. In Proceedings of the European Conference on Computer Vision (ECCV), 2020. 3, 5, 7 + +[17] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017. 2 +[18] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In CVPR, 2019. 2 +[19] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In CVPR, 2019. 2 +[20] Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of stylegan. In CVPR, 2020. 2 +[21] H. Kim, P. Garrido, A. Tewari, Weipeng Xu, Justus Thies, M. Nießner, Patrick Pérez, C. Richardt, M. Zollhöfer, and C. Theobalt. Deep video portraits. ACM Transactions on Graphics (TOG), 37:1-14, 2018. 2 +[22] Hyeongwoo Kim, Pablo Garrido, Ayush Tewari, Weipeng Xu, Justus Thies, Matthias Niessner, Patrick Pérez, Christian Richardt, Michael Zollhöfer, and Christian Theobalt. Deep video portraits. ACM TOG, 2018. 3 +[23] M. Koujan, M. Doukas, A. Roussos, and S. Zafeiriou. Head2head: Video-based neural head synthesis. In 2020 15th IEEE International Conference on Automatic Face and Gesture Recognition (FG 2020) (FG), pages 319-326, Los Alamitos, CA, USA, may 2020. IEEE Computer Society. 3 +[24] Marek Kowalski, Stephan J Garbin, Virginia Estellers, Tadas Baltrusaitis, Matthew Johnson, and Jamie Shotton. Config: Controllable neural face image generation. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XI 16, pages 299-315. Springer, 2020. 3 +[25] Christoph Lassner and Michael Zollh $\mathbb{A}$ fer. Pulsar: Efficient sphere-based neural rendering. In CVPR, 2021. 2 +[26] Tianye Li, Timo Bolkart, Michael. J. Black, Hao Li, and Javier Romero. Learning a model of facial shape and expression from 4D scans. ACM Transactions on Graphics, (Proc. SIGGRAPH Asia), 36(6), 2017. 3 +[27] Tianye Li, Mira Slavcheva, Michael Zollhoefer, Simon Green, Christoph Lassner, Changil Kim, Tanner Schmidt, Steven Lovegrove, Michael Goesele, and Zhaoyang Lv. Neural 3d video synthesis, 2021. 2 +[28] Zhengqi Li, Simon Niklaus, Noah Snavely, and Oliver Wang. Neural scene flow fields for space-time view synthesis of dynamic scenes. In CVPR, 2021. 2 +[29] Lingjie Liu, Jiatao Gu, Kyaw Zaw Lin, Tat-Seng Chua, and Christian Theobalt. Neural sparse voxel fields. 2020. 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 TOG, 2021. 3 +[31] Stephen Lombardi, Tomas Simon, Gabriel Schwartz, Michael Zollhoefer, Yaser Sheikh, and Jason Saragih. Mixture of volumetric primitives for efficient neural rendering, 2021. 2 +[32] Ricardo Martin-Brualla, Noha Radwan, Mehdi SM Sajjadi, Jonathan T Barron, Alexey Dosovitskiy, and Daniel Duckworth. Nerf in the wild: Neural radiance fields for unconstrained photo collections. arXiv:2008.02268, 2020. 2 + +[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. 2020. 2, 3 +[34] Michael Oechsle, Songyou Peng, and Andreas Geiger. Unisurf: Unifying neural implicit surfaces and radiance fields for multi-view reconstruction. arXiv preprint arXiv:2104.10078, 2021. 2 +[35] Keunhong Park, Utkarsh Sinha, Jonathan T. Barron, Sofien Bouaziz, Dan B Goldman, Steven M. Seitz, and Ricardo Martin-Brualla. Nerfies: Deformable neural radiance fields. ICCV, 2021. 2, 3, 5 +[36] 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 preprint arXiv:2106.13228, 2021. 2, 3, 5, 6, 7, 8 +[37] 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 ICCV, 2021. 3 +[38] Albert Pumarola, Antonio Agudo, Aleix M Martinez, Alberto Sanfeliu, and Francesc Moreno-Noguer. Ganimation: One-shot anatomically consistent facial animation. International Journal of Computer Vision, 128(3):698-713, 2020. 3 +[39] Albert Pumarola, Enric Corona, Gerard Pons-Moll, and Francesc Moreno-Noguer. D-NeRF: Neural Radiance Fields for Dynamic Scenes. In CVPR, 2021. 2, 3 +[40] Gernot Riegler and Vladlen Koltun. Stable view synthesis. In CVPR, 2021. 2 +[41] Johannes L Schonberger and Jan-Michael Frahm. Structure-from-motion revisited. In CVPR, 2016. 5 +[42] Zhixin Shu, Mihir Sahasrabudhe, Riza Alp Guler, Dimitris Samaras, Nikos Paragios, and Iasonas Kokkinos. Deforming autoencoders: Unsupervised disentangling of shape and appearance. In ECCV, 2018. 3 +[43] Z. Shu, E. Yumer, S. Hadap, K. Sunkavalli, E. Shechtman, and D. Samaras. Neural face editing with intrinsic image disentangling. In CVPR, 2017. 3 +[44] Aliaksandr Siarohin, Stephane Lathuilière, Sergey Tulyakov, Elisa Ricci, and Nicu Sebe. First order motion model for image animation. 2019. 5, 6, 7 +[45] Vincent Sitzmann, Michael Zollhöfer, and Gordon Wetzstein. Scene representation networks: Continuous 3d-structure-aware neural scene representations. 2019. 2 +[46] Ayush Tewari, Mohamed Elgharib, Florian Bernard, Hans-Peter Seidel, Patrick Pérez, Michael Zollhöfer, and Christian Theobalt. Pie: Portrait image embedding for semantic control. ACM Transactions on Graphics (TOG), 39(6):1-14, 2020. 3 +[47] Ayush Tewari, Mohamed Elgharib, Gaurav Bharaj, Florian Bernard, Hans-Peter Seidel, Patrick Pérez, Michael Zöllhofer, and Christian Theobalt. Stylerig: Rigging stylegan for 3d control over portrait images, cvpr 2020. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, june 2020. 2, 3 +[48] Justus Thies, M. Zollhöfer, and M. Nießner. Deferred neural rendering. ACM Transactions on Graphics (TOG), 2019. 2 + +[49] Suttisak Wizadwongsa, Pakkapon Phongthawee, Jiraphon Yenphraphai, and Supasorn Suwajanakorn. Nex: Real-time view synthesis with neural basis expansion. In CVPR, 2021. 2 +[50] Wenqi Xian, Jia-Bin Huang, Johannes Kopf, and Changil Kim. Space-time neural irradiance fields for free-viewpoint video. In CVPR, 2021. 2 +[51] Lior Yariv, Yoni Kasten, Dror Moran, Meirav Galun, Matan Atzmon, Basri Ronen, and Yaron Lipman. Multiview neural surface reconstruction by disentangling geometry and appearance. NIPS, 33, 2020. 2 +[52] Kai Zhang, Gernot Riegler, Noah Snavely, and Vladlen Koltun. Nerf++: Analyzing and improving neural radiance fields. arXiv:2010.07492, 2020. 2 +[53] Kai Zhang, Gernot Riegler, Noah Snavely, and Vladlen Koltun. Nerf++: Analyzing and improving neural radiance fields. arXiv:2010.07492, 2020. 2 +[54] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In CVPR, 2018. 8 +[55] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017. 2 \ No newline at end of file diff --git a/rignerffullycontrollableneural3dportraits/images.zip b/rignerffullycontrollableneural3dportraits/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2741e9374b5a9aa478c3a27a7aaf901882c0311b --- /dev/null +++ b/rignerffullycontrollableneural3dportraits/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:754819c60adb70b678b0ad163f91f14a977671f5875817d2e5c70807918a39dd +size 671502 diff --git a/rignerffullycontrollableneural3dportraits/layout.json b/rignerffullycontrollableneural3dportraits/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1b5ce277ef3111b4a4d0aa14bebda7c69c8e0860 --- /dev/null +++ b/rignerffullycontrollableneural3dportraits/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ef849971db37e21afe6d4982a5f358dea82fc7264ba1cc7171b7fe5c8cd9972 +size 389691 diff --git a/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/69b11256-b69e-4a95-8177-80e57b826e7d_content_list.json b/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/69b11256-b69e-4a95-8177-80e57b826e7d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..cb50badddbd9613173515d672298fb80f287c628 --- /dev/null +++ b/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/69b11256-b69e-4a95-8177-80e57b826e7d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f1547d1af827d509202003a845be3d79a98332e15eb631f22b765afa709c5c7 +size 93698 diff --git a/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/69b11256-b69e-4a95-8177-80e57b826e7d_model.json b/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/69b11256-b69e-4a95-8177-80e57b826e7d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..5b9a4909cd62f4d29d2d4b8588404fd01aeb6582 --- /dev/null +++ b/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/69b11256-b69e-4a95-8177-80e57b826e7d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec7f22fd80f0d774caea8571b9af07fc71322d63598290304ec91f49ce1f6a61 +size 107835 diff --git a/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/69b11256-b69e-4a95-8177-80e57b826e7d_origin.pdf b/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/69b11256-b69e-4a95-8177-80e57b826e7d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b6a961227933abcc02e2216e3dee5c74e1c9fede --- /dev/null +++ b/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/69b11256-b69e-4a95-8177-80e57b826e7d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e7f90c3395d84bdbc3ac4010e4506b5e2570eafdcea28ff73e86eb0ff85a048 +size 4988848 diff --git a/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/full.md b/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/full.md new file mode 100644 index 0000000000000000000000000000000000000000..72660a7efe481e7d27e189163ff214a351cea36a --- /dev/null +++ b/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/full.md @@ -0,0 +1,442 @@ +# Robust and Accurate Superquadric Recovery: a Probabilistic Approach + +Weixiao Liu $^{1,2}$ Yuwei Wu $^{1}$ Sipu Ruan $^{1}$ Gregory S. Chirikjian $^{1*}$ $^{1}$ National University of Singapore $^{2}$ Johns Hopkins University +{mpewxl, yw.wu, ruansp, mpegre}@nus.edu.sg + +# Abstract + +Interpreting objects with basic geometric primitives has long been studied in computer vision. Among geometric primitives, superquadrics are well known for their ability to represent a wide range of shapes with few parameters. However, as the first and foremost step, recovering superquadrics accurately and robustly from 3D data still remains challenging. The existing methods are subject to local optima and sensitive to noise and outliers in real-world scenarios, resulting in frequent failure in capturing geometric shapes. In this paper, we propose the first probabilistic method to recover superquadrics from point clouds. Our method builds a Gaussian-uniform mixture model (GUM) on the parametric surface of a superquadric, which explicitly models the generation of outliers and noise. The superquadric recovery is formulated as a Maximum Likelihood Estimation (MLE) problem. We propose an algorithm, Expectation, Maximization, and Switching (EMS), to solve this problem, where: (1) outliers are predicted from the posterior perspective; (2) the superquadric parameter is optimized by the trust-region reflective algorithm; and (3) local optima are avoided by globally searching and switching among parameters encoding similar superquadrics. We show that our method can be extended to the multi-superquadrics recovery for complex objects. The proposed method outperforms the state-of-the-art in terms of accuracy, efficiency, and robustness on both synthetic and real-world datasets. The code is at http://github.com/bmlklwx/EMS-superquadric_fitting.git. + +# 1. Introduction + +Understanding 3D environments (and the objects therein) has been a crucial task for computer vision and intelligent systems [24]. With the recent breakthroughs in 3D vision and the advancement of computing power, modern computer vision systems are able to reconstruct and reason about scenes with low-level representations, such as point + +![](images/83ff591b3b303596a77de59f871745bde469aa643dce81196a39d7b20c06ee71.jpg) +Figure 1. (a) Shape vocabulary of convex superquadrics. We focus on the interpretation of point clouds with convex superquadrics. (b) Superquadric representations inferred by our method. + +![](images/73cedcca019f9c9058bc45a77c95567c121bee2bd5265cc2b7c1d91fb9eae485.jpg) + +clouds [11, 25, 26], meshes [18] and voxels [9, 38]. In contrast, the human visual system favors abstracting scenes into canonical parts for a better perceptual understanding [3, 15]. Human vision seems to work well with basic geometric structures of the scene, and not rely on detailed point-wise models [24]. Therefore, understanding the geometric structure of visual inputs appears to be a promising approach for intelligent systems to achieve high-level goals such as physical reasoning, decision making, planning and interaction with the environment. Inspired by this idea, researchers turned to exploring the possibility of using basic volumetric primitives for object description, e.g., cuboids [20, 33, 39]. However, due to the limited expressiveness of cuboids, objects can only be describe in a highly abstracted way. + +Superquadrics are a family of geometric primitives with a rich shape vocabulary, including cuboids, cylinders, ellipsoids, octahedra and their intermediates (Fig. 1), but only encoded by 5 parameters. In the recent few years, superquadrics have raised considerable attention in the community and are widely applied in robotics and computer vision tasks, e.g., object modeling [5, 22, 23], collision detection and motion planning [28, 29], pose estimation [4], and grasping [27, 36, 37]. A single superquadric is already expressive enough to reasonably model many everyday objects [14, 30]. The pioneering work on single superquadric recovery includes [1, 12, 32], where the recovery is formulated as a Least-Square (LSQ) problem. In [6, 16], the methods are extended to model complex objects with multiple superquadrics. However, the existing methods are vulnerable + +ble to noise and outliers, and the inherent deficiency of the local optimizer makes them sensitive to initialization. + +In this paper, we focus on the single superquadric recovery problem and propose the first probabilistic method to recover superquadrics from noisy point clouds. We build a probabilistic model to simulate how observations (point cloud) are possibly generated from a given parameterized superquadric surface. GUM is adopted to accommodate the generation of noise and outliers. The superquadric recovery is thus formulated as a MLE problem (Sec. 3.1). Expectation and Maximization (EM) algorithm is most commonly used to solve MLE problems with latent variables [10]. However, the EM algorithm typically converge to a local optimum, resulting in an inaccurate shape approximation. To solve this problem, we propose a novel algorithm, Expectation, Maximization and Switch (EMS), which takes advantage of the geometric features of superquadrics to avoid local optima (Sec. 3.2). In the E-step, the probability of a point being an outlier is inferred from a posterior perspective (Sec. 3.3). In the M-step, the parameter of the superquadric is updated given the current estimation of the latent variables in the E-step (Sec. 3.4). The E and M-step alternate until converged to a local optimum, where we introduce the S-step: globally search for candidate parameters encoding similar superquadrics in terms of shape and pose, and then switch to the one from which we can further increase the likelihood (Sec. 3.5). This strategy is made possible by investigating the geometric symmetry and algebraic ambiguity of superquadrics. Furthermore, we show our probabilistic formulation can be extended to multi-superquadrics recovery tasks (Sec. 3.6). + +The motivations and key features of this paper come from the two following questions. (1) Can we design an algorithm robust, accurate and efficient enough to abstract an optimal superquadric primitive from a noisy point cloud whose underlying shape is indeed within the vocabulary of superquadrics? This question is answered in Sec. 4.1 and Sec. 4.2. (2) If the point cloud is too complex to be approximate by a single superquadric, can the algorithm figure out a major part which can be approximated by a superquadric? This is a challenging goal which cannot be achieved by any existing single superquadric recovery algorithm. We demonstrate qualitatively that the proposed method is capable of doing this in Sec. 4.3. + +# 2. Related work + +# 2.1. Preliminary: Superquadrics + +Superquadrics are a family of geometric primitives (Fig. 1), which can be defined by the implicit function [2]: + +$$ +F (\mathbf {x}) \doteq \left(\left(\frac {x}{a _ {x}}\right) ^ {\frac {2}{\varepsilon_ {2}}} + \left(\frac {y}{a _ {y}}\right) ^ {\frac {2}{\varepsilon_ {2}}}\right) ^ {\frac {\varepsilon_ {2}}{\varepsilon_ {1}}} + \left(\frac {z}{a _ {z}}\right) ^ {\frac {2}{\varepsilon_ {1}}} \tag {1} +$$ + +where $\mathbf{x} \doteq [x, y, z]^T \in \mathbb{R}^3$ is a point defined in the superquadric frame; $a_x$ , $a_y$ and $a_z \in \mathbb{R}_{>0}$ are the scale parameters corresponding to the x, y, z-axis; $\epsilon_1$ and $\epsilon_2 \in \mathbb{R}_{\geq 0}$ are the shape parameters. $\epsilon_1$ governs the shape along the z-axis and $\epsilon_2$ controls the shape orthogonal to the z-axis. A superquadric is convex, if both $\epsilon_1$ and $\epsilon_2$ are within (0,2]. Eq. (1) is also called the 'inside-outside' function, since $\mathbf{x}$ locates on the surface if $F(\mathbf{x}) = 1$ , inside if $F(\mathbf{x}) < 1$ and outside otherwise. We are able to fully parameterize a superquadric of a general pose with $\theta \doteq \{\epsilon_1, \epsilon_2, a_x, a_y, a_z, g\}$ , where $g = [\mathbf{R} \in SO(3), \mathbf{t} \in \mathbb{R}^3] \in SE(3)$ is the Euclidean transformation. + +# 2.2. Superquadric Recovery + +The single superquadric recovery plays an important role in all superquadric recovery problems. In the previous works [1, 12, 13, 32, 35], it is formulated as a LSQ problem and solved with the Levenberg-Marquardt (LM) algorithm [17]. Recently, researchers have also explored the possibility of deep learning approaches [21, 31]. Solina et al. [1,32] propose a cost function based on the implicit function of superquadrics. Gross et al. [12] modifies the cost function with the radial distance between points and the superquadric surface. In [13, 34], the robustness of the algorithms is investigated, and outliers are randomly rejected by a customized heuristic function. All the above methods suffer from numerical instability when either $\epsilon_{1}$ or $\epsilon_{2}$ approaches 0. As a consequence, they compromise by constraining the lower bounds of $\epsilon_{1}$ and $\epsilon_{2}$ to 0.1, resulting in less accuracy when modeling shapes with sharp edges, e.g., cuboids and cylinders. Recently, this problem is revisited and solved by approximating the implicit function with an auxiliary function in the unstable region [35]. Also in [35], the authors point out that the methods are sensitive to the initialization, and suggest to try 3 different initial guesses obtained by performing the Principal Component Analysis (PCA) to the point cloud. However, all the methods are still subject to local optima, especially when the point cloud is partially sampled on the object surface. + +For the multi-superquadrics recovery, Leonardis [16] Borges [5], and Chevalier et al. [6] try to interpret complex objects with multiple superquadrics by first segmenting the point cloud into parts and fitting a superquadric to each of them. In contrast, our multi-superquadrics recovery extension works in a hierarchical way. Other than a multi-superquadrics representation, we can also obtain the hierarchical relationships among the superquadrics (Fig. 3). + +Another line of the multi-superquadrics recovery is based on deep learning [22, 23], where superquadrics can be obtained from meshes or even an RGB image. However, their approaches are data-driven with limitations in generalization, while we focus on the recovery of unseen real-world objects based on a case by case probabilistic reasoning. + +# 3. Our Method + +# 3.1. Probabilistic Formulation + +In this section, we demonstrate how to formulate the superquadric recovery as a MLE problem. Our model is built as follows. First, on the superquadric surface $S_{\theta} \subset \mathbb{R}^3$ parameterized by $\theta$ , a Gaussian centroid $\mu \in S_{\theta}$ is sampled randomly according to the uniform density function + +$$ +p (\boldsymbol {\mu}) = \frac {1}{A _ {\boldsymbol {\theta}}}, \quad A _ {\boldsymbol {\theta}} = \int_ {S _ {\boldsymbol {\theta}}} 1 d S \tag {2} +$$ + +where $A_{\theta}$ is the area of the superquadric surface. Subsequently, an observation $\mathbf{x} \in \mathbb{R}^3$ is generated from a Gaussian-uniform model (GUM), the probability density function of which is given as + +$$ +p (\mathbf {x} \mid \boldsymbol {\mu}) = w _ {o} p _ {o} (\mathbf {x}) + (1 - w _ {o}) \mathcal {N} (\mathbf {x} \mid \boldsymbol {\mu}, \boldsymbol {\Sigma}) \tag {3} +$$ + +where $\mathcal{N}(\cdot |\boldsymbol {\mu},\boldsymbol {\Sigma})$ represents the density function of a Gaussian distribution with mean $\pmb{\mu}$ and covariance $\pmb{\Sigma}$ . We assume the noise to be isotropic, i.e., $\pmb {\Sigma} = \sigma^2\mathbf{I}$ , where $\mathbf{I}\in \mathbb{R}_{3\times 3}$ is the identity matrix. A uniform outlier component is introduced to model the generation of outliers. $w_{o}\in [0,1]$ is the probability of a point being sampled from the outlier component. To make Eq. (3) a proper probability density function (integrates to 1 over $\mathbb{R}^3$ ), we introduce a working space $\mathbb{V}$ encapsulating the point set, whose volume equals $V$ . The probability density of the outlier component $p_o(\mathbf{x}) = \frac{1}{V}$ if $\mathbf{x}\in \mathbb{V}$ and $p_o(\mathbf{x}) = 0$ otherwise. + +For the convenience of the upcoming derivation, we reformulate Eq. (3) into an equivalent form by introducing a latent random variable $z \in \{0,1\}$ encoding the membership of $\mathbf{x}$ . When $z = 0$ , $\mathbf{x}$ is sampled from the uniform outlier component. On the contrary, $z = 1$ indicates that $\mathbf{x}$ is generated from the Gaussian inlier component. We assume the membership $z$ is independent of the mean $\mu$ of the Gaussian component. Therefore, Eq. (3) is equivalent to + +$$ +\begin{array}{l} p (\mathbf {x} | \boldsymbol {\mu}, z) = p _ {o} (\mathbf {x}) ^ {1 - z} \cdot \mathcal {N} (\mathbf {x} | \boldsymbol {\mu}, \boldsymbol {\Sigma}) ^ {z} \tag {4} \\ z \sim p (z) = \mathrm {B e r n o u l l i} (1 - w _ {o}) \\ \end{array} +$$ + +Given a set of points $\mathbf{X} = \{\mathbf{x}_i\in \mathbb{R}^3|i = 1,2,\dots,N\}$ , the parameters of the superquadric surface can be estimated by maximizing the following likelihood function + +$$ +L (\boldsymbol {\theta}, \sigma^ {2}) = \prod_ {i = 1} ^ {N} p \left(\mathbf {x} _ {i} \mid \boldsymbol {\mu} _ {i}, z _ {i}\right) p \left(\boldsymbol {\mu} _ {i}\right) p \left(z _ {i}\right) \tag {5} +$$ + +or equivalently, minimizing the negative log-likelihood function + +$$ +l \left(\boldsymbol {\theta}, \sigma^ {2}\right) = \sum_ {i = 1} ^ {N} z _ {i} \left(\frac {\left\| \mathbf {x} _ {i} - \boldsymbol {\mu} _ {i} \right\| _ {2} ^ {2}}{2 \sigma^ {2}} - \log c\right) + N \log \left(A _ {\boldsymbol {\theta}}\right) \tag {6} +$$ + +where $c$ is the normalizing constant of the Gaussian distribution defined in Eq. (3). Note that the terms independent of $\theta$ and $\sigma^2$ have been omitted for simplicity. + +# 3.2. Expectation, Maximization and Switching + +Eq. (6) is intractable to solve directly because of the existence of a set of continuous latent variables $\pmb{\mu}_i\in S_\theta ,i = 1,2,\dots,N$ and discrete latent variables $z_{i}\in \{0,1\} ,i = 1,2,\dots,N$ . The EM algorithm [10] is most commonly used to solve MLE with latent variables. However, in our scenario, it suffers from multiple local optima and has difficulties in calculating the expectation of the latent variables in an exact form. Therefore, we propose a novel algorithm called EMS, which is adapted from the EM algorithm by utilizing the geometric properties of superquadrics. The algorithm first estimates the latent variables from a posterior perspective given the current estimation of the superquadric parameter (E-step). Next, the parameters are inferred and updated by minimizing the negative log-likelihood function (M-step). These two steps alternate until converged to a local minimum. Then, we globally search for candidate parameters which encode superquadrics geometrically similar to the current estimation but have the potential of further decreasing the negative log-likelihood function (S-step). If a valid candidate is found, we reinitialize the EM-phase with this candidate; else, we declare a termination and return the final result. Detailed motivations and derivations of each step are discussed in the following sections. + +# 3.3. E-step: Latent Variables Estimation + +Given the current superquadric parameter $\theta$ , we estimate $\pmb{\mu}_i$ via maximum a posteriori (MAP) + +$$ +\hat {\boldsymbol {\mu}} _ {i} = \underset {\boldsymbol {\mu} _ {i} \in \mathcal {S} _ {\boldsymbol {\theta}}} {\arg \min } p (\boldsymbol {\mu} _ {i} | \mathbf {x} _ {i}) \tag {7} +$$ + +which guarantees to minimize Eq. (6). By the Bayes' rule, we show that it is equivalent to find the nearest point on the superquadric surface to $\mathbf{x}_i$ + +$$ +\hat {\boldsymbol {\mu}} _ {i} = \underset {\boldsymbol {\mu} _ {i} \in \mathcal {S} _ {\boldsymbol {\theta}}} {\arg \min } \| \mathbf {x} _ {i} - \boldsymbol {\mu} _ {i} \| _ {2} \tag {8} +$$ + +As far as we know, there is no analytical solution to Eq. (8), and numerical optimization is prohibitively time consuming for a large number of observations. Therefore, we approximate $\hat{\mu}_i$ with a sub-optimal solution + +$$ +\hat {\boldsymbol {\mu}} _ {i} ^ {s} = \mathbf {x} _ {i} - \left(1 - F ^ {- \frac {\epsilon_ {1}}{2}} \left(g ^ {- 1} \circ \mathbf {x} _ {i}\right)\right) \left(g ^ {- 1} \circ \mathbf {x} _ {i}\right) \tag {9} +$$ + +which is the intersection of the vector $\mathbf{x}_i$ (defined in the superquadric frame) and the superquadric surface $S_{\theta}$ . $F(\cdot)$ is the implicit function of the superquadric. This idea was first introduced by [12] to establish the radial distance measure for superquadrics fitting. + +Given the current estimation of $\pmb{\mu}_i$ , the expectation of the posterior probability of $\mathbf{x}_i$ being an inlier is inferred via the Bayes' rule + +$$ +E \left(z _ {i} = 1 \mid \mathbf {x} _ {i}, \hat {\boldsymbol {\mu}} _ {i} ^ {s}\right) = \frac {\mathcal {N} \left(\mathbf {x} _ {i} \mid \hat {\boldsymbol {\mu}} _ {i} ^ {s} , \sigma^ {2} \mathbf {I}\right)}{\mathcal {N} \left(\mathbf {x} _ {i} \mid \hat {\boldsymbol {\mu}} _ {i} ^ {s} , \sigma^ {2} \mathbf {I}\right) + \frac {w _ {o} p _ {o}}{1 - w _ {o}}} \tag {10} +$$ + +For simplicity, we denote the value of the expectation as $\hat{z}_i$ . + +# 3.4. M-step: Parameter Optimization + +Substituting $\pmb{\mu}_i$ and $z_{i}$ in Eq. (6) with the their posterior estimations $\hat{\pmb{\mu}}_i^s$ and $\hat{z}_i$ , we obtain an updated negative log-likelihood function + +$$ +\hat {l} (\boldsymbol {\theta}, \sigma^ {2}) = \sum_ {i = 1} ^ {N} \hat {z} _ {i} \left(\frac {\| \mathbf {x} _ {i} - \hat {\boldsymbol {\mu}} _ {i} ^ {s} \| _ {2} ^ {2}}{2 \sigma^ {2}} - \log c\right) + N \log (A _ {\boldsymbol {\theta}}) \tag {11} +$$ + +To the best of our knowledge, $A_{\theta}$ cannot be expressed in closed-form with respect to $\theta$ . For efficiency, $A_{\theta}$ is approximated by a bi-linear interpolation along $\epsilon_{1}$ and $\epsilon_{2}$ . Details are presented in the Supplementary Material. $N\log (A_{\theta})$ indicates a preference for a small superquadric. To avoid local optima, it is preferable to delay the introduction of this term until $\sigma^2$ falls below a threshold, i.e., the shape is roughly captured. We apply the trust-region-reflective [8] to optimize $\theta$ . The main reason we do not use the LM solver lies in its numerical instability when approaching the lower bound of the shape parameters. In contrast, the reflective transformation [7], empirically, always keeps the optimization numerically stable. More discussion can be found in the Supplementary Material. After $\theta$ is solved, $\sigma^2$ is updated by setting the corresponding partial derivative of Eq. (11) to zero. + +# 3.5. S-step: Geometric Local Optimum Avoidance + +Superquadrics hold many geometric and algebraic features, e.g., symmetry and parametric ambiguity. Trivial cases can be raised where two superquadrics possess a similar or even identical shape and pose but are distant in the parameter space. The likelihood function Eq. (11) quantifies how well an underlying geometric primitive fits the observations, and thus two similar (or identical) superquadrics must possess similar (or identical) likelihoods as well. Inspired by this idea, we propose a geometry-guided local optima avoidance strategy: globally search for candidate parameters encoding similar shapes, and switch to the one which has the potential of further increasing the likelihood. The switch action is discontinuous in the parameter space, while the change in terms of the underlying geometric shape is almost smooth. We investigate the conditions when two parameters distant to each other represent similar superquadrics, and summarize the cases into two categories. The idea of switch and examples of similarities are visualized in Fig. 2. + +![](images/a190f6ef1b78eeb153851aee22d6cc8acae2814f07c7aac42f39fed1704c56e9.jpg) +Figure 2. Visualization of the S-step and similarities. The EM steps change the shape and pose of the superquadric towards a local optimum, while the S-steps tries to preserve the current shape but jump between distant parameters to avoid the local optimum. + +Axis-mismatch similarity: According to the definition in Sec. 2.1, the x and y-axis are of an equivalent class in terms for interchangeability, i.e., if we interchange the value of $a_{x}$ and $a_{y}$ , we can obtain an identical superquadric by rotating 90 degrees about the z-axis. However, the z-axis distinguishes itself because it is generally not interchangeable with them. We thus name the z-axis as the principal axis. Now let us consider a special case when the shape parameters $\epsilon_{1} = \epsilon_{2}$ . In this scenario, the implicit function (Eq. (1)) degenerates and makes all the three axes equivalent. From another perspective, the 'degree' of interchangeability decrease as the difference between $\epsilon_{1}$ and $\epsilon_{2}$ increases. Therefore, when $\epsilon_{1}$ and $\epsilon_{2}$ are close to each other, a similar superquadric can be obtained by reassigning the principal axis to either the x or y-axis and then applying a corresponding rotation. We call this axis-mismatch, because it helps to avoid the local optimum caused by the incorrect assignment of the principal axis, which prohibit the shape from further varying to the global optimum. + +Duality similarity: This case is derived from the shape ambiguity regarding $\epsilon_{2}$ . When $a_{x} = a_{y}$ and $\epsilon_{2} = 0$ , we can always represent the same superquadric (in terms of shape and pose) by scaling $a_{x}$ and $a_{y}$ with $1 / \sqrt{2}$ , setting $\epsilon_{2} = 2$ , and rotating 45 degrees about the principal axis. This is because $\epsilon_{2} = 0$ and $\epsilon_{2} = 2$ define a pair of squares dual to each other in the subspace orthogonal to the principal axis. Utilizing this property, when $a_{x} \approx a_{y}$ , a similar superquadric can be constructed by setting $\epsilon_{2} = 2 - \epsilon_{2}$ , rescaling and rotating. The duality similarity is of great importance to local optimum avoidance, since it connects two extreme ends of the parameter space. Local optimizer tends to converge monotonically towards one of the ends, while the duality similarities glue the ends together, allowing the algorithm to check and explore the counterpart. + +Similar superquadrics can also be resulted by a combination of the two similarities. Detailed mathematical formulation about the candidates generation and switching strategy + +can be found in the Supplementary Material. + +# 3.6. Extension: Multi-superquadrics Recovery + +Although our method is designed for single superquadric recovery, it can be easily extended to understand the shape and structure of a complex object with multiple superquadrics. One of the key features of our single superquadric recovery method is that it can capture the major superquadric-like part of a point cloud and identify the unfitted points as 'outliers'. Therefore, from a point cloud $\mathbf{X}$ of a complex object, we can first recover a superquadric capturing the major superquadric structure along with a set of unfitted 'outlier' clusters $\mathcal{C}$ . Then, we feed $\mathcal{C}$ back to the algorithm as the input to recover a new set of superquadrics along with an updated $\mathcal{C}$ . The process (Algorithm 1) is repeated hierarchically until $\mathcal{C}$ is empty or a maximum depth of layer is reached. In this way, not only the point cloud is represented with the union of the acquired superquadrics, but also the hierarchical relationship between the superquadrics is obtained, as illustrated in Fig. 3. + +Algorithm 1 A layer of hierarchical superquadric recovery +1: Input: $\{\pmb{X}_1, \pmb{X}_2, \dots, \pmb{X}_n\}$ +2: Output: $\{\pmb{\theta}_1, \pmb{\theta}_2, \dots, \pmb{\theta}_n\}, \mathcal{C} = \{\bar{X}_1, \bar{X}_2, \dots, \bar{X}_m\}$ +3: $\mathcal{C} \gets \{\}$ +4: for $i = 1, \dots, n$ do +5: $(\pmb{\theta}_i, \text{outliers}) \gets EMS(\pmb{X}_i)$ +6: $\{\bar{X}_{1_i}, \bar{X}_{2_i}, \dots, \bar{X}_{\gamma_i}\} \gets \text{Clustering(outliers)}$ +7: $\triangleright$ clustering the outliers by Euclidean distance [19] +8: $\mathcal{C} \gets \mathcal{C} \cup \{\bar{X}_{1_i}, \bar{X}_{2_i}, \dots, \bar{X}_{\gamma_i}\}$ +9: $\triangleright$ clusters with points less than a threshold are pruned +10: end for + +![](images/7d4678ea4e67edbe4ae91cf2b87ea2eb583896990f9991453a59548ce259cc0b.jpg) + +![](images/f6a9975fd0fd63eba4eac2de18fa2a252069f221b4000a349afdee8367fedc7c.jpg) + +![](images/c9e725dd6871579c05796c08a40f3c9d2660c09cecac9fa0fd525c37111a10ee.jpg) + +![](images/97871976783002be2ccf4c4fbf91b34ee6608c6866284f0281b190eb30be68db.jpg) + +![](images/2305e0298a07185d04c65a0bcf23d2258ffa5b412de40f47dd139d836d0ee0ec.jpg) +Figure 3. Hierarchical process of the multi-superquadrics recovery. We demonstrate with a Seal from the KIT ObjectModels. (a) The original point cloud. (b-d) Steps of the hierarchical process and the generation of the structure graph. (e) The recovered superquadric model. (f) Segmentation of the original point cloud based on the superquadric model. + +![](images/8dd5bc43acddafc50c7be02e431a793fb9661b22372db08aec34903603610d76.jpg) + +# 4. Experiments + +We conduct experiments on both synthetic and real-world point cloud datasets to verify the accuracy, efficiency and robustness of our method. All the algorithms and experiments are implemented in MATLAB, on a computer running Intel Core i9-9900K(3.6GHz). In all the single superquadric recovery experiments, we compare with 4 baseline methods: Implicit-LSQ [32], Radial-LSQ [12], Robust-fitting [13] and Numerical Stable method [35]. + +Initialization: Following [35], if not specified, the baseline methods are initialized with 3 different superquadric parameters obtained via PCA to alleviate the affect of local optima. To show the effectiveness of the proposed local optimum avoidance strategy, our method is only initialized once with the first one among the three. Implementation details can be found in the Supplementary Material. + +# 4.1. Recovery on Synthetic Datasets + +In this section, we evaluate the performance of the algorithms on recovering the underlying geometric primitives given points sampled on a superquadric. Three experiments are designed to evaluate the robustness to partial data, outliers, and noise, respectively. To cover the whole parameter space of superquadrics in convex region, we randomly generate 500 superquadrics under the following strategy: the shape parameter $[\epsilon_1,\epsilon_2]$ is uniformly sampled on $(0,2]^2\subset \mathbb{R}^2$ ; the scale parameter $[a_x,a_y,a_z]$ is uniformly sampled on $[0.5,3]^3\subset \mathbb{R}^3$ ; the rotation $\mathbf{R}\in SO(3)$ is generated by first sampling a rotation axis on the unit sphere and then applying a random rotation in $[0,2\pi ]$ about the axis; the translation $\mathbf{t}$ is uniformly sampled on $[-1,1]^3\subset \mathbb{R}^3$ . Point clouds are generated by sampling evenly on the surface of the random superquadrics with an equal interval of 0.2. In [35], a recursive algorithm is proposed to realize this task. However, the points sampled by the algorithm get denser when approaching the poles along the z-axis. Therefore, we further improve their algorithm by adaptively re-scaling the sampling intervals at different latitudes to achieve an overall equal-distance sampling (see Supplementary Material). + +The most natural metric to evaluate the goodness of fitting is the average point-to-surface orthogonal distance. However, given an arbitrary point, there is no analytical solution of the corresponding closest point on a superquadric surface. Therefore, we approximate the point-to-surface metric with + +$$ +e r r o r (\mathbf {X}, \mathbf {S}) \doteq \frac {1}{N} \sum_ {i = 1} ^ {N} \min _ {\mathbf {s} _ {j} \in \mathbf {S}} \| \mathbf {x} _ {i} - \mathbf {s} _ {j} \| _ {2} \tag {12} +$$ + +where $\mathbf{S} = \{\mathbf{s}_j\in S_\theta |j = 1,2,\dots,M\}$ is a set of points + +densely and evenly sampled (with an interval of 0.02 in the synthetic experiments) on the superquadric surface $S_{\theta}$ . + +![](images/f0c99154d6340b0b2cdaeb411cdd32f771178d16b6c145291b2b775fecb12bac.jpg) + +![](images/f8f922d9c33a8f73965b557b37aaedfc9c606c8273c6bdfc388a7923a2f65708.jpg) + +![](images/b6df4e2dc1cb0a6e200561b2f2708c6cc4a0af1a8fad52cd1521185b9397b9fe.jpg) + +![](images/588f242524dd6cef9dac0c997bb788baa7049af34b2acdf66f68603cd84d5d34.jpg) + +
(e) Partial ratioPartial ratio
Partial Ratio1.00.80.60.40.2
Radial (once)33.2%28.6%30.8%29.4%34.4%
Radial (3 times)99.0%78.0%70.4%68.8%65.6%
EMS100%100%99.8%97.4%86.4%
+ +![](images/32ca762e1d96f56bdc3a74860c3959b95e96747a6fd240648f24b4f1dccfa183.jpg) +(f) +Numerical Stable +Figure 4. Results of recovery from partial data. (a) Average error (the baselines are initialized 3 times). (b) Average error (the baselines are initialized once). (c) Ablation study. (d) Average runtime. (e) Global Optimality rate (declared when the fitting error is less than 0.01) (f) Examples at partial ratio 0.4, when the baselines get stuck in local optima, while ours have managed to jump out. + +![](images/169cc03c6db3a8f9e215653b8455514a36013820e75ae88c0927b20855259bb7.jpg) +Radial-LSQ + +![](images/ea991d0eaf46acc1dc22feea2214a8da2a1ca9529b3779e83f0c525584920a9c.jpg) +EMS (Ours) + +![](images/419ede9b2db7cf072da6bd95305af969ea742238fe71a7c3df079c76c5889771.jpg) +Ground Truth + +Recovery on partial data: This experiment simulates the cases where points are sampled from a partial area of a superquadric in the sense that sometimes we can only obtain a partial view of an object. For each point cloud of the 500 superquadrics, a point is randomly selected and a certain percentage (partial ratio) of the points which are the closest to the random point are kept. We test on 5 different levels of partial ratio ranging from 1.0 (complete point cloud) to 0.2, resulting in totally 2500 point clouds. Results are shown in Fig. 4. Our method significantly outperforms the baseline methods at all levels of partial ratios. All the methods perform well when a complete point cloud of a superquadric is available. However, with the decreasing of the partial ratio, it becomes harder to make a reasonable initial guess of the parameter. Therefore, the baseline methods become more likely to get stuck at a local optimum, even with multiple trials. While, our method continuously avoids the local optima with the geometry-guided switching strategy, and thus maintains a high success rate in converging to the global optimum. We also perform ablation studies about the S-step. The results verify its effectiveness (Fig. 4(c)). Although our algorithm only guarantees local optimality, the + +empirical results indicate that our method is very likely to achieve the global optimum in practice (Fig. 4(e)). + +Robustness to outliers: We add different levels of Gaussian outliers to the 2500 point clouds. Outlier ratio (the number of outliers / the number of inliers) is used to quantify the level of outliers added. Results are shown in Fig. 5. Our method shows superior robustness to outliers and is able to recover the underlying superquadrics even from severely corrupted point clouds. The Implicit-LSQ, RadialLSQ and Numerical Stable are vulnerable to outliers, since they are not designed to tolerate outliers. The Robust-fitting performs better, however, is limited by its heuristic outlier rejection policy, which also imposes an undesirable negative effect on clean point clouds. In contrast, our method infers outliers in a posterior probabilistic approach and thus maintains high robustness among all levels of outliers. + +![](images/fef1e3e4d31bc09e2a1d7c3ff15d1f0432e792e6777b00b07503f2f863ad474a.jpg) +(c) + +![](images/f497d4d063a57eec986187f4ff1c76ee53f131c5816aa4988751b69de4b84207.jpg) +Implicit-LSQ + +![](images/9a85b505bb0a3b712f6a73d9ed5b313d7cf239e423e620c34ca0624d917b1d63.jpg) + +![](images/2ec0091bf1af7ab35f4808d995fc743c069597c19d579b0d03cdb6ea8b68ed7a.jpg) +Numerical Stable + +![](images/5003a064d9139deac0d83ac0955cf815df6f40037def5ed50b2556b9bf349b64.jpg) +Radial-LSQ + +![](images/72db99defbfb93427f307facaf600001598e43e4f58b046d112e4cc6dfd78184.jpg) +Robust-fitting +Figure 5. Outlier results. (a) Average error at different outlier ratios. (b) Average runtime. Runtime of Radial, Implicit and NS has no significant meaning since they cannot recover the superquadric correctly in most cases. (c) Examples at outlier ratio 0.4. + +![](images/1c64f2192247bd9adecb3e78975fb672951e8ec080912097f61b1104c0df2dc0.jpg) +EMS (Ours) + +![](images/3f71a1ec11717be281d126a417fef9956eb25fd6d1c2aca1e77d7f250d5a828f.jpg) +Ground Truth + +Robustness to noise: In this experiment, we corrupt each point in the point clouds with Gaussian noise of different variance. Results are shown in Fig. 6. It can be observed that the fitting error grows with the increase of noise level for all the methods, including ours. This is because, unlike outliers, the noise inherently corrupts the geometric information. But still, our method shows advantages in robustness and efficiency when dealing with noisy point clouds. + +# 4.2. Recovery on Real-world Datasets + +In this section, we evaluate the single superquadric recovery on two public datasets: the KIT ObjectModel [14] and BigBIRD [30]. Both of the datasets consist of various daily household objects, and are widely used as benchmarks + +![](images/2862e31bed0fc04bfaf9e98cbb060a79707d70f97d07abdc2e7ec3886779eeca.jpg) + +![](images/986f279550d043ba01d59407d4cfa66c1b39959bf27f6f1f3d6e888a6b63a154.jpg) + +![](images/717092e35a0174e129c693fb34fea7106a8f8d093e573e289f1147c7980e23e2.jpg) +Figure 6. Noise results (a) Average errors at different noise levels (evaluated on uncorrupted point clouds). (b) Average runtime. (c) Examples at $\sigma^2 = 0.01$ Gaussian noise level. + +![](images/875f60cf5a01da52ff24757f04a18c9c5eb799c454001d3e28fc93549adee635.jpg) + +![](images/eab6faaa55f120c25d4eb2e1606fbf6c8982b4212581a998b509427f19dcd046.jpg) + +in 3D-object reconstruction, recognition, and robot grasping. KIT is scanned by a high-accuracy laser scanner (Minolta VI-900), while BigBIRD is captured by a commercial-grade RGB-D camera (PrimeSense Carmine 1.08). + +KIT ObjectModels: We follow the setting in [35]. The dataset includes 145 objects, among which [35] selects 105 items that can be reasonably approximated by a single superquadric. However, we decide to shrink our scope to 97 items, since some of the objects (e.g., bottles) would be better recovered with multiple superquadrics. Therefore, we defer the discussion of those cases to Sec. 4.3. We down-sample the point clouds with voxelized grids to about 1500 points. Quantitative results are shown in Fig. 7(c). Our method outperforms all the baseline methods in accuracy and efficiency. Our method also demonstrates some interesting features which can not be shown quantitatively. As shown in Fig. 7(a), some objects have minor local deformations and/or parts deviating from the main structure, which affect the major shape capturing. Our probabilistic method is able to reduce the impact of those parts (inferred as outliers) and achieves an overall better fitting. Also in Fig. 7(b), the box-like objects are usually filled with content inside, resulting in a shape slightly extended in the middle. This shape is within the vocabulary of superquadrics, however, is so close to cuboids that the other algorithms fail in telling them apart, i.e., get stuck at a local optimum. In contrast, our method is able to switch and check among similar shapes and recover the optimal superquadric. + +BigBIRD: Compared with laser scanners, low-cost RGB-D cameras are inferior in measurement accuracy, resulting in noisy point clouds with outliers. Therefore, the BigBIRD is an ideal dataset for evaluating the robustness of an algorithm in daily operation. The dataset consists of 125 object instances, and we test on 91 of them which can be reasonably approximated with single superquadrics. + +![](images/605ea94243902ea503382df4b28cff98b29bf3192e8e014ac9ebf9fb62b1447e.jpg) + +![](images/8137026b58ce2837d7582db793ba8a8fe415963b22482e46af4246318c521d8b.jpg) + +![](images/d081bb7c5687181734ff7a9b95ec6e8ce908009fcb9051078bf2deee64041e09.jpg) + +![](images/9ec2f5fdd2067359f712d731ab7ee368e81bf89062e6ce539b1575fddc939aad.jpg) + +(c) + +
implicitNS
0.6470.638
249.7256.0
+ +
RobustEMS (Ours)
0.7480.584
1065.091.1
+ +![](images/310c2aa409e1085d47920a17e0a00da85eeb8325322ad96cf519f441e59b6d13.jpg) +Figure 7. KIT results. (a) and (b) are the two cross-section views of fitting results between Radial-LSQ and the proposed method. (c) Quantitative results of average error (Eq. (12) with sampling interval as dense as $0.1\mathrm{mm}$ ) and runtime. +(a) Implicit + +![](images/2828da05a4212efca4b4523d534242117b836e5a3e92d4f417d430b4ccd4620d.jpg) +NS + +![](images/7dc2cd07a748dca4cf1286c735becc2b5a87780d70b53b328e5a759c6b62168f.jpg) +Radial + +![](images/2da65d77f9e5fab57429dd0105153c82acea960e8280856e7ae65638b6aa4648.jpg) +Robust + +![](images/507c869d4200a7e9876849d7cd0aa33090178cf8a8fabf9b4e20dabc0be67e2c.jpg) +EMS (Ours) + +![](images/0686174a8885fa716237b621a14760ee17f74001202c3666bd737d47804a5e7d.jpg) + +![](images/68fbfb76e71a65f250bbfd8fae6d76fc4a7b0c014f9a939f2cdc1afd2c1b42b9.jpg) +Figure 8. BigBIRD results. (a) A heatmap showing the local fitting error between the recovered superquadric and the original point cloud. (b) Quantitative results of the average error (Eq. (12) with sampling interval as dense as $0.1\mathrm{mm}$ ) and runtime. + +
MethodError (mm)Time (ms)
Radial0.821175.0
Implicit0.826139.0
NS0.847133.9
Robust0.807834.9
EMS (Ours)0.75378.9
+ +(b) + +The point clouds are downsampled with voxelized grids to around 1000 points. Results are shown in Fig. 8. Among the baselines, the Robust-fitting shows better robustness but takes a much longer time to converge. Our method can achieve the best accuracy with the least time consumption. + +# 4.3. Multi-superquadrics Recovery + +In this section, we show the qualitative results of our extension to the multi-superquadrics recovery (Sec. 3.6). We use the complex objects which cannot be properly approximated by a single superquadric from the KIT Object-Models. We downsample the point clouds to around 5000 points, so as to keep enough details of the complex shapes. We set the maximum hierarchical layers to 3 and the prin + +![](images/85525fea747ba3ea4ef9d5b1980ea7a1c82690076b083ab91cb27bdb2f44913d.jpg) +(a) + +![](images/20dba65b7d1c687cb9f0d5c130a3acb3f6874784aa122354951e39709c8ecaa5.jpg) + +![](images/cc9ea7bf05427a6270a1dc4136ceac30a77411aae04487b2f059b2682eca6c16.jpg) + +![](images/462a9ca123eee5e18df868b6f523881947d56ee8347bbcaaa9e96ca879d25b13.jpg) + +![](images/be5931c9833e6adb1c04d50bbe1ad22280aac40368a8d100839ef2ca7aab78c5.jpg) + +![](images/2ff2f7cd38bf2b180b2ea7190693d1cabcce10fa5db3ee5305ae89d404b206dc.jpg) + +![](images/ca8a381022e5158f23c7b3a1458b2546ee9c262ad4e383f6c2b2e53dc1a43ad6.jpg) + +![](images/9734adfa3592f8777406df3acc6b7153f1e508d2e341937c311aa81866ca8249.jpg) + +![](images/dae23470eb2df0c7c8f32acab4d19d540efd7ccd44fa9a1c472752ca9791ca46.jpg) +(b) + +![](images/867cb644ade016d92e1342c03fdbf7b37912fd3c7156305520f214538fb69d0b.jpg) + +![](images/d0ddc198d3aa2fc774037db3b293ec6bd7e3bd20e7b14bc7ce7860caa4a02c16.jpg) + +![](images/b2c2dfdefc89a2fe2f5e3501046136662e50b382c40783d24543c60394d94a72.jpg) + +![](images/f249f4b8b2cfbe11e82c803a452a45006ced495803c9b4b6da422feff1e6f3ef.jpg) + +![](images/3b07b842c3b01d90219dbd51476a55ae388430c04e868dc7bb1bab7e2b9e97e4.jpg) + +![](images/38faed1ebb5adc22bc773f65bcd6a98578dfba522eba598d1b5232eb974122d2.jpg) + +![](images/35eda26e31ef2d9d845522c3f0c8cad186e0b900accf0b21196a00d1073503a2.jpg) + +![](images/54b8a023e3e4ae2b26939c249e76930aa5cfae95efd446139d5e41ee6e575a80.jpg) +(c) + +![](images/2800ce224f106e3d66581e784d4e6d94465d314491a5fd8223258ca355fbd094.jpg) +Figure 9. Examples of multi-superquadrics recovery. (a) The original point clouds. (b) The recovered multi-superquadrics representations with the proposed method. (c) Segmentation of the original point clouds based on the multi-superquadrics representations. + +![](images/07b83526323072a212fe46f4c329a928a024e42655c871ab726861a515ca713f.jpg) + +![](images/5c3611bd2ce3e1a80ea4ca63abd047119be02c25910e9f63a7dda2a16d985789.jpg) + +![](images/60b85f2beecd4441ad1dee543659e51eb02ea7eafd9c36a79702024a2d0e22a0.jpg) + +![](images/06b89b52bdd336ef4ebf6aa79dba44e6efa43e9725b3d8df48467db7c56f794f.jpg) + +![](images/5b4824f6e3b4a9e61d22aca74b9f4cf4f0c42e9637f04ae0f758d71718429b16.jpg) + +![](images/85a34da13bed27bd27feae6178e0af5c82f1d5fa0d8a9c58cc8860136501644f.jpg) + +ing threshold to 60 points. As shown in Fig. 10, the baseline single superquadric method fails in capturing the major superquadric-like part of a bottle as a cylinder. Our method succeeds in doing this and identifies the points around the cap of the bottle as outliers, from which the bottle is recovered hierarchically. Other results on more complex objects are shown in Fig. 9. Our method is able to represent the objects vividly with superquadrics. Some detailed parts such as ears and mouths of animals can also be recovered. + +![](images/cdef18899fef5d53d98422ca2a51f05ed1f5e06902bdbfb7a7b4f6e61befb006.jpg) +(b) + +![](images/2c89a2111687f0a89fd799eee1a023f9f38da4cf49a6006778b93f5704a29f6a.jpg) + +![](images/3eea63266ab1949d7c89469cbc4cc34b79b825a68f6e3a26cc7b7f62f4ac0cb0.jpg) +Figure 10. Qualitative multi-superquadrics recovery on bottles from KIT. (a) Comparison of single superquadric recovery between Radial-LSQ and EMS (ours). The proposed method is able to recover the major superquadric shape (a cylinder) from the point cloud. (b) Other results of the proposed method. + +![](images/3274db0b8b077649fb77eaee8c1fdffb210ef122539beccfe76677a70f597c9f.jpg) + +![](images/5b236f98ecee401339988f1f0c2435280754866e10142336be3593f696f00b3c.jpg) + +![](images/a35e76fec422d4ec5cc834ab7fc6b4742b624f8c0361dde6a160cea448a6f4bd.jpg) + +# 5. Discussion & Limitations + +Various experiments show that our method is robust, accurate and efficient. As shown in Sec. 4.1 and Sec. 4.2, the baseline methods are sensitive to initialization, and are easily trapped into local optima. Therefore, to obtain a satisfying result, they usually require multiple trials starting from different initial guesses. In comparison, our method is able to avoid local optima on the fly and achieve a better recovery accuracy with one shot. Also, our method is robust to outliers and noise. This feature is brought in by our probabilistic formulation of the problem, where we explicitly model + +the possible sources of outliers and noise with a uniform distribution and a Gaussian distribution, respectively. This feature also forms the basis for our multi-superquadrics extension. As shown in Sec. 4.3, our method is able to capture the major superquadric-like part from a point cloud and hierarchically generate subordinate superquadrics from the 'outliers' identified at the upper level. + +However, there is a limitation in our multi-superquadrics extension: our approach requires the object being recovered possesses an inherent hierarchical geometric structure. For more general cases, a preliminary point cloud segmentation is preferred [25, 26]. Another limitation is due to the expressiveness of superquadrics. It is hard to well capture the shape of a thin-walled non-convex object such as a cup. In future works, we plan to adapt deformations and primitive subtractions to extend the vocabulary of superquadrics. + +# 6. Conclusion + +We present the first probabilistic method to recover superquadrics from point clouds. We formulate the recovering process as an MLE problem and propose a novel geometry-guided approach, EMS, to infer an optimal superquadric. The proposed method outperforms the state-of-the-art in terms of accuracy, robustness, and efficiency, which is substantiated by extensive experiments on both synthetic and real-world datasets. We also extend our method to represent a complex object with a hierarchy of superquadrics. Such representation can reveal the geometric and hierarchical structure of an object, which, we believe, has great potential in facilitating tasks such as object classification, segmentation and grasping. + +Acknowledgements This research is supported by the National Research Foundation, Singapore, under its Medium Sized Centre Programme - Centre for Advanced Robotics Technology Innovation (CARTIN) R-261-521-002-592, and JHU internal funds. + +# References + +[1] R. Bajcsy and F. Solina. Three dimensional object representation revisited. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 231-240, 1987. 1, 2 +[2] A. H. Barr. Superquadrics and angle-preserving transformations. IEEE Computer graphics and Applications, 1(1):11-23, 1981. 2 +[3] I. Biederman. Recognition-by-components: a theory of human image understanding. *Psychological review*, 94(2):115, 1987. 1 +[4] G. Biegelbauer and M. Vincze. Efficient 3D object detection by fitting superquadrics to range image data for robot's object manipulation. In Proceedings 2007 IEEE International Conference on Robotics and Automation (ICRA), pages 1086-1091, 2007. 1 +[5] D. L. Borges and R. B. Fisher. Class-based recognition of 3d objects represented by volumetric primitives. Image and Vision Computing, 15(8):655-664, 1997. British Machine Vision Conference. 1, 2 +[6] L. Chevalier, J. Jaillet, and A. Baskurt. Segmentation and superquadric modeling of 3D objects. In The 11-th International Conference in Central Europe on Computer Graphics, Visualization and Computer Vision'2003, WSCG 2003, 2003. 1, 2 +[7] T. F. Coleman and Y. Li. On the convergence of reflective newton methods for large-scale nonlinear minimization subject to bounds. Math. Program., 67:189-224, 10 1994. 4 +[8] T. F. Coleman and Y. Li. An interior trust region approach for nonlinear minimization subject to bounds. SIAM Journal on Optimization, 6(2):418-445, 1996. 4 +[9] B. Curless and M. Levoy. A volumetric method for building complex models from range images. In Proceedings of the 23rd Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH '96, page 303-312, New York, NY, USA, 1996. Association for Computing Machinery. 1 +[10] A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society: Series B (Methodological), 39(1):1-22, 1977. 2, 3 +[11] H. Fan, H. Su, and L. J. Guibas. A point set generation network for 3D object reconstruction from a single image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 1 +[12] A. D. Gross and T. E. Boult. Error of fit measures for recovering parametric solids. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 690-694, 1988. 1, 2, 3, 5 +[13] Y. Hu and W. G. Wee. Robust 3D part extraction from range images with deformable superquadric models. In Signal Processing, Sensor Fusion, and Target Recognition IV, volume 2484, pages 524 - 535. International Society for Optics and Photonics, SPIE, 1995. 2, 5 +[14] A. Kasper, Z. Xue, and R. Dillmann. The KIT object models database: An object model database for object recognition, localization and manipulation in service robotics. The + +International Journal of Robotics Research, 31(8):927-934, 2012. 1, 6 +[15] D. K. Katherine and S. S. Elizabeth. Core systems in human cognition. In From Action to Cognition, volume 164 of Progress in Brain Research, pages 257-264. Elsevier, 2007. 1 +[16] A. Leonardis, A. Jaklic, and F. Solina. Superquadrics for segmenting and modeling range data. IEEE Transactions on Pattern Analysis and Machine Intelligence, 19(11):1289-1295, 1997. 1, 2 +[17] K. Levenberg. A method for the solution of certain nonlinear problems in least squares. Quarterly of Applied Mathematics, 2(2):164-168, 1944. 2 +[18] W. E. Lorensen and H. E. Cline. Marching cubes: A high resolution 3D surface construction algorithm. SIGGRAPH Comput. Graph., 21(4):163-169, Aug. 1987. 1 +[19] Matlab optimization toolbox, 2021a. The MathWorks, Natick, MA, USA. 5 +[20] C. Niu, J. Li, and K. Xu. Im2Struct: Recovering 3D shape structure from a single RGB image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 1 +[21] T. Oblak, J. Sircelj, V. Struc, P. Peer, F. Solina, and A. Jaklic. Learning to predict superquadric parameters from depth images with explicit and implicit supervision. IEEE Access, 9:1087-1102, 2021. 2 +[22] D. Paschalidou, L. V. Gool, and A. Geiger. Learning unsupervised hierarchical part decomposition of 3D objects from a single RGB image. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. 1, 2 +[23] D. Paschalidou, A. O. Ulusoy, and A. Geiger. Superquadrics revisited: Learning 3D shape parsing beyond cuboids. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1, 2 +[24] A. P. Pentland. Perceptual organization and the representation of natural form. In M. A. Fischler and O. Firschein, editors, Readings in Computer Vision, pages 680-699. Morgan Kaufmann, San Francisco (CA), 1987. 1 +[25] 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 (CVPR), July 2017. 1, 8 +[26] C. R. Qi, L. Yi, H. Su, and L. J. Guibas. PointNet++: Deep hierarchical feature learning on point sets in a metric space. In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS'17, page 5105-5114, Red Hook, NY, USA, 2017. Curran Associates Inc. 1, 8 +[27] A. H. Quispe, B. Milville, M. A. Gutiérrez, C. Erdogan, M. Stilman, H. Christensen, and H. B. Amor. Exploiting symmetries and extrusions for grasping household objects. In 2015 IEEE International Conference on Robotics and Automation (ICRA), pages 3702-3708, 2015. 1 +[28] S. Ruan and G. S. Chirikjian. Closed-form Minkowski sums of convex bodies with smooth positively curved boundaries. Computer-Aided Design, 143:103133, 2022. 1 + +[29] S. Ruan, K. L. Poblete, Y. Li, Q. Lin, Q. Ma, and G. S. Chirikjian. Efficient exact collision detection between ellipsoids and superquadrics via closed-form Minkowski sums. In 2019 International Conference on Robotics and Automation (ICRA), pages 1765-1771, 2019. 1 +[30] A. Singh, J. Sha, K. S. Narayan, T. Achim, and P. Abbeel. BigBIRD: A large-scale 3D database of object instances. In 2014 IEEE International Conference on Robotics and Automation (ICRA), pages 509-516, 2014. 1, 6 +[31] J. Sircelj, T. Oblak, K. Grm, U. Petkovic, A. Jaklic, P. Peer, V. Struc, and F. Solina. Segmentation and recovery of superquadric models using convolutional neural networks. In 25th Computer Vision Winter Workshop, 2020. 2 +[32] F. Solina and R. Bajcsy. Recovery of parametric models from range images: the case for superquadrics with global deformations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 12(2):131-147, 1990. 1, 2, 5 +[33] S. Tulsiani, H. Su, L. J. Guibas, A. A. Efros, and J. Malik. Learning shape abstractions by assembling volumetric primitives. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 1 +[34] E. R. Van Dop and P. P. L. Regtien. Fitting undeformed superquadrics to range data: improving model recovery and classification. In Proceedings of IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR), pages 396-401, 1998. 2 +[35] N. Vaskevicius and A. Birk. Revisiting superquadric fitting: A numerically stable formulation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(1):220-233, 2019. 2, 5, 7 +[36] G. Vezzani, U. Pattacini, and L. Natale. A grasping approach based on superquadric models. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 1579-1586, 2017. 1 +[37] G. Vezzani, U. Pattacini, G. Pasquale, and L. Natale. Improving superquadric modeling and grasping with prior on object shapes. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pages 6875-6882, 2018. 1 +[38] A. Zeng, S. Song, M. Niessner, M. Fisher, J. Xiao, and T. Funkhouser. 3DMatch: Learning local geometric descriptors from RGB-D reconstructions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 1 +[39] C. Zou, E. Yumer, J. Yang, D. Ceylan, and D. Hoiem. 3D-PRNN: Generating shape primitives with recurrent neural networks. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Oct 2017. 1 \ No newline at end of file diff --git a/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/images.zip b/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3749824105b8f424eb7bc680e71fc7117594b736 --- /dev/null +++ b/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03970084b3a76d817d3e59eecc7d88b708b8e108546e696b4fbc9f253bd335d4 +size 535253 diff --git a/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/layout.json b/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e896136f980a99935816ed2e68054f9dd94b1d56 --- /dev/null +++ b/robustandaccuratesuperquadricrecoveryaprobabilisticapproach/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:102e70cdec6ca1b97bb2f0756194c90692181b0236cf5ae5c410a860cd3cd338 +size 520492 diff --git a/robustcombinationofdistributedgradientsunderadversarialperturbations/44005806-6d81-449b-8cb6-fc0a779b5378_content_list.json b/robustcombinationofdistributedgradientsunderadversarialperturbations/44005806-6d81-449b-8cb6-fc0a779b5378_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5e54506c227a3f195418c54b15fe226005ee71e3 --- /dev/null +++ b/robustcombinationofdistributedgradientsunderadversarialperturbations/44005806-6d81-449b-8cb6-fc0a779b5378_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cec194aa35412c19441e89aa0002265d35f6bbd621e42198ce1ca111511643db +size 82817 diff --git a/robustcombinationofdistributedgradientsunderadversarialperturbations/44005806-6d81-449b-8cb6-fc0a779b5378_model.json b/robustcombinationofdistributedgradientsunderadversarialperturbations/44005806-6d81-449b-8cb6-fc0a779b5378_model.json new file mode 100644 index 0000000000000000000000000000000000000000..5a1324f0087d9cbd949a7ea651531affec4af37c --- /dev/null +++ b/robustcombinationofdistributedgradientsunderadversarialperturbations/44005806-6d81-449b-8cb6-fc0a779b5378_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2820c61570ae51e67d7dff650a3b1150d0971452840495aaaa252feb1e0fe6b0 +size 99586 diff --git a/robustcombinationofdistributedgradientsunderadversarialperturbations/44005806-6d81-449b-8cb6-fc0a779b5378_origin.pdf b/robustcombinationofdistributedgradientsunderadversarialperturbations/44005806-6d81-449b-8cb6-fc0a779b5378_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2cd573bcd36875664a4846881950f76f9ec0f89e --- /dev/null +++ b/robustcombinationofdistributedgradientsunderadversarialperturbations/44005806-6d81-449b-8cb6-fc0a779b5378_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73051966675109119eef38429fea2774ac0e46d5a12d0f183b87759442e2e7fc +size 807091 diff --git a/robustcombinationofdistributedgradientsunderadversarialperturbations/full.md b/robustcombinationofdistributedgradientsunderadversarialperturbations/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a30a52c207b4fa1c6b7d7a0e6ce5ce2e31f8ed79 --- /dev/null +++ b/robustcombinationofdistributedgradientsunderadversarialperturbations/full.md @@ -0,0 +1,325 @@ +# Robust Combination of Distributed Gradients Under Adversarial Perturbations + +Kwang In Kim UNIST + +# Abstract + +We consider distributed (gradient descent-based) learning scenarios where the server combines the gradients of learning objectives gathered from local clients. As individual data collection and learning environments can vary, some clients could transfer erroneous gradients e.g. due to adversarial data or gradient perturbations. Further, for data privacy and security, the identities of such affected clients are often unknown to the server. In such cases, naively aggregating the resulting gradients can mislead the learning process. We propose a new server-side learning algorithm that robustly combines gradients. Our algorithm embeds the local gradients into the manifold of normalized gradients and refines their combinations via simulating a diffusion process therein. The resulting algorithm is instantiated as a computationally simple and efficient weighted gradient averaging algorithm. In the experiments with five classification and three regression benchmark datasets, our algorithm demonstrated significant performance improvements over existing robust gradient combination algorithms as well as the baseline uniform gradient averaging algorithm. + +# 1. Introduction + +The success of deep learning relies on the abundance of training data and computational capability to process such data. When computational resources are limited at centralized servers, distributed learning can be employed, where data is distributed across multiple clients and part of the learning process is performed within each client. To enhance data privacy and security, and reduce the required communication cost, often in such environments, details of the localized data are hidden to the server and other clients, and the server aggregates only encapsulated information communicated from clients. + +We consider distributed gradient descent-based optimization as an instance of such learning problems: The main objective is to minimize a differentiable energy function presented as the sum of the client energies defined based on the respective local data (e.g. the average of squared errors or cross-entry losses over clients' datasets) [23, 27, 41]. Then each client iteratively calculates and transfers the gradient of + +the local energy with respect to the learner parameters while the server maintains and updates these parameters using the aggregated local gradients. + +The nature of individual clients and local data therein can vary significantly. For instance, a client could be a data center securing professionally annotated data while another client might be an edge device containing data labeled by inexperienced annotators. In this case, some clients could exhibit abnormal behavior e.g. due to incorrect labeling or adversarial attacks, and the corresponding local gradients can be unreliable. This can distract the gradient aggregation process at the server leading to suboptimal learning. + +Robust distributed learning with such affected clients has only recently come to recognition and existing approaches are limited in that they require a separate training set at the server (to train a detector of affected clients) [34], information on the number of affected clients [32], or access to local training data [12] (see Sec. 2 for details). + +We present a new approach that combines local gradients when some clients undergo adversarial perturbation. Our algorithm takes the naive uniform average of gradients as a noisy observation of an underlying ground-truth combination, and iteratively improves this during the gradient descent steps of the learner parameters. Specifically, our algorithm represents the combined gradient as a convex combination of all local gradients. The corresponding combination weights are uniformly initialized. As the optimization proceeds, the genuine (unaffected) local gradients are automatically identified by adjusting the combination weights via simulating the diffusion of the combined gradient. Our approach does not require a separate training set at the server, and it offers the advantage of refining the gradient combination without having to know the number and identities of affected clients as well as the nature of perturbations therein. + +In the experiments with five classification and three regression benchmark datasets, and two different scenarios of client perturbations, our approach demonstrated significant performance improvements over the standard uniform gradient averaging algorithm and existing robust gradient combination approaches. + +# 2. Related work + +Privacy-enhancing and communication-efficient distributed learning. Since the introduction of the federated averaging (FedAvg) algorithm [23], federated learning has been established as a standard problem and method for communication-efficient and cross-device distributed learning [17]. The main challenges in this scenario include minimizing the communication cost (e.g. via gradient compression [21] and quantization [19]), optimizing the topology of the underlying communication networks [43], data protection and encapsulation, personalization [7], and theoretical convergence guarantee [20, 35]. Recent work also focuses on robustness against non-independent and identically distributed (non-i.i.d.) data generation processes [24] and the extensions of FedAvg to e.g. multi-task learning [27] and meta-learning [18]. + +Robust distributed learning. In privacy and security-enhancing distributed learning, the server has only access to the gradients or updated learner parameters provided by the individual clients, and therefore, it is susceptible to corrupted updates [8, 39]. + +Learning approaches that are robust against such updates have only been recently introduced. Sun et al.'s gradient clipping approach assumes that the gradients generated from the affected clients tend to have large norms and it excludes the gradients whose norms are larger than a given threshold $T$ in the combination [29]. This algorithm is tailored to attacks that focus on specific sub-tasks in multi-task environments, and it is not directly applicable to perturbations that we consider in this paper. Furthermore, in general adversarial perturbation scenarios, the threshold $T$ might not be known in advance. Hu et al.'s gradient normalization approach builds on a similar idea [15]: Assuming that the affected gradients exhibit larger norms, they normalized the gradients to suppress their contributions. In our preliminary experiments (with random labeling and random gradient perturbations; see Sec. 4) we observed that the perturbed gradients do not necessarily exhibit larger norms than genuine gradients, and in such cases, gradient normalization or clipping are not directly applicable. + +In Han and Zhang's robust federated learning algorithm, the clients take the role of (partially corrupted) teachers while the server acts as a student [12]. Each teacher then provides a few known genuine data instances, verified by domain experts, to guide the teaching process. This approach requires access to local data of individual clients and known identities of genuine data instances therein, and therefore its application is limited when the server is agnostic to the client internals. + +The local gradients can be considered as abstract high-dimensional vectors and in this respect, combining perturbed local gradients can be seen as the problem of robustly estimating their mean (see Eq. 3). In general, when observed data are noisy, potentially including outliers, the central statistical tendency can be better captured by their medians as robust es + +timators than the means. Pillutla et al.'s gradient aggregation algorithm uses geometric median as another robust alternative to the mean [25]. In the experiments, we demonstrate that our approach outperforms the algorithms that replace the gradient means with their medians or geometric medians [25]. + +Turan et al.'s gradient combination algorithm provides an alternative approach to exploit the median estimates [32]: For each optimization step, the median of the local gradients are calculated. Then, the genuine gradients are selected as $K$ -nearest neighbors of the median. While this algorithm demonstrated significant improvements over federated averaging, it requires determining $K$ which might vary across the problems and be difficult to estimate. In the experiments, we show that this algorithm achieves robustness when the numbers of affected clients are limited and when $K$ is known explicitly. However, when more clients are affected, the median estimates were distracted by the perturbed gradients and the performance degraded accordingly. Our algorithm demonstrated improvements over [32] even without having to tune $K$ , especially when large numbers of clients are affected. Other robust mean alternatives can be found e.g. in gradient filtering via low-rank signal recovery [28] and trimmed mean [38, 42]. + +Some existing approaches build upon additional assumptions or trade data privacy and security with robustness: For example, Xie et al.'s Zeno algorithm detects affected clients based on the accuracy of each local model assessed based on labeled datasets at the server [40]. Alistarh et al.'s Byzantine stochastic gradient descent approach provides a theoretical guarantee on the near-optimality of the final solution, but it requires the convexity of training objectives [1]. Wan and Chen's robust federated learning algorithm detects the genuine gradients via training a separate learner that estimates the probability of each local gradient being genuine [34]. While this approach achieved a significant performance gain over uniform gradient averaging, its application domain is limited as it requires a separate training set at the server. + +# 3. Robust gradient combination against adversarial perturbations + +Problem formulation. Our goal is to learn a function $f$ with domain $\mathcal{X}$ and range $\mathcal{Y}$ . We will focus on deep neural network learners $f$ parameterized by weight vectors $\mathbf{w}$ while our methods can be applied to other types of learners that can be trained using gradient descent techniques. For classification, we will use one-hot encoding where $\mathcal{Y} \subset \mathbb{R}^c$ with $c$ being the number of classes. For regression, $\mathcal{Y} \subset \mathbb{R}$ . In standard supervised learning, one is provided with a single training set $Z = \{(\mathbf{x}_1,\mathbf{y}_1),\dots,(\mathbf{x}_N,\mathbf{y}_N)\} \subset \mathcal{X} \times \mathcal{Y}$ and the prediction function $f$ is constructed by minimizing the sum of losses: + +$$ +\mathcal {E} (\mathbf {w}; Z) = \sum_ {j = 1} ^ {N} l (f (\mathbf {x} _ {j}), \mathbf {y} _ {j}). +$$ + +For classification, we will employ the standard cross-entropy loss: $l(\mathbf{a},\mathbf{b}) = -\sum_{j=1}^{c}[\mathbf{a}]_j \log ([\mathbf{b}]_j)$ with $[\mathbf{a}]_j$ being the $j$ -th element of the vector $\mathbf{a}$ while for regression, the squared error will be used: $l(\mathbf{a},\mathbf{b}) = (\mathbf{a} - \mathbf{b})^2$ . Applying the standard gradient descent, one obtains the final learner parameter (weight vector) $\mathbf{w}^*$ by iteratively updating $\mathbf{w}$ + +$$ +\mathbf {w} (t + 1) = \mathbf {w} (t) - \eta \nabla_ {\mathbf {w}} \mathcal {E} (\mathbf {w}; Z) \tag {1} +$$ + +with a step size $\eta > 0$ . + +In distributed learning, the training set $Z$ is distributed across $K$ different clients $\{C_k\}_{k=1}^K$ where $C_k$ is provided with a subset $Z_k$ of $Z$ , and it calculates the update of $w$ based only on $Z_k$ . For instance, McMahan et al.'s federated averaging (FedAvg) framework [23] replaces the centralized update in Eq. 1 with an aggregation of local gradients: + +$$ +\mathbf {w} (t + 1) = \mathbf {w} (t) - \eta \sum_ {k = 1} ^ {K} \mathbf {g} _ {k} (t), \tag {2} +$$ + +where $\mathbf{g}_k(t)$ is the gradient $\nabla_{\mathbf{w}}\mathcal{E}(\mathbf{w}(t);Z_k)$ calculated by the client $C_k$ based on the learner parameter $\mathbf{w}(t)$ . For stochastic gradient descent, only a small portion (called mini-batch) of $Z_k$ contributes to the gradient evaluation $\nabla_{\mathbf{w}}\mathcal{E}$ : All gradient combination algorithms considered in this work can be straightforwardly applied to this case. At iteration $t$ , a server $S$ distributes the previous learner parameter $\mathbf{w}(t)$ , collects the resulting local gradients $\{\mathbf{g}_k\}_{k=1}^K$ , and performs the parameter update in Eq. 2. To enhance security and privacy, the local datasets $\{Z_k\}$ are not shared with the server or other clients. Therefore, the only information that is communicated from $C_k$ to $S$ is the gradient $\mathbf{g}_k(t)$ . + +When each client provides a genuine gradient of $\mathcal{E}$ , the FedAvg update $\mathbf{w}(t + 1)$ in Eq. 2 is equivalent to the centralized update (Eq. 1) and they will lead to identical solutions. However, when some clients undergo adversarial perturbation and accordingly transfer erroneous gradients, the final solution of FedAvg process can be inferior to the centralized counterpart. The nature of the perturbations (e.g. the labels $\{\mathbf{y}_j\}_{j = 1}^{|Z_k|}$ in $Z_{k}$ are randomly changed or the $k$ th client gradient $\mathbf{g}_k(t)$ is replaced by a random vector; see Sec. 4) and the number and identities of the affected clients are not known to the server where the parameter update (Eq. 2) is performed. + +Robust estimation of gradient update using diffusion on the gradient manifold. We employ a modified parameter + +update rule: + +$$ +\mathbf {w} (t + 1) = \mathbf {w} (t) - \eta K \mathbf {q} (t), \tag {3} +$$ + +$$ +\mathbf {q} (t) = \sum_ {k = 1} ^ {K} [ \mathbf {a} (t) ] _ {k} \mathbf {g} _ {k} (t), \tag {4} +$$ + +where $\mathbf{a}(t)$ $(\| \mathbf{a}(t)\| _1 = 1$ and $[\mathbf{a}(t)]_k\geq 0$ for $1\le k\le K$ regulates the contributions of the local gradients $\{\mathbf{g}_k(t)\}$ . When $\mathbf{a}(t)$ is uniform (i.e. $[\mathbf{a}(t)]_k = 1 / K$ ), Eq. 3 becomes the standard FedAvg (Eq. 2) while general non-uniform $\mathbf{a}(t)$ can instantiate different gradient combination strategies. Our algorithm automatically determines $\mathbf{a}(t)$ via simulating a diffusion process on the manifold $M$ of normalized gradients. Diffusion on data manifolds. The diffusion of a function $f$ on a manifold $M$ induced by its Laplace-Beltrami operator $\Delta_M$ is described as a partial differential equation [16, 26]: + +$$ +\frac {\partial h}{\partial t} = \Delta_ {M} h. \tag {5} +$$ + +When $h$ is a noisy observation of an underlying ground-truth function $\overline{h}$ + +$$ +h (\mathbf {r}) = \bar {h} (\mathbf {r}) + \varepsilon , \tag {6} +$$ + +with $\varepsilon$ being Gaussian noise, it can be shown that the diffusion (Eq. 5) performs denoising of $h$ depending on the curvature of $M$ [14, 36]. In particular, when $h$ is presented as a noisy embedding of $M$ into an ambient Euclidean space $\mathbb{R}^m$ , applying the diffusion in Eq. 5 tends to recover the underlying true embedding $\{\overline{h}(\mathbf{r}) : \mathbf{r} \in M\} \subset \mathbb{R}^m$ by pushing along $M$ the noisy observations $\{h(\mathbf{r}) : \mathbf{r} \in M\} \subset \mathbb{R}^m$ towards them. + +As shown shortly, we will take the local client gradients $\{\mathbf{g}_k\}$ and the combined gradient $\mathbf{q}$ (Eq. 4) as a sample from $M$ and denoise $\mathbf{q}$ via simulating diffusion. For this, we first spatially discretize the original diffusion process: Suppose that we have a set of data instances $\overline{H} = \{\overline{\mathbf{h}}_1,\dots,\overline{\mathbf{h}}_S\}$ sampled from a manifold $M$ . The dataset $\overline{H}$ is not directly observed but instead presented as a noisy embedding $H = \{\mathbf{h}_1,\dots,\mathbf{h}_S\}$ within $\mathbb{R}^m$ . The normalized graph Laplacian $\mathbf{L}$ on $H$ is defined as + +$$ +\mathbf {L} = \mathbf {I} - \mathbf {D} ^ {- 1} \mathbf {A}, \text {w h e r e} \tag {7} +$$ + +$$ +[ \mathbf {A} ] _ {i j} = \kappa (\mathbf {h} _ {i}, \mathbf {h} _ {j}; \sigma^ {2}) := \exp \left(- \frac {\| \mathbf {h} _ {i} - \mathbf {h} _ {j} \| ^ {2}}{\sigma^ {2}}\right), \tag {8} +$$ + +for $i \neq j$ and $[\mathbf{A}]_{ij} = 0$ for $i = j$ . The $i, j$ -th kernel matrix entry $[\mathbf{A}]_{ij}$ measures the similarity of data instance $\mathbf{h}_i$ and $\mathbf{h}_j$ controlled by the parameter $\sigma^2$ . $\mathbf{D}$ is a diagonal matrix of the column-sums of $\mathbf{A}$ : $[\mathbf{D}]_{ii} = \sum_j[\mathbf{A}]_{ij}$ , which makes the corresponding diffusion process (presented below) probabilistically normalized. With graph Laplacian $\mathbf{L}$ as an approximation of $-\Delta_M$ , a spatial discretization of Eq. 5 + +is formulated as a time evolution of $H$ (see [6, 13] for convergence analysis of $\mathbf{L}$ to $-\Delta_M$ ): + +$$ +\frac {\partial \mathbf {H}}{\partial t} = - \mathbf {L} \mathbf {H} \tag {9} +$$ + +with $\mathbf{H} = [\mathbf{h}_1^\top, \dots, \mathbf{h}_S^\top]^\top$ . This diffuses the rows of $\mathbf{H}$ (equivalently, $H$ ) along the manifold $M$ . It should be noted that our diffusion is nonlinear as its generator $\mathbf{L}$ depends on $H$ which is being evolved: Initially, $\mathbf{L}$ is given as a noisy discretization of $-\Delta_M$ (as it is constructed based on $H$ , instead of $\overline{H}$ ), and $\mathbf{L}$ and $\mathbf{H}$ are jointly denoised during the diffusion process. + +Denoising combined gradients via diffusion. We consider a manifold $M$ consisting of normalized gradients of $\mathcal{E}$ : $\| \mathbf{g}\| _2 = 1$ , $\sum_{j}[\mathbf{g}]_{j} = 0$ for $\mathbf{g}\in h(M)$ . The corresponding graph Laplacian is constructed using the local gradients $\{\mathbf{g}_k\}_{k = 1}^K$ and the combined gradient $\mathbf{q}$ : The data matrix $\mathbf{H}$ is obtained by assigning $\mathbf{g}_k$ to $\mathbf{h}_k$ for $1\le k\le K$ and $\mathbf{q} = \mathbf{h}_S$ with $S = K + 1$ . + +Now applying the explicit Euler time-discretization to the continuous evolution of Eq. 9, we obtain to the following iterative algorithm + +$$ +\begin{array}{l} \frac {\mathbf {H} (t + 1) - \mathbf {H} (t)}{\delta} = - \mathbf {L} \mathbf {H} (t) \\ \Leftrightarrow \mathbf {H} (t + 1) = (\mathbf {I} - \delta \mathbf {L}) \mathbf {H} (t), \tag {10} \\ \end{array} +$$ + +where $\delta$ is the discretization step. + +This diffusion process simultaneously denoises all gradients, which can be computationally demanding. Since our goal is to robustify the update process of $\mathbf{w}$ (Eq. 3) via the gradient combination $\mathbf{q}$ (Eq. 4), we focus on only diffusing $\mathbf{q}$ given the local gradients $\{\mathbf{g}_k\}$ : The evolution of $\mathbf{q}$ is accordingly derived from Eqs. 7 and 10 as + +$$ +\mathbf {q} (t + 1) = (1 - \delta) \mathbf {q} (t) + \delta \sum_ {k = 1} ^ {K} [ \mathbf {a} (t) ] _ {k} \mathbf {g} _ {k} (t), \tag {11} +$$ + +$$ +\mathbf {a} (t) = \frac {\tilde {\mathbf {a}} (t)}{\| \tilde {\mathbf {a}} (t) \| _ {1}}, [ \tilde {\mathbf {a}} (t) ] _ {k} = \kappa (\mathbf {g} _ {k} (t - 1), \mathbf {q} (t); \sigma^ {2}). +$$ + +Finally, our learning algorithm is obtained by first determining the initial solution $\mathbf{q}(1)$ as a uniform average of the local gradients: $\mathbf{q}(1) = \sum_{k=1}^{K}[\mathbf{a}(1)]_k\mathbf{g}_i(1)$ with $[\tilde{\mathbf{a}}(1)]_k = 1 / K$ and incorporating the resulting diffusion step of $\mathbf{q}$ (Eq. 11) in the update of $\mathbf{w}$ in Eq. 3. By noting that $\mathbf{q}(t)$ is uniquely determined by $\mathbf{a}(t)$ given the local gradients $\{\mathbf{g}_k(t)\}_{k=1}^K$ , this casts the $\mathbf{q}$ -update step of Eq. 11 into an update rule of the gradient combination weights $\mathbf{a}$ : + +$$ +[ \mathbf {a} (t + 1) ] _ {k} = (1 - \delta) [ \mathbf {a} (t - 1) ] _ {k} + \delta [ \mathbf {a} (t) ] _ {k}. \tag {12} +$$ + +As $\mathbf{a}(t + 1)$ is not automatically normalized, we explicitly normalize it before the update of $\mathbf{w}$ (Eq. 3). Algorithm 1 summarizes the training process. + +Hyperparameters and complexity. The hyperparameters of our algorithm include the diffusion step $\delta$ (Eq. 11) and the + +Algorithm 1: Server execution of our distributed learning framework: The client $C_k$ is equipped with a dataset $X_k$ and it provides the corresponding loss gradient $\mathbf{g}_k(t)$ at step $t$ . An unknown subset of the total clients $\{C_k\}_{k=1}^K$ communicate erroneous gradients. + +Input: Diffusion step size $\delta$ (Eq. 10) and kernel width $\sigma^2$ of graph Laplacian (Eq. 8). + +Output: Optimized learner parameter $\mathbf{w}^*$ . + +Initialize the learner parameters $\mathbf{w}(1)$ randomly; Initialize combination coefficients $\mathbf{a}(1)$ uniformly; + +for each round $t = 1,\dots$ do + +Collects the local gradients $\{\mathbf{g}_k(t)\}_{k = 1}^K$ + +Normalize the gradients $\mathbf{g}_k(t) = \frac{\mathbf{g}_k(t)}{\|\mathbf{g}_k(t)\|_2}$ ; + +Calculate the weighted + +average gradient $\mathbf{q}(t) = \sum_{k=1}^{K}[\mathbf{a}(t)]_k\mathbf{g}_k(t)$ ; + +Calculate the kernel evaluations $\tilde{\mathbf{a}}(t)$ (Eq. 11); + +Calculate + +$\mathbf{w}(t + 1)$ (Eq. 3) and distribute it to clients; + +Calculate and normalize $\mathbf{a}(t + 1)$ (Eq. 12); + +end + +$$ +\mathbf {w} ^ {*} = \mathbf {w} (t); +$$ + +kernel width $\sigma^2$ (Eq. 8). The parameter $\sigma^2$ controls the uniformity of the combination coefficients $\mathbf{a}$ : For small $\sigma^2$ values, only a small portion of local gradients $\{\mathbf{g}_k\}$ contributes to the combination $\mathbf{q}$ helping suppress noisy gradients, at the expense of potentially neglecting some genuine gradients. Large $\sigma^2$ values lead to close to uniform coefficients making more gradients contribute to the combination, possibly including affected gradients. We fix $\sigma^2$ as a conservative value of 2 leading to close to uniform $\mathbf{a}$ values for the first 50 iterations of optimization. Thereafter, it is determined as 0.2 which is roughly half the squared mean distance of the pairs of the initial gradients of CIFAR10 dataset (see Sec. 4). As the explicit Euler scheme in Eq. 11 is not stable for large $\delta$ values, we fix $\delta$ at a small value of 0.1. This offered fast enough $\mathbf{q}$ -update while keeping the evolution stable. For large $\delta$ values, when $\mathbf{a}$ is not normalized, $\mathbf{q}$ can quickly diverge to infinity or converge to zero: As $\mathbf{a}$ is normalized in our algorithm, $\mathbf{a}$ actually converges to a vector consisting of zeros except for an entry of value one. In general, tuning these hyperparameters per problem and dataset can improve performance. However, this might require separate validation sets at the server, which can limit the application domain of distributed learning. + +Each step of our algorithm requires updating the gradient combination weights $\mathbf{a}$ (Eq. 12), and calculating the similarity of each local gradient and the combined gradient $\mathbf{q}$ (Eq. 11). Given the local gradients $\{\mathbf{g}_k(t)\}_{k=1}^K$ , the time complexity of each step of our algorithm depends linearly on the number $K$ of clients and the size $m$ of a gradient vector (equivalently, the number of weights of the learner $f$ ) incur + +![](images/720ed535cb1e9d67d0126d8640fed58a51d5daa10bd4dfdd727b2d42bc9600be.jpg) + +![](images/3b4968436215ad69807c56aec28d499498206fffffd9e39147cbed5f8da7d28f.jpg) + +![](images/0d194fffb57497b51046658347698a28d5046532b51f6c78b63c4a3ac0c41e67.jpg) +(a) Ground truth + +![](images/7913170780e9e9cb3bfd98f11991b59a6227fcd4d7b24563c81438dd00a6874d.jpg) +(b) Training data + +![](images/c16c6c058a26bdfe28d5d45c5706ef9a23a42271dba08dbdba566ee71c374333.jpg) +(c) FedAvg +(d) Ours +(e) Distribution of the finalized combination weights a. +Figure 1. Our algorithm and FedAvg applied to a simple 2D example where the last 40 (out of 125) clients are affected. Our algorithm successfully suppressed the gradients from the affected clients leading to $11.5\%$ accuracy improvements from FedAvg. + +ring the total complexity of $O(K \times m)$ . We terminate the weight diffusion (Eq. 12) when the diversity of local gradients $D_{t} = \sum_{k=1}^{K} \| \mathbf{g}_{k}(t-1) - \mathbf{q}(t) \|$ decreases rapidly. For CI-FAR100, each gradient combination step takes less than a second in a machine with i7-10700K CPU and RTX2080Ti GPU. + +An illustrative example. Figure 1 illustrates the learning behavior of our algorithm using a two-dimensional toy example: A training set (Fig. 1(b)) of size 500 is generated as a noisy sample from a ground-truth class map (Fig. 1(a)), which is distributed across 125 clients. At each training iteration, the gradients of 40 clients are replaced by Gaussian random vectors simulating adversarial attacks. Our algorithm successfully suppressed the perturbed gradients as indicated by the small a values assigned for these affected clients (Fig. 1(e)) and achieved the testing accuracy of $90.81\%$ (Fig. 1(d)). + +The FedAvg was distracted by these random gradients significantly degrading the performance (81.38%; Fig. 1(c)). + +Discussion. The gradient combination framework in Eq. 3 is general and it includes other algorithms including Wan and Chen's robust federated learning approach [34] as a special case. In [34], the combination weight $[\mathbf{a}]_k$ is constructed based on the probability of the gradient $\mathbf{g}_k$ being genuine, which is estimated by a separate attention mechanism trained on an annotated dataset (of genuine and affected gradients). This requires a separate dataset at the server and incurs the overhead of transmitting such data to clients to collect the example gradients. Our algorithm can be considered as an alternative that can be applied even when such labeled datasets are not available at the server and when high data communication costs cannot be afforded. + +Diffusion processes have been widely used in semi-supervised learning [30, 44], image and surface enhancement [3, 36], clustering and data embedding [5, 33]. Most closely related to our approach is Hein and Maier's manifold denoising algorithm [14] which denoises a given point cloud sampled from a manifold. Unlike [14], our approach employs a probabilistic normalization (Eq. 8) leading to a convex combination of local gradients (Eq. 11) and focuses on diffusing a single combined gradient vector rendering the update rule for the combination weights a (Eq. 12). Further, our approach uses the explicit Euler time discretization. This leads to a computationally more affordable solution (Eq. 10) than the implicit Euler scheme of [14], as the former does not require solving a large-scale optimization problem per diffusion step. However, this comes at the expense that our update rule is not uniformly stable for any values of the diffusion step $\delta > 0$ (Eqs. 11 and 12) and therefore, we keep it at a small value. + +Our algorithm was conceived by simulating diffusion on a data manifold. While this offers an advantage of theoretical rigor, inheriting the convergence analysis of diffusion processes and their denoising properties [14, 36], a more intuitive interpretation exists: At step $t$ , the new combined gradient vector $\mathbf{q}(t + 1)$ (Eq. 11) can be seen as the minimizer of the following convex energy + +$$ +\mathcal {E} ^ {W} (\mathbf {q}) = \frac {1}{2} \sum_ {k = 1} ^ {S} [ \mathbf {c} (t) ] _ {k} \| \mathbf {h} _ {k} (t) - \mathbf {q} \| ^ {2}, \tag {13} +$$ + +where for $1 \leq k \leq S - 1$ , $\mathbf{h}_k(t) = \mathbf{g}_k(t)$ , $[\tilde{\mathbf{c}}(t)]_k = \delta[\mathbf{a}(t)]_k$ , and $\tilde{\mathbf{c}}(t) = \frac{\mathbf{c}(t)}{\|\mathbf{c}(t)\|}$ , and $\mathbf{h}_S(t) = \mathbf{q}(t)$ and $[\tilde{\mathbf{c}}(t)]_S = 1 - \delta$ . This penalizes the deviation of $\mathbf{q}(t + 1)$ from the previous solution $\mathbf{q}(t)$ and the current local gradients $\{\mathbf{g}_k(t)\}$ . The contribution $[\mathbf{c}(t)]_k$ of $\mathbf{g}_k(t)$ is controlled based on the error $\|\mathbf{q}(t) - \mathbf{g}_k(t - 1)\|^2$ incurred at the previous step: The iterative minimization of $\mathcal{E}^W$ tends to assign smaller weights $\{[\mathbf{c}(t)]_k\}$ to the gradients $\{\mathbf{g}_k\}$ that exhibit large errors. This introduces robustness in the gradient aggregation of Eq. 11 as the outliers are gradually ignored during optimization. + +Achieving robustness via reweighting the contributions of individual error terms has been studied in robust linear regression and compressed sensing [10]. + +# 4. Experiments + +We evaluated our robust gradient combination algorithm on five classification and three regression datasets. + +# 4.1. Classification + +Setting. The Caltech256 dataset contains 30,607 color images from 257 object and background classes [11]. The CIFAR10 and CIFAR100 datasets consist of 60,000 images of 10 and 100 classes, respectively [22]. The FashionMNIST dataset consists of 70,000 grayscale images in 10 categories [37]. The CINIC10 dataset contains 270,000 images selected from ImageNet and CIFAR10 [9]. + +We simulated random labeling perturbations where the ground-truth training labels of the affected clients are replaced by random class labels. In the accompanying supplemental document, we also report the results of experiments with random gradient perturbations where the local gradient vectors are replaced by i.i.d. Gaussian random vectors. As our algorithm operates at the server, it is agnostic to the nature of the local datasets and perturbations, and the only information that our algorithm received from each client is the output gradient. + +For all datasets, we performed experiments with varying portions of affected clients: Ten to sixty percent of the total clients were affected. For all datasets and portions of affected clients, we ran experiments 10 times with different distributions of training data across clients and averaged the results. For Caltech256, CIFAR10, CIFAR100, FashionMNIST, for each experimental run, 20,000 data instances were randomly selected and equally distributed to 100 clients while 10,000 points were used for testing. For CINIC10, 180,000 training instances (the union of the training and validation sets proposed by the authors of [9]) were randomly distributed to 1,000 clients, and the remaining 90,000 points were reserved for testing. Here, the sizes of the local datasets across clients varied: The largest local dataset was around 10 times larger than the smallest set. + +We used the learner that combines a fixed ResNet101 pretrained on ImageNet and three fully-connected layers. + +Baselines. We compared with 1) the naive application of FedAvg which uniformly averages all local gradients. As our algorithm combines these gradients by taking weighted averages instead (Eq. 4), it can be considered as an instance of robust alternatives to the mean. In this context, we compared with 2) the median of local gradients as a popular robust estimator of central statistical tendency (denoted as Median) and 3) Pillutla et al.'s geometric median-based approach as another robust average replacement (GeoMed) [25]. GeoMed + +requires solving an optimization problem at each gradient combination step (taking around 10 seconds per step). Also, we compared with 4) Turan et al.'s robust gradient-based optimization strategy [32] (MedTh). This selects local gradients whose distance from the median gradient is within a threshold. As it is challenging to determine such a threshold value without having access to separate validation sets, we set it in the way that the number of selected gradients becomes the same as the ground-truth number of unaffected clients; Our algorithm did not use this additional information. Lastly, we compared with FedAvg applied to only genuine clients (GTC). This will serve as the ideal performance upper bounds of all gradient combination algorithms. + +Results. Table 1 summarizes the results. Note that the performance of GTC degrades with increasing portions of affected clients since the numbers of total genuine training instances accordingly decrease. Federated averaging (FedAvg) demonstrated robustness when only moderate numbers (around $10 - 20\%$ ) of clients are affected. However, its performance degraded rapidly as more clients were affected. This tendency was consistently observed across all datasets. While the median is a well-established robust alternative to the mean, combining local gradients based on their median (Median) turned out to be only comparable to, or sometimes even significantly worse than the naive mean (FedAvg). GeoMed was more effective than Median, yet it was noticeably inferior to FedAvg in a few cases despite the much higher computational cost. MedTh demonstrated competitive performance when affected clients were fewer than $50\%$ of the total clients. However, for larger numbers of affected clients, it also delivered notably worse results than FedAvg. Our algorithm demonstrated graceful performance degradation even in these cases, and overall, it yielded (statistically) significantly better results than FedAvg on 28 out of 30 cases. Importantly, it was never significantly worse than FedAvg. + +Throughout the entire experiments on random gradient perturbations (see supplemental document), both MedTh and ours significantly outperformed FedAvg, constantly achieving the best performance. + +Combining MedTh and Ours. Our original algorithm estimates the continuous gradient combination weights $\mathbf{a}$ . This helps suppress the perturbed gradients but it does not completely rule out their contributions. In the accompanying supplemental document, we demonstrate that when additional validation sets are available, we can achieve this goal and improve performance by combining our algorithm with the thresholding idea of MedTh. + +# 4.2. Regression + +Setting. We used three benchmark datasets. The MOCAP dataset provides 50,000 motion capture data instances [2]. Each instance provides the 3D locations of 62 skeletal + +
DatasetMethodAccuracy
102030405060
Caltech256GTC76.54 (0.34)75.96 (0.20)75.47 (0.19)74.84 (0.41)73.83 (0.16)72.26 (0.50)
FedAvg76.29 (0.32)75.16 (0.35)74.14 (0.45)72.29 (0.33)70.50 (0.27)66.75 (0.44)
Median64.80 (0.47)63.58 (0.97)61.82 (0.74)59.15 (0.98)55.57 (0.85)48.15 (0.99)
GeoMed76.29 (0.36)75.68 (0.41)74.69 (0.44)71.70 (0.53)66.49 (0.36)60.77 (0.82)
MedTh76.28 (0.27)75.59 (0.38)74.70 (0.85)72.51 (1.17)69.74 (1.04)46.31 (5.19)
Ours76.39 (0.20)75.95 (0.29)75.06 (0.26)73.72 (0.31)71.90 (0.50)69.25 (0.47)
CIFAR10GTC89.57 (0.11)89.49 (0.15)89.44 (0.15)89.55 (0.20)89.36 (0.16)89.22 (0.10)
FedAvg89.23 (0.10)87.34 (0.23)86.58 (0.15)85.98 (0.37)85.24 (0.41)84.83 (0.37)
Median87.21 (0.25)86.89 (0.26)86.74 (0.82)86.30 (1.37)84.65 (1.19)82.01 (0.62)
GeoMed87.38 (0.47)87.49 (1.06)87.14 (1.07)86.89 (1.83)84.99 (0.85)82.46 (0.32)
MedTh89.39 (0.18)89.27 (0.10)89.01 (0.19)88.57 (0.25)78.10 (19.90)31.40 (18.43)
Ours89.51 (0.06)89.43 (0.17)89.22 (0.19)89.14 (0.13)88.95 (0.16)88.85 (0.20)
CIFAR100GTC66.86 (0.23)66.50 (0.21)66.10 (0.33)65.81 (0.30)65.14 (0.42)64.41 (0.45)
FedAvg66.50 (0.40)65.95 (0.54)64.67 (0.28)63.25 (0.40)61.99 (0.32)60.53 (0.33)
Median65.76 (0.23)64.53 (0.29)62.73 (0.31)59.51 (0.75)53.51 (0.85)47.89 (0.65)
GeoMed67.11 (0.40)66.80 (0.63)65.75 (0.69)65.20 (0.23)58.63 (0.57)49.79 (1.05)
MedTh66.80 (0.14)66.35 (0.29)65.78 (0.24)64.11 (0.33)38.34 (1.43)36.93 (2.52)
Ours66.80 (0.23)66.41 (0.38)65.87 (0.38)65.44 (0.27)64.80 (0.20)63.56 (0.62)
FashionMNISTGTC86.96 (0.18)86.84 (0.23)86.84 (0.11)86.92 (0.19)86.77 (0.19)86.77 (0.20)
FedAvg86.48 (0.19)83.12 (0.24)81.93 (0.35)81.30 (0.31)80.80 (0.50)80.47 (0.26)
Median83.23 (1.44)82.77 (1.30)82.68 (1.71)82.02 (1.57)80.44 (1.05)78.40 (0.44)
GeoMed83.29 (1.65)82.37 (0.40)82.42 (1.72)81.20 (0.36)80.41 (0.45)78.37 (0.30)
MedTh86.75 (0.11)86.55 (0.22)86.27 (0.22)83.57 (4.56)76.16 (14.07)52.65 (23.84)
Ours87.01 (0.23)86.73 (0.16)86.63 (0.27)86.40 (0.51)86.24 (0.16)86.41 (0.27)
CINIC10GTC79.99 (0.07)79.96 (0.11)79.75 (0.12)79.70 (0.08)79.66 (0.12)79.60 (0.15)
FedAvg78.20 (0.11)76.88 (0.21)76.04 (0.16)75.41 (0.29)74.81 (0.27)74.38 (0.13)
Median77.16 (1.59)76.91 (1.61)77.03 (1.95)76.84 (1.33)73.83 (1.44)71.04 (0.72)
GeoMed78.13 (1.95)79.01 (1.86)77.49 (2.61)78.92 (1.20)75.64 (1.28)71.51 (0.75)
MedTh79.48 (0.11)79.31 (0.15)79.06 (0.10)78.57 (0.15)57.10 (23.87)42.19 (20.96)
Ours80.03 (0.13)79.95 (0.17)79.85 (0.16)79.64 (0.32)79.19 (0.50)78.69 (0.52)
+ +Table 1. Results of classification under random labeling perturbations: Mean accuracy and standard deviation (in parenthesis) are shown in % (higher is better). The best and second-best results excluding GTC are highlighted with bold and italic, respectively. For Median, GeoMed, MedTh, and ours, the results of statistical significance test with respect to FedAvg (t-test with $\alpha = 0.95$ ) are shown: Blue and orange respectively represents significantly better and worse results than FedAvg. + +joints. A body surface mesh model is fitted to these 62 joints and the locations of five end effectors (two hands, two feet, and head) are recorded, constituting 15-dimensional coarse representations. The goal is to restore the $186(62 \times 3)$ -dimensional joint locations from the input 15-dimensional coarse representations. We focused on estimating the first 12 attributes (4 out of 62 joints). Our learners consisted of five fully-connected layers. Experiments were repeated 10 times, and for each experimental run, a randomly selected subset of size 40,000 was used for training while the remaining data instances were used for testing. The training sets were distributed across 100 clients where $40\%$ were affected: Each output instance is contaminated with a Gaussian + +noise whose standard deviation per dimension is twice the standard deviation of the corresponding dimension. The School dataset provides exam scores of 15,362 students in 139 UK secondary schools in the years 1985, 1986, and 1987 [4]. Our goal is to predict these exam scores using 27 input features including the year of the exam, gender, and ethnic group. A small subset was selected from each school, constituting a combined test set of size 5,362. The remaining 10,000 instances were distributed to the clients based on the corresponding schools. The ICVL hand dataset contains 17,604 depth frames of size $320 \times 240$ capturing human hands and the corresponding 3D annotations of 16 joints [31]. Among them, 16,008 frames were used for training while the + +remaining 1,596 frames were assigned for testing. For each frame, features were extracted using the ImageNet-pretrained ResNet101. Similarly to MOCAP, for School and ICVL, $40\%$ of total local gradients were contaminated by Gaussian noise. + +Results. Table 2 summarizes the results. For all datasets, the three robust gradient combination algorithms demonstrated performance gains over FedAvg. For MOCAP, GeoMed was marginally better than FedAvg while MedTh and ours achieved further significant improvements. For School, ours ranked the best while the other two robust algorithms also exhibited marked performance gain. For ICVL, GeoMed ranked first followed by ours. + +# 5. Conclusions + +We have considered the problem of robust distributed learning under adversarial perturbation. Our approach embeds the gradients calculated from local clients into the manifold of normalized vectors and performs diffusion therein. The resulting algorithm is instantiated as a robust average estimator against outliers and it improves the combined gradient without having to require additional labeled datasets at the server or known number of affected clients. On five classification and three regression benchmark datasets, and two scenarios of adversarial perturbations, our algorithm demonstrated significant improvements over baseline federated averaging [23], robust median and geometric median estimators [25], and median-based thresholding approach [32]. + +Limitations. The application of our approach (as well as the other algorithms considered in our experiments) is limited to cases where individual clients are either entirely affected or not: As our original algorithm is agnostic to data distributions and operations performed within clients, it does not exploit the possibility that only part of each local dataset is perturbed. When access to local datasets is guaranteed, such a scenario could be approached by applying our main gradient update step (Eqs. 11 and 12) in two levels: Within each client, it can suppress perturbed data instances by taking each data instance and the corresponding error gradient as a sub-client. The resulting locally combined gradients could then be combined at the server as in our main experiments. + +# Future work and potential negative societal impacts. + +Our approach contributes to promoting distributed learning, in particular over devices where data acquisition and annotation processes might not be responsibly moderated. This can potentially facilitate the transfer of bias (e.g., age, gender, and ethnicity) present in individual clients to the entire learning process. Therefore, future work should investigate detecting and mitigating the effect of bias in local datasets. Further, future work should assess the performance of our algorithm under different adversarial perturbation scenarios, e.g. when the input images (instead of the labels as in our experiments) + +
Attr.FedAvgGeoMedMedThOurs
MOCAP
12.05 (0.17)2.01 (0.06)1.75 (0.13)1.74 (0.09)
25.67 (0.05)5.66 (0.02)3.48 (0.10)2.69 (0.08)
318.76 (0.05)18.62 (0.07)9.39 (0.52)4.40 (0.30)
43.43 (0.05)3.36 (0.05)2.75 (0.05)2.55 (0.06)
518.95 (0.08)18.86 (0.08)9.48 (0.53)4.31 (0.35)
61.93 (0.13)1.84 (0.05)1.58 (0.10)1.62 (0.14)
73.96 (0.05)3.96 (0.05)2.89 (0.05)2.46 (0.06)
818.83 (0.09)18.73 (0.05)9.25 (0.49)3.87 (0.30)
92.02 (0.11)1.92 (0.08)1.69 (0.10)1.68 (0.12)
108.78 (0.07)8.69 (0.06)4.41 (0.24)2.47 (0.09)
1119.43 (0.05)19.37 (0.04)9.23 (0.56)3.60 (0.21)
122.63 (0.13)2.55 (0.04)2.32 (0.09)2.23 (0.08)
School
115.89 (0.36)13.36 (0.43)13.87 (0.63)12.38 (0.41)
ICVL
13.61 (0.04)3.62 (0.11)3.63 (0.06)3.57 (0.05)
23.75 (0.09)2.73 (0.09)3.17 (0.14)3.00 (0.19)
316.40 (0.08)4.53 (0.08)9.09 (0.67)7.02 (1.60)
43.46 (0.02)3.56 (0.08)3.43 (0.09)3.49 (0.04)
54.03 (0.04)2.95 (0.12)3.58 (0.11)3.36 (0.14)
616.19 (0.04)4.50 (0.10)8.98 (0.60)6.90 (1.60)
73.77 (0.02)3.94 (0.11)3.70 (0.04)3.79 (0.08)
83.91 (0.10)3.32 (0.25)3.56 (0.11)3.46 (0.09)
915.33 (0.08)4.56 (0.10)8.54 (0.63)6.65 (1.43)
104.52 (0.05)4.50 (0.05)4.39 (0.03)4.42 (0.10)
113.69 (0.05)3.64 (0.29)3.73 (0.12)3.69 (0.06)
1215.18 (0.09)5.02 (0.04)8.74 (0.56)7.01 (1.33)
+ +Table 2. Regression results: Mean error rate and standard deviation in parenthesis (lower is better). The best and second-best results are highlighted with **bold** and **italic**, respectively. Statistically significantly better and worse results than **FedAvg** are highlighted in blue and **orange**, respectively. + +are randomly contaminated by noise or systematically altered, and adversarial perturbations are coordinated (e.g. by injecting noise correlated across clients). We experimentally demonstrated that our algorithm offers the capability of suppressing affected gradients. Future work should also conduct a theoretical analysis, e.g. on the deviation between the gradients combined by our algorithm and the corresponding ground-truth combinations (generated by $GTC$ ). + +# Acknowledgments + +This work was supported by the National Research Foundation of Korea (NRF) grant (No. 2021R1A2C2012195), Institute of Information & Communications Technology Planning & Evaluation (IITP) grant (2021-0-00537, Visual Common Sense Through Self-supervised Learning for Restoration of Invisible Parts in Images), and IITP grant (2020-0-01336, Artificial Intelligence Graduate School Program, UNIST), all funded by the Korea government (MSIT). + +# References + +[1] Dan Alistarh, Zeyuan Allen-Zhu, and Jerry Li. Byzantine stochastic gradient descent. In NeurIPS, 2018. 2 +[2] A. Baak, M. Müller, G. Bharaj, H.-P. Seidel, and Christian Theobalt. A data-driven approach for real-time full body pose reconstruction from a depth camera. In ICCV, pages 1092-1099, 2011. 6 +[3] Chandrajit L. Bajaj and Guoliang Xu. Anisotropic diffusion of surfaces and functions on surfaces. ACM Trans. Graphics, 22(1):4-32, 2003. 5 +[4] B. Bakker and T. Heskes. Task clustering and gating for Bayesian multitask learning. JMLR, 4, 2003. 7 +[5] Mikhail Belkin and Partha Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15:1373-1396, 2003. 5 +[6] Mikhail Belkin and Partha Niyogi. Towards a theoretical foundation for Laplacian-based manifold methods. Journal of Computer and System Sciences, 74(8):1289-1308, 2005. 4 +[7] Aurélien Bellet, Rachid Guerraoui, Mahsa Taziki, and Marc Tommasi. Personalized and private peer-to-peer machine learning. In AISTATS, 2018. 2 +[8] Arjun Nitin Bhagoji, Supriyo Chakraborty, Prateek Mittal, and Seraphin Calo. Analyzing federated learning through an adversarial lens. In ICML, 2019. 2 +[9] Luke N. Darlow, Elliot J. Crowley, Antreas Antoniou, and Amos J. Storkey. CINIC-10 is not ImageNet or CIFAR-10. In arXiv:1810.03505, 2018. 6 +[10] Ingrid Daubechies, Ronald DeVore, Massimo Fornasier, and C. Sinan Güntürk. Iteratively reweighted least squares minimization for sparse recovery. Communications on Pure and Applied Mathematics, 63(1):1-38, 2009. 6 +[11] Greg Griffin, Alex Holub, and Pietro Perona. Caltech-256 object category dataset. Technical report, California Institute of Technology, 2007. 6 +[12] Yufei Han and Xiangliang Zhang. Robust federated learning via collaborative machine teaching. In AAAI, 2019. 1, 2 +[13] Matthias Hein, Jean-Yves Audibert, and Ulrike von Luxburg. From graphs to manifolds - weak and strong pointwise consistency of graph Laplacians. In $COLT$ , pages 470-485, 2005. 4 +[14] Matthias Hein and Markus Maier. Manifold denoising. In NIPS, pages 561-568, 2007. 3, 5 +[15] Zeou Hu, Kiarash Shaloudegi, Guojun Zhang, and Yaoliang Yu. FedMGDA+: federated learning meets multi-objective optimization. In arXiv:2006.11489, 2020. 2 +[16] J. Jost. Riemannian Geometry and Geometric Analysis. Springer, New York, 2011. 3 +[17] Peter Kairouz, H. Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Kallista Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, Rafael G. L. D'Oliveira, Hubert Eichner, Salim El Rouayheb, David Evans, Josh Gardner, Zachary Garrett, Adrià Gascon, Badih Ghazi, Phillip B. Gibbons, Marco Gruteser, Zaid Harchaoui, Chaoyang He, Lie He, Zhouyuan Huo, Ben Hutchinson, Justin Hsu, Martin Jaggi, Tara Javidi, Gauri Joshi, Mikhail Khodak, Jakub Konečny, Aleksandra Korolova, FariNaz Koushanfar, Sanmi Koyejo, Tancréde Lepoint, Yang Liu, + +Prateek Mittal, Mehryar Mohri, Richard Nock, Ayfer Özgür, Rasmus Pagh, Hang Qi, Daniel Ramage, Ramesh Raskar, Mariana Raykova, Dawn Song, Weikang Song, Sebastian U. Stich, Ziteng Sun, Ananda Theertha Suresh, Florian Tramèr, Praneeth Vepakomma, Jianyu Wang, Li Xiong, Zheng Xu, Qiang Yang, Felix X. Yu, Han Yu, and Sen Zhao. Advances and open problems in federated learning. Foundations and Trends in Machine Learning, 14(1-2):1-210, 2021. 2 +[18] Mikhail Khodak, Maria-Florina Balcan, and Ameet Talwalkar. Adaptive gradient-based meta-learning methods. In NeurIPS, 2019. 2 +[19] Anastasia Koloskova, Tao Lin, Sebastian U. Stich, and Martin Jaggi. Decentralized deep learning with arbitrary communication compression. In ICLR, 2020. 2 +[20] Anastasia Koloskova, Nicolas Loizou, Sadra Boreiri, Martin Jaggi, and Sebastian Stich. A unified theory of decentralized SGD with changing topology and local updates. In ICML, 2020. 2 +[21] Anastasia Koloskova, Sebastian Stich, and Martin Jaggi. Decentralized stochastic optimization and gossip algorithms with compressed communication. In ICML, 2019. 2 +[22] Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009. 6 +[23] H. Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Agüera y Arcas. Communication-efficient learning of deep networks from decentralized data. In AISTATS, 2017. 1, 2, 3, 8 +[24] Mehryar Mohri, Gary Sivek, and Ananda Theertha Suresh. Agnostic federated learning. In ICML, 2019. 2 +[25] Krishna Pillutla, Sham M. Kakade, and Zaid Harchaoui. Robust aggregation for federated learning. In arXiv:1912.13445, 2019. 2, 6, 8 +[26] S. Rosenberg. The Laplacian on a Riemannian Manifold. Cambridge University Press, 1997. 3 +[27] Virginia Smith, Chao-Kai Chiang, Maziar Sanjabi, and Ameet Talwalkar. Federated multi-task learning. In NeurIPS, 2017. 1, 2 +[28] Lili Su and Jiaming Xu. Securing distributed gradient descent in high dimensional statistical learning. In ACM Measurement Analysis and Computer System, 2019. 2 +[29] Ziteng Sun, Peter Kairouz, Ananda Theertha Suresh, and H. Brendan McMahan. Can you really backdoor federated learning? In arXiv:1911.07963, 2019. 2 +[30] Arthur D. Szlam, Mauro Maggioni, and Ronald R. Coifman. Regularization on graphs with function-adapted diffusion processes. JMLR, 9:1711-1739, 2008. 5 +[31] Danhang Tang, Hyung Jin Chang, Alykhan Tejani, and Tae-Kyun Kim. Latent regression forest: structured estimation of 3D articulated hand posture. In CVPR, 2014. 7 +[32] Berkay Turan, César A. Uribe, Hoi-To Wai, and Mahnoosh Alizadeh. Robust distributed optimization with randomly corrupted gradients. In arXiv:2106.14956, 2021. 1, 2, 6, 8 +[33] Ulrike von Luxburg. A tutorial on spectral clustering. Statistics and Computing, 17(4):395-416, 2007. 5 +[34] Ching Pui Wan and Qifeng Chen. Robust federated learning with attack-adaptive aggregation. In *IJCAI Workshop on Federated and Transfer Learning for Data Sparsity and Confidentiality*, 2021. 1, 2, 5 + +[35] Jianyu Wang, Anit Kumar Sahu, Zhouyi Yang, Gauri Joshi, and Soummya Kar. MATCHA: speeding up decentralized SGD via matching decomposition sampling. In arXiv:1905.09435, 2019. 2 +[36] J. Weickert. Anisotropic Diffusion in Image Processing. ECMI Series, Teubner-Verlag, Stuttgart, 1998. 3, 5 +[37] Han Xiao, Kashif Rasul, and Roland Vollgraf. FashionMNIST: a novel image dataset for benchmarking machine learning algorithms. In arXiv:1708.07747, 2017. 6 +[38] Cong Xie, Oluwasanmi Koyejo, and Indranil Gupta. Phocas: dimensional Byzantine-resilient stochastic gradient descent. In arXiv:1805.09682, 2018. 2 +[39] Cong Xie, Oluwasanmi Koyejo, and Indranil Gupta. Fall of empires: breaking Byzantine-tolerant SGD by inner product manipulation. In UAI, 2019. 2 +[40] Cong Xie, Oluwasanmi Koyejo, and Indranil Gupta. Zeno: distributed stochastic gradient descent with suspicion-based fault-tolerance. In ICML, 2019. 2 +[41] Qiang Yang, Yang Liu, Tianjian Chen, and Yongxin Tong. Federated machine learning: concept and applications. ACM Trans. Intelligent Systems and Technology, 10(2):12:1-19, 2019. 1 +[42] Dong Yin, Yudong Chen, Ramchandran Kannan, and Peter Bartlett. Byzantine-robust distributed learning: towards optimal statistical rates. In ICML, pages 5650–5659, 2018. 2 +[43] Chen Yu, Hanlin Tang, Cedric Renggli, Simon Kassing, Ankit Singla, Dan Alistarh, Ce Zhang, and Ji Liu. Distributed learning over unreliable networks. In ICML, 2019. 2 +[44] X. Zhu, Z. Ghahramani, and J. Lafferty. Semi-supervised learning using Gaussian fields and harmonic functions. In ICML, pages 912-919, 2003. 5 \ No newline at end of file diff --git a/robustcombinationofdistributedgradientsunderadversarialperturbations/images.zip b/robustcombinationofdistributedgradientsunderadversarialperturbations/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4a77dfaaba915ab7eec74b7d951e8245d5b0d98a --- /dev/null +++ b/robustcombinationofdistributedgradientsunderadversarialperturbations/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5215e85fcce5cb9dada050d56a5ef0ce8980172e36ea20614e006d0d2f0552d1 +size 629171 diff --git a/robustcombinationofdistributedgradientsunderadversarialperturbations/layout.json b/robustcombinationofdistributedgradientsunderadversarialperturbations/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..461d753f7dfd8f6a5f6c1f60e168c11b18f08494 --- /dev/null +++ b/robustcombinationofdistributedgradientsunderadversarialperturbations/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c6b22c2698812ca3b67eee07d617048c7fcb5adbb62149fcbc3161293308a71 +size 484000 diff --git a/robustcontrastivelearningagainstnoisyviews/b6f4fb25-da5a-427f-a242-93d572c0aacc_content_list.json b/robustcontrastivelearningagainstnoisyviews/b6f4fb25-da5a-427f-a242-93d572c0aacc_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..c0570878e307a433fdef53623a0338d778a0e6a7 --- /dev/null +++ b/robustcontrastivelearningagainstnoisyviews/b6f4fb25-da5a-427f-a242-93d572c0aacc_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97f09ed10f281aa431a8942cf0bf24ddefa6544c96408560b3d78bb90502efa9 +size 95937 diff --git a/robustcontrastivelearningagainstnoisyviews/b6f4fb25-da5a-427f-a242-93d572c0aacc_model.json b/robustcontrastivelearningagainstnoisyviews/b6f4fb25-da5a-427f-a242-93d572c0aacc_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9f444f8de42c0b96f90e33566999c70cd9fe7645 --- /dev/null +++ b/robustcontrastivelearningagainstnoisyviews/b6f4fb25-da5a-427f-a242-93d572c0aacc_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:795a443db7ba94a303e5951cbf5e2ab2bebd9712823a569af08f151fb19d0c78 +size 122033 diff --git a/robustcontrastivelearningagainstnoisyviews/b6f4fb25-da5a-427f-a242-93d572c0aacc_origin.pdf b/robustcontrastivelearningagainstnoisyviews/b6f4fb25-da5a-427f-a242-93d572c0aacc_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..36f705abe947896eeefc4c1a6b7a64606cec4103 --- /dev/null +++ b/robustcontrastivelearningagainstnoisyviews/b6f4fb25-da5a-427f-a242-93d572c0aacc_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51e25962ba2e5c382d0a656d746393933efa7821f832a9400a61bef4eefd93c4 +size 6400898 diff --git a/robustcontrastivelearningagainstnoisyviews/full.md b/robustcontrastivelearningagainstnoisyviews/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d2d46f8ec9cc9f3cae20f014ad8de4ee2233bbfe --- /dev/null +++ b/robustcontrastivelearningagainstnoisyviews/full.md @@ -0,0 +1,438 @@ +# Robust Contrastive Learning against Noisy Views + +Ching-Yao Chuang† R Devon Hjelm‡ Xin Wang‡ Vibhav Vineet‡ +Neel Joshi‡ Antonio Torralba† Stefanie Jegelka† Yale Song‡ +†MIT CSAIL ‡ Microsoft Research + +https://github.com/chingyaoc/RINCE + +![](images/22643eb6673f78270006c87c5ac373d2d69f72c364d74733b094049b2a66c405.jpg) +ct + +an assumption that positat share certain underlye, e.g., patches of an imsignals of a video. Whatrature suggests thatmal representationsfalse positive pairsn this work, we provat is robust againstretical justificationsetric losses for noisyg a new contrastive...zation based on the + +mated Noise Level +masseteriastance measure. The proposed loss is completely modality-agnostic and a simple drop-in replacement for the InfoNCE loss, which makes it easy to apply to existing contrastive frameworks. We show that our approach provides consistent improvements over the state-of-the-art on image, video, and graph contrastive learning benchmarks that exhibit a variety of real-world noise patterns. + +# 1. Introduction + +Contrastive learning [1, 2, 3] has become one of the most prominent self-supervised approaches to learn representations of high-dimensional signals, producing impressive results with image [4, 5, 6, 7, 8, 9], text [10, 11, 12, 13], audio [14, 15, 16], and video [17, 18, 19]. The central idea is to learn representations that capture the underlying information shared between different "views" of data [3, 20]. For images, the views are typically constructed by applying common data augmentation techniques, such as jittering, cropping, resizing and rotation [6], and for video the views are often chosen as adjacent frames [21] or co-occurring multimodal signals, such as video and the corresponding optical flow [22], audio [19] and transcribed speech [17]. + +Designing the right contrasting views has shown to be + +![](images/2e21565380bf21c81bce2f89909d863dd98a2021c10c129992c42379a663f222.jpg) +Figure 1. Noisy views can deteriorate contrastive learning. We propose a new contrastive loss function (RINCE) that rescales the sample importance in the gradient space based on an estimated noise level. With a simple turn of a knob $(q \in (0,1])$ , we can upweight or downweight sample pairs with low shared information. + +a key ingredient of contrastive learning [6, 23]. This often requires domain knowledge, intuition, trial-and-error (and luck!). What would happen if the views are wrongly chosen and do not provide meaningful shared information? Prior work has reported deteriorating effects of such noisy views in contrastive learning under various scenarios, e.g., unrelated image patches due to extreme augmentation [20], irrelevant video-audio pairs due to overdubbing [24], and misaligned video-caption pairs [17]. The major issue with noisy views is that representations of different views are forced to align with each other even if there is no meaningful shared information. This often leads to suboptimal representations that merely capture spurious correlations [25] or make them collapse to a trivial solution [26]. Worse yet, when we attempt to learn from large-scale unlabeled data – i.e., the scenario where self-supervised learning is particularly expected to shine – the issue is only aggravated + +because of the increased noise in the real-world data [27], hindering the ultimate success of contrastive learning. + +Consequently, a few attempts have been made to design contrastive approaches that are noise-tolerant. For example, Morgado et al. [24] optimize a soft instance discrimination loss to weaken the impact of noisy views. Miech et al. [17] address the misalignment between video and captions by aligning multiple neighboring segments of a video. However, existing approaches are often tied to specific modalities or make assumptions that may not hold for general scenarios, e.g., MIL-NCE [17] is not designed to address the issues of irrelevant audio-visual signals. + +In this work, we develop a principled approach to make contrastive learning robust against noisy views. We start by making connections between contrastive learning and the classical noisy binary classification in supervised learning [28, 29]. This allows us to explore the wealth of literature on learning with noisy labels [30, 31, 32]. In particular, we focus on a family of robust loss functions that has the symmetric property [29], which provides strong theoretical guarantees against noisy labels in binary classification. We then show a functional form of contrastive learning that can satisfy the symmetry condition if given a proper symmetric loss function, motivating the design of new contrastive loss functions that provide similar theoretical guarantees. + +This leads us to propose Robust InfoNCE (RINCE), a contrastive loss function that satisfies the symmetry condition. RINCE can be understood as a generalized form of the contrastive objective that is robust against noisy views. Intuitively, its symmetric property provides an implicit means to reweight sample importance in the gradient space without requiring an explicit form of noise estimator. It also provides a simple "knob" (a real-valued scalar $q \in (0,1]$ ) that controls the behavior of the loss function balancing the exploration-exploitation trade-off (i.e., from being conservative to playing adventures on potentially noisy samples). + +We also provide a theoretical analysis of the proposed RINCE objective and show that it extends the analyses by Ghosh et al. [29] to the self-supervised contrastive learning regime. Furthermore, we relate the proposed loss function to dependency measurement. Analogous to InfoNCE loss, which is a lower bound of mutual information between two views [3], we show that RINCE is a lower bound of Wasserstein Dependency Measure (WDM) [33], even in the noisy setting. By replacing the KL divergence in the mutual information estimator with the Wasserstein distance, WDM is able to capture the geometry of the representation space via the equipped metric space and provides robustness against noisy views better than the KL divergence, both in theory and practice. In particular, the features learned with RINCE achieve better class-wise separation, which is proved to be crucial to improve generalization [34]. + +Despite its rigorous theoretical background, implement + +ing RINCE requires only a few lines code and can be a simple drop-in replacement for the InfoNCE loss to make contrastive learning robust against noisy views. Since InfoNCE sets the basis for many modern contrastive methods such as SimCLR [6] and MoCo-v1/v2/v3 [5, 7, 35], our construction can be easily applied to many existing frameworks. + +Finally, we provide strong empirical evidence demonstrating the robustness of RINCE against noisy views under various scenarios with different modalities and noise types. We show that RINCE improves over the state-of-the-art in image [36, 37], video [27, 38] and graph [39] self-supervised learning benchmarks, demonstrating its generality across different modalities. We also show that RINCE exhibits strong robustness against different types of noise such augmentation noise [20, 40], label noise [28, 41], and noisy audio-visual correspondence [24]. The improvement is consistently observed across different dataset scales and training epochs, demonstrating the scalability and computational efficiency. In short, our main contributions are: + +- We propose RINCE, a new contrastive learning objective that is robust against noisy views of data; +- We provide a theoretical analysis to relate the proposed loss to symmetric losses and dependency measurement; +- We demonstrate our approach on real-world scenarios of image, video, and graph contrastive learning. + +# 2. Related Work + +Contrastive Learning Contrastive approaches have become prominent in unsupervised representation learning [1, 2, 42]. InfoNCE [3] and its variants [5, 6, 8, 9] achieve state-of-the-art across different modalities [10, 14, 17, 18, 19]. Modern approaches improve upon InfoNCE from different directions. One line of work focuses on modifying training mechanisms, e.g., appending projection head [6], momentum encoder with dynamic dictionary update [5, 7], siamese networks with stop gradient trick [8, 43], and online cluster assignment [44]. Another line of work refines the loss function itself to make it more effective, e.g., upweight hard negatives [12, 45], correct false negatives [11], and alleviate feature suppression [46]. Along this second line of work, we propose a new contrastive loss function robust against noisy views. Some of prior work in this direction [17, 24] was demonstrated on limited modalities only; we demonstrate its generality on image [37], video [27, 38], and graph [40, 47, 48] contrastive learning scenarios. Our approach is orthogonal to the first line of work; we show that RINCE can easily be applied to some of existing training mechanisms such as SimCLR [6] and MoCo-v1/v2/v3 [5, 7, 35]. + +Robust Loss against Noisy Labels Learning with noisy labels has been actively explored in recent years [28, 29, 31, 32, 49, 50, 51, 52, 53, 54, 55]. One line of work + +attempts to develop robust loss functions that are noisetolerant [29, 30, 56, 57]. Ghosh et al. [29] prove that symmetric loss functions are robust against noisy labels, e.g., Mean Absolute Error (MAE) [30], while commonly used Cross Entropy (CE) loss is not. Based on this idea, Zhang and Sabuncu [56] propose the generalized cross entropy loss to combine MAE and CE loss functions. A similar idea is adopted in [57] by combining the reversed cross entropy loss with CE loss. In the next section, we relate noisy views to noisy labels by interpreting contrastive learning as binary classification, and developed a robust symmetric contrastive loss that enjoys the similar theoretical guarantees. + +# 3. From Noisy Labels to Noisy Views + +We start by connecting two seemingly different but related frameworks: supervised binary classification with noisy labels and self-supervised contrastive learning with noisy views. We then introduce a family of symmetric loss functions that is noise-tolerant and show how we can transform contrastive objectives to a symmetric form. + +# 3.1. Symmetric Losses for Noisy Labels + +Denoting the input space by $\mathcal{X}$ and the binary output space by $\mathcal{Y} = \{-1,1\}$ , let $S = \{x_{i},y_{i}\}_{i = 1}^{m}$ be the unobserved clean dataset that is drawn i.i.d. from the data distribution $\mathcal{D}$ . In the noisy setting, the learner obtains a noisy dataset $S_{\eta} = \{x_i,\hat{y}_i\}_{i = 1}^m$ , where $\hat{y}_i = y_i$ with probability $1 - \eta_{x_i}$ and $\hat{y}_i = -y_i$ with probability $\eta_{x_i}$ . Note that the noise rate $\eta_{x}$ is data point-dependent. For a classifier $f\in \mathcal{F}:\mathcal{X}\to \mathbb{R}$ , the expected risk under the noise-free scenario is $R_{\ell}(f) = \mathbb{E}_{\mathcal{D}}[\ell (f(x),y)]$ where $\ell :\mathbb{R}\times \mathcal{V}\rightarrow \mathbb{R}$ is a binary classification loss function. When the noise exists, the learner minimizes the noisy expected risk $R_{\ell}^{\eta}(f) = \mathbb{E}_{\mathcal{D}_n}[\ell (f(x),\hat{y})]$ . + +Ghosh et al. [29] show that symmetric loss functions are robust against noisy labels in binary classification. In particular, a loss function $\ell$ is symmetric if it sums to a constant: + +$$ +\ell (s, 1) + \ell (s, - 1) = c, \quad \forall s \in \mathbb {R}, \tag {1} +$$ + +where $s$ is the prediction score from $f$ . Note that the symmetry condition should also hold with the gradients w.r.t. $s$ . They show that if the noise rate is $\eta_x \leq \eta_{\max} < 0.5, \forall x \in \mathcal{X}$ and if the loss is symmetric and non-negative, the minimizer of the noisy risk $f_{\eta}^{*} = \arg \inf_{f \in \mathcal{F}} R^{\eta}(f)$ approximately minimizes the clean risk: + +$$ +R (f _ {\eta} ^ {*}) \leq \epsilon / (1 - 2 \eta_ {\max}), +$$ + +where $\epsilon = \inf_{f\in \mathcal{F}}R(f)$ is the optimal clean risk. This implies that the noisy risk under symmetric loss is a good surrogate of the clean risk. In Appendix A.2, we further relax the non-negative constraint on the loss with a corollary. + +# 3.2. Towards Symmetric Contrastive Objectives + +The results above suggest that we can achieve robustness against noisy views if a contrastive objective can be expressed in a form that satisfies the symmetry condition in the binary classification framework. To this end, we first relate contrastive learning to binary classification, and then express it in a form where symmetry can be achieved. + +Contrastive learning as binary classification. Given two views $X$ and $V$ , we can interpret contrastive learning as noisy binary classification operating over pairs of samples $(x, v)$ with a label 1 if it is sampled from the joint distribution, $(x, v) \sim P_{XV}$ , and -1 if it comes from the product of marginals, $(x, v') \sim P_{X}P_{V}$ . In the presence of noisy views, some negative pairs $(x, v') \sim P_{X}P_{V}$ could be mislabeled as positive, introducing noisy labels. + +To see this more concretely, let us consider the InfoNCE loss [3], one of the most widely adopted contrastive objectives [4, 6, 11, 58]. It minimizes the following loss function: + +$$ +\begin{array}{l} \mathcal {L} _ {\text {I n f o N C E}} (\mathbf {s}) = - \log \frac {e ^ {s ^ {+}}}{e ^ {s ^ {+}} + \sum_ {i = 1} ^ {K} e ^ {s _ {i} ^ {-}}} \\ := - \log \frac {e ^ {f (x) ^ {T} g (v) / t}}{e ^ {f (x) ^ {T} g (v) / t} + \sum_ {i = 1} ^ {K} e ^ {f (x) ^ {T} g \left(v _ {i}\right) / t}}, \tag {2} \\ \end{array} +$$ + +where $\mathbf{s} = \{s^{+},\{s_{i}^{-}\}_{i = 1}^{K}\}$ , $s^+$ and $s_i^-$ are the scores of related (positive) and unrelated (negative) pairs and $t$ is the temperature parameter introduced to avoid gradient saturation. The expectation of the loss is taken over $(x,v)\sim P_{XV}$ and $K$ independent samples $v_{i}\sim P_{V}$ , where $P_{XV}$ denotes the joint distribution over pairs of views such as transformations of the same image or co-occurring multimodal signals. Although InfoNCE has a functional form of the $(K + 1)$ -way softmax cross entropy loss, the model ultimately learns to classify whether a pair $(x,v)$ is positive or negative by maximizing/minimizing the positive score $s^+ /$ negative scores $s_i^-$ . Therefore, InfoNCE under noisy views can be seen as binary classification with noisy labels. We acknowledge that similar interpretations have been made in prior works under different contexts [4, 59, 60]. + +Symmetric form of contrastive learning. Now we turn to a functional form of contrastive learning that can achieve the symmetric property. Assume that we have a noisetolerant loss function $\ell$ that satisfies the symmetry condition of equation 1. We say a contrastive learning objective is symmetric if it accepts the following form + +$$ +\mathcal {L} (\mathbf {s}) = \underbrace {\ell \left(s ^ {+} , 1\right)} _ {\text {P o s i t i v e P a i r}} + \lambda \underbrace {\sum_ {i = 1} ^ {K} \ell \left(s _ {i} ^ {-} , - 1\right)} _ {K \text {N e g a t i v e P a i r s}} \tag {3} +$$ + +which consists of a collection of $(K + 1)$ binary classification losses; $\lambda >0$ is a density weighting term controlling + +```txt +pos: exponent for positive example +# neg: sum of exponents for negative examples +# q, lam: hyperparameters of RINCE +info_nce_loss $=$ -log(pos/(pos+neg)) +rince_loss $=$ -pos\*\*q/q + (lam\*(pos+neg))\*\*q/q +``` + +the ratio between classes 1 (positive pairs) and $-1$ (negative pairs). Reducing $\lambda$ places more weight on the positive score $s^+$ , while setting $\lambda$ to zero recovers the negative-pair-free contrastive loss such as BYOL [8]. + +Contrastive objectives that satisfy the symmetric form enjoy strong theoretical guarantees against noisy labels as described in Ghosh et al. [29], as long as we plug in the right contrastive loss function $\ell$ that satisfies the symmetry condition. Unfortunately, the InfoNCE loss [3] does not satisfy the symmetry condition in the gradients w.r.t. $s^{+/ - }$ (we provide the full derivations in Appendix A.5). This motivates us to develop a new contrastive loss function that satisfies the symmetry condition, described next. + +# 4. Robust InfoNCE Loss + +Based on the idea of robust symmetric classification loss, we present the following Robust InfoNCE (RINCE) loss: + +$$ +\mathcal {L} _ {\mathrm {R I N C E}} ^ {\lambda , q} (\mathbf {s}) = \frac {- e ^ {q \cdot s ^ {+}}}{q} + \frac {(\lambda \cdot (e ^ {s ^ {+}} + \sum_ {i = 1} ^ {K} e ^ {s _ {i} ^ {-}})) ^ {q}}{q}, +$$ + +where $q, \lambda \in (0,1]$ . Figure 2 shows the pseudo-code of RINCE; it is simple to implement. When $q = 1$ , RINCE becomes a contrastive loss that fully satisfies the symmetry property in the form of equation 3 with $\ell(s,y) = -ye^s$ : + +$$ +\mathcal {L} _ {\mathrm {R I N C E}} ^ {\lambda , q = 1} (\mathbf {s}) = - (1 - \lambda) e ^ {s ^ {+}} + \lambda \sum_ {i = 1} ^ {K} e ^ {s _ {i} ^ {-}}. +$$ + +Notice that the exponential loss $-ye^{s}$ satisfies the symmetric condition defined in equation 1 with $c = 0$ . Therefore, when $q \to 1$ , we achieve robustness against noisy views in the same manner as binary classification with noisy labels. + +In the limit of $q \to 0$ , RINCE becomes asymptotically equivalent to InfoNCE, as the following lemma describes: + +Lemma 1. For any $\lambda >0$ , it holds that + +$$ +\lim _ {q \rightarrow 0} \mathcal {L} _ {\text {R I N C E}} ^ {\lambda , q} (s) = \mathcal {L} _ {\text {I n f o N C E}} (s) + \log (\lambda); +$$ + +$$ +\lim _ {q \rightarrow 0} \frac {\partial}{\partial s} \mathcal {L} _ {\text {R I N C E}} ^ {\lambda , q} (s) = \frac {\partial}{\partial s} \mathcal {L} _ {\text {I n f o N C E}} (s). +$$ + +We defer the proofs to Appendix A. Note that the convergence also holds for the derivatives: optimizing RINCE in the limit of $q\to 0$ is mathematically equivalent to optimizing InfoNCE. Therefore, by controlling $q\in (0,1]$ we smoothly interpolate between the InfoNCE loss $(q\rightarrow 0)$ and the RINCE loss in its fully symmetric form $(q\rightarrow 1)$ . + +![](images/1944dd187288cb7cf4c40b6f91c34ee6e9173db3eb359f83f061c92b7a011168.jpg) +Figure 2. Pseudocode for RINCE. The implementation only requires a small modification to the InfoNCE code. +Figure 3. Loss Visualization. We visualize the (a) loss value and the (b) gradient scale with respect to the positive score $s^+$ for different $q$ while setting $\lambda = 0.5$ . The gradient scale of InfoNCE ( $q \to 0$ ) is larger when the positive score is smaller (hard positive pair). In contrast, for fully symmetric RINCE ( $q = 1$ ), the gradient is larger when positive score is large (easy positive pair). + +# 4.1. Intuition behind RINCE + +We now analyze the behavior of RINCE through the lens of exploration-exploitation trade-off. In particular, we reveal an implicit easy/hard positive mining scheme by inspecting the gradients of RINCE under different $q$ values, and show that we achieve stronger robustness (more exploitation) with larger $q$ at the cost of potentially useful clean hard positive samples (less exploration). + +To simplify the analysis, we consider InfoNCE and RINCE with a single negative pair $(K = 1)$ : + +$$ +\mathcal {L} _ {\text {I n f o N C E}} (\mathbf {s}) = - \log \left(e ^ {s ^ {+}} / \left(e ^ {s ^ {+}} + e ^ {s ^ {-}}\right)\right); +$$ + +$$ +\mathcal {L} _ {\mathrm {R I N C E}} ^ {\lambda , q} (\mathbf {s}) = \frac {- e ^ {q \cdot s ^ {+}}}{q} + \frac {(\lambda \cdot (e ^ {s ^ {+}} + e ^ {s ^ {-}})) ^ {q}}{q}. +$$ + +We visualize the loss and the scale of the gradients with respect to positive scores $s^+$ in Figure 3. Although the loss values are different for each $q$ , they follow the same principle: The loss achieves its minimum when the positive score $s^+$ is maximized and the negative score $s^-$ is minimized. + +The interesting bit lies in the gradients. The InfoNCE loss $(q\rightarrow 0)$ places more emphasis on hard positive pairs, i.e., the pairs with low positive scores $s^+$ (the left-most part in the plot). In contrast, the fully symmetric RINCE loss $(q = 1)$ places more weights on easy positive pairs (the right-most part). This reveals an implicit trade-off between exploration (convergence) and exploitation (robustness). When $q\to 0$ , the loss performs hard positive mining, providing faster convergence in the noise-free setting. But in the presence of noise, exploration is harmful; it wrongly puts higher weights to false positive pairs because noisy samples tend to induce larger losses [24, 55, 61, 62], and this could hinder convergence. In contrast, when $q\rightarrow 1$ we perform easy positive mining. This provides robustness + +especially against false positives; but this is done at the cost of exploration with clean hard positives. An important aspect here is that RINCE does not require an explicit form of noise estimator: the scores $s^{+}$ and $s^{-}$ , and the relationship between the two (which is what the loss function measures) act as noise estimates. In practice, we set $q \in [0.1, 0.5]$ to strike the balance between exploration and exploitation. + +Note that both $q \to 0$ and $q \to 1$ naturally perform hard negative mining; both their derivatives put exponentially more weights on hard negative pairs. In Appendix C.1 we provide extended analysis of the gradients with respect to both $s^{+}$ and $s^{-}$ and show that RINCE performs easy positive mining and hard negative mining. + +# 4.2. Theoretical Underpinnings + +Next, we provide an information-theoretic explanation on what makes RINCE robust against noisy views. In particular, we show that RINCE is a contrastive lower-bound of mutual information (MI) expressed in Wasserstein dependency measure (WDM) [33], which provides superior robustness against sample noise compared to the Kullback-Leibler (KL) divergence thanks to strong geometric properties of the Wasserstein metric. We further show that, even in the presence of noise, RINCE is a lower bound of clean WDM, indicating its robustness against noisy views. + +Limitations of KL divergence in MI estimation. Without loss of generality, let $f = g$ and consider $f = f' \circ \phi$ , where $\phi$ is a representation encoder and $f'$ is a projection head [6]. Also, let $P^{\phi} = \phi_{\#} P$ be the pushforward measure of $P$ with respect to $\phi$ . It has been shown that InfoNCE is a variational lower-bound of MI in the representation space expressed with KL-divergence [20, 63]: + +$$ +\begin{array}{l} - \mathbb {E} \left[ \mathcal {L} _ {\text {I n f o N C E}} (\mathbf {s}) \right] + \log (K) \leq I (\phi (X), \phi (V)) \\ = D _ {\mathrm {K L}} (P _ {X V} ^ {\phi}, P _ {X} ^ {\phi} P _ {V} ^ {\phi}). \\ \end{array} +$$ + +Intuitively, maximizing MI can be interpreted as maximizing the discrepancy between positive and negative pairs. However, prior works [33, 64] have identified theoretical limitations of maximizing MI using the KL divergence: Because KL divergence is not a metric, it is sensitive to small differences in data samples regardless of the geometry of the underlying data distributions. Therefore, the encoder $\phi$ can capture limited information shared between $X$ and $V$ as long as the differences are sufficient to maximize the KL divergence. Note that this can be especially detrimental in the presence of noisy views, as the learner can quickly settle on spurious correlations in false positive pairs due to the absence of the actual shared information. + +RINCE is a lower bound of WDM. We now establish RINCE as a lower bound of WDM [33], which is proposed as a replacement for the KL divergence in MI estimation. + +WDM is based on the Wasserstein distance, a distance metric between probability distributions defined via an optimal transport cost. Letting $\mu$ and $\nu \in \mathrm{Prob}(\mathbb{R}^d\times \mathbb{R}^d)$ be two probability measures, we define the Wasserstein-1 distance with a Euclidean cost function as + +$$ +\mathcal{W}(\mu ,\nu) = \inf_{\pi \in \Pi (\mu ,\nu)}\mathbb{E}_{\substack{(X,V)\\ (X^{\prime},V^{\prime})\sim \pi}}\left[\| X - X^{\prime}\| +\| V - V^{\prime}\|\right] +$$ + +where $\Pi (\mu ,\nu)$ denotes the set of measure couplings whose marginals are $\mu$ and $\nu$ , respectively. By virtue of symmetry when $q = 1$ , if $\lambda >1 / (K + 1)$ , the Kantorovich-Rubinstein duality [65] implies that (full theorem in Appendix A.3): + +$$ +\begin{array}{l} - \mathbb {E} \left[ \mathcal {L} _ {\text {R I N C E}} ^ {\lambda , q = 1} (\mathbf {s}) \right] \leq L \cdot I _ {\mathcal {W}} (\phi (X), \phi (V)) \\ := L \cdot \mathcal {W} \left(P _ {X V} ^ {\phi}, P _ {X} ^ {\phi} P _ {V} ^ {\phi}\right), \tag {4} \\ \end{array} +$$ + +where $I_{\mathcal{W}}(\phi(X), \phi(V))$ is the WDM defined in [33] and $L$ is a constant that depends on $t, \lambda$ , and the Lispchitz constant of the projection head $f$ . Note that we are not aware of any work that showed it is possible to establish a similar bound with WDM for the InfoNCE loss. + +This provides another explanation of what makes RINCE robust against noisy views. Unlike InfoNCE which maximizes the KL divergence, optimizing RINCE is equivalent to maximizing the WDM with a Lipschitz function. Equipped with a proper metric, this allows RINCE to measure the divergence between two distributions $P_{XV}^{\phi}$ and $P_X^\phi P_V^\phi$ without being overly sensitive to individual sample noise, as long as the noise does not alter the geometry of the distributions. This also allows the encoder $\phi$ to learn more complete representations, as maximizing the Wasserstein distance requires the encoder to not only model the density ratio between the two distributions but also the optimal cost of transporting one distribution to another. + +RINCE is still a lower bound of WDM even with noise. Finally, we show that RINCE still maximizes the noise-less WDM under additive noise, corroborating the robustness of RINCE. Let's consider a simple mixture noise model: + +$$ +P _ {X V} ^ {\eta} = (1 - \eta) P _ {X V} + \eta P _ {X} P _ {V}, +$$ + +where $\eta$ is the noise rate and the noisy joint distribution $P_{XV}^{\eta}$ is a weighted sum between the noise-less positive distribution $P_{XV}$ and negative distribution $P_{X}P_{V}$ . Note that the marginals of $P_{XV}^{\eta}$ are still $P_{X}$ and $P_{V}$ by construction. The intuition behind mixture noise model is that when we draw positive pairs from $P_{XV}^{\eta}$ , we obtain false positives from $P_{X}P_{V}$ with probability $\eta$ . Via the symmetry of the contrastive loss, we can extend bound (4) as follows (proof in Appendix A.4): + +$$ +- \mathbb {E} _ {P _ {X V} ^ {\eta}} \left[ \mathcal {L} _ {\text {R I N C E}} ^ {\lambda , q = 1} (\mathbf {s}) \right] \leq (1 - \eta) \cdot L \cdot I _ {\mathcal {W}} (\phi (X), \phi (V)). +$$ + +![](images/eb8da3ba65802b75c068c51ab0444b005b6e6af58560d9fcb5a5f1d5b6d37412.jpg) +(a) Label Noise + +![](images/6739378aa5fd7b73bbaf30413455c0ea9be9292e1ce513d4914bf1e72649eacb.jpg) +(b) Augmentation Noise + +![](images/a20996e6915b209e35ddbb555f4da95c4a930049e7547641c2823a2712004dcf.jpg) +Figure 4. Noisy CIFAR-10. We show the top-1 accuracy of RINCE with different values of $q$ across different noise rate $\eta$ . Large $q$ ( $q = 0.5, 1$ ) leads to better robustness, while smaller $q$ ( $q = 0.01$ ) performs similar to InfoNCE ( $q \to 0$ ). + +![](images/78bf22324ba47a3e2c9d4b225fe72ffa54a828fa46ab1fdd9f20a1c9aa55cb89.jpg) + +![](images/e285d1206643d515d582eb55759a60ce4964208c7b83ac561738dc32fbf1ecde.jpg) + +![](images/5296a1836b6aa8fea805ef06401eb63b2b21744cb0e03170d3a30a896b5fb4f0.jpg) +Figure 5. t-SNE Visualization on CIFAR-10 with label noise. Colors indicate classes. RINCE leads to better class-wise separation than the InfoNCE loss in both noise-less and noisy cases. + +![](images/892ed67cd09e5cb8b8e9a3d1831cc7b70ba30ee154f81e046ccb82c02dc72784.jpg) + +![](images/6cb9c37657d0c7abb0471c24369ae3d97e5b24160dbd6c61124bc421e84ca3ee.jpg) + +Comparing to the bound (4), the right hand side is reweighted with $(1 - \eta)$ . This implies that minimizing RINCE with noisy views still maximizes a lower bound of noise-less WDM. Despite the simplicity of the analysis, it intuitively relates dependency measures and the noisy views with interpretable bounds. It would be an interesting future direction to extend the analysis to more complicated noise models, e.g., $P_{XV}^{\eta} = (1 - \eta)P_{XV} + \eta Q_{XV}$ , where $Q$ is an unknown perturbation on positive distribution. + +# 5. Experiments + +We evaluate RINCE on various contrastive learning scenarios involving images (CIFAR-10 [36], ImageNet [37]), videos (ACAV100M [27], Kinetics400 [38]) and graphs (TUDataset [39]). Empirically, we find that RINCE is insensitive to the choice of $\lambda$ ; we simply set $\lambda = 0.01$ for all vision experiments and $\lambda = 0.025$ for graph experiments. + +# 5.1. Noisy CIFAR-10 + +We begin with controlled experiments on CIFAR-10 to verify the robustness of RINCE against synthetic noise by controlling the noise rate $\eta$ . We consider two noise types: + +
MethodΔ to SimCLR [6]Top 1Top 5
Supervised [67]N/A76.5-
SimSiam [43]No negative pairs71.3-
BYOL [8]No negative pairs74.391.6
Barlow Twins [9]Redundancy reduction73.291.0
SwAV [44]Cluster discrimination75.3-
SimCLR [6]None69.389.0
+RINCE (Ours)Symmetry controller q70.089.8
MoCo [5]Momentum encoder60.6-
MoCo-v2 [7]Momentum encoder71.190.1
MoCo-v3 [35]Momentum encoder73.8-
+RINCE (Ours)Symmetry controller q74.291.8
+ +Table 1. Linear Evaluation on ImageNet. All the methods use ResNet-50 [67] as backbone architecture with 24M parameters. + +Label noise. We start with the case of supervised contrastive learning [41] where positive pairs are different images of the same label. This allows us to control noise in the traditional sense, i.e., learning with noisy labels. Similar to [56], we flip the true labels to semantically related ones, e.g., $\mathrm{CAT} \leftrightarrow \mathrm{DOG}$ with probability $\eta / 2$ . This is commonly referred to as class-dependent noise [55, 56, 57]. + +Augmentation noise. We consider the self-supervised learning scenario and vary the crop size during data augmentation similar to [20], i.e., after applying all the transformations as in SimCLR [6], images are further cropped into $1/5$ of their original size with probability $\eta$ . This effectively controls the noise rate as cropped patches will most likely be too small to contain any shared information. + +Figure 4 shows the results of SimCLR trained with InfoNCE and RINCE with different choices of $q$ and $\lambda$ . When the augmentation noise is present, e.g., $\eta = 0.4$ , the accuracy of InfoNCE drops from $91.14\%$ to $87.33\%$ . In contrast, the robustness of RINCE is enhanced by increasing $q$ , achieving $89.01\%$ when $q = 1.0$ . InfoNCE also fails to address label noise and suffers from significant performance drop (93.38% → 87.11% when $\eta = 0.8$ ). In comparison, RINCE retains the performance even when the noise rate is large (91.59% for $q = 1.0$ ). In both cases, reducing the value of $q$ makes the performance of RINCE closer to InfoNCE, verifying our analysis in Lemma 1. + +Figure 5 shows t-SNE visualization [66] of representations learned with InfoNCE and RINCE ( $q = 1.0$ ) under different label noise. As the noise rate increases, representations of different classes start to tangle up for InfoNCE, while RINCE still achieves decent class-wise separation. + +# 5.2. Image Contrastive Learning + +We verify our approach on the well-established ImageNet benchmark [37]. We adopt the same training proto + +
MethodBackboneFinetune Input SizeHMDBUCF
3D-RotNet [68]R3D-1816 × 112233.762.9
ClipOrder [69]R3D-1816 × 112230.972.4
DPC [70]R3D-1825 × 128235.775.7
CBT [71]S3D16 × 112244.679.5
AVTS [72]MC3-1825 × 224256.985.8
SeLaVi [73]R(2+1)D-1832 × 112247.183.1
XDC [74]R(2+1)D-1832 × 224252.686.8
Robust-xID [24]R(2+1)D-1832 × 224255.085.6
Cross-AVID [19]R(2+1)D-1832 × 224259.986.9
AVID+CMA [19]R(2+1)D-1832 × 224260.887.5
InfoNCE (Ours)R(2+1)D-1832 × 224257.888.6
RINCE (Ours)R(2+1)D-1832 × 224261.688.8
GDT [23]R(2+1)D-1830 × 112262.3*90.9*
+ +* Based on an advanced hierarchical data augmentation during pretraining. + +Table 2. Kinetics400-pretrained performance on UCF101 and HMDB51 (top-1 accuracy). Ours use the same data augmentation approach as Cross-AVID and AVID+CMA, while GDT uses a hierarchical sampling process to obtain good performance. + +col and hyperparameter settings of SimCLR [6] and MoCo-v3 [35] and simply replace the InfoNCE with our RINCE loss ( $q = 0.1$ and $q = 0.6$ , respectively) as shown in Figure 2. Table 1 shows that RINCE improves InfoNCE (SimCLR and MoCo-v3) by a non-trivial margin. We also include results from the SOTA baselines, where they improve SimCLR by introducing dynamic dictionary plus momentum encoder (MoCo-v1/v2/v3 [5, 7, 35]), removing negative pairs plus the stop-gradient trick (SimSiam [43], BYOL [8]), or online cluster assignment (SwAV [44]). In comparison, our work is orthogonal to the recent developments, and the existing tricks can be applied along with RINCE. + +Figure 6 shows the positive pairs from SimCLR augmentations and the corresponding positive scores $s^{+} = f(x)^{T}g(v)$ output by trained RINCE model. Examples with lower positive scores contain pairs that is less informative to each other, while semantically meaningful pairs often have higher scores. This implies that positive scores are good noise detectors, and down-weighting the samples with lower positive score brings robustness during training, verifying our analysis in section 4.1. + +# 5.3. Video Contrastive Learning + +We examine our approach in the audio-visual learning scenario using two video datasets: Kinetics400 [38] and ACAV100M [27]. Here, we find that simple $q$ -warmup improves the stability of RINCE, i.e., $q$ starts at 0.01 and linearly increases to 0.4 until the last epoch. We apply this to all RINCE models in this section. As we show below, RINCE outperforms SOTA noise-robust contrastive methods [19, 24] on Kinetics400, while also providing scalability and computational efficiency compared to InfoNCE. + +![](images/ffd827ed5db19978017d432b63fa829fb128a407333d49df38767eff6fbba613.jpg) + +![](images/bba44ce272f95d7d6d17c967cd6bd8753be616d0bc7064e0cc51832614362e53.jpg) + +![](images/adfd567fec294ca081fc0bbf0780f5b924520e5ce4a8f7c7048e29a98bf55671.jpg) + +![](images/05a6212c9d4f8b6f84c7311fa011e6ee98b37fd4d817fab1b2e279a93f651bdf.jpg) +$s^+$ < 0.75 +Figure 6. Positive pairs and their scores. The positive scores $s^+ \in [-1,1]$ are output by the trained RINCE model (temperature = 1). Pairs that have lower scores are visually noisy, while informative pairs often have higher scores. + +![](images/0f1b087bb407608899af95dc1bfcb2a9d06a0bc1b12c3225cf2a68732700c32f.jpg) + +![](images/6904c5a38da69a697de19737dd6fdeee31648a4fbc393548034be238cf5633f5.jpg) + +![](images/edecd7e93b0c891dad50b1982cab05af1f2f8baac2ee5a32af64843be4899428.jpg) + +![](images/a224a93f7cbf67376391fbfc9f6d571e6ef55efa3052c0ad39d532721b52c86c.jpg) + +![](images/1b02e76383725be5c0488ec0546dfafd93e4094dd5388673df80d931b098b51f.jpg) +$0.8 < s^{+} < 0.9$ + +![](images/e34ac211b485366eb8718bd0ec4e34e1300ca561d6b9535bd9767999bde8aa8e.jpg) + +![](images/1bc43e279f491ae435f67f8c4f60776122e40a821a3a1fe3f049f48f4df45122.jpg) + +![](images/79160e7e2a3d6cf32b494a79031b005516afb523a1561a94ea13cc4ebd2b9e82.jpg) + +![](images/b6d3b367829703105c4480e108f23232c2cde1dff83de7e9fba512705d5df912.jpg) + +![](images/4dd64278c362d85efc350a107de0f32f58893fbfd9e43b99aecc679c9c1fd0ed.jpg) +$s^+ > 0.95$ + +Kinetics400 For fair comparison to SOTA, we follow the same experimental protocol and hyperparameter settings of [19] and simply replace their InfoNCE loss functions with RINCE as shown in Figure 2. We use the same network architecture, i.e., 18-layer $\mathrm{R}(2 + 1)\mathrm{D}$ video encoder [75], 9-layer VGG-like audio encoder, and 3-layer MLP projection head producing 128-dim embeddings. We use the ADAM optimizer [76] for 400 epochs with 4,096 batch size, 1e-4 learning rate and 1e-5 weight decay. The pretrained encoders are finetuned on UCF-101 [77] and HMDB-51 [78] with clips composed of 32 frames of size $224 \times 224$ . We defer the full experimental details to Appendix B. + +Table 2 shows RINCE outperforming most of the baselines, including Robust-xID [24] and AVID+CMA [19] which are recent InfoNCE-based SOTA methods proposed to address the noisy view issues in audio-visual contrastive learning. Considering the only change required is the simple replacement of the InfoNCE with our RINCE loss, the results clearly show the effectiveness of our approach. The simplicity means we can easily apply RINCE to a variety of InfoNCE-based approaches, such as GDT [23] that uses advanced data augmentation to achieve SOTA results. + +ACAV100M We conduct an in-depth analysis of RINCE on ACAV100M [27], a recent large-scale video dataset for self-supervised learning. Compared to Kinetics400 which is limited to human actions, ACAV100M contains videos "in the wild" exhibiting a wide variety of audio-visual patterns. The unconstrained nature of the dataset makes it a good benchmark to investigate the robustness of RINCE to various types of real-world noise, e.g., background music, overdubbed audio, studio narrations, etc. + +We focus on evaluating the (a) scalability and (b) conver + +![](images/d5c05f6129f8512b9f1109f7f86c0309ffc555d5f6fcd2ff9f5d86a6288d118b.jpg) +(a) Scalability + +![](images/e222b2c3da6f480f97d6d3a6b5c877f5f2ab853c89d4bbd6b7d00f55c1eb81d9.jpg) +(b) Convergence +Figure 7. RINCE outperforms InfoNCE with fewer epochs across different scales The results are based on ACAV100M-pretrained models transferred to UCF-101. + +gence rate of RINCE, thereby answering the question: Will it retrain its edge over InfoNCE (a) even in the large-scale regime and (b) with a longer training time? We follow the same experimental setup as described above, but reduce the batch size to 512 and report the results only on the first split of UCF-101 to make our experiments tractable. + +Figure 7 (a) shows the top-1 accuracy of RINCE and InfoNCE across different data scales and training epochs. RINCE outperforms InfoNCE by a large margin at every data scale. In terms of the convergence rate, RINCE is comparable to or even outperforms fully-trained (200 epochs) InfoNCE models with only 100 or fewer epochs. Figure 7 (b) gives a closer look at the convergence at $50\mathrm{K}$ and $200\mathrm{K}$ scales. Interestingly, InfoNCE saturates and even degenerates after epoch 150, while RINCE keeps improving. This verifies our analysis in section 4.1: InfoNCE can overfit noisy samples due to its exploration property, while RINCE downweights them and continue to obtain the learning signal from clean ones, achieving robustness against noise. + +# 5.4. Graph Contrastive Learning + +To see whether the modality-agnostic nature of RINCE applies beyond image and video data, we examine our approach on TUDataset [39], a popular benchmark suite for graph inference on molecules (BZR, NCI1), bioinformatics (PROTEINS), and social network (RDT-B, IMDB-B). Unlike vision datasets, data augmentation for graphs requires careful engineering with domain knowledge, limiting the applicability of InfoNCE-type contrastive objectives. + +For fair comparison, we follow the protocol of [40] and train graph isomorphism networks [79] with four types of data augmentation: node dropout, edge perturbation, attribute masking, and subgraph sampling. We train models using ADAM [76] for 20 epochs with a learning rate 0.01 and report mean and standard deviation over 5 independent trials. We set $q = 0.1$ for all the experiments in this section. + +Table 3 shows that RINCE outperforms SOTA InfoNCE- + +
MethodsRDT-BNCI1PROTEINSDD
node2vec [80]-54.9±1.657.5±3.6-
sub2vec [81]71.5±0.452.8±1.553.0±5.6-
graph2vec [82]75.8±1.073.2±1.873.3±2.1-
InfoGraph [47]82.5±1.476.2±1.174.4±0.372.9±1.8
GraphCL [40]89.5±0.877.9±0.474.4±0.578.6±0.4
JOAO [83]85.3±1.478.1±0.574.6±0.477.3±0.5
JOAOv2 [83]86.4±1.578.4±0.574.1±1.177.4±1.2
InfoNCE* (Ours)89.9±0.478.2±0.874.4±0.578.6±0.8
RINCE (Ours)90.9±0.678.6±0.474.7±0.878.7±0.4
+ +* GraphCL [40] but uses the same data augmentation as RINCE. + +![](images/8432f25897adb5159c9a2aadbb261647f8314e9c97021bc7411cac8907a41449.jpg) +Table 3. Self-supervised representation learning on TUDataset: The baseline results are excerpted from the published papers. +Figure 8. Performance vs. Perturbation Rate: We increase the perturbation rate of node dropping, edge perturbation, and attribute masking from $10\%$ to $60\%$ . RINCE outperforms InfoNCE in terms of accuracy and variance when perturbation enhances. + +![](images/2ef20ff5e003aa92048944c16e7ec3f0fe695d9b2af643810c4c0ee58b6dabd4.jpg) + +based contrastive methods, GraphCL and JOAO /JOAOv2, setting the new records on all four datasets. GraphCL applies different augmentations for different datasets, while JOAO/JOAOv2 require solving bi-level optimization to choose optimal augmentation per dataset. In contrast, we apply the same augmentation across all four datasets and achieve competitive performance, demonstrating its generality and robustness. In Figure 8, we control perturbation rate by applying three augmentation types (node dropout, edge perturbation, attribute masking) to different $\%$ of nodes/edges. We show results on two datasets most sensitive to augmentation. Again, RINCE consistently outperform InfoNCE and has relatively smaller variances when the noise rate increases. + +# 6. Conclusion + +We presented Robust InfoNCE (RINCE) as a simple drop-in replacement for the InfoNCE loss in contrastive learning. Despite its simplicity, it comes with strong theoretical justifications and guarantees against noisy views. Empirically, we provided extensive results across image, video, and graph contrastive learning scenarios demonstrating its robustness against a variety of realistic noise patterns. + +Acknowledgement This work was in part supported by NSF Convergence Award 6944221 and ONR MURI 6942251. + +# References + +[1] S. Chopra, R. Hadsell, and Y. LeCun, “Learning a similarity metric discriminatively, with application to face verification,” in 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'05), vol. 1. IEEE, 2005, pp. 539–546. 1, 2 +[2] R. Hadsell, S. Chopra, and Y. LeCun, “Dimensionality reduction by learning an invariant mapping,” in 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06), vol. 2. IEEE, 2006, pp. 1735–1742. 1, 2 +[3] A. v. d. Oord, Y. Li, and O. Vinyals, “Representation learning with contrastive predictive coding,” arXiv preprint arXiv:1807.03748, 2018. 1, 2, 3, 4 +[4] Y. Tian, D. Krishnan, and P. Isola, "Contrastive multiview coding," in Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XI 16. Springer, 2020, pp. 776-794. 1, 3 +[5] K. He, H. Fan, Y. Wu, S. Xie, and R. Girshick, “Momentum contrast for unsupervised visual representation learning,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2020, pp. 9729–9738. 1, 2, 6, 7 +[6] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton, "A simple framework for contrastive learning of visual representations," in International conference on machine learning. PMLR, 2020, pp. 1597-1607. 1, 2, 3, 5, 6, 7, 17 +[7] X. Chen, H. Fan, R. Girshick, and K. He, "Improved baselines with momentum contrastive learning," in 2020 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'20). IEEE, 2020. 1, 2, 6, 7 +[8] J.-B. 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," Advances in neural information processing systems, 2020. 1, 2, 4, 6, 7 +[9] J. Zbontar, L. Jing, I. Misra, Y. LeCun, and S. Deny, "Barlow twins: Self-supervised learning via redundancy reduction," in International Conference on Machine Learning. PMLR, 2021. 1, 2, 6 +[10] L. Logeswaran and H. Lee, "An efficient framework for learning sentence representations," in International Conference on Learning Representations, 2018. 1, 2 +[11] C.-Y. Chuang, J. Robinson, L. Yen-Chen, A. Torralba, and S. Jegelka, “Debiased contrastive learning,” Advances in neural information processing systems, 2020. 1, 2, 3, 17 +[12] J. Robinson, C.-Y. Chuang, S. Sra, and S. Jegelka, “Contrastive learning with hard negative samples,” in International Conference on Learning Representations, 2021. 1, 2, 19 + +[13] J. M. Giorgi, O. Nitski, G. D. Bader, and B. Wang, “Declutr: Deep contrastive learning for unsupervised textual representations,” Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics, 2020. 1 +[14] A. Baevski, H. Zhou, A. Mohamed, and M. Auli, "wav2vec 2.0: A framework for self-supervised learning of speech representations," in Advances in neural information processing systems, 2020. 1, 2 +[15] A. Saeed, D. Grangier, and N. Zeghidour, “Contrastive learning of general-purpose audio representations,” in ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2021, pp. 3875-3879. 1 +[16] L. Wang and A. v. d. Oord, “Multi-format contrastive learning of audio representations,” arXiv preprint arXiv:2103.06508, 2021. 1 +[17] A. Miech, J.-B. Alayrac, L. Smaira, I. Laptev, J. Sivic, and A. Zisserman, “End-to-end learning of visual representations from uncurated instructional videos,” in 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020, pp. 9879–9889. 1, 2 +[18] S. Ma, Z. Zeng, D. McDuff, and Y. Song, "Active contrastive learning of audio-visual video representations," in International Conference on Learning Representations, 2020. 1, 2 +[19] P. Morgado, N. Vasconcelos, and I. Misra, "Audio-visual instance discrimination with cross-modal agreement," in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021, pp. 12475-12486. 1, 2, 7, 17, 18 +[20] Y. Tian, C. Sun, B. Poole, D. Krishnan, C. Schmid, and P. Isola, "What makes for good views for contrastive learning?" in Advances in neural information processing systems, 2020. 1, 2, 5, 6 +[21] P. Sermanet, C. Lynch, Y. Chebotar, J. Hsu, E. Jang, S. Schaal, S. Levine, and G. Brain, "Time-contrastive networks: Self-supervised learning from video," in 2018 IEEE international conference on robotics and automation, 2018. 1 +[22] T. Han, W. Xie, and A. Zisserman, "Self-supervised constraining for video representation learning," Advances in neural information processing systems, 2020. 1 +[23] M. Patrick, Y. M. Asano, P. Kuznetsova, R. Fong, J. F. Henriques, G. Zweig, and A. Vedaldi, “On compositions of transformations in contrastive self-supervised learning,” in Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021. 1, 7 +[24] P. Morgado, I. Misra, and N. Vasconcelos, "Robust audiovisual instance discrimination," in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021, pp. 12934-12945. 1, 2, 4, 7 + +[25] M. Arjovsky, L. Bottou, I. Gulrajani, and D. Lopez-Paz, “Invariant risk minimization,” arXiv preprint arXiv:1907.02893, 2019. 1 +[26] L. Jing, P. Vincent, Y. LeCun, and Y. Tian, “Understanding dimensional collapse in contrastive self-supervised learning,” arXiv preprint arXiv:2110.09348, 2021. 1 +[27] S. Lee, J. Chung, Y. Yu, G. Kim, T. Breuel, G. Chechik, and Y. Song, "Acav100m: Automatic curation of large-scale datasets for audio-visual video representation learning," in Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021, pp. 10274-10284. 2, 6, 7 +[28] N. Natarajan, I. S. Dhillon, P. K. Ravikumar, and A. Tewari, "Learning with noisy labels," Advances in neural information processing systems, vol. 26, pp. 1196-1204, 2013. 2 +[29] A. Ghosh, N. Manwani, and P. Sastry, “Making risk minimization tolerant to label noise,” Neurocomputing, vol. 160, pp. 93–107, 2015. 2, 3, 4, 14 +[30] A. Ghosh, H. Kumar, and P. Sastry, "Robust loss functions under label noise for deep neural networks," in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 31, no. 1, 2017. 2, 3 +[31] Y. Li, J. Yang, Y. Song, L. Cao, J. Luo, and L.-J. Li, "Learning from noisy labels with distillation," in Proceedings of the IEEE International Conference on Computer Vision, 2017. 2 +[32] A. Veit, N. Alldrin, G. Chechik, I. Krasin, A. Gupta, and S. Belongie, "Learning from noisy large-scale datasets with minimal supervision," in Proceedings of the IEEE conference on computer vision and pattern recognition, 2017. 2 +[33] S. Ozair, C. Lynch, Y. Bengio, A. v. d. Oord, S. Levine, and P. Sermanet, "Wasserstein dependency measure for representation learning," arXiv preprint arXiv:1903.11780, 2019. 2, 5, 15 +[34] C.-Y. Chuang, Y. Mroueh, K. Greenewald, A. Torralba, and S. Jegelka, "Measuring generalization with optimal transport," in Advances in Neural Information Processing Systems, 2021. 2 +[35] X. Chen, S. Xie, and K. He, “An empirical study of training self-supervised vision transformers,” arXiv preprint arXiv:2104.02057, 2021. 2, 6, 7, 17 +[36] A. Krizhevsky et al., “Learning multiple layers of features from tiny images.” CiteSeer, 2009. 2, 6 +[37] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei, "Imagenet: A large-scale hierarchical image database," in 2009 IEEE conference on computer vision and pattern recognition. IEEE, 2009, pp. 248-255. 2, 6 +[38] 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. 2, 6, 7 + +[39] C. Morris, N. M. Kriege, F. Bause, K. Kersting, P. Mutzel, and M. Neumann, "Tudataset: A collection of benchmark datasets for learning with graphs," arXiv preprint arXiv:2007.08663, 2020. 2, 6, 8 +[40] Y. You, T. Chen, Y. Sui, T. Chen, Z. Wang, and Y. Shen, "Graph contrastive learning with augmentations," Advances in Neural Information Processing Systems, vol. 33, pp. 5812-5823, 2020. 2, 8, 18 +[41] P. Khosla, P. Teterwak, C. Wang, A. Sarna, Y. Tian, P. Isola, A. Maschinot, C. Liu, and D. Krishnan, "Supervised contrastive learning," Advances in neural information processing systems, 2020. 2, 6 +[42] R. D. Hjelm, A. Fedorov, S. Lavoie-Marchildon, K. Grewal, P. Bachman, A. Trischler, and Y. Bengio, “Learning deep representations by mutual information estimation and maximization,” arXiv preprint arXiv:1808.06670, 2018. 2 +[43] X. Chen and K. He, “Exploring simple siamese representation learning,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021. 2, 6, 7 +[44] M. Caron, I. Misra, J. Mairal, P. Goyal, P. Bojanowski, and A. Joulin, "Unsupervised learning of visual features by contrasting cluster assignments," in Advances in Neural Information Processing Systems (NeurIPS), 2020. 2, 6, 7 +[45] Y. Kalantidis, M. B. Sariyildiz, N. Pion, P. Weinzaepfel, and D. Larlus, "Hard negative mixing for contrastive learning," in Advances in Neural Information Processing Systems (NeurIPS), 2020. 2 +[46] J. Robinson, L. Sun, K. Yu, K. Batmanghelich, S. Jegelka, and S. Sra, "Can contrastive learning avoid shortcut solutions?" in Advances in Neural Information Processing Systems (NeurIPS), 2021. 2 +[47] P. Velicković, W. Fedus, W. L. Hamilton, P. Lio, Y. Bengio, and R. D. Hjelm, “Deep graph infomax,” arXiv preprint arXiv:1809.10341, 2018. 2, 8 +[48] K. Hassani and A. H. Khasahmadi, “Contrastive multi-view representation learning on graphs,” in International Conference on Machine Learning. PMLR, 2020, pp. 4116–4126. 2 +[49] S. Sukhbaatar, J. Bruna, M. Paluri, L. Bourdev, and R. Fergus, “Training convolutional networks with noisy labels,” in 3rd International Conference on Learning Representations, ICLR 2015, 2015. 2 +[50] T. Xiao, T. Xia, Y. Yang, C. Huang, and X. Wang, “Learning from massive noisy labeled data for image classification,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2015, pp. 2691–2699. 2 +[51] T. Liu and D. Tao, "Classification with noisy labels by importance reweighting," IEEE Transactions on pattern analysis and machine intelligence, vol. 38, no. 3, pp. 447-461, 2015. 2 + +[52] G. Patrini, A. Rozza, A. Krishna Menon, R. Nock, and L. Qu, "Making deep neural networks robust to label noise: A loss correction approach," in Proceedings of the IEEE conference on computer vision and pattern recognition, 2017, pp. 1944-1952. 2 +[53] L. Jiang, Z. Zhou, T. Leung, L.-J. Li, and L. Fei-Fei, “Mentornet: Learning data-driven curriculum for very deep neural networks on corrupted labels,” in International Conference on Machine Learning, 2018. 2 +[54] M. Ren, W. Zeng, B. Yang, and R. Urtasun, “Learning to reweight examples for robust deep learning,” in International Conference on Machine Learning. PMLR, 2018, pp. 4334–4343. 2 +[55] B. Han, Q. Yao, X. Yu, G. Niu, M. Xu, W. Hu, I. Tsang, and M. Sugiyama, “Co-teaching: Robust training of deep neural networks with extremely noisy labels,” Advances in neural information processing systems, 2018. 2, 4, 6 +[56] Z. Zhang and M. R. Sabuncu, "Generalized cross entropy loss for training deep neural networks with noisy labels," Advances in neural information processing systems, 2018. 3, 6 +[57] Y. Wang, X. Ma, Z. Chen, Y. Luo, J. Yi, and J. Bailey, "Symmetric cross entropy for robust learning with noisy labels," in Proceedings of the IEEE/CVF International Conference on Computer Vision, 2019, pp. 322-330. 3, 6 +[58] P. Bachman, R. D. Hjelm, and W. Buchwalter, “Learning representations by maximizing mutual information across views,” arXiv preprint arXiv:1906.00910, 2019. 3 +[59] M. Gutmann and A. Hyvarinen, "Noise-contrastive estimation: A new estimation principle for unnormalized statistical models," in Proceedings of the thirteenth international conference on artificial intelligence and statistics. JMLR Workshop and Conference Proceedings, 2010, pp. 297-304. 3 +[60] Z. Wu, Y. Xiong, S. Yu, and D. Lin, "Unsupervised feature learning via non-parametric instance-level discrimination," arXiv preprint arXiv:1805.01978, 2018. 3 +[61] D. Arpit, S. Jastrzebski, N. Ballas, D. Krueger, E. Bengio, M. S. Kanwal, T. Maharaj, A. Fischer, A. Courville, Y. Bengio et al., "A closer look at memorization in deep networks," in International Conference on Machine Learning. PMLR, 2017, pp. 233-242. 4 +[62] X. Yu, B. Han, J. Yao, G. Niu, I. Tsang, and M. Sugiyama, "How does disagreement help generalization against label corruption?" in International Conference on Machine Learning. PMLR, 2019, pp. 7164-7173. 4 +[63] B. Poole, S. Ozair, A. Van Den Oord, A. Alemi, and G. Tucker, "On variational bounds of mutual information," in International Conference on Machine Learning. PMLR, 2019, pp. 5171-5180. 5 + +[64] D. McAllester and K. Stratos, "Formal limitations on the measurement of mutual information," in International Conference on Artificial Intelligence and Statistics, 2020. 5 +[65] F. H. N. H. L. Hörmander, N. S. B. Totaro, and A. V. M. Waldschmidt, “Grundlehren der mathematischen wissenschaften 332.” Springer, 2006. 5 +[66] L. Van der Maaten and G. Hinton, "Visualizing data using t-sne." Journal of machine learning research, vol. 9, no. 11, 2008. 6 +[67] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2016, pp. 770–778. 6 +[68] L. Jing and Y. Tian, "Self-supervised spatiotemporal feature learning by video geometric transformations," arXiv preprint arXiv:1811.11387, vol. 2, no. 7, p. 8, 2018. 7 +[69] D. Xu, J. Xiao, Z. Zhao, J. Shao, D. Xie, and Y. Zhuang, "Self-supervised spatiotemporal learning via video clip order prediction," in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2019, pp. 10334-10343. 7 +[70] T. Han, W. Xie, and A. Zisserman, "Video representation learning by dense predictive coding," in Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops, 2019, pp. 0-0. 7 +[71] C. Sun, F. Baradel, K. Murphy, and C. Schmid, “Learning video representations using contrastive bidirectional transformer,” arXiv preprint arXiv:1906.05743, 2019. 7 +[72] B. Korbar, D. Tran, and L. Torresani, "Cooperative learning of audio and video models from self-supervised synchronization," in Advances in Neural Information Processing Systems (NeurIPS), 2018. 7 +[73] Y. M. Asano, M. Patrick, C. Rupprecht, and A. Vedaldi, "Labelling unlabelled videos from scratch with multi-modal self-supervision," in Advances in Neural Information Processing Systems (NeurIPS), 2020. 7 +[74] H. Alwassel, D. Mahajan, B. Korbar, L. Torresani, B. Ghanem, and D. Tran, "Self-supervised learning by cross-modal audio-video clustering," in Advances in Neural Information Processing Systems (NeurIPS), 2020. 7 +[75] D. Tran, H. Wang, L. Torresani, J. Ray, Y. LeCun, and M. Paluri, “A closer look at spatiotemporal convolutions for action recognition,” in Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, 2018, pp. 6450–6459. 7 +[76] D. P. Kingma and J. Ba, "Adam: A method for stochastic optimization," in ICLR (Poster), 2015. 7, 8 +[77] K. Soomro, A. R. Zamir, and M. Shah, "Ucf101: A dataset of 101 human actions classes from videos in the wild," arXiv preprint arXiv:1212.0402, 2012. 7 + +[78] H. Kuehne, H. Jhuang, E. Garrote, T. Poggio, and T. Serre, "Hmdb: a large video database for human motion recognition," in 2011 International conference on computer vision. IEEE, 2011, pp. 2556-2563. 7 +[79] K. Xu, W. Hu, J. Leskovec, and S. Jegelka, “How powerful are graph neural networks?” in International Conference on Learning Representations, 2018. 8 +[80] A. Grover and J. Leskovec, "node2vec: Scalable feature learning for networks," in Proceedings of the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining, 2016, pp. 855-864. 8 +[81] B. Adhikari, Y. Zhang, N. Ramakrishnan, and B. A. Prakash, "Sub2vec: Feature learning for subgraphs," in Pacific-Asia Conference on Knowledge Discovery and Data Mining. Springer, 2018, pp. 170–182. 8 +[82] A. Narayanan, M. Chandramohan, R. Venkatesan, L. Chen, Y. Liu, and S. Jaiswal, “graph2vec: Learning distributed representations of graphs,” arXiv preprint arXiv:1707.05005, 2017. 8 +[83] Y. You, T. Chen, Y. Shen, and Z. Wang, “Graph contrastive learning automated,” arXiv preprint arXiv:2106.07594, 2021.8 +[84] W. Falcon and K. Cho, “A framework for contrastive self-supervised learning and designing a new approach,” arXiv preprint arXiv:2009.00104, 2020. 17 \ No newline at end of file diff --git a/robustcontrastivelearningagainstnoisyviews/images.zip b/robustcontrastivelearningagainstnoisyviews/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..007b4a85e16b5d79eebf744d27829a3e66a41d3e --- /dev/null +++ b/robustcontrastivelearningagainstnoisyviews/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16f904c9c80ef659c72fe4825bd7e6ecbd0b97ac0d08a054912ffd0c06ecdfc4 +size 549810 diff --git a/robustcontrastivelearningagainstnoisyviews/layout.json b/robustcontrastivelearningagainstnoisyviews/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..fc8d2ff70bfe0bdd8c5807798e96122af23a524b --- /dev/null +++ b/robustcontrastivelearningagainstnoisyviews/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:871440a00f7e681ee9218c8e71a675b582d1f45d8eae91e44e40a4074926762f +size 564479 diff --git a/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/e65226ac-a678-4234-b743-95369b01a9fc_content_list.json b/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/e65226ac-a678-4234-b743-95369b01a9fc_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e1df30d3196396e3287df247861f1d63dbb46e32 --- /dev/null +++ b/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/e65226ac-a678-4234-b743-95369b01a9fc_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:521d9d1a2ddce56f64170a4e4f811b4f9af3df6d6ea2eadf8b6691372ec836c0 +size 88829 diff --git a/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/e65226ac-a678-4234-b743-95369b01a9fc_model.json b/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/e65226ac-a678-4234-b743-95369b01a9fc_model.json new file mode 100644 index 0000000000000000000000000000000000000000..283b428da9dca62e07b3ec7fcf6cdbb1c2ade6d7 --- /dev/null +++ b/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/e65226ac-a678-4234-b743-95369b01a9fc_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:332867d5b5771068738600fe4e8432e87a518a6aeec0c9bfc50172ba52912c27 +size 116050 diff --git a/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/e65226ac-a678-4234-b743-95369b01a9fc_origin.pdf b/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/e65226ac-a678-4234-b743-95369b01a9fc_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ba72ec35827b7d74d03c9b85b2fb7c0e9ef0e12f --- /dev/null +++ b/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/e65226ac-a678-4234-b743-95369b01a9fc_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70306507ddd90325b36a9fabf83fc11dff3a6f9222687c2d9b2e3354138f3415 +size 2547416 diff --git a/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/full.md b/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b71143c38003482ac1272d73cf95f7263390dd93 --- /dev/null +++ b/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/full.md @@ -0,0 +1,340 @@ +# Robust Cross-Modal Representation Learning with Progressive Self-Distillation + +Alex Andonian* MIT CSAIL + +andonian@mit.edu + +Shixing Chen, Raffay Hamid +Amazon Prime Video + +{shixic, raffay}@amazon.com + +# Abstract + +The learning objective of vision-language approach of CLIP [63] does not effectively account for the noisy many-to-many correspondences found in web-harvested image captioning datasets, which contributes to its compute and data inefficiency. To address this challenge, we introduce a novel training framework based on cross-modal contrastive learning that uses progressive self-distillation and soft image-text alignments to more efficiently learn robust representations from noisy data. Our model distills its own knowledge to dynamically generate soft-alignment targets for a subset of images and captions in every minibatch, which are then used to update its parameters. Extensive evaluation across 14 benchmark datasets shows that our method consistently outperforms its CLIP counterpart in multiple settings, including: (a) zero-shot classification, (b) linear probe transfer, and (c) image-text retrieval, without incurring extra computational cost. Analysis using an ImageNet-based robustness test-bed [70] reveals that our method offers better effective robustness to natural distribution shifts compared to both ImageNet-trained models and CLIP itself. Lastly, pretraining with datasets spanning two orders of magnitude in size shows that our improvements over CLIP tend to scale with number of training examples. + +# 1. Introduction + +The convergence of self-supervised pretraining techniques in natural language processing and computer vision have brought about a renaissance of cross-modal representation learning methods [1, 19, 30, 39, 52, 63, 68, 75] where largescale weakly correlated multimodal data (e.g., image-text pairs) is used to learn cross-modal representations using contrastive learning techniques. In particular, the recently proposed CLIP [63] model has garnered significant attention due to its impressive zero-shot recognition ability and excellent transfer performance on downstream tasks. + +However, despite their recent success, multimodal pretraining methods like CLIP [63] are data and compute in- + +![](images/c656f8ccdfaf0185de409a80f9fb3ba66c758057f13fe4292937c98f595c867a.jpg) + +![](images/59c3e61d2993000306e719c3a9d9c9937333b0a08f514272bfa0d08fdfed74cd.jpg) +test image ground truth: goldfish +an out-of-distributionimage from ImageNet-R dataset showing a goldfish rendered in astained glass pane +pretrained models + +![](images/ab5baf01ae243ae5ab12a83afe84f89bd8d4b71663f06c9dd960ae8672ced2b2.jpg) + +![](images/d7e6b9f3fd0c538de5bb3c191a2eb60f4fc891c6969259bd385936e106bb76e3.jpg) +test image +model outputs +Figure 1. Illustrative Comparison with CLIP - CLIP [63] learns a joint vision-language embedding space by bringing corresponding image-text representation together (green links), while repelling unpaired instances away from each other (red links). This formulation does not account for potential semantic similarity between negative samples. We address this issue by learning to predict a distribution of soft-alignment targets (dotted blue edges) in a given minibatch, thereby allowing our model to learn more robust representations. This robustness is evident when comparing predicted distributions on an out-of-distribution image from ImageNet-R dataset [25], where unlike CLIP, our method can correctly classify a goldfish rendered in a stained glass pane. + +efficient. Much of CLIP's success can be attributed to its voracious appetite for training data, utilizing 400M image-text pairs and an estimated 3,584 GPU days for pretraining. As the scale of data increases, pretraining requirements of these methods become increasingly expensive, thereby limiting their widespread adoption in a sustainable manner. + +This data and compute inefficiency of CLIP [63] can be partially attributed to the underlying assumptions it makes about the web-harvested data it uses for training. Several mainstream vision-language datasets utilize the alt-text HTML attribute of images scraped from archived web pages [9, 67, 71] where captions can often have words unrelated to their corresponding image-content [67]. However, CLIP [63] models the caption for each image to be accurately and exclusively related to only that image (see Figure 1). Moreover, when using larger batch sizes (32K used for CLIP), the likelihood of observing negatives with + +high semantic similarity increases which can further degrade the learned representations especially those associated with shared semantics between faulty negatives [2]. + +To address this challenge, we propose to model the many-to-many relationships between images of webharvested datasets and their corresponding captions more accurately using soft probabilities rather than hard pairing labels. Specifically, we propose a simple yet effective framework for robust contrastive language-image pretraining that uses progressive self-distillation and soft image-text alignment targets to more efficiently learn from noisy data. Instead of explicitly finding, correcting or even pruning noisy correspondences [75, 88], our joint student-teacher model dynamically generates a new set of soft-alignments for a random subset of images and captions in every minibatch. This enables our method to model many-to-many relationships while simultaneously re-calibrating potentially poorly matched instances without needing to identify them. Over the course of training, our network generates soft-alignments for increasingly large subsets of a minibatch, effectively becoming its own teacher. We identify several key elements that allow the student network to predict its targets without representation collapse or reinforcing its mistakes. + +We use multiple pretraining datasets to extensively compare our approach to CLIP [63] evaluated on 14 benchmark datasets, where our approach consistently outperforms CLIP under multiple settings. Analysis using an ImageNet-based robustness test-bed [70] shows that our method offers better effective robustness to natural distribution shifts compared to both ImageNet-trained models as well as CLIP. Pretraining with datasets spanning two orders of magnitude in size shows that our improvements over CLIP tend to scale with number of training examples. Lastly, the simplicity of our approach allows it to be readily incorporated into existing and future methods. + +# 2. Related Work + +a. Self-Supervised Representation Learning: Self-supervised learning (SSL) approaches use a pretext task to automatically generate a supervision signal from the data itself, thereby eliminating the dependence on expensive manual data-labeling [31]. Pretext tasks in computer vision include spatial reasoning [15, 20, 32, 54, 59], temporal context [23, 32, 36, 48, 49], and other visual properties such as hue [13, 35, 81, 82], brightness [29, 72] or optical flow [29, 62, 73, 79], reconstruction of modified inputs [59, 74, 81], and classifying inputs with pseudo-labels [15, 16, 58] or pseudo-clusters [7, 8, 86, 87]. A promising subset of SSL methods uses a variant of instance discrimination framework [17, 77] which learns to align augmented versions of features while distinguishing them from features of other instances using a contrastive loss [8, 11, 24, 47]. + +b. Vision-Language Pretraining: Joint vision-language pretraining (VLP) is an active research area [1,19,39,63,68] where the availability of large-scale image-text datasets e.g., YFCC100M [71] and Conceptual Captions [9, 67] has played a key role in its progress. Although multiple concurrent works are being proposed to further improve VLP models [75], our work is different from them in a few important ways. Specifically, unlike EfficientCLIP [75] that proposes an ensemble approach to obtain a less noisy data subset for cross-modal training, our method attempts to sidestep this problem altogether by re-purposing as opposed to completely removing noisy data. Similarly, DeCLIP [39] improves on the data-efficiency of CLIP [63] by leveraging intra-model contrastive learning along with a nearest-neighbor feature bank to augment negatives. However, incorporating these supervision sources can be computationally expensive. In contrast, our approach offers a simple yet effective way to improve the data-efficiency of CLIP [63] without incurring additional computational cost. + +c. Learning from Noisy Data: Several techniques have been developed to increase the robustness of label noise especially in the supervised context [22, 40, 60, 65, 83]. These techniques include loss functions that reduce impact of outliers [76, 83], metalearning procedures that learn how to correct sources of label noise [1, 37, 69, 84], loss correction approaches that model label noise [50, 51, 65], regularization techniques aimed at lowering the impact of noise [61], and noise filtering processes that iteratively refine dataset labels and retrain models to obtain a more robust final model [55]. However, these works investigate noise-robust methods in the context of common object detection and classification tasks and cannot directly be applied effectively to cross-modal pretraining tasks. As it stands, noise-robust VLP pretraining methods are still a relatively unexplored topic. + +d. Knowledge Distillation: Approaches for knowledge distillation (KD) [27] aim to transfer knowledge from one model (i.e., a teacher) to another (i.e., a student). While KD techniques are often motivated by certain performance and efficiency goals [6, 10, 38, 66], researchers have also found that KD methods serve as an effective regularization technique that can reduce model overfitting and improve generalization capabilities [14, 40, 43, 53]. Our approach is motivated by the recent success of self-knowledge distillation approaches [21, 78, 80] that use the student network as a teacher under supervised settings to achieve high accuracy with reduced computational cost. To the best of our knowledge, we are among the first to investigate progressive self-distillation in the context of vision-language pretraining. + +# 3. Methods + +Unlike CLIP [63], we view the problem of learning aligned vision-language representations from web-scale weakly-annotated data as the challenge of learning many-to-many + +relationships from noisy image-text correspondences. To address this challenge, we propose a novel vision-language pretraining method that progressively distills a model's own knowledge to soften its initially hard-target alignments, thereby enabling it to learn more transferable representations from the same amount of training data (see Figure 2). In the following, we first establish cross-modal contrastive learning objective and identify some of its limitations. We then introduce our novel progressive self-distillation approach and explain how it addresses these limitations. + +# 3.1. Preliminaries + +We consider a batch of N semantically paired image-text tuples $\{(v_i, t_i)\}_{i=1:N}$ drawn from a cross-modal dataset. The goal of cross-modal contrastive pretraining is to learn encoders $f_v$ for image data and $f_t$ for text data such that for a given semantically related instance $(v_i, t_i)$ , the encoded $\ell_2$ -normalized embeddings $\mathbf{v}_i = f_v(v_i)$ and $\mathbf{t}_i = f_t(t_i)$ with $\mathbf{v}_i, \mathbf{t}_i \in \mathbb{R}^d$ are close together (i.e., "aligned") under some distance metric, while the unpaired image and text embeddings are farther apart (i.e., "unaligned"). + +# 3.2. Contrastive Learning with InfoNCE Loss + +Recall that CLIP [63] trains these image and text encoders with a contrastive loss by minimizing the InfoNCE [56] loss $\mathcal{L}_{\mathrm{InfoNCE}} = \mathcal{L}_v + \mathcal{L}_t$ , where $\mathcal{L}_v$ is the loss for aligning images to text and $\mathcal{L}_t$ is the loss for aligning text to images. Specifically, $\mathcal{L}_v$ is defined as: + +$$ +\mathcal {L} _ {v} = - \frac {1}{N} \sum_ {i = 1} ^ {N} \sum_ {j = 1} ^ {N} I _ {i j} \log P _ {v} \left(\mathbf {v} _ {i}, \mathbf {t} _ {j}; \tau\right) \tag {1} +$$ + +$$ +\mathbf {P} _ {v} \left(\mathbf {v} _ {i}, \mathbf {t} _ {j}; \tau\right) = \frac {\exp \left(\operatorname {s i m} \left(\mathbf {v} _ {i} , \mathbf {t} _ {j}\right) / \tau\right)}{\sum_ {k = 1} ^ {N} \exp \left(\operatorname {s i m} \left(\mathbf {v} _ {i} , \mathbf {t} _ {k}\right) / \tau\right)} \tag {2} +$$ + +where $\mathrm{sim}(\mathbf{v}_i,\mathbf{t}_j) = \mathbf{v}_i^T\mathbf{t}_j$ is typically chosen to be the dot product (cosine similarity), $\tau$ is a learnable softmax temperature parameter and $\mathbf{I}_{ij}$ is an element from the identity matrix $\mathbf{I}_{\mathrm{N}}$ . Since InfoNCE is symmetric, $\mathcal{L}_t$ and $\mathrm{P}_t$ are defined in a similar manner. + +For convenience, let $\mathbf{V},\mathbf{T}\in \mathbb{R}^{N\times d}$ be matrices that contain a batch of image and text embeddings whose rows are populated with $\mathbf{v}_{1:\mathrm{N}}$ and $\mathbf{t}_{1:\mathrm{N}}$ , respectively. Then, the InfoNCE loss can be re-written compactly in matrix form as: + +$$ +\mathcal {L} _ {\text {I n f o N C E}} = \mathcal {H} \left(\mathbf {I} _ {\mathrm {N}}, \rho \left(\mathbf {V T} ^ {\top}\right)\right) + \mathcal {H} \left(\mathbf {I} _ {\mathrm {N}}, \rho \left(\mathbf {T V} ^ {\top}\right)\right), \tag {3} +$$ + +where $\mathcal{H}$ is the batched (row-wise) cross-entropy function with mean reduction and $\rho$ is the standard softmax function applied row-wise such that each row sums to one. + +Equation 3 shows that InfoNCE loss is simply the cross entropy between a one-hot distribution $\mathrm{I}_{ij}$ and estimated probability $\mathrm{P}_v(\mathbf{v}_i, \mathbf{t}_j; \tau)$ . It enforces the strict assumption that an image $v_i$ selected from a batch should be paired exclusively with text $t_i$ while being repelled from all other $t_j$ . + +However, this assumption generally does not hold for two important reasons. First, it is likely that a given image would be aligned to several text captions to different degrees especially under large batch-size settings. Second, the ground truth pairings in large-scale weakly-annotated datasets may be simply incorrect or describe loose correlations between images and their corresponding texts. + +# 3.3. Distillation through Soft-Alignments + +To address the aforementioned limitations of using the InfoNCE loss to train on noisy cross-modal data, we propose to adopt a knowledge distillation framework where the predictive probabilities produced by a teacher network are used as soft target distributions to train a student network. + +Our framework offers two key advantages. First, in the process of generating target image-text alignments, a well-trained teacher can combat poorly captioned images by re-pairing them with stronger semantic matches from the batch, thereby providing a cleaner learning signal for the student network. Second, by providing soft targets, the teacher can convey many-to-many relationships in a batch. + +Specifically, to estimate the correspondence between image $v_{i}$ and text $t_{i}$ , our teacher model employs image and text encoders $\tilde{f}_{v}$ and $\tilde{f}_{t}$ to compute $\ell_{2}$ -normalized teacher embeddings $\tilde{\mathbf{v}}_{i}$ and $\tilde{\mathbf{t}}_{j}$ which are similarly batched as rows in the matrices $\tilde{\mathbf{V}}$ and $\tilde{\mathbf{T}}$ respectively. Our method uses a swapped prediction strategy to produce soft target distributions $\mathbf{A}^{v}$ and $\mathbf{A}^{t}$ to supervise student training. These target distributions are defined as: + +$$ +\mathbf {A} ^ {v} = \rho (\tilde {\mathbf {T}} \tilde {\mathbf {V}} ^ {\top}; \tilde {\tau}) \text {a n d} \mathbf {A} ^ {t} = \rho (\tilde {\mathbf {V}} \tilde {\mathbf {T}} ^ {\top}; \tilde {\tau}) \tag {4} +$$ + +where $\rho$ is the standard softmax function now using a secondary teacher temperature $\tilde{\tau}$ that transforms and re-scales raw logits into probabilities. + +Swapped prediction improves on the well established forward bootstrapping approach [65] by using predictions from opposite modality. Unlike bootstrapping, swapped prediction computes the image alignment scores $\mathbf{A}^v$ from the text encoder posterior probabilities and vice-versa, thus aggregating information over all other instances from the opposite modality. Intuitively, the strength of alignment from image $v_i$ to text $t_j$ is based on the probability that text $t_j$ should be matched with image $v_i$ compared to all other $v_j$ . This strategy has shown promise in related contrastive learning settings [50], which is consistent with our results. + +Replacing the $\mathrm{I_N}$ targets in Equation 3 with estimated soft-alignment probabilities $\mathbf{A}^v$ and $\mathbf{A}^t$ allows the teacher to re-calibrate the attractive and repulsive forces between image and text embeddings in the representation space based on its estimated similarity between instances. For instance, a faulty negative pair $(v_i,t_j)$ , which may have high semantic similarity is assigned a similarity score of zero by + +![](images/0d20c8e0e43191d020441de79a73ad54102ec3401eb6087de4143c6a1a0129b1.jpg) +Figure 2. Approach Overview - We partition a minibatch into aligned instances (rows above the dotted red line) and unaligned instances (rows below the dotted red line). Our teacher network is trained on the aligned instances using the standard InfoNCE loss. By normalizing the predictions from the opposite modality (columns to the right of the dotted yellow line), the teacher provides the estimated soft-alignments for the unaligned data to supervise the student. Over the course of training, the proportion of soft-alignments provided to the student increases as the teacher's representations become more reliable. + +the InfoNCE loss, whereas our method provides $\mathbf{A}_{ij}$ as a target which should be larger given a well trained teacher. + +# 3.4. Progressive Self-Distillation + +We now explain how to start such a teacher network and how its contribution to learning process evolves over time. + +# 3.4.1 Teacher Network Selection + +Conventional KD and SSL methods offer numerous potential teacher choices, e.g., larger but static pretrained teacher networks [27], or networks that share the same model architecture but use weights from a previous epoch [42], or as an exponential moving average [24]. The primary drawback to these approaches is reduced computational and memory efficiency as they require a secondary inference stage using additional model weights that must be kept in memory. + +To circumvent these issues, we adopt a self-distillation strategy where the student network acts as its own teacher (i.e., $f_v = \tilde{f}_v, f_t = \tilde{f}_t$ ). The idea here is to update the targets of the student contrastive objective using the current state of the model. Intuitively, as the learning improves over time, its representation can be trusted to make more accurate predictions. This mitigates the negative effects of noisy pairings as incorrect pairs are increasingly likely to be inconsistent with the consensus learned from the rest of the data as training progresses. By refining inconsistent alignments, the model can develop more coherent representations, which further improves its ability to evaluate the consistency of noisy image-text pairs. + +# 3.4.2 Progressing from Student to Teacher + +As our objective relies on some basic level of alignment between corresponding image and text representations, we introduce a novel procedure that progressively increases the + +contribution of self-distillation to the contrastive learning process over the course of training. Our model therefore dynamically evolves into its own teacher as training progresses, which differs from the standard knowledge distillation setting where the teacher is often static and separate. + +We achieve this dynamic progression by randomly partitioning a batch of N image-text pairs into $\mathrm{N}^a = \lfloor \alpha \mathrm{N}\rfloor$ "aligned" instances and $\mathrm{N}^u = \mathrm{N} - \lfloor \alpha \mathrm{N}\rfloor$ "unaligned" instances where $\alpha \in [0,1]$ determines their relative proportions. The aligned subset is used to train the teacher network using the hard ground truth pairings and the standard InfoNCE loss. The teacher network then employs our aforementioned swapped prediction strategy to estimate soft-alignments on the unaligned instances to supervise the student. We refer to this random minibatch partitioning as dynamic as opposed to static as the global partitioning of instances into aligned and unaligned subsets is refreshed for each training epoch. + +To increase the strength of the teacher's influence on learning, we decrease the value of $\alpha$ gradually, in the same way that the learning rate can be scheduled. While there are several strategies to decrease $\alpha$ as a function of the training iteration, e.g., step-wise, linear, etc., we use a cosine-annealing schedule [38] specified by a start and end value. + +To summarize our overall learning procedure, we first compute the batched student-teacher embedding with $\mathbf{V} = \tilde{\mathbf{V}}$ and $\mathbf{T} = \tilde{\mathbf{T}}$ . Next, we extract the first $\mathrm{N}^a$ rows to form aligned subset of teacher embeddings $\tilde{\mathbf{V}}^a$ , $\tilde{\mathbf{T}}^a$ , and the last $\mathrm{N}^u$ rows for the unaligned student embeddings $\mathbf{V}^u$ , $\mathbf{T}^u$ . Altogether, our final objective function is defined as: + +$$ +\begin{array}{l} \mathcal {L} _ {\text {I n f o N C E}} ^ {\text {P S D}} = \alpha \left[ \mathcal {H} \left(\mathbf {I} _ {\mathrm {N} _ {a}}, \rho (\tilde {\mathbf {V}} ^ {a} \tilde {\mathbf {T}} ^ {\top})\right) + \mathcal {H} \left(\mathbf {I} _ {\mathrm {N} _ {a}}, \rho (\tilde {\mathbf {T}} ^ {a} \tilde {\mathbf {V}} ^ {\top})\right) \right] + \\ (1 - \alpha) [ \mathcal {H} (\mathbf {A} ^ {v}, \rho (\mathbf {V} ^ {u} \mathbf {T} ^ {\top})) + \mathcal {H} (\mathbf {A} ^ {t}, \rho (\mathbf {T} ^ {u} \mathbf {V} ^ {\top})) ] \\ \end{array} +$$ + +where $\mathbf{I}_{\mathrm{N}_a} \in \mathbb{R}^{\mathrm{N}_a \times \mathrm{N}}$ is the zero-padded identity matrix, while $\mathbf{A}^v, \mathbf{A}^t$ are indexed to match the unaligned student embeddings. + +# 4. Experiments + +We start by describing our experimental setup which aims to match CLIP [63] as closely as possible for fair comparison. We then demonstrate the advantages of our method over CLIP [63] for: (a) zero-shot classification, (b) finetuning (i.e., linear probe), and (c) image-text retrieval. + +# 4.1. Pretraining Datasets + +We apply our pretraining method to three image-text datasets varying in scale, scope and noise: + +a. MS COCO Captions [41] - A widely used standard image captioning benchmark dataset with approximately 118K images, each labeled with 5 human evaluated captions, and a testing set of 5K images. +b. Conceptual Captions 3M (CC3M) [67] - A collection of over 3M images and their raw descriptions harvested from the alt-text HTML attribute associated with the web-scraped images, therefore representing a wider variety of content styles. After downloading and preprocessing, we utilized about 2.9M image-text pairs in our experiments. +c. Conceptual Captions 12M (CC12M) [9] - By relaxing multiple image and text filters used in CC3M [67], CC12M is a less precise but $4 \times$ larger set of image-text pairs that covers a wider range of visual concepts. Due to unavailable URLs, we utilize about 10M examples from this dataset. + +# 4.2. Pretraining Details + +In the following experiments, the image encoders follow ViT-B/32 vision transformer architecture proposed in CLIP [63], while the text encoder's transformer-based architecture follows modification proposed in [63]. Image and text features are projected to a shared 512-D space and L2 normalized before participating in contrastive loss. + +Models are trained from scratch for 100 epochs using the Adam optimizer [33] with weight decay and a cosine annealing learning rate schedule with warmup [44]. As done in [63], the learnable temperature parameter $\tau$ is initialized to 0.07 and clamped to values less than 100. Automatic mixed-precision [45] training is used to save on memory and achieve minibatch sizes of 4096. Input images are randomly cropped and resized to $224 \times 224$ resolution during pretraining and the maximum length of the text is limited to 77 tokens via random sub-sequence sampling similar to [63]. Training is conducted on as many as 8 Nvidia A-100 GPUs with the longest experiments spanning up to several days. The partitioning factor $\alpha$ is decayed from 0.8 to 0.2 over the course of training using cosine annealing. De + +tails regarding hyperparameter values for different datasets and models are provided in the supplementary material. + +We compare our approach to a re-implementation of CLIP based on the methods and pseudo-code described in the original paper as well as open source implementations such as OpenCLIP [28]. The performance of our re-implementation is consistent with that achieved by OpenCLIP and unreleased CLIP models trained on reduced subsets of the 400M dataset; thus, we retrain a baseline CLIP model for each pretraining dataset to serve as a proxy. + +# 4.3. Evaluation Details + +a. Evaluation Protocol - We measure zero-shot and linear probe classification performance using Top-1 accuracy. For the linear probe experiments, we train the linear classifier with the L-BFGS optimizer on extracted visual features as described in [63]. We use standard retrieval metrics: recall at rank K (R@K, higher is better) and mean rank (MnR, lower is better), to evaluate the retrieval performance of our model. R@K (Recall at K) calculates the percentage of test samples for which the correct result is found in the top-K retrieved points to the query sample. +b. Benchmark Datasets - We evaluate the zero-shot and linear probe classification performance of proposed approach on a suite of benchmark evaluation datasets, including ImageNet [12], Places365 [85], ObjectNet [3], and several recent variants of ImageNet aimed at evaluating the robustness of trained models to natural (as opposed to synthetic) distribution shifts [25, 26, 64]. +c. Prompt Ensembling with Templates - Consistent with previous work, we find that our approach benefits from prompt ensembling to augment the original class label for downstream tasks. For fair comparison, we use the same set of prompt templates published in CLIP [63], which generally take on the form of "a photo of a {label}." + +# 4.4. Zero-Shot Image Classification + +Following the pretraining stage, we evaluate our method on zero-shot image classification achieved through natural language input, and compare to its CLIP counterpart trained under identical settings. + +Table 1 lists the top-1 accuracy $(\%)$ of zero-shot image classification across a suite of benchmark datasets. Given a fixed amount of pretraining data, our method considerably outperforms its CLIP counterparts in terms of average top-1 accuracy over all datasets, achieving as much as a $6.19\%$ absolute improvement in the CC3M pretraining regime. Notably, our method surpasses CLIP on ImageNet and all of the ImageNet variants. Our method also achieves substantial performance gains on ImageNet-Renditions (ImageNet-R) [25], a dataset specifically aimed at evaluating out-of-distribution robustness, with an average + +
Pretraining DatasetMethodCifar10 [34]Cifar100 [34]Caltech101 [18]Places365 [85]ObjectNet [3]ImageNet-R [25]ImageNet-O [26]ImageNet-A [26]ImageNet-V2 [64]ImageNet [12]Average
COCOCLIP64.1419.5732.8812.784.988.278.03.327.418.1816.87
Ours66.7424.4934.2614.156.1811.259.855.328.999.4919.07+2.22
CC3MCLIP73.9030.6054.0724.544.4928.3318.57.82721.4323.5628.73
Ours80.1538.2764.4528.079.2137.3126.210.8126.7027.9634.91+6.19
CC12MCLIP75.2941.9475.8631.2912.5051.3431.9013.2534.8937.8740.61
Ours84.8451.3480.0034.0815.2459.2933.018.8539.1642.2445.85+5.23
+ +Table 1. Zero-Shot Image Classification Comparison - Zero-shot top-1 accuracy (%) of our method compared to baseline CLIP on numerous ImageNet-based benchmark datasets using different pretraining datasets varying in scale. + +![](images/7568af630a0c0d3e9583cf57cc6db03a8400d0737568fefe1ed57254cfea9343.jpg) +Figure 3. Pretraining Data Size and Relative Performance - Average zero-shot classification performance of our method compared to CLIP as number of pretraining examples from the CC12M dataset grows from 600K to 12M. Our method consistently learns representations more amenable to zero-shot classification than CLIP given same amount of pretraining data. + +performance gain of nearly $8.5\%$ when considering Conceptual Captions datasets [9, 67]. Figure 1 shows how our method is able to provide more accurate predictions for a goldfish rendered in a stained glass pane. + +To better understand the relationship between the amount of pretraining data and relative differences in downstream performance between our method and CLIP, we perform a sweep of experiments that restrict pretraining to 5, 10, 25, 50, and $100\%$ of the CC12M dataset. Figure 3 plots the average zero-shot classification score for both methods, and shows that our method maintains higher performance throughout this range. Interestingly, our method appears to provide the largest performance increases at the boundaries of the plot, suggesting that our method can improve data-efficiency in data-limited regimes, in addition to providing larger performance gains as the dataset size increases. + +![](images/f9740d0b900a8f3f3d95e44587d9d4faa1a0a6f2dd70c55292b8575f26980ebb.jpg) +Figure 4. Effective Robustness Evaluation - Our method produces features more robust to natural distribution shift compared to CLIP features. When comparing models with similar ImageNet performance, our method produces representations that offer better performance on naturally shifted distributions. Mean Transfer Accuracy is computed over the ImageNet-R/O/A/V2 test sets. Best-fit trend lines suggests that the effective robustness of our method (blue) outpaces CLIP (red) as ImageNet accuracy increases. + +# 4.5. Evaluation of Effective Robustness + +CLIP models [63, 70] have been found to be more robust to natural distribution shifts when compared to standard models trained on ImageNet. This phenomena is illustrated in Figure 4 with ImageNet accuracy on the x-axis and mean accuracy on ImageNet-A, ImageNet-O, ImageNet-R, and ImageNetV2, on the y-axis. Previous work [46, 70] has found that the in-distribution and out-of-distribution accuracies of ImageNet models follow a predictable linear trend (plotted in green), and CLIP models established a trend (plotted in red) of improved effective robustness. Note that the slope of linear-fit to our model is higher than that for the CLIP model, suggesting that our effective robustness improves over CLIP with increasing scale. + +
Pretraining DatasetMethodFood[1] [5]OxfordPeds [57]Bindsnap [4]ImageNet [12]
COCOCLIP53.0476.8637.1752.66
Ours53.6080.5942.8556.21
CC3MCLIP53.3378.1137.7556.28
Ours60.6980.4043.1761.00
CC12MCLIP67.4185.1741.0659.42
Ours71.8786.3247.1665.33
+ +# 4.6. Linear Probe Performance + +We report our linear probe performance on 4 downstream datasets in Table 2. Our method outperforms its CLIP counterpart in every case, suggesting that our learned visual features alone (i.e., considering within-modal alignment only) are more transferable than CLIP. + +# 4.7. Image-Text Retrieval + +Given the cross-modal nature of models under investigation, image-text retrieval consists of two sub-tasks: image-to-text and text-to-image. We evaluate our method on COCO test set with 5K images, each with 5 unique captions. + +Table 3 shows our zero-shot retrieval performance relative to baseline CLIP under COCO, CC3M and CC12M pretraining datasets. Relative to CLIP, our method consistently outperforms in both text-to-image and image-to-text subtasks, with both methods generally achieving slightly higher performance in text-to-image sub-task. Note that, due to data domain differences, pretraining directly on COCO produces models with higher downstream performance than pretraining on CC12M despite the $100 \times$ increase in data size. The last four rows show that, as expected, finetuning Conceptual Captions pretrained models on COCO produces retrieval performance that exceeds corresponding baselines and the performance from training on COCO alone. + +# 4.8. Ablation Study + +We now investigate the contributions of individual components of our method, specifically the swapped prediction strategy for estimating soft-alignments over the forward bootstrapping strategy, dynamic minibatch partitioning, and progressive self-distillation to downstream performance. Following pretraining on COCO, we measure models' performance on COCO zero-shot image-text retrieval and ImageNet zero-shot classification. + +Table 2. Linear Probe Performance – Linear probe top-1 accuracy (%) of our method compared to baseline CLIP on four benchmark datasets is given. Our method learns visual features that consistently achieve improved finetuning performance, suggesting that our loss helps to improve within-modal feature alignment. + +
MethodPerformance
Prediction ModeDynamic PartitioningProgressive DistillationIN Top-1MS R1
Baseline--8.1827.58
ForwardXX6.2320.40
SwappedXX8.4623.51
Forward✓X8.3725.64
Swapped✓X8.8126.24
Forward✓✓8.8726.18
Swapped✓✓9.5128.48
+ +Table 4. Abalation Study - Our results using COCO for pretraining. IN Top-1 is zero-shot ImageNet accuracy and MS R1 is mean recall at rank 1 across image-to-text and text-to-image subtasks. + +Table 4 shows that directly using the model's posterior (bootstrapping) to assign alignments to a static subset of inputs leads to a degradation of learned representations and decreased performance compared to the baseline. Here the teacher network is likely reinforcing its own mistakes without penalty from the loss, leading to partial representation collapse for the unaligned examples. Utilizing the swapped prediction strategy restores zero-shot performance to slightly above baseline suggesting effective method for addressing this issue; however, retrieval performance is still lower than the baseline. By incorporating a dynamic partitioning strategy, our method exceeds baseline performance. + +# 4.9. Qualitative Analysis + +a. Distribution of Similarity Scores: Our method is largely motivated by the observation that previous VLP approaches neglect potential semantic similarity between negative samples and that accounting for this phenomenon can improve learned representations. In Figure 5, we plot the distribution of similarity scores for both positive and negative samples drawn from the COCO testing set. The left subplot reveals that our method consistently yields larger similarity scores for positive pairs compared to its CLIP counterpart and the OpenAI pretrained CLIP. Interestingly, the histogram of negative similarity scores shows that our method also assigns higher similarity scores to negative pairs. While it may seem counter intuitive to assign greater similarity scores to negative samples, we argue that doing so is the very reason our method captures greater similarity between positive pairs. By allowing some degree of alignment between the right set of negative examples, our method is able to minimize the inconsistencies between shared context of related positives and negatives. This in turn allows us to learn an overall more coherent representation space, resulting in increased robustness and downstream performance. + +b. Visualizing Text-Image Retrievals: In Figure 6, we show the comparative list of top ten retrieved images for 5 example text queries. Overall, these retrievals suggest that + +
Pretraining DatasetMethodText-to-ImageImage-to-Text
R@1↑R@5↑R@10↑MnR↓R@1↑R@5↑R@10↑MnR↓
COCOCLIP27.7657.3470.7023.1027.4056.3168.6520.11
Ours28.4257.1468.8626.1128.5356.7568.1022.01
CC3MCLIP12.5029.7640.9291.049.8824.8635.30106.94
Ours16.9837.1248.2863.8013.1931.5443.0072.92
CC12MCLIP19.6440.6651.7255.2317.6339.6750.7755.29
Ours22.9446.6057.8246.2422.7945.9556.8143.41
CC3MCLIP*31.3059.5471.8021.1529.1858.6670.2317.02
Ours*33.2666.7076.9218.7732.2060.1471.9617.05
CC12MCLIP*35.2262.7473.4617.7033.3661.1573.3615.76
Ours*38.6666.7477.1013.3538.1565.8577.0212.54
+ +Table 3. Image-Text Retrieval - Zero-shot retrieval performance on the COCO 5K testing set as measured by recall at 1,5,10 (higher is better) and mean rank (lower is better). The last four rows (marked with *) report the zero-shot retrieval results of the same models further finetuned on the COCO captions training set. + +![](images/bd59496439884e9328e2aaae16e014305f8996ac53c0087b897acfd9dccddeab.jpg) +Figure 5. Similarity Scores - Similarity scores distribution for positive and negative pairs in joint cross-modal space after training with original CLIP loss and our proposed loss is provided. Compared to our baseline (COCO) pretrained CLIP and OpenAI's pretrained CLIP model, our method yields similarity scores with higher mean and lower variance for positive pairs. While COCO pretrained CLIP model concentrates negatives' similarity scores around zero, our method concentrates them at higher levels as it allows for some degree of semantic similarity between negatives. + +our learned features more comprehensively capture all potential similarities between a text snippet and image. In contrast, baseline CLIP features tend to more narrowly focus on one specific commonality while neglecting others. For example, in the last row of Figure 6, CLIP strongly targets "living room" but misses the cat. Our approach on the other hand is successfully able to extract all the key aspects of the query including the cat, the chair and the living room. Similar trends are found in other examples. + +# 5. Conclusions + +We proposed a novel cross-modal contrastive learning framework with progressive self-distillation and soft image-text alignments. Our approach distills its own knowledge to dynamically generate soft-alignment targets for a subset of samples in every minibatch, which enables it to efficiently learn robust representations from noisy data. Exten + +![](images/05269cac1ad05e3cd184253cdb0d5bd9825db3b1e768e363b70e3eb7a04e541d.jpg) +Figure 6. Example Text-Image Retrievals - Given a text query, we display the top ten most semantically related images (ranked left to right) retrieved by CLIP and our method. Compared to CLIP, our method continues to retrieve images that more holistically match the text description, even after the ground truth image has appeared in the ranking. + +sive evaluations across 14 benchmark datasets showed that our method consistently outperforms its CLIP counterpart in multiple settings. Moreover, our method provides better effective robustness to natural distribution shifts compared to existing state-of-the-art methods. Going forward, we plan to further improve the efficiency of our approach by investigating data redundancy, network architectures and optimization algorithms during pretraining, so that we can generalize to even larger scale with fewer resources. + +# References + +[1] Gorkem Algan and Ilkay Ulusoy. Metalabelnet: Learning to generate soft-labels from noisy-labels. arXiv preprint arXiv:2103.10869, 2021. 1, 2 +[2] Sanjeev Arora, Hrishikesh Khandeparkar, Mikhail Khodak, Orestis Plevrakis, and Nikunj Saunshi. A theoretical analysis of contrastive unsupervised representation learning. arXiv preprint arXiv:1902.09229, 2019. 2 +[3] Andrei Barbu, David Mayo, Julian Alverio, William Luo, Christopher Wang, Dan Gutfreund, Josh Tenenbaum, and Boris Katz. Objectnet: A large-scale bias-controlled dataset for pushing the limits of object recognition models. 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. 5, 6 +[4] Thomas Berg, Jiongxin Liu, Seung Woo Lee, Michelle L. Alexander, David W. Jacobs, and Peter N. Belhumeur. Birdsnap: Large-scale fine-grained visual categorization of birds. In Proc. Conf. Computer Vision and Pattern Recognition (CVPR), June 2014. 7 +[5] Lukas Bossard, Matthieu Guillaumin, and Luc Van Gool. Food-101 – mining discriminative components with random forests. In European Conference on Computer Vision, 2014. 7 +[6] 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, 2006. 2 +[7] Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In Proceedings of the European Conference on Computer Vision (ECCV), pages 132-149, 2018. 2 +[8] Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. arXiv preprint arXiv:2006.09882, 2020. 2 +[9] Soravit Changpinyo, Piyush Sharma, Nan Ding, and Radu Soricut. Conceptual 12m: Pushing web-scale image-text pretraining to recognize long-tail visual concepts. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3558-3568, 2021. 1, 2, 5, 6 +[10] Guobin Chen, Wongun Choi, Xiang Yu, Tony Han, and Manmohan Chandraker. Learning efficient object detection models with knowledge distillation. Advances in neural information processing systems, 30, 2017. 2 +[11] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In International Conference on Machine Learning (ICML), 2020. 2 +[12] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2009. 5, 6, 7 +[13] Aditya Deshpande, Jason Rock, and David Forsyth. Learning large-scale automatic image colorization. In Proceedings + +of the IEEE International Conference on Computer Vision, pages 567-575, 2015. 2 +[14] Qianggang Ding, Sifan Wu, Hao Sun, Jiadong Guo, and ShuTao Xia. Adaptive regularization of labels. arXiv preprint arXiv:1908.05474, 2019. 2 +[15] Carl Doersch, Abhinav Gupta, and Alexei A Efros. Unsupervised visual representation learning by context prediction. In Proceedings of the IEEE international conference on computer vision, pages 1422-1430, 2015. 2 +[16] Alexey Dosovitskiy, Philipp Fischer, Jost Tobias Springenberg, Martin Riedmiller, and Thomas Brox. Discriminative unsupervised feature learning with exemplar convolutional neural networks. IEEE transactions on pattern analysis and machine intelligence, 38(9):1734-1747, 2015. 2 +[17] Alexey Dosovitskiy, Jost Tobias Springenberg, Martin Riedmiller, and Thomas Brox. Discriminative unsupervised feature learning with convolutional neural networks. Advances in neural information processing systems, 27:766-774, 2014. 2 +[18] Li Fei-Fei, Rob Fergus, and Pietro Perona. One-shot learning of object categories. IEEE transactions on pattern analysis and machine intelligence, 28(4):594-611, 2006. 6 +[19] Andreas Fürst, Elisabeth Rumetshofer, Viet Tran, Hubert Ramsauer, Fei Tang, Johannes Lehner, David Kreil, Michael Kopp, Günter Klambauer, Angela Bitto-Nemling, et al. Cloob: Modern hopfield networks with infoloob outperform clip. arXiv preprint arXiv:2110.11316, 2021. 1, 2 +[20] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. arXiv preprint arXiv:1803.07728, 2018. 2 +[21] Sangchul Hahn and Heeyoul Choi. Self-knowledge distillation in natural language processing. arXiv preprint arXiv:1908.01851, 2019. 2 +[22] Bo Han, Quanming Yao, Xingrui Yu, Gang Niu, Miao Xu, Weihua Hu, Ivor Tsang, and Masashi Sugiyama. Coteaching: Robust training of deep neural networks with extremely noisy labels. arXiv preprint arXiv:1804.06872, 2018.2 +[23] Tengda Han, Weidi Xie, and Andrew Zisserman. Video representation learning by dense predictive coding. In Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops, pages 0–0, 2019. 2 +[24] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 4 +[25] Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath, Frank Wang, Evan Dorundo, Rahul Desai, Tyler Zhu, Samyak Parajuli, Mike Guo, Dawn Song, Jacob Steinhardt, and Justin Gilmer. The many faces of robustness: A critical analysis of out-of-distribution generalization. ICCV, 2021. 1, 5, 6 +[26] Dan Hendrycks, Kevin Zhao, Steven Basart, Jacob Steinhardt, and Dawn Song. Natural adversarial examples.(2019). arXiv preprint cs.LG/1907.07174, 2019. 5, 6 +[27] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. 2, 4 + +[28] Gabriel Ilharco, Mitchell Wortsman, Nicholas Carlini, Rohan Taori, Achal Dave, Vaishaal Shankar, Hongseok Namkoong, John Miller, Hannaneh Hajishirzi, Ali Farhadi, and Ludwig Schmidt. Openclip, July 2021. If you use this software, please cite it as below. 5 +[29] J Yu Jason, Adam W Harley, and Konstantinos G Derpanis. Back to basics: Unsupervised learning of optical flow via brightness constancy and motion smoothness. In European Conference on Computer Vision, pages 3-10. Springer, 2016. 2 +[30] 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. 1 +[31] Longlong Jing and Yingli Tian. Self-supervised visual feature learning with deep neural networks: A survey. IEEE transactions on pattern analysis and machine intelligence, 2020. 2 +[32] Dahun Kim, Donghyeon Cho, and In So Kweon. Self-supervised video representation learning with space-time cubic puzzles. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8545-8552, 2019. 2 +[33] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.5 +[34] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009. 6 +[35] Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Learning representations for automatic colorization. In European conference on computer vision, pages 577-593. Springer, 2016. 2 +[36] Hsin-Ying Lee, Jia-Bin Huang, Maneesh Singh, and Ming-Hsuan Yang. Unsupervised representation learning by sorting sequences. In Proceedings of the IEEE International Conference on Computer Vision, pages 667-676, 2017. 2 +[37] Junnan Li, Yongkang Wong, Qi Zhao, and Mohan S Kankanhalli. Learning to learn from noisy labeled data. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5051-5059, 2019. 2 +[38] Tianhong Li, Jianguo Li, Zhuang Liu, and Changshui Zhang. Few sample knowledge distillation for efficient network compression. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14639-14647, 2020. 2, 4 +[39] 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. 1, 2 +[40] Yuncheng Li, Jianchao Yang, Yale Song, Liangliang Cao, Jiebo Luo, and Li-Jia Li. Learning from noisy labels with distillation. In Proceedings of the IEEE International Conference on Computer Vision, pages 1910-1918, 2017. 2 +[41] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dálár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In + +European conference on computer vision, pages 740-755. Springer, 2014. 5 +[42] Yuanze Lin, Xun Guo, and Yan Lu. Self-supervised video representation learning with meta-contrastive network. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8239–8249, 2021. 4 +[43] Haoliang Liu, Tan Yu, and Ping Li. Inflate and shrink: Enriching and reducing interactions for fast text-image retrieval. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 9796-9809, 2021. 2 +[44] Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983, 2016. 5 +[45] Paulius Micikevicius, Sharan Narang, Jonah Alben, Gregory Diamos, Erich Elsen, David Garcia, Boris Ginsburg, Michael Houston, Oleksii Kuchaiev, Ganesh Venkatesh, et al. Mixed precision training. arXiv preprint arXiv:1710.03740, 2017. 5 +[46] John P Miller, Rohan Taori, Aditi Raghunathan, Shiori Sagawa, Pang Wei Koh, Vaishaal Shankar, Percy Liang, Yair Carmon, and Ludwig Schmidt. Accuracy on the line: On the strong correlation between out-of-distribution and indistribution generalization. In International Conference on Machine Learning, pages 7721-7735. PMLR, 2021. 6 +[47] Ishan Misra and Laurens van der Maaten. Self-supervised learning of pretext-invariant representations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6707-6717, 2020. 2 +[48] Ishan Misra, C Lawrence Zitnick, and Martial Hebert. Shuffle and learn: unsupervised learning using temporal order verification. In European Conference on Computer Vision, pages 527-544. Springer, 2016. 2 +[49] Hossein Mobahi, Ronan Collobert, and Jason Weston. Deep learning from temporal coherence in video. In Proceedings of the 26th Annual International Conference on Machine Learning, pages 737-744, 2009. 2 +[50] Pedro Morgado, Ishan Misra, and Nuno Vasconcelos. Robust audio-visual instance discrimination. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12934–12945, 2021. 2, 3 +[51] Pedro Morgado, Nuno Vasconcelos, and Ishan Misra. Audiovisual instance discrimination with cross-modal agreement. CoRR, abs/2004.12943, 2020. 2 +[52] Pedro Morgado, Nuno Vasconcelos, and Ishan Misra. Audiovisual instance discrimination with cross-modal agreement. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12475-12486, 2021. 1 +[53] Rafael Müller, Simon Kornblith, and Geoffrey Hinton. When does label smoothing help? arXiv preprint arXiv:1906.02629, 2019. 2 +[54] Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In European conference on computer vision, pages 69-84. Springer, 2016. 2 + +[55] Curtis Northcutt, Lu Jiang, and Isaac Chuang. Confident learning: Estimating uncertainty in dataset labels. Journal of Artificial Intelligence Research, 70:1373-1411, 2021. 2 +[56] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018. 3 +[57] Omkar M Parkhi, Andrea Vedaldi, Andrew Zisserman, and CV Jawahar. Cats and dogs. In 2012 IEEE conference on computer vision and pattern recognition, pages 3498-3505. IEEE, 2012. 7 +[58] Deepak Pathak, Ross Girshick, Piotr Dólar, Trevor Darrell, and Bharath Hariharan. Learning features by watching objects move. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2701-2710, 2017. 2 +[59] Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A Efros. Context encoders: Feature learning by inpainting. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2536-2544, 2016. 2 +[60] Giorgio Patrini, Alessandro Rozza, Aditya Krishna Menon, Richard Nock, and Lizhen Qu. Making deep neural networks robust to label noise: A loss correction approach. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1944–1952, 2017. 2 +[61] Gabriel Pereyra, George Tucker, Jan Chorowski, Lukasz Kaiser, and Geoffrey Hinton. Regularizing neural networks by penalizing confident output distributions. arXiv preprint arXiv:1701.06548, 2017. 2 +[62] AJ Piergiovanni, Anelia Angelova, and Michael S Ryoo. Evolving losses for unsupervised video representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 133-142, 2020. 2 +[63] 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. 1, 2, 3, 5, 6 +[64] Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenet classifiers generalize to imagenet? In International Conference on Machine Learning, pages 5389-5400. PMLR, 2019. 5, 6 +[65] Scott Reed, Honglak Lee, Dragomir Anguelov, Christian Szegedy, Dumitru Erhan, and Andrew Rabinovich. Training deep neural networks on noisy labels with bootstrapping. arXiv preprint arXiv:1412.6596, 2014. 2, 3 +[66] Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. Fitnets: Hints for thin deep nets. arXiv preprint arXiv:1412.6550, 2014. 2 +[67] Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2556-2565, 2018. 1, 2, 5, 6 + +[68] 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 +[69] Jun Shu, Qi Xie, Lixuan Yi, Qian Zhao, Sanping Zhou, Zongben Xu, and Deyu Meng. Meta-weight-net: Learning an explicit mapping for sample weighting. arXiv preprint arXiv:1902.07379, 2019. 2 +[70] Rohan Taori, Achal Dave, Vaishaal Shankar, Nicholas Carlini, Benjamin Recht, and Ludwig Schmidt. Measuring robustness to natural distribution shifts in image classification. In Advances in Neural Information Processing Systems (NeurIPS), 2020. 1, 2, 6 +[71] 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, 59(2):64-73, 2016. 1, 2 +[72] Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. In European Conference on Computer Vision (ECCV), 2020. 2 +[73] Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XI 16, pages 776-794. Springer, 2020. 2 +[74] Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th international conference on Machine learning, pages 1096-1103, 2008. 2 +[75] Jue Wang, Haofan Wang, Jincan Deng, Weijia Wu, and Debing Zhang. Efficientclip: Efficient cross-modal pretraining by ensemble confident learning and language modeling. arXiv preprint arXiv:2109.04699, 2021. 1, 2 +[76] Yisen Wang, Xingjun Ma, Zaiyi Chen, Yuan Luo, Jinfeng Yi, and James Bailey. Symmetric cross entropy for robust learning with noisy labels. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 322-330, 2019. 2 +[77] Zhirong Wu, Yuanjun Xiong, X Yu Stella, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[78] Ting-Bing Xu and Cheng-Lin Liu. Data-distortion guided self-distillation for deep neural networks. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 5565-5572, 2019. 2 +[79] Zhichao Yin and Jianping Shi. Geonet: Unsupervised learning of dense depth, optical flow and camera pose. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1983-1992, 2018. 2 +[80] Sukmin Yun, Jongjin Park, Kimin Lee, and Jinwoo Shin. Regularizing class-wise predictions via self-knowledge distillation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 13876-13885, 2020. 2 + +[81] Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In European conference on computer vision, pages 649-666. Springer, 2016. 2 +[82] Richard Zhang, Phillip Isola, and Alexei A Efros. Split-brain autoencoders: Unsupervised learning by cross-channel prediction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1058-1067, 2017. 2 +[83] Zhilu Zhang and Mert R Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. In 32nd Conference on Neural Information Processing Systems (NeurIPS), 2018. 2 +[84] Zizhao Zhang, Han Zhang, Sercan O Arik, Honglak Lee, and Tomas Pfister. Distilling effective supervision from severe label noise. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9294-9303, 2020. 2 +[85] Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017. 5, 6 +[86] Chengxu Zhuang, Tianwei She, Alex Andonian, Max Sobol Mark, and Daniel Yamins. Unsupervised learning from video with deep neural embeddings. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9563-9572, 2020. 2 +[87] Chengxu Zhuang, Alex Lin Zhai, and Daniel Yamins. Local aggregation for unsupervised learning of visual embeddings. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6002-6012, 2019. 2 +[88] Mohammadreza Zolfaghari, Yi Zhu, Peter Gehler, and Thomas Brox. Crossclr: Cross-modal contrastive learning for multi-modal video representations. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1450-1459, 2021. 2 \ No newline at end of file diff --git a/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/images.zip b/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..805f233d0f4928c8c2650f6e88d060094212f342 --- /dev/null +++ b/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a891257d2ea77817804d38409006128bbd7813773410c68f7f9b97171100540 +size 542905 diff --git a/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/layout.json b/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..662db4554811752d8663dd836676f27721652f94 --- /dev/null +++ b/robustcrossmodalrepresentationlearningwithprogressiveselfdistillation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f05c8b13e17bea8e0e4c98f076665f0f1914efdece0af6865e1ca7b8ab198e74 +size 432055 diff --git a/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/69410a98-b3f1-43b7-950d-ce2c4782b1de_content_list.json b/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/69410a98-b3f1-43b7-950d-ce2c4782b1de_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..15cf788695b9dd025bf6a71ac0bc6f4d776d4b4c --- /dev/null +++ b/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/69410a98-b3f1-43b7-950d-ce2c4782b1de_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40b24f5f418736ea6cbaeace32cb3345715f0255ce8ffbc99eecebb669e0f38a +size 89261 diff --git a/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/69410a98-b3f1-43b7-950d-ce2c4782b1de_model.json b/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/69410a98-b3f1-43b7-950d-ce2c4782b1de_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9811e9924a946e63403f8745da661e4b221122cd --- /dev/null +++ b/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/69410a98-b3f1-43b7-950d-ce2c4782b1de_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6eba4dd4500f1283948179d523f3c44354bdb3449deaa6b0541efbaaeda47ed2 +size 105263 diff --git a/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/69410a98-b3f1-43b7-950d-ce2c4782b1de_origin.pdf b/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/69410a98-b3f1-43b7-950d-ce2c4782b1de_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b7fb448b52bd69ed8d209c3e960d16d759d80293 --- /dev/null +++ b/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/69410a98-b3f1-43b7-950d-ce2c4782b1de_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2023ff13f2b2ee3b35a65935e6422d0b3b0b6467887cc48a72f406e6d337e72c +size 2735689 diff --git a/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/full.md b/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/full.md new file mode 100644 index 0000000000000000000000000000000000000000..fcb11a517e548a82685990b295a689b163272788 --- /dev/null +++ b/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/full.md @@ -0,0 +1,417 @@ +# Robust Egocentric Photo-realistic Facial Expression Transfer for Virtual Reality + +Amin Jourabloo* Fernando De la Torre† Jason Saragih Shih-En Wei Stephen Lombardi +Te-Li Wang Danielle Belko Autumn Trimble Hernan Badino +Facebook Reality Labs, Pittsburgh, PA +†Robotics Institute, Carnegie Mellon University + +# Abstract + +Social presence, the feeling of being there with a "real" person, will fuel the next generation of communication systems driven by digital humans in virtual reality (VR). The best 3D video-realistic VR avatars that minimize the uncanny effect rely on person-specific (PS) models. However, these PS models are time-consuming to build and are typically trained with limited data variability, which results in poor generalization and robustness. Major sources of variability that affects the accuracy of facial expression transfer algorithms include using different VR headsets (e.g., camera configuration, slop of the headset), facial appearance changes over time (e.g., beard, make-up), and environmental factors (e.g., lighting, backgrounds). This is a major drawback for the scalability of these models in VR. + +This paper makes progress in overcoming these limitations by proposing an end-to-end multi-identity architecture (MIA) trained with specialized augmentation strategies. MIA drives the shape component of the avatar from three cameras in the VR headset (two eyes, one mouth), in untrained subjects, using minimal personalized information (i.e., neutral 3D mesh shape). Similarly, if the PS texture decoder is available, MIA is able to drive the full avatar (shape+texture) robustly outperforming PS models in challenging scenarios. Our key contribution to improve robustness and generalization, is that our method implicitly decouples, in an unsupervised manner, the facial expression from nuisance factors (e.g., headset, environment, facial appearance). We demonstrate the superior performance and robustness of the proposed method versus state-of-the-art PS approaches in a variety of experiments. + +# 1. Introduction + +Our experience with communication systems is two-dimensional, mostly via video teleconferencing (e.g., Messenger), that includes both audio and video transmissions. Recent studies on videoconferencing have shown that the + +![](images/7569d9c3dbe90391fad7d50e0aa208ec47d1d60fc3cd05636847114e53fa2545.jpg) +Figure 1. 3D Photo-realistic avatar driven by three headset-mounted camera (HMC) images in a VR headset. This paper presents a system to drive photo-realistic avatars robustly with variability in headsets, lighting, environmental background, head pose, and facial appearance. + +more closely technology can simulate a face-to-face interaction, the more participants are able to focus, engage, and retain information [43]. A more advanced level of communication with virtual reality (VR) via telepresence [5,8,12, 19,30,34,44,45] will allow virtual presence at a distant location and a more authentic interaction. If successful, this new form of face-to-face interaction can reduce the time and financial commitments of travel, make sales meetings or family meetings more immersive, with a huge impact for the environment and use of personal time. + +Today most real-time systems for avatars in AR/VR are cartoon-like (e.g., Hyprsense, Loom AI); on the other hand, Hollywood has animated nearly uncanny digital humans as virtual avatars using advanced computer graphics technology and person-specific models (e.g., Siren). While some of these avatars can be driven in real-time from cameras, building the PS model is an extremely time-consuming and hand-tuned process that prevents democratization of this technology. This paper makes progress in this direction by generating video-realistic avatars by transferring subtle facial expressions from the headset mounted cameras (HMC) images in a VR headset to a 3D talking head (see Fig. 1). + +We build on recent work on codec avatars (CA) [26] that learn a PS model from a Plenoptic study. Recall that driving an avatar from HMC cameras is typically more + +![](images/9558fed977ca780d5b5a843b1aa9b91aee539562bfa5ae8956ee0c6815414da0.jpg) +(a) + +![](images/35efc944a6abecfd0eae3ad73fa6fceb0e1d7c5babe0bc1597a23dcdd2fe4edd.jpg) +Headset Environment +(b) +Headset Environment + +![](images/1b4ff2847abaa0a8103c4103e34a1f5433e2564cc6e30c6a84ad7aadf8bf4356.jpg) +(c) +adset +Environment +Facial appearance Facial appearance Facial appearance +Figure 2. Comparing the HMC images of a subject in multiple HMC captures with variations in headset, environment and facial appearance. (a) The training HMC capture, (b-e) the testing HMC captures. The blue bold font shows the variations respect to the training capture (a). The red circles in (f) show the locations of the cameras inside the headset. + +![](images/211414fb6d1ce74fec725190a73c36aa591078770429d3b025b8a7e95aaf7572.jpg) +Facial appearance Facial appearance +(d) +Headset +Environment + +![](images/af41a186c88a528fefb7f9d264b56b666806955791dbafefe8a08c3cf212121a.jpg) + +![](images/430276ececfbeea8be897b3384fe8e28667a1cc7562c9ad412da6602d76cfe2c.jpg) + +challenging than driving it from regular cameras (e.g., iPhone) [25, 37, 52], due to the domain difference between IR cameras and the texture/shape of the avatar, variability in HMC images due to headset variability (e.g., camera location, IR LED illumination), high-distortion introduced by the near-camera views, and partial visibility of the face (Fig. 2). Wei et al. [49] proposed an end-to-end deep learning network for learning the mapping between the HMC images and the parameterized avatar. First, this model solves the unknown correspondence between HMC images and the avatar parameters in an unsupervised manner using an eleven-view HMC headset. Second, to animate the CA in real time from three HMC images(i.e., inference), Wei et al. [49] learns an encoder network to regress from 3-view HMC images to CA's parameters (Fig. 3). + +While previous work has reported compelling photorealistic facial expression transfer results, the existing method has limitations due to the PS nature of the approach. It is time-consuming, expensive and error-prone to capture sufficient statistical variability when collecting PS samples to learn a robust model. It will typically require recording several sessions with variability across lighting, headsets and iconic changes (e.g., makeup, beard), which limits its scalability. To build generic models (conditioned to the neutral shape), the most import contribution of this paper is to propose multi-identity architecture (MIA), an architecture that factorizes nuisance parameters such as camera parameters, facial aesthetic changes (e.g., beard, makeup) and environmental factors (e.g., lighting) from + +the facial motion (i.e., facial expression). This is critical because the encoder is able to extract from the HMC images only the information that is relevant to the final task, which is transferring subtle facial expressions, and it is able to marginalize information that is not relevant (headset, facial appearance, environment). Implicitly, this results in an algorithm that aligns facial expressions (3D shape + texture) across users in an unsupervised manner. Recall that is a very difficult problem to align subtle facial behavior (using both 3D shape + texture) across users in a supervised or unsupervised manner. That is, how can we find the correspondence of expression across subjects? Even if done manually, it is an extremely challenging problem and MIA (to the best of our knowledge) is the first algorithm that solves this problem in an unsupervised and discriminative manner (see subsection 4.3). MIA results in an algorithm for facial expression transfer for VR, that improves upon PS models in realistic scenarios. + +# 2. Prior Work + +# 2.1. Animating Stylized and Codec Avatars + +Animating stylized avatars from video has a long history, for instance [7] fits a generic 3DMM to the face and use it to retarget the facial motion to a 3D character. To improve the accuracy, Chaudhuri et al. [6] proposed to learn person-specific expression blendshapes and dynamic albedo maps from the input video of subjects. In [42], facial action unit intensity is estimated in a self-supervise manner by utilizing a differentiable rendering layer for fitting the expression and + +![](images/0de867379e23cf0608b8815c14c99ac4f184d530789233939bc7fc3ae1540eb2.jpg) +Figure 3. Training and testing pipeline for animating the face codec avatar. In the data collection stage, we perform a face capture to generate the codec avatar of the subject [26] and a HMC capture. We utilize [49] to find the correspondence between the avatar and the HMC capture. Finally, we can train a model to animate the codec avatar (CA) from the HMC images in real-time. + +![](images/c36533a46828efebc7d82fd5a6117f7ae6b766da6d9aaa8d87eb6a09530bcec9.jpg) +Face Capture and Face Modeling + +![](images/897b1c0c9255f3f1e9c93f153c8d18594e19885d6db380446a7c00a6e737f54a.jpg) + +![](images/72a645f5dc5c8ec79d27cac1a3da0ea7f07414fa87f88fbe711c837884131145.jpg) + +![](images/8d2e729bd830c9b39e7b86d2437a355c0c875018f6a0dcb7f69fdbee0e2be9fc.jpg) + +![](images/b9fab1c15344f3e04acad16dc80625b3f8f7dfcf371a143354f8fe0a2f6cb54e.jpg) +Figure 4. The proposed multi-identity architecture (MIA). It consists of three main parts: the backbone network $\mathbf{B}$ , the 3D shape network $\mathbf{G}$ , and the texture networks $\mathbf{F}_i$ . The identity selector module pass the features to the corresponding texture network. + +to retarget the expression to the character. In contrast, expression transfer from a VR headset [12, 18, 27, 33] is more challenging due to partial visibility of face in HMC images, the specific hardware, and limited existing data. + +CAs animate avatars by estimating the parameters of a PS shape and texture model from HMC [9, 26, 39, 49], see Fig. 3. In [26], combination of real and synthetic HMC images are utilized for reducing the domain gap between real HMC images in IR spectrum and rendered images for training encoder and reducing the HMC-avatar domain gap. Wei et al. [49] utilize a cycle-GAN to achieve accurate cycle consistency between 11-view HMC images and CA. Then, they train a person specific regressor from 3-view HMC images to the CA's parameter. Chu et al. [9] propose to use modular CA to have more freedom for animating the eyes and mouth. In a different approach, Richard et al. [36] animate the CA based on the gaze direction and audio inputs. The aforementioned methods rely on PS models, are typically not robust to variations in headsets and environments. + +# 2.2. 3D Shape Estimation + +Early approaches for model-based shape and texture estimation are based on active shape model [11] (ASM) and Active Appearance Model [10, 28] (AAM). The AAM methods learn a joint holistic model of shape and appearance. 3D Morphable Model (3DMM) provides a dense 3D representation for faces e.g. the Basel Face Model [35] and the FaceWarehouse [3]. In [16, 21], 3DMM is incorporated in an end-to-end CNN training to dicriminatively estimate the 3D shape of faces given single input image. Tran et al. [47] propose to learn a nonlinear 3DMM via deep neural network from in-the-wild images, and in this way 3DMMs are capable of representing non-linear facial expressions. The proposed method in [13] can extract expression-dependent details of the 3D shape from a single image. [14] proposed to use the GAN generator + +for 3DMM fitting and estimating high-fidelity UV texture. Similarly, [20] proposed to utilize the volumetric representation of face instead of using 3DMM. An unsupervised method proposed in [15] for, identity 3DMM fitting, regressing the 3D shape and texture. Also, in [38] the identity constraints utilized among the images of the same subject. Similar to [47] we learn a non-linear discriminative 3DMM, but we extend it to learn the model from HMC images given a neutral 3D shape, and align the expressions across subjects in an unsupervised manner. To the best of our knowledge, this is the first work that solves the correspondence of expression across subjects in unsupervised manner. + +# 3. Multi-Identity Model + +This section describes the proposed multi-identity architecture (MIA) and augmentation techniques to robustify and generalize existing encoder models for driving CAs. + +# 3.1. Multi-Identity Architecture (MIA) + +Given 3-view HMC images of the eyes and mouth (see Fig. 1), our goal is to estimate the facial expression of a CA (shape+texture), and render it in an arbitrary view in VR. The MIA has three main parts (see Fig. 4): the backbone network, the 3D shape network, and the texture branch. + +Backbone network: The backbone network, $\mathbf{B}_{\psi}$ in Fig. 4, is shared among subjects. Its goal is to factorize the expression from other nuisance factors such as lighting, background, or camera views, and build an internal representation that is invariant to those factors. As we will show in the experiments section, MIA naturally finds that the best way to encode HMC images across subjects, is by marginalizing out person-specific factors in addition to the nuisance factors mentioned. This results in learning an embedding that only preserves expression without the need of solving for correspondence across expression among subjects. + +3D shape network: MIA assumes that the neutral shape + +![](images/75fb4c08147b6ac0c634ac4ecc523c724a89b6780a34408d70ad0d714e9f5f48.jpg) +Figure 5. Examples of applying 3D augmentation layer to HMC images. First row: Real HMC images, second row: Augmented images by changing 3D pose, focal length and background. + +of the test subject, $\mathbf{S}^N\in \mathbb{R}^{7306\times 3}$ , in given1. This is the only information MIA needs to generalize the shape component of the network to untrained subjects. A network $\mathbf{G}_{\gamma}$ is trained to estimate 3D shape, $\hat{\mathbf{S}}\in \mathbb{R}^{7306\times 3}$ from HMC images. The network $\mathbf{G}_{\gamma}$ takes both of the output of the backbone network $\mathbf{B}_{\psi}$ and $\mathbf{S}^N$ to estimate the person-specific 3D shape expression residual. The neutral 3D shape is used to re-inject person-specific information that was factored out in $\mathbf{B}_{\psi}$ . For instance, eye openness, which varies across identities, can be extracted from the neutral 3D shape $\mathbf{S}^N$ of each subject. With this, we reconstruct the 3D shape of subject $i$ as: + +$$ +\hat {\mathbf {S}} _ {i} = \mathbf {S} _ {i} ^ {N} + \mathbf {G} _ {\gamma} \left(\mathbf {B} _ {\psi} \left(\mathbf {H} _ {i} ^ {0}, \mathbf {H} _ {i} ^ {1}, \mathbf {H} _ {i} ^ {2}\right), \mathbf {S} _ {i} ^ {N}\right). \tag {1} +$$ + +The network $\mathbf{G}_{\gamma}$ is trained by minimizing the Euclidean distance between the target $\mathbf{S}_i$ and estimated $\hat{\mathbf{S}}_i$ 3D shapes, + +$$ +\mathbf {L} _ {S} ^ {i} = \left\| \mathbf {W} ^ {S} \odot \left(\mathbf {S} _ {i} - \hat {\mathbf {S}} _ {i}\right) \right\| _ {2} ^ {2}, \tag {2} +$$ + +where $\mathbf{W}^S$ is the weight mask for the visible areas. + +Texture network: When the pre-trained PS texture decoder is available for each identity, our goal is to be able to animate the CA from HMC images robustly and with minimal adaptation effort. In this paper, we presume pre-trained decoders $\mathbf{D}_{\phi}$ from [26] are available, but our work can be similarly applied to other PS models as well (e.g. [24, 46]). The network $\mathbf{D}_{\phi}$ takes, as input, an expression parameter $\mathbf{z} \in \mathbb{R}^{256}$ and a view vector $\mathbf{v} \in \mathbb{R}^3$ , and generates person-specific and view-specific texture $\mathbf{T}^{\mathbf{v}} \in \mathbb{R}^{1024 \times 1024 \times 3}$ that, together with shape, can be used to render the avatar, + +$$ +\mathbf {T} ^ {\mathbf {v}} = \mathbf {D} _ {\phi} (\mathbf {z}, \mathbf {v}). \tag {3} +$$ + +However, since each PS model is trained independently of all others, the structure of the latent space, $\mathbf{z}$ , is not consistent across identities. We would like to utilize the shared + +backbone encoder $\mathbf{B}_{\psi}$ across identities to encourage robustness via joint training. Inspired by multi-task learning techniques [4, 32], we additionally learn person-specific adaptation layers, $\mathbf{F}_{\theta}$ , that transform the identity-consistent expression embedding produced by $\mathbf{B}_{\psi}$ to each identity's personalized latent space. Finally, to eliminate unnecessary dimensions in $\mathbf{z}$ , non-informative dimensions, we apply PCA dimensionality reduction, denoted $\mathbf{P} \in \mathbb{R}^{256 \times 80}$ to each identity's latent space and fix it during training. Together, these components are used to generate PS expression parameters as follows: + +$$ +\hat {\mathbf {z}} _ {i} = \mathbf {P} _ {i} \left(\mathbf {F} _ {\theta_ {i}} \left(\mathbf {B} _ {\psi} \left(\mathbf {H} _ {i} ^ {0}, \mathbf {H} _ {i} ^ {1}, \mathbf {H} _ {i} ^ {2}\right)\right)\right) + \bar {\mathbf {z}} _ {i}, \tag {4} +$$ + +where $i$ is subject index, and $\overline{\mathbf{z}}_i$ is the average expression parameter for subject $i$ . Then, we use Eqn. 3 to generate the estimated texture $\mathbf{T}_i^{\mathbf{v}}$ from view $\mathbf{v}$ . To guide the network, we minimize the Euclidean loss between the estimated and the target expression parameters and textures: + +$$ +\mathbf {L} _ {T} ^ {i} = \left\| \mathbf {z} _ {i} - \hat {\mathbf {z}} _ {i} \right\| _ {2} ^ {2} + \lambda_ {\mathbf {T}} \left\| \mathbf {W} ^ {T} \odot \left(\mathbf {T} _ {i} ^ {\mathbf {v}} - \hat {\mathbf {T}} _ {i} ^ {\mathbf {v}}\right) \right\| _ {2} ^ {2}, \tag {5} +$$ + +where $\mathbf{W}^T$ is the weight mask for the visible areas from the HMC images and $\lambda_T$ is the weight for the texture loss. + +Total Loss: The entire MIA network is trained end-to-end to optimize the networks' parameters by minimizing: + +$$ +\underset {\psi , \gamma , \left\{\theta_ {i} \right\} _ {i = 0} ^ {K}} {\text {m i n i m i z e}} \sum_ {i = 0} ^ {K} \mathbf {L} _ {T} ^ {i} + \lambda_ {\mathbf {S}} \mathbf {L} _ {S} ^ {i}, \tag {6} +$$ + +where $K$ is the number of subjects and $\lambda_{\mathbf{S}}$ is the weight for the shape loss. + +# 3.2. Augmentation + +Data augmentation is a wildly practiced heuristic in many deep learning tasks. The main goal is to make the distribution of variations in training data more similar to those in the test set. Most common data augmentations techniques include scaling [41], color augmentation [23], simple geometric transformations [40], and utilizing synthetic data [22, 29]. However, a major source of variability in our task stems from headset factors, such as variations in camera placement and focus, as well as the slop of the headset relative to the face which varies during usage. These variations are not easily modeled using standard augmentation techniques that do not take the 3D shape of the face into account. In this paper, we simulate headset-based variations by perturbing the 3D rotation and translation of the face shape in the training set, and use it to re-render augmented views of each HMC image on random backgrounds. Some examples are shown in Fig. 5. As demonstrated in the experiments section below, this simple augmentation technique substantially improves the robustness of our method to real world variations. + +![](images/6f1c1c83a1b1a9fe20629a72b8c506a715a1aaff0cd1f24b54a0bc626441f350.jpg) +Figure 6. The testing results for estimating the 3D shapes for six untrained subjects and their ground truth based on 11-view results in [49]. + +![](images/639ebd3d4f41c07a910c676525569d95e680aa46e9dd91be237f3d1e20b05cc1.jpg) + +![](images/31212ea7d60215a0222b85b09a3170b6c95a48d48f4bb97cef96989bb072e2ac.jpg) + +# 4. Experimental Results + +This section reports experimental results and analysis on MIA. The first experiment shows how MIA can estimate accurate 3D shapes directly from HMC images of untrained subjects. In the second experiment, we evaluate the quality of MIA's texture prediction for identities with pre-trained avatars under challenging testing scenarios. In the third experiment, we show how MIA can incorporate new subjects with minimal training. In addition, we also present further analysis about what MIA learns prior and during adaptation. + +Data: We used 120 HMC captures of different subjects for training and 21 HMC captures for testing. Training and testing HMC captures do not overlap. Each HMC capture is a 45 minutes long video (30fps) of 11-views HMC images, and contains 73 peak expressions, two sets of continuous range-of-motion, recitation of 50 sentences and 5-10 minutes of conversion. The HMC images are in the IR spectrum with a resolution of $480 \times 640$ . During testing only 3-views are available. For each subject, we have a pre-trained decoder to generate PS texture for various expressions from arbitrary views. For more information, of how to build the PS decoder see [26] and Eqn. 3. + +Ground Truth: We utilize the result of the method in [49], that solves for the correspondence between 11-views HMC images and the CA parameters as the ground truth. Recall that the training data is captured with 11-views to achieve more precise results in the correspondence between HMC and CA, while the testing data has only 3-views. + +**Baseline method:** We compare MIA with the person specific (PS) encoder in [49]. The PS encoder is trained with one HMC capture (3-view images) and uses a CNN architecture with the same number of parameters as ours. + +Evaluation metrics: We report the average Euclidean error for the eyes, mouth and face areas separately for both 3D shape and the texture. The 3D shape errors are measured in millimeters and the texture errors in raw intensity values (i.e. 0-255). We report the localized error metrics to analyze failure modes better. For example, the 3D shape error + +Table 1. Test results for 3D shape estimation in untrained subjects. + +
Subject3D Shape Error (mm)
FaceEyesMouth
person 11.681.082.90
person 21.511.212.32
person 31.070.741.82
person 41.841.202.92
person 51.450.892.23
person 61.470.972.56
person 71.731.202.98
person 81.570.892.52
person 91.210.911.84
person 101.581.002.68
overall1.51 ± 0.231.00 ± 0.162.47 ± 0.42
+ +in the eyes capture openness and blinking errors, while in the mouth, they capture deviations in lip shapes important for visual-speech. Similarly, texture error in the eyes is typically due to the errors in gaze direction, and in mouth, it corresponds to incorrect teeth and tongue estimation. + +Implementation details: In training, we use the Adam optimizer, setting the batch size to 32 and the initial learning rate to $1\mathrm{e} - 3$ . We decrease learning rate by $8\mathrm{e} - 1$ after each 25K iterations. In total, we train the encoder for 250K iterations, and set both of $\lambda_{\mathrm{T}}$ and $\lambda_{\mathrm{S}}$ to 100. We crop and resize the HMC images to $192\times 192$ to focus on the face areas. + +The backbone network, $\mathbf{B}_{\psi}$ , consists of two residual networks [17], one for eye images $\left[\mathbf{H}^{0}, \mathbf{H}^{1}\right] \in \mathbb{R}^{192 \times 192 \times 2}$ and another for the mouth $\mathbf{H}^{2} \in \mathbb{R}^{192 \times 192}$ . Each network consists of a Res-Net head module, five BottleNeck blocks and a 64-way fully connected layer. Each BottleNeck block consists of ten convolutional layers with $3 \times 3$ and $1 \times 1$ filters. We add shortcut connections among the convolutional layers, and each layer is followed by ReLU [31] and Instance normalization [48] layers. To extract the final identity invariant features, we apply a global average pooling and a 64-way fully connected layer to the activations of the last BottleNeck block. The architecture of the 3D shape network, $\mathbf{G}_{\gamma}$ , consists of four fully connected layers where each one is followed by a leaky ReLU [51] layer with negative slope of 0.2. We normalize the extracted features + +![](images/99317f44d7a6b640abe16b96ff8a1500e9e49c973afbb0ce420e20c31200f9d9.jpg) +Figure 7. Test results to estimate the 3D shape from HMC images of an untrained subject for a wide range of expressions. + +from the HMC images and the neutral 3D shape, to account for their different domains, by employing group normalization [50] after concatenating the features. Finally, for the texture network $\mathbf{F}_{\theta}$ , we utilize the combination of a ReLU layer and a fully connected layer without bias. + +# 4.1. Quantitative Evaluations + +This section quantifies the performance of MIA using three experiments: (1) driving the 3D shape of untrained subjects. (2) robustness of shape and texture estimation for subjects with trained PS models. (3) generalization of learned features on new subjects. + +Driving 3D Shape: Inputs to the shape generation network, $\mathbf{G}_{\gamma}$ , are the HMC images and the corresponding identity's neutral 3D shape. We train the network with 120 subjects using the loss function in Eqn. 2 as guidance. Fig. 6 shows the estimated 3D shape for extreme expression examples from six untrained subjects along with their ground truth. Our 3D shape estimator captures subtle details in expressions necessary for inferring social signal. Table 1 shows the 3D shape errors for face, eyes and mouth areas of the whole sequence for ten untrained subjects. The error is less than $2\mathrm{mm}$ in the face/eyes and $3\mathrm{mm}$ in the mouth. Recall that MIA does not use any sample from the test subject other than the neutral shape and has never seen any HMC images for these subjects during training. Fig. 7 shows testing results of one untrained subject for a wide range of expressions. Note that PS [49] is not able to estimate the 3D + +shape for untrained subjects. + +Comparing Table 1 with PS's results for the 3D shape error in Table 2 (different capture), we find that MIA outperforms PS, despite PS having access to subject-specific HMC images, and their target shapes, during training. We suspect the reason for this is that MIA learns to marginalize the extrinsic variability of the problem (i.e. environment, headset) from the 120 subjects that is trained on, while the PS tends to overfit to the specific HMC capture session used for training. More comparative results can be found in the video in the supplementary material. + +Driving Full Avatars: In this experiment, we evaluate the ability of MIA to generate both shape and texture and its robustness against extrinsic factors such as headset, environment and facial appearance variations. Here, data for test subject is available during training, but from a different HMC capture. The selected subject was captured on five different dates; examples of the HMC images are shown in Fig. 2. These samples show large appearance variations due to facial hair, pose changes in the headset slop, and camera assembly differences across headsets; it also contains background variation due to changing environment and overall lighting differences. We use one HMC capture (Fig. 2(a)) of the subject with 119 HMC captures of other subjects for training, and test on the remaining four HMC captures of that subject. Table 2 compares the testing errors of MIA against PS [49]. On test capture 1, which is very similar to the training capture, PS [49] performs better than MIA. But, + +Table 2. Testing results for a subject with multiple testing HMC captures with different variations. One HMC capture of the subject is inside the training set. The 3D shape errors are in mm and the texture errors are in intensity. + +
Test CaptureSample ImageVariationsMethod3D Shape ErrorTexture Error
FaceEyesMouthFaceEyesMouth
1Fig. 2.(b)HeadsetPS [49]0.850.651.331.131.931.50
MIA1.200.851.901.332.341.79
2Fig. 2.(c)Headset Facial appearancePS [49]2.040.774.711.842.473.51
MIA1.280.792.221.492.522.00
3Fig. 2.(d)Headset Facial appearancePS [49]1.900.983.681.652.732.84
MIA1.260.862.231.322.522.03
4Fig. 2.(e)Environment Facial appearancePS [49]2.210.864.921.922.333.39
MIA1.140.731.941.452.112.05
overallPS [49]1.75 ± 0.610.81 ± 0.133.66 ± 1.641.63 ± 0.352.36±0.332.81 ± 0.92
MIA1.22±0.060.80±0.062.07±0.171.39±0.082.37 ± 0.191.96±0.12
+ +Table 3. Testing results for training and testing on new subjects with pre-trained fixed backbone network. + +
Method3D Shape ErrorTexture Error
FaceEyesMouthFaceEyesMouth
PS [49]1.12 ± 0.260.74 ± 0.111.98 ± 0.652.22±0.612.90 ± 0.952.77 ± 0.83
MIA1.05±0.190.74±0.091.71±0.372.22 ± 0.622.88±0.812.65±0.78
+ +its performance declines significantly when testing on the other captures, where variations in environment and facial appearance are more extreme. Note that the overall errors for MIA, for all areas of 3D shape and texture, are more stable and are similarly low across all test captures. The first two rows of Fig. 10 shows visual comparison of methods on the test HMC captures, where a significant reduction in expressive detail is noticeable in results for PS [49]. We refer the reader to the supplementary material for more results. + +Adaptation to New Identities: We evaluated the generalization of MIA's feature extraction to new subjects on HMC captures of 6 subjects that are not trained in MIA. Each of the 6 subjects has more than one HMC capture exhibiting variations in extrinsic factors. We used the pre-trained MIA network with 120 subjects (excluding the test 6 subjects), and fix the shape generation network, $\mathbf{G}$ , and backbone network, $\mathbf{B}_{\psi}$ . For each new subject, we trained a new small texture network $\mathbf{F}_{\theta}$ . During the testing on HMC captures with variations, we used the newly trained texture estimation branch for estimating the texture parameters, and decode both the texture and the 3D shape by utilizing Eqn. 3. Table 3 shows the overall errors for 3D shape and texture for different areas of 7 testing HMC captures of the 6 subjects. MIA achieves lower errors for all areas with smaller variability, demonstrating the effectiveness of the features extracted from the fixed backbone network. The last three rows of Fig. 10 show visualizations of this case for. + +# 4.2. Ablation Study + +3D augmentation layer: To analyze the advantage of using the 3D augmentation layer, we compare the errors of the PS [49] model, MIA with 3D augmentation trained with 1 subject, MIA without 3D augmentation (3D Aug) trained with 30 subjects, and MIA with 3D Aug trained with 30 subjects. Fig. 8 shows the average errors for the four test captures in Table 2. It shows that even using the 3D Aug layer with 1 subject reduces errors slightly in comparison to PS [49]. However, there is huge drop in errors by using the 3D Aug layer with 30 subjects. This reduction of er + +![](images/cb582c77e73bd9fa2285abc8c8d7380413c8eb0a19312a002a027c4c2e4edc85.jpg) +Figure 8. The advantage of the 3D augmentation layer, the errors drop significantly by using both of 3D augmentation and MIA. + +![](images/2afe26640f276a645b6e465fd11e8311cc68c3e16a2b3c7cabb56a7e743370f0.jpg) + +![](images/a8715660d3a95f736170b497b0ac4e1a291a2d3aaa3e3c57a20b52155ef85039.jpg) +Figure 9. The influence of number of training subjects. The shape errors are decreasing by increasing number of training subjects. + +ror is more significant in the mouth area. It shows that the combination of MIA and 3D Aug is effective. + +Influence of number of subjects: We evaluate the influence of number of training subjects in the performance of MIA during testing. We train MIA with 30, 60, 100 and 120 subjects, and test them on ten untrained subjects for estimating the 3D shapes. Fig. 9 shows that by increasing number of training subjects the 3D shape errors are decreasing, especially for the mouth area. + +# 4.3. Unsupervised Expression Correspondence + +The MIA implicitly learns to solve for correspondence across expressions in order to marginalize nuisance parameters (e.g., lighting). It naturally discovers that the best way to encode HMC multi-identity data is finding a latent space that only contains expression information. Fig. 11 illustrates how MIA learns to solve for correspondence across expressions. The first column shows the input HMC images and the second column is the CA of the subject in the first column. The remaining columns are the CAs of other subjects driven from the HMC images in first column, that is, the same extracted features from HMC images are utilized to estimate (by using the corresponding $\mathbf{F}_{\theta}$ ) a new expression parameter (with the same facial expression meaning), $\mathbf{z}$ , in the latent space of each of the remaining subjects. As we can observe, MIA is able to align the expression across all of the subjects in an unsupervised manner, and creating a common expression-only space. Please pay attention to the mouth area in the second row of Fig. 11 that shows the same expression with different mouth interior. + +# 5. Conclusion and Future Directions + +This paper proposes MIA to robustify and generalize existing PS methods for driving CAs. MIA learns to extract identity invariant features related to facial expression while marginalizing nuisance factors (headset, environment, facial expression) in an unsupervised manner. We show that MIA is able to drive the shape component in untrained subjects, and if the PS texture decoder is available, with a minimum training, MIA can drive CAs for new subjects. For future directions, first, we will design new loss function based on the closeness of 3D surfaces to model the lips and eyes closure. Second, we will work on texture-conditional decoders to make the texture part of the method generalizable for new subjects without pre-trained decoders. + +![](images/639b458ccd5244ef7070d39579a1b57744b78afc55b62fe4996e3cb5307e0712.jpg) + +![](images/53880a77b893aaf79613e7bbdcd30c00f3e009a8447271ef19b792076c79874e.jpg) + +![](images/7b4fee094c508b9036d738a44bc67f758b594e2bdbb33f59d34bc68b5b48ad02.jpg) + +![](images/dfd81b2883591857bd235d85c8c97d3e1240fdc5856670728d0b4d55aa781e1e.jpg) + +![](images/1383eb80c1ea32165fc082d1ec498c5524f6c9aa303271afd18c836bea73646f.jpg) + +![](images/ab02575f44caf7e191e155355a3058984f09a4405065806cf97f6f349eaf67b5.jpg) + +![](images/213b5d3a0f7304c46b454b0896cf21bf1ff8cf6e4c89179494b7df40df1efc05.jpg) + +![](images/ad6ab6b34642756aff1eaca733532d6dd8b1209a62228c4082538bce31b27cfd.jpg) + +![](images/593c1eb20cab6e65159d7510c23aecd22a91dd1b7343bf1cd1176309b37fa31d.jpg) + +![](images/607d106a2c47be3cba40df9811a4d6436d8d46a9dd553415c4a8e5b6edde0d3d.jpg) + +![](images/96af7eda862cb828ce35fad62d6dd2ee85efa90022659592395ecf292f53fb40.jpg) + +![](images/79a78f6dac93d91c012ee7b56afc24f157c60becf06515060c2acc32f1d0beac.jpg) + +![](images/757f337235fbd919cb2e6748c45e3e2b915dab580b6236e9f5fdbd63ee82857c.jpg) + +![](images/1d07c818b97a71bc4e433daaabcb4d9b59e017032cf8698e3549831282c2c5c4.jpg) + +![](images/e41d72891a4a097de38e7e5ef2eb0afbe0ae6e30f844f739e545201561de58b5.jpg) + +![](images/6c851fe6995eb858f43883c3249b0dc28d002fed5bbbec6a310a451b5e40bb50.jpg) + +![](images/95a76657bde14d2c5626f40861a53ccaa16458d4b3edfa30269b06031e615eb6.jpg) + +![](images/82afbd8ca900378b8b97f907a7fd054beb5eac6d87162d571dda4c7c24ded016.jpg) + +![](images/6eba8c5979d0c3430acd8d523c811ff108a549a4460bd3d3729f2f7ec2217115.jpg) + +![](images/3a41109b5420da3550e01e0f6673dabfd8c7d12482ee9eff6e17eec5e1146b4b.jpg) + +![](images/d6149613e9e2fc0302bb5c6d994885301b56b00c4e7e880a7c4967908d66abc3.jpg) + +![](images/dfc5213f0a20aeaf69d9cb0f9d5060fe387b8d6cd93f3471463fc04d65d93ac0.jpg) + +![](images/0f7e4d7c949b48988aa5810635fa77020b0bd17b341384d82443dc1d2396cc5e.jpg) + +![](images/b04bc398401b1744f1b7fa39192d002dde8545040a4c1c78896326aee3feddee.jpg) + +![](images/bdfa6178c87fd90e6135a064fcfcca3a8d0d8f15985f9a00c33a24dd5c4cbde9.jpg) + +![](images/87f041b442fe4345bf3f25baaeb397df2e9005c3f770c49245efd1ed7d446bf6.jpg) + +![](images/51f6ef87aaf1dc91bc97ac27f7a0532edc985566910ef8575e0e3edb33909091.jpg) + +![](images/27730e310285be9b0cb5616d30216c06c59d294bfe337136b82400fff930b4d3.jpg) + +![](images/1d1cfc39d219f92392cfc200179623e4d279019c6b699dcb1251c6f017ad7452.jpg) + +![](images/d15aa44afe966974d9b10e1a748e62bb1ecd42c16be89824ce041e6829b1cffc.jpg) + +![](images/b2da4e040b6d82aa797b88b28cba5a1ed86c0b97e66f07fbce18cea2aae0ff8d.jpg) + +![](images/925a7a3b06ac866c82a129f12cbff007e0a67f377c9e37bee02b6b4b8a1b4d97.jpg) + +![](images/cd402cbeb8292b1ba1b4911f0ca3b069f2736d34d4cdfc373f8186213429e676.jpg) +HMC + +![](images/6b40112f480b1b18ea3fab99a54126af02fbfa54a4081c8c2c3924a7b1d4c19b.jpg) +PS [49] + +![](images/f800031a13fdb81cf13f9eb00238a3b017da9c907d047cdff1df2993b2d71d38.jpg) +MIA + +![](images/6af2cd8bd625dd04b5514f7f7564ae053d01abace260453b43cb9ee01a6246d9.jpg) +GT + +![](images/7238e6b59b1a853c231b0e317284d7741e1ab9756715221a0eda4cb1ba7e94a9.jpg) +HMC + +![](images/d048ce80bf588f37901890ec61ae1b1826994363408027b85119e73af04337de.jpg) +PS [49] + +![](images/586b143b029aa15cf2887efb2da57c67b63dab42faf4f6a94284e5406b67c71b.jpg) +MIA + +![](images/76327ab6661f7fb2514924bcc50117942889d12af11cf4a6de5c6807b6b12e54.jpg) +GT + +![](images/ff8b998110aad31aa797e88d959c8029cafde9511335ab8d9eace61ae256f291.jpg) +Figure 10. The comparison of PS [49] and MIA methods for animating the codec avatar from HMC images. The MIA can estimate more expressive and accurate expressions. + +![](images/5504878c6ecb8f1d78407744d9b5b03fd53d1102b2c502b97f5b344eef780ffb.jpg) + +![](images/54ef51345e6a2ecf499845d11c23bd1403b74986173596a8c50fd019a1571e93.jpg) + +![](images/1215a72dccdfaca2788c9c680a4fb93a77b3a202f838d388a5d4446bed4d6bd4.jpg) + +![](images/a6076f361fd8dc8b88d444c9896f022a494d43f5f3d1d29038f0d646af380767.jpg) + +![](images/f27525a8a47fdf7224e3a96417c72c1c542d91f59d616773f6862bf33b1358dc.jpg) + +![](images/6fd42095b648656ddfba001406687ed8e539a22345adb7d1b301c0cc7a7f7c59.jpg) + +![](images/f5af64da274b764f318e7d72a02b87809f7343fcddcfe2d37fbec453d8140450.jpg) + +![](images/a878e87c446d8059e6c08ba4b5bd6192c72926ef71528648fa5d40ce8feb866c.jpg) + +![](images/9815929d009d9c55821cc239383cb209c62cab36348da742cb8faa2e196bf623.jpg) +Figure 11. The examples of synchronized expressions of training subjects by using the same input HMC images. + +![](images/5aee55ed7418636948155c31887c9fcfa2b92b9c6b6e9d2536d0c694b7d496f4.jpg) + +![](images/5d66fbcde73e7ff4df087ea9b151783ef58469fd6c48fe3d6c636b18ca47d2a2.jpg) + +![](images/2b45d80d65f20baa7a73bca5ff8101895e2214934bf09b5d8faf92fcf2d16489.jpg) + +![](images/7f1eb4984a84addd4c9c87c094802ef2aa39e2f13e9c787107523e10dcc391ce.jpg) + +![](images/1450e8854933b42773058dd00f03bff3d499137abb17e20025c0b2607c7c70af.jpg) + +![](images/9ddad4d14e94cecc0edf53e1deb45d47966f3a0e836a3bad1238d6db6ec2bc28.jpg) + +![](images/11d4bf1d977abdf5c87876efe72845e318b9dc948c3870acb18ec5bd2ce1cca0.jpg) + +![](images/e4f6f16c3982e4133147410ae9496848154832d058f7121a6e5fd1af396937f2.jpg) + +# References + +[1] FacePlusPlus. https://www(faceplusplus.com/3dface/.4 +[2] KeenTools. https://keentools.io/.4 +[3] Chen Cao, Yanlin Weng, Shun Zhou, Yiying Tong, and Kun Zhou. Facewarehouse: A 3d facial expression database for visual computing. IEEE Trans. Vis. Comput. Graph., 20(3):413-425, 2013. 3 +[4] Jiajiong Cao, Yingming Li, and Zhongfei Zhang. Partially shared multi-task convolutional neural network with local constraint for face attribute learning. In IEEE Conf. Comput. Vis. Pattern Recog., pages 4290-4299, 2018. 4 +[5] Prashanth Chandran, Derek Bradley, Markus Gross, and Thabo Beeler. Semantic deep face models. In Int. Conf. 3D Vis., pages 345-354. IEEE, 2020. 1 +[6] Bindita Chaudhuri, Noranart Vesdapunt, Linda Shapiro, and Baoyuan Wang. Personalized face modeling for improved face reconstruction and motion retargeting. In Eur. Conf. Comput. Vis., pages 142-160. Springer, 2020. 2 +[7] Bindita Chaudhuri, Noranart Vesdapunt, and Baoyuan Wang. Joint face detection and facial motion retargeting for multiple faces. In IEEE Conf. Comput. Vis. Pattern Recog., pages 9719-9728, 2019. 2 +[8] Lele Chen, Chen Cao, Fernando De la Torre, Jason Saragih, Chenliang Xu, and Yaser Sheikh. High-fidelity face tracking for ar/vr via deep lighting adaptation. In IEEE Conf. Comput. Vis. Pattern Recog., pages 13059-13069, 2021. 1 +[9] Hang Chu, Shugao Ma, Fernando De la Torre, Sanja Fidler, and Yaser Sheikh. Expressive telepresence via modular codec avatars. In Eur. Conf. Comput. Vis., pages 330-345. Springer, 2020. 3 +[10] Timothy F Cootes, Gareth J Edwards, and Christopher J Taylor. Active appearance models. In *Eur. Conf. Comput. Vis.*, pages 484-498. Springer, 1998. 3 +[11] Timothy F Cootes, Christopher J Taylor, and Andreas Lanitis. Active shape models: Evaluation of a multi-resolution method for improving image search. In Brit. Mach. Vis. Conf., volume 1, pages 327-336. Citeseer, 1994. 3 +[12] Mohamed Elgharib, Mallikarjun BR, Ayush Tewari, Hyeongwoo Kim, Wentao Liu, Hans-Peter Seidel, and Christian Theobalt. Egoface: Egocentric face performance capture and videorealistic reenactment. arXiv preprint arXiv:1905.10822, 2019. 1, 3 +[13] Yao Feng, Haiwen Feng, Michael J Black, and Timo Bolkart. Learning an animatable detailed 3d face model from in-the-wild images. ACM Trans. Graph., 40(4):1-13, 2021. 3 +[14] Baris Gecer, Stylianos Ploumpis, Irene Kotsia, and Stefanos Zafeiriou. Ganfit: Generative adversarial network fitting for high fidelity 3d face reconstruction. In IEEE Conf. Comput. Vis. Pattern Recog., pages 1155-1164, 2019. 3 +[15] Kyle Genova, Forrester Cole, Aaron Maschinot, Aaron Sarna, Daniel Vlasic, and William T Freeman. Unsupervised training for 3d morphable model regression. In IEEE Conf. Comput. Vis. Pattern Recog., pages 8377-8386, 2018. 3 +[16] Jianzhu Guo, Xiangyu Zhu, Yang Yang, Fan Yang, Zhen Lei, and Stan Z Li. Towards fast, accurate and stable 3d dense + +face alignment. In Eur. Conf. Comput. Vis., pages 152-168. Springer, 2020. 3 +[17] 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. 5 +[18] Steven Hickson, Nick Dufour, Avneesh Sud, Vivek Kwatra, and Irfan Essa. Eyemotion: Classifying facial expressions in VR using eye-tracking cameras. In IEEE Winter Conference on Applications of Computer Vision, pages 1626-1635. IEEE, 2019. 3 +[19] Tao Hu, Kripasindhu Sarkar, Lingjie Liu, Matthias Zwicker, and Christian Theobalt. Egorenderer: Rendering human avatars from egocentric camera images. In Int. Conf. Comput. Vis., pages 14528-14538, 2021. 1 +[20] Aaron S Jackson, Adrian Bulat, Vasileios Argyriou, and Georgios Tzimiropoulos. Large pose 3d face reconstruction from a single image via direct volumetric cnn regression. In Int. Conf. Comput. Vis., pages 1031-1039, 2017. 3 +[21] Amin Jourabloo, Mao Ye, Xiaoming Liu, and Liu Ren. Pose-invariant face alignment with a single cnn. In Int. Conf. Comput. Vis., pages 3200-3209, 2017. 3 +[22] Martin Klaudiny, Steven McDonagh, Derek Bradley, Thabo Beeler, and Kenny Mitchell. Real-time multi-view facial capture with synthetic training. In Computer Graphics Forum, volume 36, pages 325-336. Wiley Online Library, 2017. 4 +[23] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Adv. Neural Inform. Process. Syst., pages 1097-1105, 2012. 4 +[24] Gun-Hee Lee and Seong-Whan Lee. Uncertainty-aware mesh decoder for high fidelity 3D face reconstruction. In IEEE Conf. Comput. Vis. Pattern Recog., pages 6100–6109, 2020. 4 +[25] Jiangke Lin, Yi Yuan, Tianjia Shao, and Kun Zhou. Towards high-fidelity 3d face reconstruction from in-the-wild images using graph convolutional networks. In IEEE Conf. Comput. Vis. Pattern Recog., pages 5891-5900, 2020. 2, 4 +[26] Stephen Lombardi, Jason Saragih, Tomas Simon, and Yaser Sheikh. Deep appearance models for face rendering. ACM Trans. Graph., 37(4):1-13, 2018. 1, 2, 3, 4, 5 +[27] Jianwen Lou, Yiming Wang, Charles Nduka, Mahyar Hamedi, Ifigeneia Mavridou, Fei-Yue Wang, and Hui Yu. Realistic facial expression reconstruction for VR hmd users. IEEE Trans. Multimedia, 22(3):730-743, 2019. 3 +[28] Iain Matthews and Simon Baker. Active appearance models revisited. Int. J. Comput. Vis., 60(2):135-164, 2004. 3 +[29] Steven McDonagh, Martin Klaudiny, Derek Bradley, Thabo Beeler, Iain Matthews, and Kenny Mitchell. Synthetic prior design for real-time face tracking. In Int. Conf. 3D Vis., pages 639-648. IEEE, 2016. 4 +[30] Koki Nagano, Jaewoo Seo, Jun Xing, Lingyu Wei, Zimo Li, Shunsuke Saito, Aviral Agarwal, Jens Fursund, and Hao Li. pagan: real-time avatars using dynamic textures. ACM Trans. Graph., 37(6):1-12, 2018. 1 +[31] Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In Int. Conf. Machine Learning, 2010. 5 + +[32] J Naruniec, L Helminger, C Schroers, and RM Weber. High-resolution neural face swapping for visual effects. In Computer Graphics Forum, volume 39, pages 173-184. Wiley Online Library, 2020. 4 +[33] Kyle Olszewski, Joseph J Lim, Shunsuke Saito, and Hao Li. High-fidelity facial and speech animation for vr hmds. ACM Trans. Graph., 35(6):1-14, 2016. 3 +[34] Sergio Orts-Escolano, Christoph Rhemann, Sean Fanello, Wayne Chang, Adarsh Kowdle, Yury Degtyarev, David Kim, Philip L Davidson, Sameh Khamis, Mingsong Dou, et al. Holoportation: Virtual 3d teleportation in real-time. In Proceedings of Symposium on User Interface Software and Technology, pages 741-754, 2016. 1 +[35] Pascal Paysan, Reinhard Knothe, Brian Amberg, Sami Romdhani, and Thomas Vetter. A 3d face model for pose and illumination invariant face recognition. In International Conference on Advanced Video and Signal Based Surveillance, pages 296-301. IEEE, 2009. 3 +[36] Alexander Richard, Colin Lea, Shugao Ma, Juergen Gall, Fernando de la Torre, and Yaser Sheikh. Audio-and gaze-driven facial animation of codec avatars. In IEEE Winter Conference on Applications of Computer Vision, 2020. 3 +[37] Joseph Roth, Yiying Tong, and Xiaoming Liu. Adaptive 3d face reconstruction from unconstrained photo collections. In IEEE Conf. Comput. Vis. Pattern Recog., pages 4197-4206, 2016. 2, 4 +[38] 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 Conf. Comput. Vis. Pattern Recog., pages 7763-7772, 2019. 3 +[39] Gabriel Schwartz, Shih-En Wei, Te-Li Wang, Stephen Lombardi, Tomas Simon, Jason Saragih, and Yaser Sheikh. The eyes have it: an integrated eye and face model for photorealistic facial animation. ACM Trans. Graph., 39(4):91-1, 2020. 3 +[40] Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. CNN features off-the-shelf: an astounding baseline for recognition. In IEEE Conf. Comput. Vis. Pattern Recog. Worksh., pages 806-813, 2014. 4 +[41] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 4 +[42] Xinhui Song, Tianyang Shi, Zunlei Feng, Mingli Song, Jackie Lin, Chuanjie Lin, Changjie Fan, and Yi Yuan. Unsupervised learning facial parameter regressor for action unit intensity estimation via differentiable renderer. In Proceedings of ACM International Conference on Multimedia, pages 2842-2851, 2020. 2 +[43] Oddvar Hagen Stein R Bolle, Frank Larsen and Mads Gilbert. Video conferencing versus telephone calls for team work across hospitals: a qualitative study on simulated emergencies. *Emergency Medicine*, 22, 2009. 1 +[44] Ayush Tewari, Florian Bernard, Pablo Garrido, Gaurav Bharaj, Mohamed Elgharib, Hans-Peter Seidel, Patrick Pérez, Michael Zollhofer, and Christian Theobalt. Fml: Face model learning from videos. In IEEE Conf. Comput. Vis. Pattern Recog., pages 10812-10822, 2019. 1 + +[45] Justus Thies, Michael Zollhofer, Marc Stamminger, Christian Theobalt, and Matthias Nießner. Face2face: Real-time face capture and reenactment of rgb videos. In IEEE Conf. Comput. Vis. Pattern Recog., pages 2387-2395, 2016. 1 +[46] Luan Tran, Feng Liu, and Xiaoming Liu. Towards high-fidelity nonlinear 3D face morphable model. In IEEE Conf. Comput. Vis. Pattern Recog., pages 1126-1135, 2019. 4 +[47] Luan Tran and Xiaoming Liu. On learning 3d face morphable model from in-the-wild images. IEEE Trans. Pattern Anal. Mach. Intell., 2019. 3 +[48] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Instance normalization: The missing ingredient for fast stylization. arXiv preprint arXiv:1607.08022, 2016. 5 +[49] Shih-En Wei, Jason Saragih, Tomas Simon, Adam W Harley, Stephen Lombardi, Michal Perdoch, Alexander Hyes, Dawei Wang, Hernan Badino, and Yaser Sheikh. VR facial animation via multiview image translation. ACM Trans. Graph., 38(4):1-16, 2019. 2, 3, 5, 6, 7, 8 +[50] Yuxin Wu and Kaiming He. Group normalization. In Eur. Conf. Comput. Vis., pages 3-19, 2018. 6 +[51] Bing Xu, Naiyan Wang, Tianqi Chen, and Mu Li. Empirical evaluation of rectified activations in convolutional network. arXiv preprint arXiv:1505.00853, 2015. 5 +[52] Wenbin Zhu, HsiangTao Wu, Zeyu Chen, Noranart Vesdapunt, and Baoyuan Wang. Reda: Reinforced differentiable attribute for 3d face reconstruction. In IEEE Conf. Comput. Vis. Pattern Recog., pages 4958-4967, 2020. 2, 4 \ No newline at end of file diff --git a/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/images.zip b/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9f862410179b03197eb2efffd7e1c6bf6321c736 --- /dev/null +++ b/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d3e116f549432940762072d4944eb52bf803ef89b22966892c95b591f6c5b50 +size 775251 diff --git a/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/layout.json b/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8b056245b1c24c3c7db47b0348d9ab9214a85ae0 --- /dev/null +++ b/robustegocentricphotorealisticfacialexpressiontransferforvirtualreality/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:493ee57f67ce8b9275a785c7840de2d47fd0b7d346b6753e4b4b254ecfadee6f +size 469002 diff --git a/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/5c9db06e-edbb-45b3-847b-7b73036c6d20_content_list.json b/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/5c9db06e-edbb-45b3-847b-7b73036c6d20_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a9b5e280f331f536062b423a9bda9e943147c92c --- /dev/null +++ b/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/5c9db06e-edbb-45b3-847b-7b73036c6d20_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7044c6e0f65392c4fdf4da535570f8da18810302494179b20763f6dc29e0d7b +size 74342 diff --git a/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/5c9db06e-edbb-45b3-847b-7b73036c6d20_model.json b/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/5c9db06e-edbb-45b3-847b-7b73036c6d20_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9aa07d692ad1c564a25955623596a41144eebc25 --- /dev/null +++ b/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/5c9db06e-edbb-45b3-847b-7b73036c6d20_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0b55bcad8c349333c0aed867a3f5bc5b7739e72effde3a1324231719a91abd4 +size 91221 diff --git a/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/5c9db06e-edbb-45b3-847b-7b73036c6d20_origin.pdf b/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/5c9db06e-edbb-45b3-847b-7b73036c6d20_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bee6490f0b15402573b237b9c923bef819077cee --- /dev/null +++ b/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/5c9db06e-edbb-45b3-847b-7b73036c6d20_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:618071d9ad383a744fb4fa4b944d9f7bd91dd60fe5bc7df3210f0a77b6dd4981 +size 4020794 diff --git a/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/full.md b/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/full.md new file mode 100644 index 0000000000000000000000000000000000000000..cff16ac8c2a2f9ad91acbc4792125b53b000cb08 --- /dev/null +++ b/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/full.md @@ -0,0 +1,363 @@ +# Robust Equivariant Imaging: a fully unsupervised framework for learning to image from noisy and partial measurements + +Dongdong Chen* +School of Engineering +University of Edinburgh + +Julián Tachella* +School of Engineering +University of Edinburgh + +Mike E. Davies +School of Engineering +University of Edinburgh + +# Abstract + +Deep networks provide state-of-the-art performance in multiple imaging inverse problems ranging from medical imaging to computational photography. However, most existing networks are trained with clean signals which are often hard or impossible to obtain. Equivariant imaging (EI) is a recent self-supervised learning framework that exploits the group invariance present in signal distributions to learn a reconstruction function from partial measurement data alone. While EI results are impressive, its performance degrades with increasing noise. In this paper, we propose a Robust Equivariant Imaging (REI) framework which can learn to image from noisy partial measurements alone. The proposed method uses Stein's Unbiased Risk Estimator (SURE) to obtain a fully unsupervised training loss that is robust to noise. We show that REI leads to considerable performance gains on linear and nonlinear inverse problems, thereby paving the way for robust unsupervised imaging with deep networks. Code is available at https://github.com/edongdongchen/REI. + +# 1. Introduction + +Inverse problems play a fundamental role in computer vision and signal processing. Applications such as computed tomography (CT), magnetic resonance imaging (MRI), super-resolution and image inpainting have been extensively explored. The goal in an inverse problem is to reconstruct a signal $x \in \mathbb{R}^n$ from measurements $y \in \mathbb{R}^m$ , that is inverting the forward process + +$$ +y = A (x) + \epsilon , \tag {1} +$$ + +which is generally a challenging task due to the noise $\epsilon$ and the ill-conditioned or rank deficient forward operator $A$ (e.g., $m < n$ ). Traditional approaches exploit prior knowledge about $x$ (sparsity [10], total variation [36] or more re + +![](images/1684748d2bfcb8d2c069c4ba4f06133c033e1a253ba01ea8043b40917db9a57c.jpg) +Figure 1. REI vs EI: EI is not robust to noise and the performance degrades with increasing noise. From top to bottom: reconstructions of EI, supervised (Sup) baseline, and the proposed REI on $4 \times$ accelerated MRI with Gaussian noise level $\sigma = 0.01, 0.1, 0.2$ . PSNR values are shown in the top right corner of the images. + +cently the deep image prior [39]) to regularize the reconstructions. A different approach is taken by more recent end-to-end learning solutions [17] which aim to learn the inverse mapping directly from $(x,y)$ pairs. However, in many inverse problems, it is expensive or impossible to obtain clean signals $x$ , and only noisy measurement data $y$ are available for training. + +Without any assumptions on the signal distribution, it is fundamentally impossible to learn the reconstruction mapping from partial measurements alone, as there are infinitely many inverses for each observed measurement $y$ [4, 10]. Some unsupervised methods alleviate this limitation by us + +ing multiple forward operators [1, 9, 32], however this setting is not often met in practice. Recently, the EI framework [4] showed that learning from partial measurements $y$ is possible if the underlying signal set is invariant to transformations, such as shifts or rotations. The EI strategy offers an elegant way to learn the model in a self-supervised fashion, as most natural signals present certain invariances (e.g., invariance to translations and rotations in images). EI was shown to achieve similar performance to supervised methods on a number of noiseless image reconstruction tasks such as sparse-view CT and image inpainting. However, as shown in Figure 1, EI's performance degrades rapidly in the presence of measurement noise. + +In this paper, we propose a novel robust EI (REI) framework which can learn from only noisy measurements data. In particular, we use Stein's Unbiased Risk Estimator (SURE) [38] to derive an unsupervised loss that takes into account the noise present in the measurements. The proposed learning method is architecture agnostic and can handle a wide range of different noise models, including Gaussian noise, Poisson noise and mixed Poisson-Gaussian noise. We experimentally show that our REI method outperforms the vanilla EI for all noise levels in 3 inverse problems: sparse-view CT, accelerated MRI and image inpainting. In summary, our contributions are as follows: + +1. We present a new end-to-end unsupervised learning framework for training deep networks to solve imaging problems from noisy partial measurements alone. +2. Our REI learning framework can handle a wide range of the most frequently encountered noise models in practice, including: Gaussian noise, Poisson noise, and mixed Gaussian-Poisson noise. +3. We evaluate the proposed method on accelerated MRI, image inpainting, and a nonlinear imaging model for sparse-view CT, showing substantial improvements over vanilla EI in the presence of noise and approaching the quality of reconstructions trained with ground truth data using supervised learning. + +# 2. Background + +We begin with some basic definitions. Let $A: \mathbb{R}^n \to \mathbb{R}^m$ be a (possibly nonlinear) smooth measurement operator with constant rank $m < n$ . For a given measurement vector $y \in \mathbb{R}^m$ , the set of feasible solutions $A^{-1}(y) = \{x \in \mathbb{R}^n | A(x) = y\}$ is a submanifold of $\mathbb{R}^n$ of dimension $n - m$ [23, Chapter 4]. + +# 2.1. Learning to Solve Inverse Problems + +Modern learning-based approaches learn a reconstruction function $f_{\theta}:\mathbb{R}^{m}\to \mathbb{R}^{n}$ which maps the observed measurements $y$ to the reconstructed signal $x$ . The function + +![](images/09d473c87ee143d0734788734f9c4c158a0c5bc45baf4fd79e2c379385256afe.jpg) +Figure 2. Equivariant imaging systems. If the set of signals is invariant to a certain set of transformations, the composition of imaging operator $A$ with the reconstruction function $f_{\theta}$ should be equivariant to these transformations. + +is generally parameterized by a convolutional network and trained using $N$ pairs of measurements and associated reconstructions $\{(y_i, x_i)\}_{i=1,\dots,N}$ . Learning only with partial measurements $y_i$ is impossible without any further assumptions [4, 10] as $f_\theta(y)$ can output any of the $x \in A^{-1}(y)$ and still perfectly fit the training set. + +Equivariant Imaging (EI) Recently, the EI framework [4] showed that learning with only measurement data $y_{i}$ is possible if the signal set is assumed to be group invariant. That is, the signal set $\mathcal{X} \subseteq \mathbb{R}^n$ is invariant to a group of transformations (e.g., shifts, rotations, etc.) $\{T_g\}_{g=1,\ldots,|\mathcal{G}|}$ if for all $x \in \mathcal{X}$ , $T_g x$ also belongs to $\mathcal{X}$ for all transformations $g = 1,\ldots,|\mathcal{G}|$ . Assuming that the transformation matrices are unitary1 and there is no noise affecting the measurements, for all group elements $g = 1,\ldots,|\mathcal{G}|$ , we have that + +$$ +y = A (x) = A \left(T _ {g} T _ {g} ^ {\top} x\right) = A _ {g} (\tilde {x}) \tag {2} +$$ + +where $A_{g} = A\circ T_{g}$ and both $x$ and $\tilde{x} = T_g^\top x$ belong to the signal set $\mathcal{X}$ due to the invariance property. Thus, the invariance property gives access to multiple virtual operators $\{A_g\}_{g = 1,\ldots ,|\mathcal{G}|}$ . For a given measurement $y$ , each operator $A_{g}$ might have a different submanifold of possible inverses $A_{g}^{-1}(y)$ . Thus, it is feasible to learn $f_{\theta}$ from only measurements if the intersection of these submanifolds $\bigcap_{g}A_{g}^{-1}(y)$ contains a single signal $x$ . + +The invariance property also tells us that the composition $f_{\theta} \circ A$ should be equivariant to the transformations (see Figure 2): + +$$ +T _ {g} f _ {\theta} (A (x)) = f _ {\theta} (A \left(T _ {g} x\right)) \tag {3} +$$ + +for $g = 1,\dots ,|\mathcal{G}|$ . To exploit this idea the EI training strategy enforces both measurement consistency $A(f_{\theta}(y)) = y$ and the equivariance condition in (3) using a dataset of measurements $\{y_i\}_{i = 1,\ldots ,N}$ . The reconstruction function $f_{\theta}$ is then learned by minimizing the following loss: + +$$ +\mathcal {L} _ {\mathrm {E I}} (\theta) = \mathcal {L} _ {\mathrm {M C}} (\theta) + \alpha \mathcal {L} _ {\mathrm {E Q}} (\theta), \tag {4} +$$ + +with + +$$ +\mathcal {L} _ {\mathrm {M C}} (\theta) = \sum_ {i = 1} ^ {N} \frac {1}{m} \| y _ {i} - A \left(f _ {\theta} \left(y _ {i}\right)\right) \| ^ {2}, \tag {5} +$$ + +$$ +\mathcal {L} _ {\mathrm {E Q}} (\theta) = \sum_ {i = 1} ^ {N} \sum_ {g = 1} ^ {| \mathcal {G} |} \frac {1}{| \mathcal {G} | n} \| T _ {g} f _ {\theta} (y _ {i}) - f _ {\theta} \left(A \left(T _ {g} f _ {\theta} (y _ {i})\right)\right) \| ^ {2} \tag {6} +$$ + +where the first term (5) enforces measurement consistency (MC) and the second term (6) enforces system equivariance, and $\alpha$ is a trade-off parameter. + +While EI proved to be an efficient self-supervised learning method in noiseless settings [4], its performance degrades rapidly in the presence of noise, as shown in Figure 1, hindering its use in noisy inverse problems. + +# 2.2. Self-supervised denoising via SURE + +In most real-world settings, observed measurements are corrupted by noise. For example, measurements can contain Gaussian noise, that is + +$$ +y \mid u \sim \mathcal {N} (u, I \sigma^ {2}), \tag {7} +$$ + +where $u$ denotes the clean measurements, $\sigma$ is the standard deviation of the noise and $I$ denotes the identity matrix. A denoiser network $h_\theta$ that maps $y \mapsto u$ is generally trained with a dataset of noisy and clean pairs $(y, u)$ via the supervised loss + +$$ +\mathcal {L} _ {\mathrm {M S E}} (\theta) = \frac {1}{m} \sum_ {i = 1} ^ {N} \| y _ {i} - h _ {\theta} (u _ {i}) \| _ {2} ^ {2}. \tag {8} +$$ + +However, in practice sometimes only the noisy observations $y_{i}$ are available. In settings where the noise distribution is Gaussian, it is possible to bypass the need of clean training data with a SURE-based loss [38] + +$$ +\mathcal {L} _ {\text {S U R E}} (\theta) = \sum_ {i = 1} ^ {N} \frac {1}{m} \| y _ {i} - h _ {\theta} (y _ {i}) \| ^ {2} - \sigma^ {2} + \frac {2 \sigma^ {2}}{m} \nabla \cdot h _ {\theta} (y _ {i}) \tag {9} +$$ + +where $\nabla \cdot h_{\theta}(y) = \sum_{j=1}^{m} \frac{\partial h_{\theta,j}(y)}{\partial y_j}$ is the divergence of the function $h_{\theta}$ with respect to the noisy input $y$ . The first two terms in (9) penalize the error between the noisy observations and denoised ones (bias of the denoiser), whereas the last term penalizes the variance of the denoiser. Crucially, the SURE loss is an unbiased estimator of the supervised loss: + +Theorem 1 [38] Let $h_\theta : \mathbb{R}^m \to \mathbb{R}^m$ be a (weakly) differentiable real-valued function such that $\forall j = 1,2,\dots,m$ , $\mathbb{E}_\epsilon \{|\partial h_j(y) / \partial y_j|\} < -\infty$ . Then, the SURE loss is an unbiased estimator of the supervised mean squared loss, that is + +$$ +\mathbb {E} _ {y} \left\{\mathcal {L} _ {\text {S U R E}} (\theta) \right\} = \mathbb {E} _ {y, u} \left\{\mathcal {L} _ {\text {M S E}} (\theta) \right\} \tag {10} +$$ + +The SURE framework has been generalized by a number of authors, [8, 25, 34] beyond simple additive Gaussian noise, including Poisson and mixed Poisson Gaussian noise, resulting in different loss expressions depending on the noise type. In each case, however, there is always the need to calculate the divergence of the denoiser function (c.f. (9)) which may not have a simple analytic form, e.g., for deep networks. To alleviate this limitation, Ramani et al. [33] proposed a Monte Carlo method to estimate the divergence which only requires one additional evaluation of $h_{\theta}$ : + +Theorem 2 [33] Let $b$ be a zero-mean i.i.d. random vector with unit variance and bounded higher order moments. Then + +$$ +\nabla \cdot h _ {\theta} (y) = \lim _ {\tau \rightarrow 0} \mathbb {E} _ {b} \left\{\frac {1}{\tau} b ^ {\top} \left(h _ {\theta} (y + \tau b) - h _ {\theta} (y)\right)\right\} \tag {11} +$$ + +provided that $h_{\theta}(y)$ admits a well-defined second-order Taylor expansion. If not, this is still valid in the weak sense provided that $h_{\theta}(y)$ is tempered. + +Thus, the divergence term can be approximated by sampling a single i.i.d. vector, e.g., $b \sim \mathcal{N}(0,1)$ , and fixing a small positive value $\tau$ : + +$$ +\nabla \cdot h _ {\theta} (y) \approx \frac {1}{\tau} b ^ {\top} \left(h _ {\theta} (y + \tau b) - h _ {\theta} (y)\right). \tag {12} +$$ + +Incorporating this expression into the associated SURE loss has been shown to yield accurate unbiased estimates may not have a simple analytic form MSE for many various denoising methods $h_{\theta}(y)$ [33]. Furthermore, combining the SURE loss (9) with a parameterized denoiser enables unsupervised learning via minimization of this proxy for MSE without access to ground truth signals. + +Recently, it has become popular to use the SURE loss for unsupervised training of denoising networks [37, 42], and to learn solutions to compressed sensing problems where reconstruction can be cast as an iterative sequence of denoising steps, e.g., [12, 28-30]. However, as explained in Sec. 2.1, learning from measurement alone is not possible without further assumptions. We therefore consider next how to exploit SURE within the EI framework. + +# 3. Robust Equivariant Imaging + +Our aim is to develop a Robust Equivariant Imaging (REI) framework to learn the reconstruction function $f_{\theta}: y \to x$ in a fully unsupervised manner from only noisy partial measurement data $\{y\}_{i=1,\dots,N}$ in inverse problems whose acquisition models are rank deficient (e.g., with a non-trivial nullspace $\mathcal{N}_A$ when $A$ is linear). We assume the following generative model: + +$$ +y \mid u \sim q _ {u} (y), \quad u = A (x) \tag {13} +$$ + +![](images/dfdd8a1c8eeb941511220b869531400b1e209d96995265e107c8ee84a0903798.jpg) +Figure 3. REI training strategy. $x^{(1)}$ represents the estimated image, while $x^{(2)}$ and $x^{(3)}$ represent $T_{g}x^{(1)}$ and the estimate of $x^{(2)}$ from the (noisy) measurements $\tilde{y} = A(x^{(2)})$ respectively. + +where $q_{u}(y)$ is the noise distribution and $x\sim p(x)$ , the unknown signal distribution, is supported on a signal set $\mathcal{X}$ which is assumed to be invariant to the transformations $\{T_g\}_{g = 1,\dots ,|\mathcal{G}|}$ . + +The REI model replaces the two loss terms in (4) with noise-robust counterparts: + +$$ +\mathcal {L} _ {\mathrm {R E I}} (\theta) = \mathcal {L} _ {\mathrm {S U R E}} (\theta) + \alpha \mathcal {L} _ {\mathrm {R Q}} (\theta) \tag {14} +$$ + +The right hand term, presented in Section 3.1, aims to enforce equivariance of the imaging system $f_{\theta} \circ A$ taking into account that the input to $f_{\theta}$ should be noisy. The left hand term is a SURE-based approximation of the unknown clean measurement consistency loss in (4), which depends on the noise model and it is presented in Section 3.2. The network can be trained in an end-to-end fashion using stochastic optimization [19], see Figure 3. + +The proposed unsupervised training framework is agnostic of the network architecture used for $f_{\theta}$ . Thus, in principle, REI can be used to train any existing model in an unsupervised way. In our experiments, we use a trainable neural network $f_{\theta} = G_{\theta} \circ A^{\dagger}$ , where $G_{\theta}: \mathbb{R}^{n} \to \mathbb{R}^{n}$ is a neural network and $A^{\dagger}: \mathbb{R}^{m} \to \mathbb{R}^{n}$ is any (fixed) suitable backprojection. + +# 3.1. Enforcing equivariance with noisy data + +Following [4], we wish to enforce that $f_{\theta} \circ A$ is equivariant to transformations. We adapt the equivariant loss in (6) to handle noisy measurements: + +$$ +\mathcal {L} _ {\mathrm {R E Q}} (\theta) = \sum_ {i = 1} ^ {N} \sum_ {g = 1} ^ {| \mathcal {G} |} \frac {1}{| \mathcal {G} | n} \| T _ {g} f _ {\theta} (y _ {i}) - f _ {\theta} (\tilde {y} _ {i})) \| ^ {2} \tag {15} +$$ + +where $\tilde{y}_i$ is sampled from the distribution $\tilde{y}_i\sim q_{\tilde{u}_i}$ with underlying measurement $\tilde{u}_i = A(T_gf_\theta (y_i))$ . The sampled measurements $\tilde{y}_i$ can be interpreted as noisy measurements obtained via the virtual operator $A\circ T_{g}$ . In the absence of noise, $\mathcal{L}_{\mathrm{REQ}}(\theta)$ is equivalent to the equivariant loss in (6). + +# 3.2. SURE-based measurement consistency + +In this work, while the methodology is more general, we consider 3 specific noise models $q_{u}(y)$ which appear + +often in practice: Gaussian, Poisson and mixed Poisson-Gaussian. In each case, we develop a noise-specific measurement consistency SURE term $\mathcal{L}_{\mathrm{SURE}}(\theta)$ which is an unbiased estimator of the unknown clean measurement consistency loss. That is we develop a SURE estimate for the denoising function $A\circ f_{\theta}$ that denoises the measurements: + +$$ +\mathbb {E} _ {y} \left\{\mathcal {L} _ {\text {S U R E}} (\theta) \right\} = \mathbb {E} _ {y, u} \left\{\sum_ {i = 1} ^ {N} \frac {1}{m} \| u _ {i} - A \left(f _ {\theta} \left(y _ {i}\right)\right) \| ^ {2} \right\}. \tag {16} +$$ + +A detailed derivation of all the formulas is included in the supplementary material (SM). + +Gaussian noise We first consider the standard Gaussian noise model, that is + +$$ +y \sim \mathcal {N} (u, \sigma^ {2} I) \quad \text {w i t h} \quad u = A (x). \tag {17} +$$ + +Following Sec. 2.2, in this case we have + +$$ +\begin{array}{l} \mathcal {L} _ {\text {S U R E}} (\theta) = \sum_ {i = 1} ^ {N} \frac {1}{m} \| y _ {i} - A \left(f _ {\theta} \left(y _ {i}\right)\right) \| _ {2} ^ {2} - \sigma^ {2} \tag {18} \\ + \frac {2 \sigma^ {2}}{m \tau} b _ {i} ^ {\top} (A (f _ {\theta} (y _ {i} + \tau b _ {i})) - A (f _ {\theta} (y _ {i}))) \\ \end{array} +$$ + +where $b_{i}\sim \mathcal{N}(0,I)$ and $\tau$ is a small positive number. + +Poisson noise In various imaging settings such as low-photon imaging, the observed measurements follow a Poisson distribution. This noise is modeled as: + +$$ +y = \gamma z \quad \text {w i t h} \quad z \sim \operatorname {P o i s s o n} \left(\frac {u}{\gamma}\right), \quad u = A (x). \tag {19} +$$ + +where $\gamma > 0$ is the gain of the acquisition process which controls the noise level. In this case, we have + +$$ +\begin{array}{l} \mathcal {L} _ {\text {S U R E}} (\theta) = \frac {1}{m} \sum_ {i = 1} ^ {N} \| y _ {i} - A \left(f _ {\theta} \left(y _ {i}\right)\right) \| _ {2} ^ {2} - \gamma 1 ^ {\top} y _ {i} \tag {20} \\ + \frac {2 \gamma}{\tau} \left(b _ {i} \odot y _ {i}\right) ^ {\top} \left(A \left(f _ {\theta} \left(y _ {i} + \tau b _ {i}\right)\right) - A \left(f _ {\theta} \left(y _ {i}\right)\right)\right) \\ \end{array} +$$ + +where here we select $b_{i}$ to be a Bernoulli random variable [22] taking values of $-1$ and $1$ each with a probability of $0.5$ , $\tau$ is a small positive number, and $\odot$ is an element-wise multiplication. + +Mixed Gaussian-Poisson (MPG) model The Gaussian and Poisson noise models usually do not individually account for the various phenomena involved with real image acquisition processes in inverse problems such as fluorescence microscopy and X-ray computed tomography + +(CT) [22]. The noise in these inverse problems is better captured by a mixed Poisson-Gaussian noise model [16, 22]: + +$$ +y = \gamma z + \epsilon \quad \text {w i t h} \quad \left\{ \begin{array}{l} u = A (x) \\ z \sim \operatorname {P o i s s o n} \left(\frac {u}{\gamma}\right) \\ \epsilon \sim \mathcal {N} \left(0, \sigma^ {2} I\right) \end{array} . \right. \tag {21} +$$ + +The Gaussian model is recovered as $\gamma \rightarrow 0$ whereas the Poisson model is obtained by setting $\sigma = 0$ . + +Extending the pioneering work in [22, 25], we derive the unbiased risk estimator of the MSE of clean measurement consistency for the MPG noise model: + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {S U R E}} (\theta) = \sum_ {i = 1} ^ {N} \frac {1}{m} \| y _ {i} - A (f _ {\theta} (y _ {i})) \| _ {2} ^ {2} - \gamma 1 ^ {\top} y _ {i} - \sigma^ {2} \\ + \frac {2}{\tau} \left(b _ {i} \odot \left(\gamma y _ {i} + \sigma^ {2} I\right)\right) ^ {\top} \left(A \left(f _ {\theta} \left(y _ {i} + \tau b _ {i}\right)\right) - A \left(f _ {\theta} \left(y _ {i}\right)\right)\right) \\ + \frac {2 \gamma \sigma^ {2}}{\tau} c _ {i} ^ {\top} (A (f _ {\theta} (y _ {i} + \tau c _ {i})) + A (f _ {\theta} (y _ {i} - \tau c _ {i})) \dots \\ - 2 A \left(f _ {\theta} \left(y _ {i}\right)\right)) \tag {22} \\ \end{array} +$$ + +where $b_{i} \sim \mathcal{N}(0, I)$ , $c_{i}$ are i.i.d. random variables that follow a Bernoulli distribution taking values of $-1$ and $1$ each with a probability of $0.5$ , $\tau$ is a small positive number. + +# 4. Experiments + +We evaluated the REI framework in 3 inverse problems: accelerated MRI, image inpainting and a (nonlinear) sparse view CT problem. More details are presented in the SM. + +# 4.1. Setup and Implementation + +The forward operator $A$ in all the evaluated tasks is known and is dimension reducing ( $m < n$ ). We considered different noise models for each task. Throughout the experiments, we follow [4] and use a residual U-Net [35] to build $G_{\theta}$ . We compare our new learning method (REI) with three different learning strategies: vanilla EI given by the loss in (4), an oracle REI trained with noiseless measurement consistency (REIoracle) that replaces the SURE loss by the true clean measurement consistency loss, and supervised learning (Sup) [17], which minimizes $\sum_{i=1}^{N} \frac{1}{n} \| x_i - f_{\theta}(y_i) \|^2_2$ using clean signal and noisy measurements pairs. The oracle REI provides us with a way to evaluate the separate contributions of the REG and SURE losses. We use the same neural network architecture for all learning methods. For a fair comparison with EI and REI, no data augmentation of is used for supervised learning. We emphasize that our goal here is not to achieve state-of-the-art performance, but to show that unsupervised learning is possible on different inverse problems with noise. The choice of architecture is somewhat orthogonal to this goal. + +All methods are implemented in PyTorch and optimized by Adam [19]. A full ablation study, based on the MRI experiment below, and across all the possible loss terms: EI, REI, $\mathrm{REI}_{\mathrm{oracle}}$ , MC, SURE and combinations thereof is presented in the SM. This shows that replacement of REI or SURE with other losses has a negative impact on performance and fails to track the performance of supervised learning. + +# 4.2. Accelerated MRI + +MRI produces images of biological tissues by sampling the Fourier transform ( $k$ -space) of the image. In accelerated MRI, the goal is to recover high quality MR images from sparsely sampled $k$ -space data to reduce the acquisition time. The forward operator is $A \coloneqq S_{\omega} \circ \mathcal{F}$ where $\mathcal{F}$ is the 2D Fourier transform and $S_{\omega}$ is a binary matrix, whose ones correspond to frequencies in $\omega$ that are measured. The pseudo-inverse $A^{\dagger} = \mathcal{F}^{H} \circ S_{\omega}$ is the masked inverse Fourier transform. This problem has been extensively studied in the context of compressed sensing [26] and supervised deep learning [13, 14, 17]. + +The primary sources of noise in MR are electronic, and dielectric and inductive coupling to the conducting solution inside the body [2], and is usually modelled as Gaussian [11]. We therefore train the REI models using (18) to implement the SURE loss in (14). In this task, we exploit the invariance of MRI images to rotations, and use rotations of integer degree $(|\mathcal{G}| = 360)$ , while $\alpha$ is set to one (see SM for the effect of varying $\alpha$ ). + +The MRI data used were obtained from NYU fastMRI Initiative [40]. We trained and tested on a subset of the single-coil measurements at $4 \times$ acceleration. There are 973 samples in the dataset, the first 900 were used for training and the last 73 were used for testing. Each image is of size $320 \times 320$ pixels. In all tests, we use complex-valued data treating the real and imaginary parts of the images as separate channels. For the purpose of visualization, we display only the magnitude images. + +The reconstruction results are reported in Table 1 and Figures 4-5. Note that EI only performs well for small noise levels, e.g., $\sigma \leq 0.05$ , and degrades rapidly when the noise level is increased becoming almost as bad as the linear pseudo-inverse reconstruction $A^\dagger(y)$ for high noise levels. In comparison, REI enjoys a 3.6 dB gain at $\sigma = 0.1$ which rises to a 7 dB improvement with respect to EI when $\sigma = 0.2$ . While, unsurprisingly, supervised learning always enjoys the slowest performance degradation as $\sigma$ increases due to its access to ground truth training data, the performance of REI stays within 1.5 to 2.5 dB of that of supervised learning over the full range of noise levels. The oracle REI performance lies close to that for REI, suggesting that the SURE loss (18) is doing a reasonable job of approximating the (oracle) clean measurement consistency loss (see SM for the full ablation study). Overall, these results sug + +![](images/1f2fe9814e9562723a00905e711a9369e91316d4d071ec7435102552ffa8543a.jpg) +Figure 4. MRI image reconstruction on the test data with Gaussian noise (from top to bottom: $\sigma = 0.01, 0.1, 0.2$ ) and $4\times$ acceleration. PSNR values are shown in the top right corner of the images. + +![](images/abee7b333177ec551e235e95d9bb7ce5ba0a310ce21f36256515babca98464dd.jpg) + +gest that REI provides an unsupervised learning framework that is robust to noise with nearly as good performance as supervised learning. + +# 4.3. Inpainting + +In image inpainting problems, the goal is to recover a complete image from a subset of noisy pixels. Inpainting can be used for example in imaging systems with hot or dead pixels. We consider the Poisson noise model in (19) to generate the noisy measurements. We therefore use (20) to implement (14) and to train REI models. + +In this task, the forward model is described as $y = a \odot x$ where $a$ is a binary mask, $\odot$ is the Hadamard product, and the associated operator and pseudo-inverse are $A = \mathrm{diag}(a)$ and $A = A^{\dagger}$ . We consider random masks which drop 30% + +
σA†(y)EIREIREIoracleSup
025.8 ± 2.731.0 ± 2.031.0 ± 2.031.0 ± 2.032.5 ± 2.1
0.0125.7 ± 2.730.6 ± 1.830.8 ± 2.030.8 ± 2.032.2 ± 2.0
0.0524.7 ± 2.127.6 ± 1.329.0 ± 1.829.6 ± 1.930.8 ± 1.8
0.122.6 ± 1.424.1 ± 0.927.7 ± 2.028.9 ± 1.729.8 ± 1.8
0.218.7 ± 0.719.7 ± 0.726.9 ± 2.027.7 ± 1.728.8 ± 1.7
+ +Table 1. PSNR of $4\times$ accelerated MRI image reconstruction for different methods using noisy test measurements. + +of pixel measurements. We then train our REI models by applying random (horizontal and vertical) shift transformations with $\alpha = 1$ . We evaluate the reconstruction performance on the Urban100 [15] natural image dataset. For each image, we cropped a $512 \times 512$ pixel area at the center and then resized it to $256 \times 256$ for the ground truth image. The first 90 images are used for training while the last 10 measurements are used for testing. + +The results in Table 2 and Figure 6 show that even for small values of $\gamma$ , EI struggles to compete with REI and the performance rapidly decreases when the noise level $\gamma$ is increased. In contrast, REI performs well across all noise levels, beating EI by more than $8\mathrm{dB}$ at high noise levels, and within $1\mathrm{dB}$ of the fully supervised model, demonstrating the effectiveness of REI for the Poisson noise model. + +![](images/cbff8ad688a3cf8a73bb4d71ca7af11f2c88f50aea0d8e9a2ced336ab942c0f3.jpg) +Figure 6. Inpainting reconstructions on test images with Poisson noise (from top to bottom: $\gamma = 0.01, 0.05, 0.1$ ) and $30\%$ mask rate. PSNR values are shown in the top right corner of the images. + +![](images/1687f9a491e042a828aef183fcb2f5e5522ffc75e52d7b5ec1c9e2f7e929df20.jpg) +Figure 7. CT image reconstruction (50 views) on the test observations with mixed Poisson-Gaussian noise, $I_0 = 10^5$ , $\sigma = 30$ , $\gamma = 1$ . PSNR values are shown in the top right corner of the images. + +# 4.4. Sparse-view CT + +Our final experiment provides an initial demonstration of robust equivariant imaging for a nonlinear inverse problem. Sparse-view CT can be described by a nonlinear forward model $A(x) = I_0e^{-\mathrm{radon}(x)}$ , where radon denotes a sparse-view Radon transformation and $I_0$ denotes the X-ray source intensity. Quantum and electronic noise are two major noise sources in X-ray CT scanners [7] and for nor + +mal clinical exposures, measurements $y$ are often modeled as the sum of a Poisson distribution representing photon-counting statistics and an independent Gaussian distribution representing additive electronic noise, i.e., $y = z + \epsilon$ where $z\sim \mathrm{Poisson}(A(x))$ and $\epsilon \sim \mathcal{N}(0,\sigma^2 I)$ + +Here, we exploit the invariance of CT images to rotations and consider rotations of multiples of 1 degree $(|\mathcal{G}| = 360)$ . For $A^{\dagger}$ we use the filtered backprojection (FBP), iradon, + +
γA†(y)EIREIREIoracleSup
0.015.7 ± 1.518.9 ± 1.021.7 ± 1.322.0 ± 1.322.3 ± 1.1
0.055.1 ± 1.411.8 ± 3.018.2 ± 1.218.3 ± 0.919.6 ± 1.2
0.14.4 ± 1.39.8 ± 0.816.6 ± 1.317.3 ± 1.318.2 ± 1.2
+ +of the logarithm of the measurements, $\log (I_0 / y)$ . The reconstruction function is thus defined as $f_{\theta}(y) = G_{\theta}\circ$ iradon $\circ \log (I_0 / y)$ . We therefore use the MPG model, (22) to implement (14) and train the REI models. + +We use the CT100 clinical dataset [5], which comprises 100 real in-vivo CT images collected from the cancer imaging archive. The CT images were resized to $256 \times 256$ pixels. The radon function consists of 50 uniformly sampled views (angles). For the imaging noise we follow [7] and generate MPG noisy measurements with $I_0 = 10^5$ , $\sigma = 30$ and $\gamma = 1$ . We used the sinograms of the first 90 images for training and the remaining 10 for testing. In this task, we use the U-Net which is the same architecture as FBPCnet in [17]. We trained EI, REI and REIoracle with $\alpha = 10^3$ (this is much larger than in the MRI and inpainting experiments due to the scaled log, $\log (I_0 / y))^2$ using the sinograms $y$ alone while the supervised training is performed with the noisy measurements and ground truth pairs $(x,y)$ . + +A quantitative comparison is presented in Table 3. While all learning-based methods outperform the standard FBP reconstruction, REI achieves a 5 dB gain when compared with EI, and performs almost as well as the oracle $\mathrm{REI}_{\mathrm{oracle}}$ and the fully supervised baseline. Figure 7 shows examples of reconstructed images. The FBP reconstruction contains massive line artefacts and noise due to the sparse-view MPG measurements. Although EI performs better, it fails to fully remove the artefacts and noise. In contrast, REI achieves almost equivalent quality to the supervised method. A similarly performing low-dose example, with $I_0 = 10^4$ , $\sigma = 50$ , is given in the SM. + +Table 2. PSNR of pixelwise image inpainting reconstruction for different methods using noisy test measurements. + +
FBPEIREIREIORacleSup
CT22.8 ± 0.529.2 ± 0.634.0 ± 1.134.0 ± 1.234.4 ± 1.1
+ +Table 3. Reconstruction performance (PSNR) of sparse-view CT task for different methods on the test noisy measurements. + +# 5. Discussion + +One might naturally ask whether one could hard wire the equivariance into the neural network. Indeed, there has been considerable efforts recently in designing such architectures, mostly in the context of classification [6, 21, 27]. + +However, in equivariant imaging it is not the network that we want to be equivariant but the full acquisition-reconstruction system, $f_{\theta} \circ A$ . Celledoni et al. [3] proposed an interesting extension to design equivariant networks for inverse problems by using an unrolled network with an equivariant network substituting the proximal component. However, as noted by the authors, this approach does not guarantee full system equivariance and is restricted to supervised learning applications. In contrast, (R)EI promotes full system equivariance through the (robust) equivariant loss, thereby enabling unsupervised learning. + +Training using SURE requires knowledge of the noise characteristics. While we evaluated REI on the Gaussian, Poisson and MPG models, SURE can handle many other models including non-exponential ones, see [34] for a detailed list. SURE based training losses have also been used in other related works, [18,30,37,41] for unsupervised imaging/denoising, however they are only applied to inverse problems with complete measurements. Noise2Noise [24] takes a slightly different route (and only considered denoising) by using training pairs consisting of two different noisy realisations of the same signal. While this may appear to be blind to the noise characteristics, the requirement to have two distinct noisy realisations implicitly provides such information. Indeed, we emphasise that some such prior information is always required in any fully unsupervised denoising technique. + +Finally, some papers have proposed unsupervised methods for compressed sensing (with non-trivial forward operators) [12, 30]. However, these methods rely heavily on the randomness of $A$ . In contrast, REI applies a SURE-based loss for measurement consistency while exploiting equivariance to encourage a unique reconstruction from partial measurements. + +# 6. Conclusion + +In this paper, we proposed Robust Equivariant Imaging, a fully unsupervised imaging method that can effectively learn to image from only noisy partial measurements. The method only requires knowledge about the (possibly nonlinear) forward operator and the acquisition noise characteristics, which for most imaging systems are usually known. The framework is architecture agnostic, and can be used to train any existing model, and a wide range of noise models in a fully unsupervised way. + +# Acknowledgments + +This work is supported by the ERC C-SENSE project (ERCADG-2015-694888). + +# References + +[1] Ashish Bora, Eric Price, and Alexandros G Dimakis. AmbientGAN: Generative models from lossy measurements. In International Conference on Learning Representations, 2018. 2 +[2] Arturo Cardenas-Blanco, Cristian Tejos, Pablo Irarrazaval, and Ian Cameron. Noise in magnitude magnetic resonance images. Concepts in Magnetic Resonance Part A: An Educational Journal, 32(6):409-416, 2008. 5 +[3] Elena Celledoni, Matthias Joachim Ehrhardt, Christian Etmann, Brynjulf Owren, Carola-Bibiane Schonlieb, and Ferdia Sherry. Equivariant neural networks for inverse problems. Inverse Problems, 37(8):085006, 2021. 8 +[4] Dongdong Chen, Julián Tachella, and Mike E Davies. Equivariant imaging: Learning beyond the range space. In Proceedings of the International Conference on Computer Vision (ICCV), 2021. 1, 2, 3, 4, 5, 6 +[5] Kenneth Clark, Bruce Vendt, Kirk Smith, John Freymann, Justin Kirby, Paul Koppel, Stephen Moore, Stanley Phillips, David Maffitt, Michael Pringle, et al. The cancer imaging archive (TCIA): maintaining and operating a public information repository. Journal of digital imaging, 26(6):1045-1057, 2013. 8 +[6] Taco Cohen and Max Welling. Group equivariant convolutional networks. In International conference on machine learning, pages 2990-2999. PMLR, 2016. 8 +[7] Qiaoqiao Ding, Yong Long, Xiaoqun Zhang, and Jeffrey A Fessler. Statistical image reconstruction using mixed Poisson-Gaussian noise model for X-ray CT. arXiv preprint arXiv:1801.09533, 2018. 7, 8 +[8] Yonina C Eldar. Generalized SURE for exponential families: Applications to regularization. IEEE Transactions on Signal Processing, 57(2):471-481, 2008. 3 +[9] Weijie Gan, Yu Sun, Cihat Eldeniz, Jiaming Liu, Hongyu An, and Ulugbek S Kamilov. Deep image reconstruction using unregistered measurements without groundtruth. In ISBI, pages 1531-1534, 2021. 2 +[10] Sivan Gleichman and Yonina C Eldar. Blind compressed sensing. IEEE Transactions on Information Theory, 57(10):6958-6975, 2011. 1, 2 +[11] Hákön Gudbjartsson and Samuel Patz. The rician distribution of noisy MRI data. Magnetic resonance in medicine, 34(6):910-914, 1995. 5 +[12] Chunli Guo and Mike E. Davies. Near optimal compressed sensing without priors: Parametric sure approximate message passing. IEEE Transactions on Signal Processing, 63(8):2130-2141, 2015. 3, 8 +[13] Kerstin Hammernik, Teresa Klatzer, Erich Kobler, Michael P Recht, Daniel K Sodickson, Thomas Pock, and Florian Knoll. Learning a variational network for reconstruction of accelerated mri data. Magnetic resonance in medicine, 79(6):3055-3071, 2018. 5 +[14] Yoseo Han, Leonard Sunwoo, and Jong Chul Ye. k-space deep learning for accelerated mri. IEEE transactions on medical imaging, 39(2):377-386, 2019. 5 +[15] Jia-Bin Huang, Abhishek Singh, and Narendra Ahuja. Single image super-resolution from transformed self-exemplars. + +In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5197-5206, 2015. 6 +[16] Anna Jezierska, Caroline Chaux, Jean-Christophe Pesquet, and Hugues Talbot. An em approach for poisson-gaussian noise modeling. In 2011 19th European Signal Processing Conference, pages 2244–2248. IEEE, 2011. 5 +[17] Kyong Hwan Jin, Michael T McCann, Emmanuel Froustey, and Michael Unser. Deep convolutional neural network for inverse problems in imaging. IEEE Transactions on Image Processing, 26(9):4509-4522, 2017. 1, 5, 6, 8 +[18] Kwanyoung Kim, Shakarim Soltanayev, and Se Young Chun. Unsupervised training of denoisers for low-dose CT reconstruction without full-dose ground truth. IEEE Journal of Selected Topics in Signal Processing, 14(6):1112-1125, 2020. 8 +[19] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 4, 5 +[20] Imre Risi Kondor. Group theoretical methods in machine learning, volume 2. PhD Thesis, 2008. 2 +[21] Risi Kondor and Shubhendu Trivedi. On the generalization of equivariance and convolution in neural networks to the action of compact groups. In Jennifer Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 2747-2755. PMLR, 10-15 Jul 2018. 8 +[22] Yoann Le Montagner, Elsa D Angelini, and Jean-Christophe Olivo-Marin. An unbiased risk estimator for image denoising in the presence of mixed Poisson-Gaussian noise. IEEE Transactions on Image processing, 23(3):1255–1268, 2014. 4, 5 +[23] John M Lee. Introduction to smooth manifolds. In Introduction to Smooth Manifolds, pages 1-31. Springer, 2013. 2 +[24] Jaakkö Lehtinen, Jacob Munkberg, Jon Hasselgren, Samuli Laine, Tero Karras, Miika Aittala, and Timo Aila. Noise2noise: Learning image restoration without clean data. In International Conference on Machine Learning, pages 2965-2974, 2018. 8 +[25] Florian Luisier, Thierry Blu, and Michael Unser. Image denoising in mixed Poisson-Gaussian noise. IEEE Transactions on image processing, 20(3):696-708, 2011. 3, 5 +[26] Michael Lustig, David Donoho, and John M Pauly. Sparse mri: The application of compressed sensing for rapid mr imaging. Magnetic Resonance in Medicine: An Official Journal of the International Society for Magnetic Resonance in Medicine, 58(6):1182-1195, 2007. 5 +[27] Stéphane Mallat. Group invariant scattering. Communications on Pure and Applied Mathematics, 65(10):1331-1398, 2012. 8 +[28] Christopher A Metzler, Arian Maleki, and Richard G Baraniuk. From denoising to compressed sensing. IEEE Transactions on Information Theory, 62(9):5117-5144, 2016. 3 +[29] Christopher A Metzler, Ali Mousavi, and Richard G Baraniuk. Learned D-AMP: principled neural network based compressive image recovery. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pages 1770–1781, 2017. 3 + +[30] Christopher A Metzler, Ali Mousavi, Reinhard Heckel, and Richard G Baraniuk. Unsupervised learning with Stein's unbiased risk estimator. arXiv preprint arXiv:1805.10531, 2018. 3, 8 +[31] Sreyas Mohan, Zahra Kadkhodaie, Eero P. Simoncelli, and Carlos Fernandez-Granda. Robust and interpretable blind image denoising via bias-free convolutional neural networks. In ICLR, 2020. 8 +[32] Arthur Pajot, Emmanuel de Bezenac, and Patrick Gallinari. Unsupervised adversarial image reconstruction. In International Conference on Learning Representations, 2019. 2 +[33] Sathish Ramani, Thierry Blu, and Michael Unser. Monte-Carlo SURE: A black-box optimization of regularization parameters for general denoising algorithms. IEEE Transactions on image processing, 17(9):1540-1554, 2008. 3 +[34] Martin Raphan and Eero Simoncelli. Least squares estimation without priors or supervision. Neural computation, 23:374-420, 02 2011. 3, 8 +[35] 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 +[36] Leonid I Rudin, Stanley Osher, and Emad Fatemi. Nonlinear total variation based noise removal algorithms. Physica D: nonlinear phenomena, 60(1-4):259-268, 1992. 1 +[37] Shakarim Soltanayev and Se Young Chun. Training deep learning based denoisers without ground truth data. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pages 3261-3271, 2018. 3, 8 +[38] Charles M Stein. Estimation of the mean of a multivariate normal distribution. The annals of Statistics, pages 1135-1151, 1981. 2, 3 +[39] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Deep image prior. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 9446-9454, 2018. 1 +[40] Jure Zbontar, Florian Knoll, Anuroop Sriram, Tullie Murrell, Zhengnan Huang, Matthew J Muckley, Aaron Defazio, Ruben Stern, Patricia Johnson, Mary Bruno, et al. fastMRI: An open dataset and benchmarks for accelerated MRI. arXiv preprint arXiv:1811.08839, 2018. 5 +[41] Magaiya Zhussip, Shakarim Soltanayev, and Se Young Chun. Extending Stein's unbiased risk estimator to train deep denoisers with correlated pairs of noisy images. Advances in neural information processing systems, 32:1465-1475, 2019. 8 +[42] Magaiya Zhussip, Shakarim Soltanayev, and Se Young Chun. Training deep learning based image denoisers from undersampled measurements without ground truth and without image prior. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10255-10264, 2019. 3 \ No newline at end of file diff --git a/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/images.zip b/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..8aa02813bfaa571c0d50c9f65eb2c4a490a7227a --- /dev/null +++ b/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eba9ef8afd19b35c664400ca71c1875596132a83f206c40b49e56c9cd36700b8 +size 781455 diff --git a/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/layout.json b/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..fc586646807fcba65c534f24aa2b293a7655c23f --- /dev/null +++ b/robustequivariantimagingafullyunsupervisedframeworkforlearningtoimagefromnoisyandpartialmeasurements/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1161a5e8a4259ae9a3fbc85d1255bfa1f2253ff986de4ec06d2d35396e3f0a97 +size 462705 diff --git a/robustfederatedlearningwithnoisyandheterogeneousclients/8955fbe4-262c-4ed7-a4a1-482fda8ec6f7_content_list.json b/robustfederatedlearningwithnoisyandheterogeneousclients/8955fbe4-262c-4ed7-a4a1-482fda8ec6f7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a5204b84a850baa6a247316178199210d1d7369d --- /dev/null +++ b/robustfederatedlearningwithnoisyandheterogeneousclients/8955fbe4-262c-4ed7-a4a1-482fda8ec6f7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d1dbb75999bd2c247c238d364385e08fa89a5a930e828c0d0ff5c800f640cbf +size 80044 diff --git a/robustfederatedlearningwithnoisyandheterogeneousclients/8955fbe4-262c-4ed7-a4a1-482fda8ec6f7_model.json b/robustfederatedlearningwithnoisyandheterogeneousclients/8955fbe4-262c-4ed7-a4a1-482fda8ec6f7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6cc7c56df5f5be82c1aec5fc7a8eea221a90a2f4 --- /dev/null +++ b/robustfederatedlearningwithnoisyandheterogeneousclients/8955fbe4-262c-4ed7-a4a1-482fda8ec6f7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7913737d5310d043eea1adc295be2e5f2530878ed9da6b5ecff8d5e75e9b6d50 +size 100240 diff --git a/robustfederatedlearningwithnoisyandheterogeneousclients/8955fbe4-262c-4ed7-a4a1-482fda8ec6f7_origin.pdf b/robustfederatedlearningwithnoisyandheterogeneousclients/8955fbe4-262c-4ed7-a4a1-482fda8ec6f7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..485a81a8127c2f3b38c80558ca859eab09b835fc --- /dev/null +++ b/robustfederatedlearningwithnoisyandheterogeneousclients/8955fbe4-262c-4ed7-a4a1-482fda8ec6f7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13c8e80c2a61b0f896f7a3223ac5f60c411050cfc4f74c3adcfa2f3295472285 +size 768923 diff --git a/robustfederatedlearningwithnoisyandheterogeneousclients/full.md b/robustfederatedlearningwithnoisyandheterogeneousclients/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6b0985322d1911f1b1a1de5f95a64d74e2d425de --- /dev/null +++ b/robustfederatedlearningwithnoisyandheterogeneousclients/full.md @@ -0,0 +1,310 @@ +# Robust Federated Learning with Noisy and Heterogeneous Clients + +Xiwen Fang $^{1}$ , Mang Ye $^{1,2*}$ + +$^{1}$ National Engineering Research Center for Multimedia Software, Institute of Artificial Intelligence, Hubei Key Laboratory of Multimedia and Network Communication Engineering, School of Computer Science, Wuhan University, Wuhan, China $^{2}$ Hubei Luojia Laboratory, Wuhan, China https://github.com/FangXiwen/Robust_FL + +# Abstract + +Model heterogeneous federated learning is a challenging task since each client independently designs its own model. Due to the annotation difficulty and free-riding participant issue, the local client usually contains unavoidable and varying noises, which cannot be effectively addressed by existing algorithms. This paper starts the first attempt to study a new and challenging robust federated learning problem with noisy and heterogeneous clients. We present a novel solution RHFL (Robust Heterogeneous Federated Learning), which simultaneously handles the label noise and performs federated learning in a single framework. It is featured in three aspects: (1) For the communication between heterogeneous models, we directly align the models feedback by utilizing public data, which does not require additional shared global models for collaboration. (2) For internal label noise, we apply a robust noise-tolerant loss function to reduce the negative effects. (3) For challenging noisy feedback from other participants, we design a novel client confidence re-weighting scheme, which adaptively assigns corresponding weights to each client in the collaborative learning stage. Extensive experiments validate the effectiveness of our approach in reducing the negative effects of different noise rates/types under both model homogeneous and heterogeneous federated learning settings, consistently outperforming existing methods. + +# 1. Introduction + +Local clients such as mobile devices or whole organizations generally have limited private data and limited generalizability. Therefore, using all clients' private data to centralized learn a public model will greatly improve performance. However, due to the existence of data silos and data privacy, we cannot use traditional centralized learning + +![](images/e4a582f2244454aaef4db234856a92cd121c33ff8450a75b829d360397db7e49.jpg) +Figure 1. Illustration of federated learning with noisy and heterogeneous clients, where clients possess heterogeneous local models and noisy datasets with different noise rates. + +in practical applications [19]. To address these challenges, Federated Learning (FL) has been proposed by McMahan et al. [33]. Federated learning is a distributed machine learning framework that enables multiple clients to collaboratively train models with decentralized data. The clients never share private data with server ensuring basic privacy. Recently, the widely used federated learning algorithms, e.g., FedAvg [33] and FedProx [29], are based on averaging the model parameters of the participating clients. Most of these federated learning methods [44, 27, 40, 32, 8, 14] are developed based on the assumption that participating client models have the same neural architecture. + +In real-world scenarios, due to the differences in the personalized requirements [28], each client might expect to design its own model independently [17, 38, 41, 26, 13, 3, 9], resulting in the model heterogeneous federated learning problem. For example, when many healthcare organizations engage in collaborative learning without sharing private + +data, they design different models to meet different tasks and specifications, as illustrated in Fig. 1. In this scenario, institutions are often reluctant to disclose or share the details of the model design due to business purposes. Therefore, to perform federated learning with heterogeneous models, a number of heterogeneous federated learning methods have been proposed [23, 31, 30, 60, 7, 55, 6, 16]. FedMD [23] is a framework based on knowledge distillation, which is implemented through the class scores by client models on the public dataset. FedDF [31] leverage unlabeled data to perform ensemble distillation for each different model architecture. These strategies mainly rely on a unified global consensus or shared models. However, learning a global consensus has a major limitation in that the clients cannot individually adjust their learning direction to accommodate the differences among clients. Besides, building extra models will increase computational overhead, thereby affecting efficiency and effectiveness. Therefore, how to perform federated learning with heterogeneous clients without relying on a global consensus or shared models is challenging. + +In addition, the methods mentioned above mainly rely on the assumption that each client has a clean dataset, which cannot be satisfied in many practical applications. When the clients contain inevitable noisy samples, existing federated learning methods cannot eliminate the negative effect caused by label noise, suffering from a significant performance drop [25]. Since federated learning contains a large number of participating clients, the data in each participating client usually has different noisy patterns. Generally, in practical applications, the label noise is caused by the following two aspects: 1) Due to the limitation and scarcity of human expertise, the quality of labeled data will be affected by human subjective factors, which means that high-quality labeled data requires high cost and thus inevitably results in some wrong annotation. 2) In the federated learning framework, considering the user fairness issue, there may be some free-riding participants in the system who want to learn from the global model, but do not want to provide useful information. Therefore, some users are reluctant to share their real information with other users and deliberately generate some wrong labels. In order to reduce the negative impact of label noise, existing methods [12, 57, 46, 35, 42, 24, 58, 49, 53, 52] are usually developed for the image classification task with a single model. The approaches can be divided into four categories: label transition matrix estimation [39, 36, 50, 10], robust regularization [54, 2, 34], robust loss function design [43, 5, 48], and clean sample selection [11, 47, 18]. Under the federated learning framework, we expect that each class of samples will be learned sufficiently while avoiding overfitting to noisy samples. Therefore, how to reduce the negative impact of the internal label noise on the local model convergence during the local update phase is an important issue. + +Furthermore, the above mentioned two problems lead to a new challenging issue, i.e., how to reduce the negative and noisy influence from other clients while collaborative learning in the federated learning framework. Due to model heterogeneity, the participating clients will have different decision boundaries and varying noisy patterns. As a result, besides local noise, we also need to pay attention to the noise from other clients, and then it is crucial to reduce the contribution of noisy clients in the whole federated system. The existing methods for solving noise in machine learning only eliminate the negative effect of internal model label noise, but are unable to solve the noise from other clients. Therefore, it is crucial to handle the noisy feedback from other noisy clients under the federated learning framework. + +In this paper, we provide the corresponding solution RHFL (Robust Heterogeneous Federated Learning) for the robust federated learning problem with noisy and heterogeneous clients: 1) Aligning the logits output distributions in heterogeneous federated learning. In order to communicate learning in the presence of model heterogeneity, we learn the knowledge distribution of other clients by aligning models feedback on public data. This allows each client to adjust different learning directions, which does not depend on a public model for communication. 2) Local noise learning with a noise-tolerant loss function. We analyze the negative effect caused by internal model label noise. In the local learning phase, we consider symmetrically using cross-entropy loss and reverse cross-entropy loss to avoid overfitting noise samples while fully learning all classes. 3) Client confidence re-weighting for external noise. Since the label noise comes from the feedback by other clients, we propose a new weighting approach, namely Client Confidence Re-weighting (CCR), to reduce the contribution of noisy clients in federated communication. CCR models the loss decreasing pattern of the local models on private datasets for participant re-weighting. Its basic idea is to simultaneously quantifies the label quality of dataset through the loss value and the loss decreasing speed, and then adaptively assign the weight of the clean and efficient clients. The main contributions in this work are as follows: + +- We study a novel and important robust federated learning problem with noisy and heterogeneous clients. +- We propose a new loss correction approach CCR, which computes the optimal weighted combination of participating clients. CCR adaptively adjusts the contribution of each client during loss updating, reducing the contribution of noisy clients, and increasing the contribution of clean clients. +- We validate the proposed method under various settings, including both heterogeneous and homogeneous models with different noise types and noise rates. Experimental results show that RHFL consistently achieves stronger robustness than competing methods. + +# 2. Related Work + +Federated Learning. The concept of federated learning was first proposed in 2017 by McMahan et al. [33]. It is a machine learning setting that allows clients to collaboratively train models while protecting data privacy. McMahan et al. propose FedAvg, in which the client uses private data to reduce the local gradient of the local model, and the server uses the averaged model parameters to aggregate the local model. Li et al. [29] build a framework similar to FedAvg, but it can adaptively set the local calculations according to different devices and iterations. Wang et al. [44] propose to collect the weight of each layer of the client and performs one-layer matching to obtain the weight of each layer of the federated model. + +For learning with model heterogeneous clients, Li et al. [23] implement communication between models through knowledge distillation. The server collects the class scores of the public data set on each client model and calculates the average value as the updated consensus. Lin et al. [31] leverage ensemble distillation for model fusion, and it can be carried out through unlabeled data. Diao et al. [4] propose to adaptively allocate a subset of global model parameters as local model parameters according to the corresponding capabilities of the local client. Liang et al. [30] introduce an algorithm to jointly train the compact local representation and global model of the client. + +In summary, existing methods are usually developed under the assumption that all clients possess clean data without noise, dedicated to making federated learning more efficient, and preserving the privacy of user data. There is no research on mitigating the impact of noise in heterogeneous federated learning. + +Label Noise Learning. In machine learning, many methods have been proposed to handle label noise. They can be divided into four main categories: 1) Label transition matrix [39, 36, 50]. The main idea is to estimate the probability of each label class flipping to another class. Sukhbaatar et al. [39] add a noise layer to the network to make the network output match the noisy label distribution. Patrini et al. [36] design an end-to-end loss correction framework that makes recent noise estimation techniques applicable to the multi-class setting. Yao et al. [50] transform the noise into a Dirichlet-distributed space, use the dynamic label regression method iteratively infer the potential real labels, and jointly train the classifier and noise modeling. 2) Robust regularization [54, 2, 34, 22]. Robust regularization can effectively prevent the model from overfitting to noisy labels. Zhang et al. [54] propose Mixup, which trains the convex combination of pairs of samples and their labels to regularize the hybrid neural network. Arpit et al. [2] demonstrate regularization can reduce the memory speed of noise without affecting the learning of real data. Miyato et al. [34] introduce a regularization + +method based on virtual adversarial loss, and defined the adversarial direction without label information, which makes it suitable for label noise setting. 3) Robust loss function [43, 5, 59, 57]. Some methods achieve robust learning by using noise-tolerant loss functions. Rooyen et al. [43] propose a convex classification calibration loss, which is robust on symmetric label noise. Ghosh et al. [5] analyze some loss functions that are widely used in deep learning and proved that MAE is robust to noise. 4) Selecting possibly clean samples [11, 47, 18, 51]. The methods select clean samples from the noisy training dataset for learning, or re-weighting for each sample. The core idea is to reduce the attention to noisy-labeled samples in each iteration for training. Han et al. [11] propose Co-teaching, which trains two deep neural networks at the same time and selects data with potentially clean labels for cross-trains. Wei et al. [47] present JoCoR, which calculates the joint loss with Co-Regularization, and then select small loss samples to update network parameters. Jiang et al. [18] introduce MentorNet, which provides a sample weighting scheme for StudentNet, and MentorNet learns a data-driven curriculum dynamically with StudentNet. + +Previous methods for solving label noise are mainly under the centralized setting. However, in the federated setting, the server cannot directly access the private datasets of clients. In the model heterogeneous setting, different model architectures will lead to inconsistent decision boundaries and different noisy patterns. + +# 3. Robust Heterogeneous Federated Learning + +Problem Definition and Notation. Under the heterogeneous federated learning setting, we consider $K$ clients and one server. We define $\mathbb{C}$ as the collection of all clients, and $|\mathbb{C}| = K$ . Therefore, the $k$ -th client $c_k \in \mathbb{C}$ has a private dataset $D_k = \{(x_i^k, y_i^k)\}_{i=1}^{N_k}$ with $|x^k| = N_k$ . $y_i^k \in \{0, 1\}^{N_k}$ indicate the one-hot vector of the ground truth label. In addition, client $c_k$ holds a local model $\theta_k$ with different neural architecture, $f(\cdot)$ represents a network, and $f(x^k, \theta_k)$ denotes the logits output of $x^k$ calculated on $\theta_k$ . The server cannot access the clients' datasets, and it has a public dataset $D_0 = \{x_i^0\}_{i=1}^{N_0}$ , which may belong to different classification tasks from the client datasets. In heterogeneous federated learning, the learning process is divided into a collaborative learning phase and a local learning phase. Moreover, collaborative learning includes $T_c$ epochs and local learning includes $T_l$ epochs. We aim to perform robust federated learning with noisy clients, so suppose that each client has a private noisy dataset $\tilde{D}_k = \{(x_i^k, \tilde{y}_i^k)\}_{i=1}^{N_k}$ , where $\tilde{y}_i^k$ represents the noisy label. Because of model heterogeneity, each client has inconsistent decision boundaries and different noisy patterns, which can be formulated as $f(x, \theta_{k_1}) \neq f(x, \theta_{k_2})$ . Therefore, except the noise on its own private dataset $D_k$ , the client $c_k$ must also pay attention to the noise in the noisy labels. + +![](images/a224ef588279999217771b537e5d1b701c737b7246e07f10ac8730d1e53329a0.jpg) +Figure 2. Illustration of RHFL, which performs the heterogeneous FL by aligning the knowledge distributions of individual models on the public dataset §3.1. Under the condition of noisy clients, SL loss is adopted to mitigate overfitting to local noisy data §3.2. As for the noise generated in communication, the weight of noisy clients is lowered by measuring the client confidence §3.3 + +tion to the noise of other clients $c_{k_0\neq k}$ + +Intuitively, we need to calculate a set of optimal model parameters $\theta_{k} = \arg \min \mathcal{L}(f(x^{k},\theta_{k}),y^{k})$ . To achieve this goal, we propose robust federated learning which contains three steps as shown in Fig. 2: 1) Communicating and learning between heterogeneous clients §3.1. 2) Prevent overfitting to local noisy labels while promoting sufficient learning of all classes §3.2. 3) Individualized weighting of each client to reduce the contribution of noisy clients §3.3. + +# 3.1. Heterogeneous Federated Learning + +In collaborative learning phase, we use the public dataset $D_0$ as a bridge for communication between clients. In the $t_c \in T_c$ epoch of collaborative learning, each client $c_k$ uses the local model $\theta_{k}^{t_c}$ to calculate the logits output on the public dataset $D_0$ . In this way, the knowledge distribution $R_{k}^{t_{c}} = f(D_{0},\theta_{k}^{t_{c}})$ on the client $c_k$ is obtained. Furthermore, the client uses Kullback-Leibler (KL) divergence to measure the difference in knowledge distribution from other clients. + +KL divergence is usually used to express the difference between two probability distributions. Given two different clients $c_{k_1}$ and $c_{k_2}$ , we fit the knowledge distribution $R_{k_2}^{t_c} = f(D_0, \theta_{k_2}^{t_c})$ with $R_{k_1}^{t_c} = f(D_0, \theta_{k_1}^{t_c})$ in order to measure the difference between the knowledge distribution of $c_{k_1}$ and $c_{k_2}$ , which can be expressed as: + +$$ +\mathcal {K L} \left(R _ {k _ {1}} ^ {t _ {c}} \| R _ {k _ {2}} ^ {t _ {c}}\right) = \sum R _ {k _ {1}} ^ {t _ {c}} \log \left(\frac {R _ {k _ {1}} ^ {t _ {c}}}{R _ {k _ {2}} ^ {t _ {c}}}\right). \tag {1} +$$ + +The greater the knowledge distribution difference between $R_{k_1}^{t_c}$ and $R_{k_2}^{t_c}$ , the more $c_{k_1}$ and $c_{k_2}$ can learn from each other. Therefore, minimizing the KL difference between probability distributions $R_{k_1}^{t_c}$ and $R_{k_2}^{t_c}$ can be considered as a process in which $c_{k_1}$ learns knowledge from $c_{k_2}$ . + +In this way, the client $c_{k}$ calculates the knowledge distribution difference: + +$$ +\mathcal {L} _ {k l} ^ {k, t _ {c}} = \sum_ {k _ {0} = 1, k _ {0} \neq k} ^ {K} K L \left(R _ {k _ {0}} ^ {t _ {c}} \| R _ {k} ^ {t _ {c}}\right), \tag {2} +$$ + +where $k_{0}$ denotes the clients other than $c_{k}$ . In Heterogeneous Federated Learning (HFL) method, by measuring the knowledge distribution difference of $c_{k}$ , all other clients can obtain knowledge from $c_{k}$ without leakage of data privacy or model design details. + +Due to the significant knowledge distribution difference, clients are motivated to perform collaborative learning. Then the clients learn from others by aligning the knowledge distribution: + +$$ +\theta_ {k} ^ {t _ {c}} \leftarrow \theta_ {k} ^ {t _ {c} - 1} - \alpha \nabla_ {\theta} \left(\frac {1}{K - 1} \cdot \mathcal {L} _ {k l} ^ {k, t _ {c} - 1}\right), \tag {3} +$$ + +where $\alpha$ represents the learning rate. + +# 3.2. Local Noise Learning + +To reduce the negative impact of local noise, we learn the approach mentioned in the Symmetric Cross Entropy Learning [45]. In current Machine Learning, Cross Entropy (CE) loss is one of the most common loss functions, which is deformed according to the KL divergence formula. We denote $p$ and $q$ as the label class distribution and the predicted class distribution, respectively. The KL divergence for $p$ and $q$ is denoted as: + +$$ +\mathcal {K L} (p \| q) = \sum p (x) \log (p (x)) - \sum p (x) \log (q (x)), \tag {4} +$$ + +where the first term of formula represents the entropy of $p$ , and the second term represents the cross entropy. Therefore, + +the CE loss of the sample $x$ can be expressed as: + +$$ +\mathcal {L} _ {c e} = - \sum_ {i = 1} ^ {N} p \left(x _ {i}\right) \log \left(q \left(x _ {i}\right)\right). \tag {5} +$$ + +In the presence of label noise, CE loss shows several limitations. Due to the different levels of simplicity in classes, CE loss cannot make all classes be sufficiently learned or correctly classify all categories. In order to fully converge the difficult-to-learn classes, more rounds of learning will be performed. At this time, the easy-to-learn classes will tend to overfitting the noisy labels, and the overall performance of the model will begin to decline. + +In general, the model has the ability to correctly classify samples to some extent. Furthermore, due to the presence of label noise, the prediction result of the model is more reliable than the given label to some extent. Thus $p$ might not be the true class distribution, on the contrary, $q$ reflects the true class distribution to a degree. Automatically, a loss function Reverse Cross Entropy (RCE) [45] based on $q$ is considered, which can align to the class distribution predicted by the model. The RCE loss of the sample $x$ can be expressed as follows: + +$$ +\mathcal {L} _ {r c e} = - \sum_ {i = 1} ^ {N} q (x _ {i}) \log (p (x _ {i})). \tag {6} +$$ + +By combining the CE loss and the RCE loss, it is possible to fully learn the difficult-to-learn classes while preventing overfitting noisy labels on the easy-to-learn classes. Then the Symmetric Cross Entropy Learning(SL) loss is formulated as: + +$$ +\mathcal {L} _ {s l} = \lambda \mathcal {L} _ {c e} + \mathcal {L} _ {r c e}, \tag {7} +$$ + +here $\lambda$ controls the overfitting of CE to noise. The CE loss strengthens the model fitting effect on each class, the RCE loss is robust to the label noise. + +To balance local knowledge and knowledge learned from other clients, we set up a local learning stage. The client will update the local model with its own private dataset to prevent the forgetting of local knowledge. During the training iteration process, the label noise causes the model to update in the wrong direction and eventually fail to converge. To avoid such a result, we adopt SL loss to calculate the loss between the pseudo-label predicted by the model and the corresponding given label. Then, the local update can be denoted as: + +$$ +\theta_ {k} ^ {t _ {l}} \leftarrow \theta_ {k} ^ {t _ {l} - 1} - \alpha \nabla_ {\theta} \mathcal {L} _ {s l} ^ {k, t _ {l} - 1} \left(f \left(x ^ {k}, \theta_ {k} ^ {t _ {l} - 1}\right), \tilde {y} ^ {k}\right), \tag {8} +$$ + +where $t_{l} \in T_{l}$ represents the $t_{l}$ -th communication round. The client takes advantage of SL loss to update the model when strengthening local knowledge, which can avoid overfitting noisy labels and promote adequate learning. + +# 3.3. Client Confidence Re-weighting + +We propose the Client Confidence Re-weighting (CCR) approach to reduce the adverse impact of label noise from other clients during the collaborative learning phase. CCR can individualize the weighting of each client during the communication process to reduce the contribution of noisy clients and pay more attention to clients with clean datasets and efficient models. + +To estimate the label quality, SL loss is used to calculate the loss between the predictive output of the local model $\theta_{k}$ on the private noisy dataset $\tilde{D}_k$ and the given label $\tilde{y}^k$ . In particular, SL considers both the loss based on the given label and the loss based on the predicted pseudo-label. Thus, a small SL loss $\mathcal{L}_{sl}(f(x^k,\theta_k),\tilde{y}^k)$ indicates that the predicted pseudo-label has a similar distribution to the given label, which means that the private dataset $\tilde{D}_k$ of the client $c_{k}$ has accurate labels. On the contrary, either a large loss CE based on the given labels $\tilde{y}^k$ or a large loss RCE based on the predicted pseudo-labels $f(x^{k},\theta_{k})$ will inevitably be a large SL loss. If the loss $\mathcal{L}_{sl}^k$ calculated by the local model $\theta_{k}$ on the private dataset $\tilde{D}_k$ is very large, this signifies that the distribution of the predicted pseudo-labels and the given labels are different, i.e., the private dataset $\tilde{D}_k$ of the client $c_{k}$ might possess many noisy labels. In this way, the label quality of the dataset $\tilde{D}_k$ can be formulated as: + +$$ +\mathcal {Q} _ {t _ {c}} (\tilde {D} _ {k}) = \frac {1}{\frac {1}{N _ {k}} \sum_ {i = 1} ^ {N _ {k}} \mathcal {L} _ {s l} ^ {k , t _ {c}} \left(f \left(x _ {i} ^ {k}, \theta_ {k}\right) , \tilde {y} _ {i} ^ {k}\right)}. \tag {9} +$$ + +To quantify the learning efficiency, we calculate the SL drop rate in each iteration round. The SL drop rate of the client $c_{k}$ in the $T_{c}$ iteration is formulated as $\Delta \mathcal{L}_{sl}^{k,t_c}$ . Specifically, the loss drop rate can reflect the learning efficiency of the model to some extent. Then we simply quantify the learning efficiency of the client $c_{k}$ with the SL drop rate: + +$$ +\mathcal {P} \left(\theta_ {k} ^ {t _ {c}}\right) = \Delta \mathcal {L} _ {s l} ^ {k, t _ {c}} = L _ {s l} ^ {k, t _ {c} - 1} - L _ {s l} ^ {k, t _ {c}}, \tag {10} +$$ + +where $t_c \in T_c$ represents the $t_c$ -th communicate round. By considering both label quality and learning efficiency, the $k$ -th client confidence in round $t_c$ will be defined as: + +$$ +\mathcal {F} _ {k} ^ {t _ {c}} = \mathcal {Q} _ {t _ {c}} (\tilde {D} _ {k}) \cdot \mathcal {P} \left(\theta_ {k} ^ {t _ {c}}\right). \tag {11} +$$ + +It measures the confidence for each client respectively by quantifying the label quality of the private dataset and the learning efficiency of the local model. In the collaborative learning phase, we re-weight each client with its confidence, so that clients can learn more knowledge from confident clients and reduce the learning weight on unconfident clients. The client confidence $\mathcal{F}_k^{t_c}$ determines the weight assigned to client $c_k$ in round $t_c$ , which can be denoted as: + +$$ +w _ {k} ^ {t _ {c}} = \frac {1}{K - 1} + \eta \frac {\mathcal {F} _ {k} ^ {t _ {c}}}{\sum_ {k = 1} ^ {K} \mathcal {F} _ {k} ^ {t _ {c}}}, \tag {12} +$$ + +![](images/aa4e72dcfa64aa9a557bbc7775e96ca077d24519f6010b207f0e05601ff31b52.jpg) +Figure 3. The flow chart of RHFL. + +$$ +\mathcal {W} _ {k} ^ {t _ {c}} = \frac {\exp \left(w _ {k} ^ {t _ {c}}\right)}{\sum_ {k = 1} ^ {K} \exp \left(w _ {k} ^ {t _ {c}}\right)}, \tag {13} +$$ + +here $\eta$ controls the impact of client confidence $\mathcal{F}$ . When $\eta = 0$ , the client confidence is not considered. The above weighted regularization can minimize the knowledge of the noisy client with poor label quality and low learning efficiency from being learned, thereby solving the problem of noise from other clients. We dynamically weight the knowledge distribution learned by the client in each round, as: + +$$ +\theta_ {k} ^ {t _ {c}} \leftarrow \theta_ {k} ^ {t _ {c} - 1} - \alpha \nabla_ {\theta} \left(\mathcal {W} _ {k} ^ {t _ {c}} \cdot \mathcal {L} _ {k l} ^ {k, t _ {c} - 1}\right). \tag {14} +$$ + +With the iteration of training, each model will be updated in the direction of the clean and efficient clients. + +Summary. The entire procedure is summarized in Fig. 3. First, each client $c_k$ updates the local model $\theta_k$ with the private noisy dataset $\tilde{D}_k$ to get a set of pre-trained models. In the collaborative learning, the client $c_k$ aligns the feedback distribution of other clients $c_{k_0} \neq k$ , to learn the knowledge from others in Eq. 1&2. In this way, the clients can individually adjust their learning direction according to the differences of models, instead of simply learning a global consensus. Therefore, in order to reduce the impact of local noise, we use SL loss to update the local model in Eq. 8. The loss and the loss drop rate are adopted to measure the label quality of private dataset and the learning efficiency of local model, then calculate the client confidence based on the label quality and the model learning efficiency in Eq. 9&10&11. When learning the knowledge distribution from other clients, the participants are re-weighted according to the client confidence in Eq. 12&13. Through personalized weighting, we adjust the involvement of the noisy client in the federated system and avoid the impact of noise during communication. + +Table 1. Prove the effectiveness of heterogeneous federated learning in a no-noise scenario §4.2. $\theta_{k}$ represents the local model of client $c_{k}$ , Avg denotes the average test accuracy on four models. + +
Methodθ1θ2θ3θ4Avg
w/o FL82.0381.8568.2777.9677.53
FedMD [23]81.3680.4372.3179.8978.50
FedDF [31]81.9581.1472.1780.6178.97
RHFL82.9682.7273.2179.0479.48
+ +# 4. Experimental + +# 4.1. Experimental Setting + +Datasets and Models. Our experiments are conducted on three datasets, Cifar10 [21] and Cifar100 [21], which are widely used in the research of label noise. Here we set public dataset on the server as a subset of Cifar100, and randomly divide Cifar10 to different clients as private datasets. + +In the heterogeneous model scenario, we assign four different networks, ResNet10 [15], ResNet12 [15], ShuffleNet [56] and Mobilenetv2 [37], to four client respectively. While in the homogeneous model scenario, the networks of all four clients are set as ResNet12. + +Noise Type. We use the label transition matrix $\mathcal{M}$ to add label noise to the dataset, where $\mathcal{M}_{mn} = flip(\tilde{y} = n|y = m)$ represents that the label $y$ is flipped from the clean $m$ class to the noisy $n$ class. There are two widely used structures for the matrix $\mathcal{M}$ , symmetric flip [43] and pair flip [11]. Symmetric flip means that the original class label will be flipped to any wrong class labels with equal probability. As for pair flip, it means that the original class label will only be flipped to a very similar wrong category. + +Implementation Details. The size of private dataset and public dataset is specified as $N_{k} = 10,000$ and $N_{0} = 5,000$ respectively. We perform $T_{c} = 40$ collaborative learning epochs for different models. Considering the scale difference between public dataset and private dataset, we set the number of local learning epochs to $T_{l} = \frac{N_{k}}{N_{0}}$ , which can better balance the learning of local knowledge and the knowledge from other clients. Furthermore, we use the Adam [20] optimizer with an initial learning rate of $\alpha = 0.001$ and the batch size of 256. $\lambda$ set as 0.1 and $\eta$ set as 0.5. Due to this paper mainly focuses on the robustness of the federated learning on noisy supervision, we set the noise rate $\mu = 0.1$ and 0.2, discussing the results under both symmetric flip and pair flip noise types. To generate the noisy dataset $\tilde{D}$ , we flip $20\%$ of the labels in the training dataset of Cifar10 [21] to the wrong labels and keep the test dataset of Cifar10 constant to observe the model robustness. The $c_{k}$ client randomly selects $N_{k}$ samples from the shuffled Cifar10, so the client may have different proportions of noise, which is more in line with the actual situation. All experiments are supported by Huawei MindSpore [1]. + +State-of-the-Art Methods. In order to prove the effectiveness of RHFL in the heterogeneous model scenario, + +Table 2. Ablation study §4.2 with the noise rate $\mu = {0.1},{\theta }_{k}$ represents the local model of the client ${c}_{k}$ . + +
ComponentsPairflipSymflip
HFLSLCCRθ1θ2θ3θ4Avgθ1θ2θ3θ4Avg
77.9876.7566.8974.3373.9976.2076.0564.9674.3172.88
✓73.6476.0268.2276.6473.6374.0576.4866.9173.7472.80
✓76.2376.9663.3568.7971.3377.2078.0664.2770.7172.56
✓✓78.4179.3868.0574.8675.1878.8176.6867.4275.6474.64
✓✓✓78.8678.7669.6071.8374.7678.4078.3669.4776.9375.79
+ +Table 3. Ablation study §4.2 with the noise rate $\mu = {0.2},{\theta }_{k}$ represents the local model of the client ${c}_{k}$ . + +
ComponentsPairflipSymflip
HFLSLCCRθ1θ2θ3θ4Avgθ1θ2θ3θ4Avg
72.3171.8461.7869.6768.9072.0170.1559.6269.4267.80
✓68.4366.5760.6770.3666.5168.0864.4362.0970.4666.26
✓73.9473.1861.7868.1869.2775.6973.8160.2968.6469.61
✓✓74.6274.2062.4572.5570.9678.0577.8063.4174.1473.35
✓✓✓77.8176.0966.6172.7873.3278.1476.7764.2373.9073.26
+ +we compare RHFL with the heterogeneous FL algorithm FedMD [23] and FedDF [31] under the same settings. FedMD is based on knowledge distillation, in which each client computes the class scores on public data and then approaches the consensus. FedDF builds a distillation framework for robust federated model fusion, which allows for heterogeneous models and data. To demonstrate the validity of RHFL in the homogeneous model case, we compare it with FedAvg [33], FedMD, and FedDF. FedAvg leverages the private dataset for local gradient descent, followed by the server aggregating the updated model on average. Since our setting is not the same as theirs, we use the key of these algorithms for our experiments. + +# 4.2. Ablation Study + +Effect of Each Component. We first evaluate the effect of each component on two noise rates (0.1, 0.2) with two noise types (pairflip, symflip) in the heterogeneous model scenario, to prove the effectiveness of each component. + +1) Effectiveness of HFL: According to Table 1, we observe that in the no-noise scenario, the average accuracy of the four models without communication reaches $77.53\%$ . After adding HFL, the clients conduct federated communication and learn more global knowledge. It is obvious from the results that the testing accuracy of each local model has been effectively enhanced, specifically the average accuracy has increased to $79.48\%$ . In the noisy scenario, the effect of adding HFL will have some degree of degradation than without FL in Table 2&3. Then, we analyze the reasons for this phenomenon. Since the existence of noise leads to degradation of model performance, HFL causes the clients to keep communicating learning the wrong knowledge and updating the model in the wrong direction. Therefore, it is essential to focus on noisy data in heterogeneous FL. +2) Effectiveness of SL: We add the SL loss component to the baseline to avoid the influence of noisy data during the local update phase. When the noise rate is 0.1, the average + +test accuracy does not improve obviously in Table 2. However, when the noise rate is 0.2, the performance of most models has been significantly improved in Table 3. From the above phenomenon, it can be inferred that the higher the noise rate, the better the performance of SL loss. Our analysis is due to the fact that the reliance on the given label is reduced in SL loss, but the truthfulness of the given label is high in the setting of low noise rate, which diminishes the effectiveness of SL loss to some extent. This proves that at high noise rates, the addition of SL loss enables the models to correctly learn the local true distribution. We add the SL loss component on the basis of adding HFL, each model has been remarkably optimized, especially when the noise type is symflip. When the noise rate is 0.2, the improvement is most obvious, the average test accuracy is improved from $66.26\%$ to $73.35\%$ . The SL loss component effectively revises the learning direction of HFL. + +3) Effectiveness of CCR: We add the CCR component so that the robustness against noisy data from other clients is enhanced. As shown in Table 3, each model has achieved better performance. The most obvious is that when the noise type is pairflip and the noise rate is 0.2, the average test accuracy of models has increased from $70.96\%$ to $73.32\%$ . CCR enables each client to learn each local knowledge individually, rather than learning global knowledge at the average level, avoiding knowledge learning on noisy clients. This verifies the rationale of re-weighting the models by modeling the loss decreasing curve. + +Comparison of Different Noise Rates and Noise Types. As shown in the Table 2&3, we have compared the effectiveness of RHFL under different noise rates and types. + +1) Noise Rate: Our method can achieve great overall accuracy under different noise rates, and the improvement of our method will be more obvious at high noise rates. When the noise rate $\mu = 0.1$ , our method improves on the original baseline by $0.77\%$ under pairflip noise, and $2.91\%$ under symflip noise. When the noise rate $\mu = 0.2$ , our method + +Table 4. Compare with the state-of-the-art method §4.3 when the noise rate $\mu = {0.1},{\theta }_{k}$ represents the local model of the client ${c}_{k}$ . + +
MethodPairflipSymflip
θ1θ2θ3θ4Avgθ1θ2θ3θ4Avg
Baseline77.9876.7566.8974.3373.9976.2076.0564.9674.3172.88
FedMD [23]74.9876.8967.1076.6473.9073.2373.6667.7275.5472.54
FedDF [31]76.2675.5168.4176.0474.0672.0775.1867.3874.4772.28
RHFL78.8678.7669.6071.8374.7678.4078.3669.4776.9375.79
+ +Table 5. Compare with the state-of-the-art method §4.3 when the noise rate $\mu = {0.2},{\theta }_{k}$ represents the local model of the client ${c}_{k}$ . + +
MethodPairflipSymflip
θ1θ2θ3θ4Avgθ1θ2θ3θ4Avg
Baseline72.3171.8461.7869.6768.9072.0170.1559.6269.4267.80
FedMD [23]68.0067.8165.6774.0268.8867.3168.5464.4871.7568.02
FedDF [31]68.6669.6862.3672.1268.2167.3668.5663.6070.8367.59
RHFL77.8176.0966.6172.7873.3278.1476.7764.2373.9073.26
+ +Table 6. Compare with the state-of-the-art method §4.3 in the setting of the homogeneous model, we set all four local models as ResNet12, and took the average test accuracy of the local models for demonstration. $\mu$ denotes the noise rate. + +
Methodμ = 0.1μ = 0.2
PairflipSymflipPairflipSymflip
Baseline75.1671.6166.1466.87
FedAvg [33]79.7377.3273.5774.90
FedMD [23]74.9675.5769.3270.52
FedDF [31]77.7675.9069.9871.03
RHFL81.0379.6077.8578.83
+ +improves on the original baseline by $4.42\%$ under pair-flip noise, and $5.46\%$ under symflip noise. So when there are more noisy labels in the dataset, using our method can achieve a more significant improvement. This is likely because in the high-noise-rate scenario, the label distribution is more different from the true distribution, and the addition of the SL component makes each client more convergent to learn the pseudo-label distribution in the process of local update. The addition of the CCR component makes the knowledge of relatively noisy clients be learned less in the process of collaborative learning, so our approach demonstrates more significant effectiveness. + +2) Noise Type: Our method shows good robustness regardless of the noise generated by symflip or pairflip transition matrix. According to Table 2&3, we observe that our method performs slightly better under symflip noise. + +# 4.3. Comparison with State-of-the-Art Methods + +Heterogeneous Federated Learning Methods. We compare with the state-of-the-art heterogeneous FL method under the same setting. The baseline refers to the method in which the client trains local model on private dataset without FL. Therefore, the comparisons on two noise rates (0.1, 0.2) are shown in Table 4&5. The experiments demonstrate that our proposed method outperforms the existing strategies under various noise settings. As the noise rate rises from 0.1 to 0.2, it can be seen that the average test accuracy of FedMD [23] and FedDF [31] drops significantly, by + +$5.02\%$ for FedMD and $5.85\%$ for FedDF on pairflip noise, and by $4.52\%$ for FedMD and $4.69\%$ for FedDF on sym- flip noise. As for RHFL, it drops $1.44\%$ on pairflip noise and $2.53\%$ on symflip noise. The above can prove that our proposed solution is robust against different noise settings. + +Homogeneous Federated Learning Methods. We compare RHFL with the state-of-the-art FL methods under model homogeneous setting in Table 6, demonstrating its superiority over existing federated algorithms in handling noise. The results show that our method has achieved remarkable results in the model homogeneous scenario, especially when the noise type is symflip and the noise rate is 0.2, our method improves by $11.96\%$ on the basis of the baseline. In this case, the average test accuracy of our method reaches $78.83\%$ , while the best-performing existing method, FedAvg [33], achieves only $74.90\%$ . + +# 5. Conclusion + +This paper studies a novel problem of how to perform robust federated learning with noisy heterogeneous clients. To address this issue, a novel solution RHFL is proposed. We align the feedback distribution on public data to enable federated learning between model heterogeneous clients. To avoid each model overfitting to noise during the local learning, a symmetric loss is adopted to update the local model. For the noisy feedback from other participants, we propose a flexible re-weighting method CCR, which effectively avoids overlearning from noisy clients and achieves robust federated collaboration. Extensive experiments prove the effectiveness of each component included in our approach. Moreover, we demonstrate that our method achieves higher accuracy than the current state-of-the-arts under both model homogeneous and heterogeneous scenarios. + +Acknowledgement. This work is supported by National Natural Science Foundation of China (62176188), Key Research and Development Program of Hubei Province (2021BAA187), Zhejiang Lab (NO.2022NF0AB01), and CAAI-Huawei MindSpore Open Fund. + +# References + +[1] Mindspore, https://www.mindspore.cn/, 2020.6 +[2] Devansh Arpit, Stanisław Jastrzebski, Nicolas Ballas, David Krueger, Emmanuel Bengio, Maxinder S Kanwal, Tegan Maharaj, Asja Fischer, Aaron Courville, Yoshua Bengio, et al. A closer look at memorization in deep networks. In ICML, pages 233-242, 2017. 2, 3 +[3] Ayush Chopra, Surya Kant Sahu, Abhishek Singh, Abhinav Java, Praneeth Vepakomma, Vivek Sharma, and Ramesh Raskar. Adasplit: Adaptive trade-offs for resource-constrained distributed deep learning. arXiv preprint arXiv:2112.01637, 2021. 1 +[4] Enmao Diao, Jie Ding, and Vahid Tarokh. Heterofl: Computation and communication efficient federated learning for heterogeneous clients. In ICLR, 2020. 3 +[5] Aritra Ghosh, Himanshu Kumar, and PS Sastry. Robust loss functions under label noise for deep neural networks. In AAAI, pages 1919-1925, 2017. 2, 3 +[6] Gautham Krishna Gudur, Bala Shyamala Balaji, and Satheesh K Perepu. Resource-constrained federated learning with heterogeneous labels and models. In ACM SIGKDD Workshop, 2020. 2 +[7] Gautham Krishna Gudur and Satheesh K Perepu. Federated learning with heterogeneous labels and models for mobile activity monitoring. In NeurIPS Workshop, 2020. 2 +[8] Pengfei Guo, Puyang Wang, Jinyuan Zhou, Shanshan Jiang, and Vishal M. Patel. Multi-institutional collaborations for improving deep learning-based magnetic resonance image reconstruction using federated learning. In CVPR, pages 2423-2432, 2021. 1 +[9] Otkrist Gupta and Ramesh Raskar. Distributed learning of deep neural network over multiple agents. *JNCA*, 2018. 1 +[10] Bo Han, Jiangchao Yao, Gang Niu, Mingyuan Zhou, Ivor Tsang, Ya Zhang, and Masashi Sugiyama. Masking: A new perspective of noisy supervision. In NeurIPS, pages 5841-5851, 2018. 2 +[11] Bo Han, Quanming Yao, Xingrui Yu, Gang Niu, Miao Xu, Weihua Hu, Ivor W Tsang, and Masashi Sugiyama. Co-teaching: Robust training of deep neural networks with extremely noisy labels. In NeurIPS, 2018. 2, 3, 6 +[12] Jiangfan Han, Ping Luo, and Xiaogang Wang. Deep self-learning from noisy labels. In ICCV, pages 5138-5147, 2019. 2 +[13] Chaoyang He, Murali Annavaram, and Salman Avestimehr. Group knowledge transfer: Federated learning of large cnns at the edge. In NeurIPS, page 14068-14080, 2020. 1 +[14] Chaoyang He, Murali Annavaram, and Salman Avestimehr. Towards non-iid and invisible data with fednas: Federated deep learning via neural architecture search. In CVPR Workshop, 2020. 1 +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 6 +[16] Wenke Huang, Mang Ye, and Bo Du. Learn from others and be yourself in heterogeneous federated learning. In CVPR, 2022. 2 + +[17] Wonyong Jeong, Jaehong Yoon, Eunho Yang, and Sung Ju Hwang. Federated semi-supervised learning with inter-client consistency & disjoint learning. In ICLR, 2021. 1 +[18] Lu Jiang, Zhengyuan Zhou, Thomas Leung, Li-Jia Li, and Li Fei-Fei. Mentornet: Learning data-driven curriculum for very deep neural networks on corrupted labels. In ICML, pages 2304-2313, 2018. 2, 3 +[19] Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Kallista Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. Advances and open problems in federated learning. arXiv preprint arXiv:1912.04977, 2019. 1 +[20] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. 6 +[21] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Master's thesis, Department of Computer Science, University of Toronto, 2009. 6 +[22] Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. In ICLR, 2017. 3 +[23] Daliang Li and Junpu Wang. Fedmd: Heterogenous federated learning via model distillation. In NeurIPS Workshop, 2019. 2, 3, 6, 7, 8 +[24] Junnan Li, Yongkang Wong, Qi Zhao, and Mohan S. Kankanhalli. Learning to learn from noisy labeled data. In CVPR, pages 5051-5059, 2019. 2 +[25] Li Li, Huazhu Fu, Bo Han, Cheng-Zhong Xu, and Ling Shao. Federated noisy client learning. arXiv preprint arXiv:2106.13239, 2021. 2 +[26] Qinbin Li, Bingsheng He, and Dawn Song. Model-agnostic round-optimal federated learning via knowledge transfer. arXiv preprint arXiv:2010.01017, 2020. 1 +[27] Qinbin Li, Bingsheng He, and Dawn Song. Model-contrastive federated learning. In CVPR, pages 10713–10722, 2021. 1 +[28] Tian Li, Anit Kumar Sahu, Ameet Talwalkar, and Virginia Smith. Federated learning: Challenges, methods, and future directions. IEEE Signal Processing Magazine, pages 50-60, 2020. 1 +[29] Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous networks. arXiv preprint arXiv:1812.06127, 2018. 1, 3 +[30] Paul Pu Liang, Terrance Liu, Liu Ziyin, Nicholas B Allen, Randy P Auerbach, David Brent, Ruslan Salakhutdinov, and Louis-Philippe Morency. Think locally, act globally: Federated learning with local and global representations. In NeurIPS Workshop, 2020. 2, 3 +[31] Tao Lin, Lingjing Kong, Sebastian U Stich, and Martin Jaggi. Ensemble distillation for robust model fusion in federated learning. In NeurIPS, page 2351-2363, 2020. 2, 3, 6, 7, 8 +[32] Quande Liu, Cheng Chen, Jing Qin, Qi Dou, and Pheng-Ann Heng. Feddg: Federated domain generalization on medical image segmentation via episodic learning in continuous frequency space. In CVPR, pages 1013–1023, 2021. 1 +[33] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication- + +efficient learning of deep networks from decentralized data. In AISTATS, pages 1273-1282, 2017. 1, 3, 7, 8 +[34] Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. IEEE TPAMI, pages 1979–1993, 2018. 2, 3 +[35] Giorgio Patrini, Alessandro Rozza, Aditya Krishna Menon, Richard Nock, and Lizhen Qu. Making deep neural networks robust to label noise: A loss correction approach. In CVPR, pages 1944-1952, 2017. 2 +[36] Giorgio Patrini, Alessandro Rozza, Aditya Krishna Menon, Richard Nock, and Lizhen Qu. Making deep neural networks robust to label noise: A loss correction approach. In CVPR, pages 1944-1952, 2017. 2, 3 +[37] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zh-moginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In CVPR, pages 4510-4520, 2018. 6 +[38] Tao Shen, Jie Zhang, Xinkang Jia, Fengda Zhang, Gang Huang, Pan Zhou, Kun Kuang, Fei Wu, and Chao Wu. Federated mutual learning. arXiv preprint arXiv:2006.16765, 2020. 1 +[39] Sainbayar Sukhbaatar, Joan Bruna, Manohar Paluri, Lubomir Bourdev, and Rob Fergus. Training convolutional networks with noisy labels. In ICLR, 2015. 2, 3 +[40] Jingwei Sun, Ang Li, Binghui Wang, Huanrui Yang, Hai Li, and Yiran Chen. Soteria: Provable defense against privacy leakage in federated learning from representation perspective. In CVPR, pages 9311-9319, 2021. 1 +[41] Lichao Sun and Lingjuan Lyu. Federated model distillation with noise-free differential privacy. arXiv preprint arXiv:2009.05537, 2020. 1 +[42] Daiki Tanaka, Daiki Ikami, Toshihiko Yamasaki, and Kiyoharu Aizawa. Joint optimization framework for learning with noisy labels. In CVPR, pages 5552-5560, 2018. 2 +[43] Brendan Van Rooyen, Aditya Krishna Menon, and Robert C Williamson. Learning with symmetric label noise: The importance of being unhinged. In NeurlPS, pages 10-18, 2015. 2, 3, 6 +[44] Hongyi Wang, Mikhail Yurochkin, Yuekai Sun, Dimitris Papailiopoulos, and Yasaman Khazaeni. Federated learning with matched averaging. In ICLR, 2020. 1, 3 +[45] Yisen Wang, Xingjun Ma, Zaiyi Chen, Yuan Luo, Jinfeng Yi, and James Bailey. Symmetric cross entropy for robust learning with noisy labels. In ICCV, pages 322-330, 2019. 4, 5 +[46] Hongxin Wei, Lei Feng, Xiangyu Chen, and Bo An. Combating noisy labels by agreement: A joint training method with co-regularization. In CVPR, pages 13726–13735, 2020. 2 +[47] Hongxin Wei, Lei Feng, Xiangyu Chen, and Bo An. Combating noisy labels by agreement: A joint training method with co-regularization. In CVPR, pages 13726–13735, 2020. 2, 3 +[48] Yilun Xu, Peng Cao, Yuqing Kong, and Yizhou Wang. L_dmi: A novel information-theoretic loss function for training deep nets robust to label noise. In NeurIPS, pages 6222-6233, 2019. 2 + +[49] Seunghan Yang, Hyoungseob Park, Junyoung Byun, and Changick Kim. Robust federated learning with noisy labels. arXiv preprint arXiv:2012.01700, 2020. 2 +[50] Jiangchao Yao, Hao Wu, Ya Zhang, Ivor W Tsang, and Jun Sun. Safeguarded dynamic label regression for noisy supervision. In AAAI, pages 9103–9110, 2019. 2, 3 +[51] Quanming Yao, Hansi Yang, Bo Han, Gang Niu, and James Tin-Yau Kwok. Searching to exploit memorization effect in learning with noisy labels. In ICML, pages 10789-10798, 2020. 3 +[52] Mang Ye, He Li, Bo Du, Jianbing Shen, Ling Shao, and Steven CH Hoi. Collaborative refining for person re-identification with label noise. IEEE TIP, 2021. 2 +[53] Mang Ye and Pong C Yuen. Purifynet: A robust person re-identification model with noisy labels. IEEE TIFS, 2020. 2 +[54] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In ICLR, 2018. 2, 3 +[55] Jie Zhang, Song Guo, Xiaosong Ma, Haozhao Wang, Wenchao Xu, and Feijie Wu. Parameterized knowledge transfer for personalized federated learning. In NeurIPS, 2021. 2 +[56] Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. In CVPR, pages 6848-6856, 2018. 6 +[57] Zhilu Zhang and Mert R Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. In NeurIPS, pages 8792-8802, 2018. 2, 3 +[58] Jia-Xing Zhong, Nannan Li, Weijie Kong, Shan Liu, Thomas H. Li, and Ge Li. Graph convolutional label noise cleaner: Train a plug-and-play action classifier for anomaly detection. In CVPR, pages 1237-1246, 2019. 2 +[59] Xiong Zhou, Xianming Liu, Junjun Jiang, Xin Gao, and Xi-angyang Ji. Asymmetric loss functions for learning with noisy labels. In ICML, 2021. 3 +[60] Zhuangdi Zhu, Junyuan Hong, and Jiayu Zhou. Data-free knowledge distillation for heterogeneous federated learning. In ICML, 2021. 2 \ No newline at end of file diff --git a/robustfederatedlearningwithnoisyandheterogeneousclients/images.zip b/robustfederatedlearningwithnoisyandheterogeneousclients/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d8a6d11d832af3b933afa7b085a1ec5e57b34da6 --- /dev/null +++ b/robustfederatedlearningwithnoisyandheterogeneousclients/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:798f4be3c9eb7d22f192d1f1e579c9d8217b82a1827d6268fe134f02021c2ddb +size 454029 diff --git a/robustfederatedlearningwithnoisyandheterogeneousclients/layout.json b/robustfederatedlearningwithnoisyandheterogeneousclients/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0ed4148070b450a68e50df8944c9785f7199a971 --- /dev/null +++ b/robustfederatedlearningwithnoisyandheterogeneousclients/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c58b8d9965ed16df401f3cf4d7386449444f9632109ef3a2a330788a09fbee0 +size 431300 diff --git a/robustfinetuningofzeroshotmodels/df28aa52-4aaf-49af-acb5-7e03162e42d2_content_list.json b/robustfinetuningofzeroshotmodels/df28aa52-4aaf-49af-acb5-7e03162e42d2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..285b13fac20bd5aa0c3980313590c02a5ab4a06f --- /dev/null +++ b/robustfinetuningofzeroshotmodels/df28aa52-4aaf-49af-acb5-7e03162e42d2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26eb9ac1f1e79df2d2427b97d714aff6631e5c36c6b78e04e7ebc5917b6c124c +size 97443 diff --git a/robustfinetuningofzeroshotmodels/df28aa52-4aaf-49af-acb5-7e03162e42d2_model.json b/robustfinetuningofzeroshotmodels/df28aa52-4aaf-49af-acb5-7e03162e42d2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..014342721a2a181e28b062938bd5f5054a9a78e5 --- /dev/null +++ b/robustfinetuningofzeroshotmodels/df28aa52-4aaf-49af-acb5-7e03162e42d2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c005826c0a116efcb22e6ba42f3283b92a642ead1e737837274fbed8642c8da9 +size 128091 diff --git a/robustfinetuningofzeroshotmodels/df28aa52-4aaf-49af-acb5-7e03162e42d2_origin.pdf b/robustfinetuningofzeroshotmodels/df28aa52-4aaf-49af-acb5-7e03162e42d2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b1c276166ea6b4651ca978b274a2efa5deed8e01 --- /dev/null +++ b/robustfinetuningofzeroshotmodels/df28aa52-4aaf-49af-acb5-7e03162e42d2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0f4aa69133542cbeaa406b17a054f64c79ade8bc666353cba8e1516c5a6d402 +size 827567 diff --git a/robustfinetuningofzeroshotmodels/full.md b/robustfinetuningofzeroshotmodels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..9a36e83fb5a7adc06c502d69736bc6f3015370f2 --- /dev/null +++ b/robustfinetuningofzeroshotmodels/full.md @@ -0,0 +1,381 @@ +# Robust fine-tuning of zero-shot models + +Mitchell Wortsman* + +University of Washington + +mitchnw@cs.washington.edu + +Gabriel Ilharco* + +University of Washington + +gamaga@cs.washington.edu + +Jong Wook Kim + +OpenAI + +jongwook@openai.com + +Mike Li + +Columbia University + +mli24@gsb.columbia.edu + +Simon Kornblith + +Google Research, Brain Team + +skornblith@google.com + +Rebecca Roelofs + +Google Research, Brain Team + +rofls@google.com + +Raphael Gontijo Lopes + +Google Research, Brain Team + +iraphael@google.com + +Hannaneh Hajishirzi + +University of Washington + +hannaneh@cs.washington.edu + +Ali Farhadi* + +University of Washington + +ali@cs.washington.edu + +Hongseok Namkoong* + +Columbia University + +namkoong@gsb.columbia.edu + +Ludwig Schmidt + +University of Washington + +schmidt@cs.washington.edu + +# Abstract + +Large pre-trained models such as CLIP or ALIGN offer consistent accuracy across a range of data distributions when performing zero-shot inference (i.e., without fine-tuning on a specific dataset). Although existing fine-tuning methods substantially improve accuracy on a given target distribution, they often reduce robustness to distribution shifts. We address this tension by introducing a simple and effective method for improving robustness while fine-tuning: ensembling the weights of the zero-shot and fine-tuned models (WiSE-FT). Compared to standard fine-tuning, WiSE-FT provides large accuracy improvements under distribution shift, while preserving high accuracy on the target distribution. On ImageNet and five derived distribution shifts, WiSE-FT improves accuracy under distribution shift by 4 to 6 percentage points (pp) over prior work while increasing ImageNet accuracy by 1.6 pp. WiSE-FT achieves similarly large robustness gains (2 to 23 pp) on a diverse set of six further distribution shifts, and accuracy gains of 0.8 to 3.3 pp compared to standard fine-tuning on commonly used transfer learning datasets. These improvements come at no additional computational cost during fine-tuning or inference. + +# 1. Introduction + +A foundational goal of machine learning is to develop models that work reliably across a broad range of data distri + +butions. Over the past few years, researchers have proposed a variety of distribution shifts on which current algorithmic approaches to enhance robustness yield little to no gains [68, 95]. While these negative results highlight the difficulty of learning robust models, large pre-trained models such as CLIP [79], ALIGN [44] and BASIC [75] have recently demonstrated unprecedented robustness to these challenging distribution shifts. The success of these models points towards pre-training on large, heterogeneous datasets as a promising direction for increasing robustness. However, an important caveat is that these robustness improvements are largest in the zero-shot setting, i.e., when the model performs inference without fine-tuning on a target distribution. + +In a concrete application, a zero-shot model can be fine-tuned on extra application-specific data, which often yields large performance gains on the target distribution. However, in the experiments of Radford et al. [79] and Pham et al. [75], fine-tuning comes at the cost of robustness: across several natural distribution shifts, the accuracy of their fine-tuned models is lower than that of the original zero-shot model. This leads to a natural question: Can zero-shot models be fine-tuned without reducing accuracy under distribution shift? + +As pre-trained models are becoming a cornerstone of machine learning, techniques for fine-tuning them on downstream applications are increasingly important. Indeed, the question of robustly fine-tuning pre-trained models has recently also been raised as an open problem by several authors [3, 9, 75, 79]. Andreassen et al. [3] explored several fine-tuning approaches but found that none yielded models + +![](images/770221af938048ccbbb38b6cdd4561fd98e87dd324e70d8a00a9a4dac07a375b.jpg) + +![](images/155ee921e4b8ceb4e26cb1227680c442c8922bdb8b41f9199c9f592d749cb96a.jpg) + +![](images/306db7f437bb93c5f2feaacf54681e14ffc8f4e13ccefc5432afd19d1924d951.jpg) +Figure 1. (Top left) Zero-shot CLIP models exhibit moderate accuracy on the reference distribution ( $x$ -axis, the target for fine-tuning) and high effective robustness (accuracy on the distribution shifts beyond the baseline models). In contrast, standard fine-tuning—either end-to-end or with a linear classifier (final layer)—attains higher accuracy on the reference distribution but less effective robustness. (Top right) Our method linearly interpolates between the zero-shot and fine-tuned models with a mixing coefficient $\alpha \in [0,1]$ . (Bottom) On five distribution shifts derived from ImageNet (ImageNetV2, ImageNet-R, ImageNet Sketch, ObjectNet, and ImageNet-A), WiSE-FT improves average accuracy relative to both the zero-shot and fine-tuned models while maintaining or improving accuracy on ImageNet. + +![](images/53eb6577cab2bea4d1d19af6742a102797b1f8a73a86a19d11bae538df4d3dee.jpg) + +![](images/fe8472b2d169219ac848f027c889899403cbc49792b912a29a1e6e1111f03b2c.jpg) + +with improved robustness at high accuracy. Furthermore, Taorio et al. [95] demonstrated that no current algorithmic robustness interventions provide consistent gains across the distribution shifts where zero-shot models excel. + +In this paper, we conduct an empirical investigation to understand and improve fine-tuning of zero-shot models from a distributional robustness perspective. We begin by measuring how different fine-tuning approaches (last-layer vs. end-to-end fine-tuning, hyperparameter changes, etc.) affect the accuracy under distribution shift of the resulting fine-tuned models. Our empirical analysis uncovers two key issues in the standard fine-tuning process. First, the robustness of fine-tuned models varies substantially under even small changes in hyperparameters, but the best hyperparameters cannot be inferred from accuracy on the target distribution alone. Second, more aggressive fine-tuning (e.g., using a larger learning rate) yields larger accuracy improvements on the target distribution, but can also reduce accuracy under distribution shift by a large amount. + +Motivated by the above concerns, we propose a robust way of fine-tuning zero-shot models that addresses the aforementioned trade-off and achieves the best of both worlds: increased performance under distribution shift while maintaining or even improving accuracy on the target distribution relative to standard fine-tuning. In addition, our method simplifies the choice of hyperparameters in the fine-tuning process. + +Our method (Figure 1) has two steps: first, we fine-tune the zero-shot model on the target distribution. Second, we combine the original zero-shot and fine-tuned models by linearly interpolating between their weights, which we refer to as weight-space ensembling. Interpolating model parameters is a classical idea in convex optimization dating back decades (e.g., see [76, 82]). Here, we empirically study model interpolation for non-convex models from the perspective of distributional robustness. Interestingly, linear interpolation in weight-space still succeeds despite the non-linearity in the activation functions of the neural networks. + +Weight-space ensembles for fine-tuning (WiSE-FT) substantially improve accuracy under distribution shift compared to prior work while maintaining high performance on the target distribution. Concretely, on ImageNet [17] and five of the natural distribution shifts studied by Radford et al. [79], WiSE-FT applied to standard end-to-end fine-tuning improves accuracy under distribution shift by 4 to 6 percentage points (pp) over prior work while maintaining or improving the ImageNet accuracy of the fine-tuned CLIP model. Relative to the zero-shot model, WiSE-FT improves accuracy under distribution shift by 1 to 9 pp. Moreover, WiSE-FT improves over a range of alternative approaches such as regularization and evaluating at various points throughout fine-tuning. These robustness gains come at no additional computational cost during fine-tuning or inference. + +While our investigation centers around CLIP, we observe similar trends for other zero-shot models including ALIGN [44], BASIC [75], and a ViT model pre-trained on JFT [21]. For instance, WiSE-FT improves the ImageNet accuracy of a fine-tuned BASIC-L model by 0.4 pp, while improving average accuracy under distribution shift by 2 to 11 pp. + +To understand the robustness gains of WiSE-FT, we first study WiSE-FT when fine-tuning a linear classifier (last layer) as it is more amenable to analysis. In this linear case, our procedure is equivalent to assembling the outputs of two models, and experiments point towards the complementarity of model predictions as a key property. For end-to-end fine-tuning, we connect our observations to earlier work on the phenomenology of deep learning. Neyshabur et al. [71] found that end-to-end fine-tuning the same model twice yielded two different solutions that were connected via a linear path in weight-space along which error remains low, known as linear mode connectivity [25]. Our observations suggest a similar phenomenon along the path generated by WiSE-FT, but the exact shape of the loss landscape and connection between error on the target and shifted distributions are still open problems (analysis in Appendix A). + +In addition to the aforementioned ImageNet distribution shifts, WiSE-FT consistently improves robustness on a diverse set of six additional distribution shifts including: (i) geographic shifts in satellite imagery and wildlife recognition (WILDS-FMoW, WILDS-iWildCam) [6, 13, 47], (ii) reproductions of the popular image classification dataset CIFAR-10 with a distribution shift (CIFAR-10.1 and CIFAR-10.2) [60,81], and (iii) datasets with distribution shift induced by temporal perturbations in videos (ImageNet-Vid-Robust and YTBB-Robust) [86]. Beyond the robustness perspective, WiSE-FT also improves accuracy compared to standard fin-tuning, reducing the relative error rate by $4 - 49\%$ on a range of seven datasets: ImageNet, CIFAR-10, CIFAR-100 [52], Describable Textures [14], Food-101 [10], SUN397 [101], and Stanford Cars [51]. Even when fine-tuning data is scarce, + +reflecting many application scenarios, we find that WiSE-FT improves performance. + +Overall, WiSE-FT is simple, universally applicable in the problems we studied, and can be implemented in a few lines of code. Hence we encourage its adoption for fine-tuning zero-shot models. + +# 2. Background and experimental setup + +Our experiments compare the performance of zero-shot models, corresponding fine-tuned models, and models produced by WiSE-FT. To measure robustness, we contrast model accuracy on two related but different distributions, a reference distribution $\mathcal{D}_{\mathrm{ref}}$ which is the target for fine-tuning, and shifted distribution $\mathcal{D}_{\mathrm{shift}}$ . We assume both distributions have test sets for evaluation, and $\mathcal{D}_{\mathrm{ref}}$ has an associated training set $S_{\mathrm{ref}}^{\mathrm{tr}}$ which is typically used for training or fine-tuning. The goal for a model is to achieve both high accuracy and consistent performance on the two distributions $\mathcal{D}_{\mathrm{ref}}$ and $\mathcal{D}_{\mathrm{shift}}$ . This is a natural goal as humans often achieve similar accuracy across the distribution shifts in our study [87]. + +For a model $f$ , we let $\mathsf{Acc}_{\mathrm{ref}}(f)$ and $\mathsf{Acc}_{\mathrm{shift}}(f)$ refer to classification accuracy on the reference and shifted test sets, respectively. We consider $k$ -way image classification, where $x_{i}$ is an image with corresponding label $y_{i} \in \{1,\dots,k\}$ . The outputs of $f$ are $k$ -dimensional vectors of non-normalized class scores. + +Distribution shifts. Taori et al. [95] categorized distribution shifts into two broad categories: (i) synthetic, e.g., $\ell_{\infty}$ -adversarial examples or artificial changes in image contrast, brightness, etc. [2, 7, 8, 29, 36]; and (ii) natural, where samples are not perturbed after acquisition and changes in data distributions arise through naturally occurring variations in lighting, geographic location, crowdsourcing process, image styles, etc. [35, 38, 47, 81, 95]. Following Radford et al. [80], our focus here is on natural distribution shifts as they are more representative of the real world when no active adversary is present. Specifically, we present our key results for five natural distribution shifts derived from ImageNet (i.e., $S_{\mathrm{ref}}^{\mathrm{tr}}$ is ImageNet): (a) ImageNet-V2 (IN-V2) [81], a reproduction of the ImageNet test set with distribution shift (b) ImageNet-R (IN-R) [35], renditions (e.g., sculptures, paintings) for 200 ImageNet classes (c) ImageNet Sketch (IN-Sketch) [98], which contains sketches instead of natural images (d) ObjectNet [4], a test set of objects in various scenes with 113 classes overlapping with ImageNet (e) ImageNet-A (IN-A) [38], a test set of natural images mis + +![](images/38ff13e33867fbe124778eb1d1cbad7718f4c6e1f2eab8e8c1c6542554ebf867.jpg) +Figure 2. Samples of the class lemon, from the reference distribution ImageNet [17] and the derived distribution shifts considered in our main experiments: ImageNet-V2 [81], ImageNet-R [35], ImageNet Sketch [98], ObjectNet [4], and ImageNet-A [38]. + +![](images/3eedfee5f683fe411039049b383b5372ea0d4a1e1f964e930c6240724f53c68c.jpg) + +![](images/644f64196c6efe8472fcd1fa8c63c47418fd65712888865859305d3b16289d60.jpg) + +![](images/02394478250e27134614c1af4a3d10b2dc3caf41b0c9424bbb80b0c2212bfc6c.jpg) + +![](images/e595ccf63fce96bd5eddee4bf1dd6717a030bee014dfaf3324a25805169263fc.jpg) + +![](images/e02ab3ff03a63b1ae9a6aefea6f4bfa232e3c9f9bea9bd7ef6b0e72d0f1c9e05.jpg) + +classified by a ResNet-50 [34] for 200 ImageNet classes. Figure 2 illustrates the five distribution shifts. + +Effective robustness and scatter plots. To compare the robustness of models with different accuracies on the reference distribution, we follow the effective robustness framework introduced by Taori et al. [95]. Effective robustness quantifies robustness as accuracy beyond a baseline trained only on the reference distribution. A useful tool for studying (effective) robustness are scatter plots that illustrate model performance under distribution shift [81, 95]. These scatter plots display accuracy on the reference distribution on the $x$ -axis and accuracy under distribution shift on the $y$ -axis, i.e., a model $f$ is shown as a point $(\mathsf{Acc}_{\mathrm{ref}}(f), \mathsf{Acc}_{\mathrm{shift}}(f))$ . Figure 1 exemplifies these scatter plots with both schematics and real data. For the distribution shifts we study, accuracy on the reference distribution is a reliable predictor of accuracy under distribution shift [68, 95]. In other words, there exists a function $\beta : [0, 1] \to [0, 1]$ such that $\mathsf{Acc}_{\mathrm{shift}}(f)$ approximately equals $\beta (\mathsf{Acc}_{\mathrm{ref}}(f))$ for models $f$ trained on the train set $S_{\mathrm{ref}}^{\mathrm{tr}}$ . Effective robustness [95] is accuracy beyond this baseline, defined formally as $\rho(f) = \mathsf{Acc}_{\mathrm{shift}}(f) - \beta (\mathsf{Acc}_{\mathrm{ref}}(f))$ . + +In the corresponding scatter plots, effective robustness is vertical movement above expected accuracy under distribution shift (Figure 1, top). Effective robustness thereby disentangles accuracy changes on the reference distribution from the effect of robustness interventions. When we say that a model is robust to distribution shift, we mean that effective robustness is positive. Taori et al. [95] observed that no algorithmic robustness intervention consistently achieves substantial effective robustness across the distribution shifts in Figure 2—the first method to do so was zero-shot CLIP. Empirically, when applying logit (or probit) axis scaling, models trained on the reference distribution approximately lie on a linear trend [68,95]. As in Taori et al. [95], we apply logit axis scaling and show $95\%$ Clopper-Pearson confidence intervals for the accuracies of select points. + +Zero-shot models and CLIP. We primarily explore CLIP models [79], although we also investigate other zero-shot models including ALIGN [44], BASIC [75] and a ViT model pre-trained on JFT [21]. Zero-shot models exhibit effective robustness and lie on a qualitatively different linear trend (Figure 1). CLIP-like models are pre-trained using + +image-caption pairs from the web. Given a set of image-caption pairs $\{(x_1, s_1), \ldots, (x_B, s_B)\}$ , CLIP-like models train an image-encoder $g$ and text-encoder $h$ such that the similarity $\langle g(x_i), h(s_i) \rangle$ is maximized relative to unaligned pairs. CLIP-like models perform zero-shot $k$ -way classification given an image $x$ and class names $C = \{c_1, \ldots, c_k\}$ by matching $x$ with potential captions. For instance, using caption $s_i = \text{"a photo of a } \{c_i\}"$ for each class $i$ , the zero-shot model predicts the class via $\arg \max_j \langle g(x), h(s_j) \rangle$ . Equivalently, one can construct $\mathbf{W}_{\text{zero-shot}} \in \mathbb{R}^{d \times k}$ with columns $h(s_j)$ and compute outputs $f(x) = g(x)^{\top} \mathbf{W}_{\text{zero-shot}}$ . Unless explicitly mentioned, our experiments use the CLIP model ViT-L/14@336px, although all CLIP models are displayed in our scatter plots (additional details provided in Appendix F.1). + +# 3. Weight-space ensembles for fine-tuning + +This section describes and motivates our proposed method, WiSE-FT, which consists of two simple steps. First, we fine-tune the zero-shot model on application-specific data. Second, we combine the original zero-shot and fine-tuned models by linearly interpolating between their weights, also referred to as weight-space ensembling. WiSE-FT can be implemented in a few lines of PyTorch, and we provide example code in Appendix C. + +The zero-shot model excels under distribution shift while standard fine-tuning achieves high accuracy on the reference distribution. Our motivation is to combine these two models into one that achieves the best of both worlds. Weight-space ensembles are a natural choice as they ensemble without extra computational cost. Moreover, previous work has suggested that interpolation in weight space may improve performance when models share part of their optimization trajectory [42, 71]. + +Step 1: Standard fine-tuning. As in Section 2, we let $S_{\mathrm{ref}}^{\mathrm{tr}}$ denote the dataset used for fine-tuning and $g$ denote the image encoder used by CLIP. We are now explicit in writing $g(x,\mathbf{V}_{\mathrm{enc}})$ where $x$ is an input image and + +$\mathbf{V}_{\mathrm{enc}}$ are the parameters of the encoder $g$ . Standard fine-tuning considers the model $f(x,\theta) = g(x,\mathbf{V}_{\mathrm{enc}})^{\top}\mathbf{W}_{\mathrm{classifier}}$ where $\mathbf{W}_{\mathrm{classifier}} \in \mathbb{R}^{d\times k}$ is the classification head and $\theta = [\mathbf{V}_{\mathrm{enc}},\mathbf{W}_{\mathrm{classifier}}]$ are the parameters of $f$ . We then solve $\arg \min_{\theta}\left\{\sum_{(x_i,y_i)\in S_{\mathrm{ref}}^{\mathrm{tr}}}\ell (f(x_i,\theta),y_i) + \lambda R(\theta)\right\}$ where $\ell$ is the cross-entropy loss and $R$ is a regularization term (e.g., weight decay). We consider the two most common variants of fine-tuning: end-to-end, where all values of $\theta$ are modified, and fine-tuning only a linear classifier, where $\mathbf{V}_{\mathrm{enc}}$ is fixed at the value learned during pre-training. Appendices F.2 and F.3 provide additional details. + +Step 2: Weight-space ensembling. For a mixing coefficient $\alpha \in [0,1]$ , we consider the weight-space ensemble between the zero-shot model with parameters $\theta_0$ and the model obtained via standard fine-tuning with parameters $\theta_{1}$ . The predictions of the weight-space ensemble wse are given by + +$$ +\operatorname {w s e} (x, \alpha) = f (x, (1 - \alpha) \cdot \theta_ {0} + \alpha \cdot \theta_ {1}), \tag {1} +$$ + +i.e., we use the element-wise weighted average of the zero-shot and fined-tuned parameters. When fine-tuning only the linear classifier, weight-space ensembling is equivalent to the traditional output-space ensemble [11, 20, 26] ( $1 - \alpha$ ) $\cdot f(x,\theta_0) + \alpha \cdot f(x,\theta_1)$ since Equation 1 decomposes as $(1 - \alpha)\cdot g(x,\mathbf{V}_{\mathrm{enc}})^{\top}\mathbf{W}_{\mathrm{zero - shot}} + \alpha \cdot g(x,\mathbf{V}_{\mathrm{enc}})^{\top}\mathbf{W}_{\mathrm{classifier}}$ + +As neural networks are non-linear with respect to their parameters, ensembling all layers—as we do when end-to-end fine-tuning—typically fails, achieving no better accuracy than a randomly initialized neural network [25]. However, as similarly observed by previous work where part of the optimization trajectory is shared [25, 42, 71], we find that the zero-shot and fine-tuned models are connected by a linear path in weight-space along which accuracy remains high (explored further in Section A.2). + +Remarkably, as we show in Section 4, WiSE-FT improves accuracy under distribution shift while maintaining high performance on the reference distribution relative to fine-tuned models. These improvements come without any additional computational cost as a single set of weights is used. + +# 4. Results + +This section presents our key experimental findings. First, we show that WiSE-FT boosts the accuracy of a fine-tuned CLIP model on five ImageNet distribution shifts studied by Radford et al. [79], while maintaining or improving ImageNet accuracy. Next, we present additional experiments, including more distribution shifts, the effect of hyperparameters, accuracy improvements on the reference distribution, and experiments in the low-data regime. Finally, we demonstrate that our findings are more broadly applicable + +by exploring WiSE-FT for BASIC [75], ALIGN [44], and a ViT-H/14 [21] model pre-trained on JFT-300M [91]. + +Main results: ImageNet and associated distribution shifts. As illustrated in Figure 1, when the mixing coefficient $\alpha$ varies from 0 to 1, $wse(\cdot, \alpha)$ is able to simultaneously improve accuracy on both the reference and shifted distributions. A breakdown for each dataset is shown in Appendix E.1. Table 1 presents our main results on ImageNet and five derived distribution shifts. WiSE-FT (end-to-end, $\alpha = 0.5$ ) outperforms numerous strong models in both average accuracy under distribution shift and the average accuracy on the reference and shifted distributions. While future work may lead to more sophisticated strategies for choosing the mixing coefficient $\alpha$ , $\alpha = 0.5$ yields close to optimal performance across a range of experiments. Hence, we recommend $\alpha = 0.5$ when no domain knowledge is available. Appendix D further explores the effect of $\alpha$ . Moreover, results for 12 other backbones are shown in Appendix E. + +Robustness on additional distribution shifts. Beyond the five distribution shifts derived from ImageNet, WiSE-FT consistently improves robustness on a diverse set of further distributions shifts including geographic shifts in satellite imagery and wildlife recognition (WILDS-FMoW [13, 47], WILDS-iWildCam [6, 47]), reproductions of the popular image classification dataset CIFAR-10 [52] with a distribution shift (CIFAR-10.1 [81] and CIFAR-10.2 [60]), and datasets with distribution shift induced by temporal perturbations in videos (ImageNet-Vid-Robust and YTBB-Robust [87]). Concretely, WiSE-FT $(\alpha = 0.5)$ improves performance under distribution shift by 3.5, 6.2, 1.7, 2.1, 9.0 and $23.2~\mathrm{pp}$ relative to the fine-tuned solution while decreasing performance on the reference distribution by at most $0.3~\mathrm{pp}$ (accuracy on the reference distribution often improves). In contrast to the ImageNet distribution shifts, the zero-shot model initially achieves less than $30\%$ accuracy on the WILDS distribution shifts, and WiSE-FT provides improvements regardless. Appendix E.2 (Figure 9 and Table 6) includes more detailed results. + +Hyperparameter variation and alternatives. As illustrated by Figure 3, moderate changes in standard hyperparameters such as the learning rate or the number of epochs can substantially affect performance under distribution shift. Moreover, these performance differences cannot be detected reliably from model performance on reference data alone. For instance, while training for 10 epochs with learning rate $3 \cdot 10^{-5}$ and $3 \cdot 10^{-6}$ lead to a small accuracy difference on ImageNet (0.3 pp), accuracy under distribution shift varies by as much as 8 pp. + +Furthermore, tuning hyperparameters on ImageNet data can also reduce robustness. For instance, while moving from small to moderate learning rates $(10^{-7}$ to $3\cdot 10^{-5})$ improves + +
IN (reference)Distribution shiftsAvg shiftsAvg ref., shifts
IN-V2IN-RIN-SketchObjectNet*IN-A
CLIP ViT-L/14@336px
Zero-shot [79]76.270.188.960.270.077.273.374.8
Fine-tuned LC [79]85.475.984.257.466.275.371.878.6
Zero-shot (PyTorch)76.670.589.060.969.177.773.475.0
Fine-tuned LC (ours)85.275.885.358.767.276.172.678.9
Fine-tuned E2E (ours)86.276.879.857.963.365.468.677.4
WiSE-FT (ours)
LC, α=0.583.776.389.663.070.779.775.979.8
LC, optimal α85.376.989.863.070.779.775.980.2
E2E, α=0.586.879.589.464.771.179.976.981.8
E2E, optimal α87.179.590.365.072.181.077.481.9
+ +Table 1. Accuracy of various methods on ImageNet and derived distribution shifts for CLIP ViT-L/14@336px [79]. E2E: end-to-end; LC: linear classifier. Avg shifts displays the mean performance among the five distribution shifts, while Avg reference, shifts show the average of ImageNet (reference) and Avg shifts. For optimal $\alpha$ , we choose the single mixing coefficient that maximizes the column. Results for additional models are provided in Appendix E.7. + +![](images/db97b089cf0e7a98aa5a3c85036f0092e15dcff07dffa4d581a38d2778157f17.jpg) + +![](images/486c4d70fbf4d032cbddad0779d81e26b56d67c62211b79c1f695544e5eee4a8.jpg) + +![](images/a9d024f45185ed80d0472c5d50a7c673166c75ed82c776df97afec2fc7ce7080.jpg) + +![](images/05e9c63297f287d48b43104044e4ce53a8761c2378e572b8c505bb853da3dc13.jpg) +Figure 3. The robustness of fine-tuned models varies substantially under even small changes in hyperparameters. Applying WiSE-FT addresses this brittleness and can remove the trade-off between accuracy on the reference and shifted distributions. Results shown for CLIP ViT-B/16 fine-tuned with cosine-annealing learning rate schedule and all models in the top left and top middle plots are fine-tuned with AdamW [59]. Moreover, regularize to zero-shot appends the regularizer $\lambda \| \theta -\theta_0\| _2^2$ to the fine-tuning objective, where $\theta_0$ are the parameters of the zero-shot model. + +![](images/8b345a8cfc5e3f5bb2fae3c58f53f1d4942e895c04e21e5d70bff36232902751.jpg) + +![](images/f44cda824513f819ae388b0660bed3ed616346edcf36ef97d681f383fb9424b6.jpg) + +performance on ImageNet by 5 pp, it also deteriorates accuracy under distribution shift by 8 pp. + +WiSE-FT addresses this brittleness of hyperparameter tuning: even when using a learning rate $3 \cdot 10^{-5}$ where standard fine-tuning leads to low robustness, applying WiSE-FT re + +moves the trade-off between accuracy on the reference and shifted distributions. The models which can be achieved by varying $\alpha$ are as good or better than those achievable by other hyperparameter configurations. Then, instead of searching over a wide range of hyperparameters, only $\alpha$ needs to be + +considered. Moreover, evaluating different values of $\alpha$ does not require training new models. + +There is no hyperparameter in Figure 3 which can be varied to match or exceed the optimal curve produced by WiSE-FT. In our experiments, this frontier is reached only through methods that average model weights, either using WiSE-FT or with a more sophisticated averaging scheme: keeping an exponential moving average of all model iterates (EMA, [93]). Comparisons with EMA are detailed in Appendix E.3.2. + +Additional comparisons are also presented in Appendix E.3, including distillation, additional regularization, and CoOp [110]. Finally, Appendix E.4 recreates Figure 3 with stronger data augmentation and finds similar trends. + +Accuracy gains on reference distributions. Beyond robustness to distribution shift, Table 2 demonstrates that WiSE-FT also improves accuracy after fine-tuning on seven datasets. When fine-tuning end-to-end on ImageNet, CIFAR10, CIFAR-100, Describable Textures, Food-101, SUN397, and Stanford Cars, WiSE-FT reduces relative error by 4 to $49\%$ . Even though standard fine-tuning directly optimizes for high accuracy on the reference distribution, WiSE-FT achieves better performance. Appendix E.5 includes more details, including explorations in the low-data regime. + +Beyond CLIP. Figure 4 illustrates that WiSE-FT is generally applicable to zero-shot models beyond CLIP, and beyond models pre-trained contrastively with image-text pairs. First, we interpolate between the weights of the zero-shot and fine-tuned BASIC-L model [75], finding that $\alpha = 0.5$ improves average accuracy on five distribution shifts derived from ImageNet by over 7 pp while improving ImageNet accuracy by 0.4 pp relative to the fine-tuned BASIC-L model (a per-dataset breakdown is provided in Figure 23 and Table 12 of the Appendix). As in Pham et al. [75], the model is fine-tuned using a contrastive loss and half of the ImageNet training data. WiSE-FT provides improvements on both reference and shifted distributions, despite these experimental differences. + +Next, we consider the application of WiSE-FT to a ViT-H/14 model [21] pre-trained on JFT-300M [91], where the zero-shot classifier is constructed by manually identifying a class correspondence (details provided in Section E.7.2). WiSE-FT improves performance under distribution shift over both the zero-shot and fine-tuned models. When $\alpha = 0.8$ , WiSE-FT outperforms the fine-tuned model by 2.2 pp on distribution shifts, while maintaining ImageNet performance within 0.2 pp of the fine-tuned model. This result demonstrates that + +WiSE-FT can be successfully applied even to models which do not use contrastive image-text pre-training. + +Finally, we apply WiSE-FT to the ALIGN model of Jia et al. [44], which is similar to CLIP but is pre-trained with a different dataset, finding similar trends. + +# 5. Related work + +Concurrent and subsequent related work is in Appendix B. + +Robustness. Understanding how models perform under distribution shift remains an important goal, as real world models may encounter data from new environments [78, 96]. Previous work has studied model behavior under synthetic [2, 23, 29, 36, 63, 97] and natural distribution shift [4, 35, 38, 47, 98]. Interventions used for synthetic shifts do not typically provide robustness to many natural distribution shifts [95]. In contrast, accuracy on the reference distribution is often a reliable predictor for accuracy under distribution shift [67, 68, 92, 95, 104]. On the other hand, D'Amour et al. [16] show that accuracy under certain distribution shifts cannot be reliably inferred from accuracy on the reference distribution. We observe a similar phenomenon when fine-tuning with different hyperparameters (Section 4, Figure 3). + +Pre-training and transfer learning. Pre-training on large amounts of data is a powerful technique for building high-performing machine learning systems [12,21,48,80,88,105]. One increasingly popular class of vision models are those pre-trained with auxiliary language supervision, which can be used for zero-shot inference [18,44,75,79,84,107,109]. When pre-trained models are adapted to a specific distribution through standard fine-tuning, effective robustness deteriorates at convergence [3]. In natural language processing, previous work proposed stable fine-tuning methods that incur computational overhead [45, 111], alleviating problems such as representational collapse [1]. More generally, a variety of methods have attempted to mitigate catastrophic forgetting [65]. Kirkpatrick et al. [46]; Zenke et al. [106] explored weighted quadratic regularization for sequential learning. Xuhongget al. [103] showed that, for fine-tuning, the simple quadratic regularization explored in Section 4 performs best, while Lubana et al. [61] explored the connection between quadratic regularization and interpolation. Andreassen et al. [3] found that many approaches from continual learning do not provide robustness to multiple natural distribution shifts. Finally, Li et al. [57] investigate the effect of fine-tuning hyperparameters on performance. + +Traditional (output-space) ensembles. Traditional ensemble methods, which we refer to as output-space ensembles, combine the predictions (outputs) of many classifiers [5, 11, 20, 26, 27, 56]. Typically, output-space ensembles outperform individual classifiers and provide uncertainty es + +
ImageNetCIFAR10CIFAR100CarsDTDSUN397Food101
Standard fine-tuning86.298.692.291.681.980.794.4
WiSE-FT (α=0.5)86.8 (+0.6)99.3 (+0.7)93.3 (+1.1)93.3 (+1.7)84.6 (+2.8)83.2 (+2.5)96.1 (+1.6)
WiSE-FT (opt. α)87.1 (+0.9)99.5 (+0.8)93.4 (+1.2)93.6 (+2.0)85.2 (+3.3)83.3 (+2.6)96.2 (+1.8)
+ +Table 2. Beyond robustness, WiSE-FT can improve accuracy after fine-tuning on several datasets. + +![](images/e10b72e0d4e2c407bbfc90769a3c865882e7c5b3900a87960fa85e287a41f8d6.jpg) +Figure 4. WiSE-FT applied to BASIC-L [75], a ViT-H/14 [21] model pre-trained on JFT-300M [91] and ALIGN [44]. + +timates under distribution shift that are more callibrated than baselines [56, 73, 90]. In contrast to these works, we consider the ensemble of two models which have observed different data. Output-space ensembles require more computational resources as they require a separate pass through each model. Compared to an ensemble of 15 models trained on the same dataset, Mustafa et al. [70] find an improvement of 0.8-1.6 pp under distribution shift (on ImageNetV2, ImageNet-R, ObjectNet, and ImageNet-A) by assembling a similar number of models pre-trained on different datasets. In contrast, we see an improvement of 2-15 pp from assembling two models. Moreover, as we ensemble in weight-space, no extra compute is required compared to a single model. + +Weight-space ensembles. Weight-space ensembles linearly interpolate between the weights of different models [25,32,62,93]. For example, Izmailov et al. [42] average checkpoints saved throughout training for improved performance. Indeed, averaging the weights along the training trajectory is a central method in optimization [72, 77, 82]. For instance, Zhang et al. [108] propose optimizing with a set of fast and slow weights, where every $k$ steps, these two sets of weights are averaged and a new trajectory begins. Here, we revisit these techniques from a distributional robustness perspective and consider the weight-space ensemble of models which have observed different data. + +# 6. Limitations, impact, and conclusion + +Limitations. While we expect our findings to be more broadly applicable to other domains such as natural lan + +guage processing, our investigation here is limited to image classification. Exploring fine-tuning for object detection and natural language processing are interesting directions for future work. Moreover, although the interpolation parameter setting $\alpha = 0.5$ provides good overall performance, we leave the question of finding the optimal $\alpha$ for specific target distributions to future work. + +Impact. Radford et al. [79] and Brown et al. [12] extensively discuss the broader impact of large zero-shot models and identify potential causes of harm including model biases and potential malicious uses such as surveillance systems. WiSE-FT is a fine-tuning method that builds on such models, and thus may perpetuate their negative impact. + +Conclusion. We view WiSE-FT as a first step towards more sophisticated fine-tuning schemes and anticipate that future work will continue to leverage the robustness of zero-shot models for building more reliable neural networks. + +# Acknowledgements + +We thank Anders Andreassen, Tim Dettmers, Jesse Dodge, Katie Everett, Samir Gadre, Ari Holtzman, Sewon Min, Mohammad Norouzi, Nam Pho, Ben Poole, Sarah Pratt, Alec Radford, Jon Shlens, and Rohan Taori for helpful discussions and draft feedback, Hyak at UW for computing support, and Basil Mustafa for providing an earlier version of the mapping between JFT and ImageNet classes. This work is in part supported by NSF IIS 1652052, IIS 17303166, DARPA N66001-19-2-4031, DARPA W911NF-15-1-0543 and gifts from Allen Institute for Artificial Intelligence. + +# References + +[1] Armen Aghajanyan, Akshat Shrivastava, Anchit Gupta, Naman Goyal, Luke Zettlemoyer, and Sonal Gupta. Better fine-tuning by reducing representational collapse. In International Conference on Learning Representations (ICLR), 2021. https://openreview.net/forum?id=OQ08SN70M1V.7 +[2] Michael A Alcorn, Qi Li, Zhitao Gong, Chengfei Wang, Long Mai, Wei-Shinn Ku, and Anh Nguyen. Strike (with) a pose: Neural networks are easily fooled by strange poses of familiar objects. In Conference on Computer Vision and Pattern Recognition (CVPR), 2019. https://arxiv.org/abs/1811.11553.3, 7 +[3] Anders Andreassen, Yasaman Bahri, Behnam Neyshabur, and Rebecca Roelofs. The evolution of out-of-distribution robustness throughout fine-tuning, 2021. https://arxiv.org/abs/2106.15831.1,7 +[4] Andrei Barbu, David Mayo, Julian Alverio, William Luo, Christopher Wang, Dan Gutfreund, Josh Tenenbaum, and Boris Katz. Objectnet: A large-scale bias-controlled dataset for pushing the limits of object recognition models. In Advances in Neural Information Processing Systems (NeurIPS), 2019. 3, 4, 7 +[5] Eric Bauer and Ron Kohavi. An empirical comparison of voting classification algorithms: Bagging, boosting, and variants. Machine learning, 1999. https://link.springer.com/article/10.1023/A:1007515423169.7 +[6] Sara Beery, Arushi Agarwal, Elijah Cole, and Vighnesh Birodkar. The iwildcam 2021 competition dataset. In Conference on Computer Vision and Pattern Recognition (CVPR) FGVC8 Workshop, 2021. https://arxiv.org/abs/2105.03494.3, 5, 21, 22 +[7] Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Šrndić, Pavel Laskov, Giorgio Giacinto, and Fabio Roli. Evasion attacks against machine learning at test time. In Joint European conference on machine learning and knowledge discovery in databases, 2013. https://arxiv.org/abs/1708.06131.3 +[8] Battista Biggio and Fabio Roli. Wild patterns: Ten years after the rise of adversarial machine learning. Pattern Recognition, 2018. https://arxiv.org/abs/1712.03141.3 +[9] Rishi Bommasani, Drew A Hudson, Ehsan Adeli, Russ Altman, Simran Arora, Sydney von Arx, Michael S Bernstein, Jeannette Bohg, Antoine Bosselut, Emma Brunskill, et al. On the opportunities and risks of foundation models, 2021. https://arxiv.org/abs/2108.07258.1 +[10] Lukas Bossard, Matthieu Guillaumin, and Luc Van Gool. Food-101-mining discriminative components with random forests. In European Conference on Computer Vision (ECCV), 2014. https://data.vision.ee.ethz.ch/cvl/datasetsextra/food-101/.3,25,26, 27 +[11] Leo Breiman. Bagging predictors. Machine learning, 1996. https://link.springer.com/article/10.1007/BF00058655.5,7 + +[12] 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, et al. Language models are few-shot learners. In Advances in Neural Information Processing Systems (NeurIPS), 2020. https://arxiv.org/abs/2005.14165.7,8 +[13] Gordon Christie, Neil Fendley, James Wilson, and Ryan Mukherjee. Functional map of the world. In Conference on Computer Vision and Pattern Recognition (CVPR), 2018. https://arxiv.org/abs/1711.07846. 3, 5, 21, 22 +[14] Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In Conference on Computer Vision and Pattern Recognition (CVPR), 2014. https://arxiv.org/abs/1311.3618.3, 25, 26, 27 +[15] Jeremy Cohen, Elan Rosenfeld, and Zico Kolter. Certified adversarial robustness via randomized smoothing. In International Conference on Machine Learning (ICML), 2019. https://arxiv.org/abs/1902.02918.17 +[16] Alexander D'Amour, Katherine Heller, Dan Moldovan, Ben Adlam, Babak Alipanahi, Alex Beutel, Christina Chen, Jonathan Deaton, Jacob Eisenstein, Matthew D Hoffman, et al. Underspecification presents challenges for credibility in modern machine learning, 2020. https://arxiv.org/abs/2011.03395.7 +[17] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Conference on Computer Vision and Pattern Recognition, 2009. https://ieeexplore.ieee.org/document/5206848.3, 4, 27 +[18] Karan Desai and Justin Johnson. Virtex: Learning visual representations from textual annotations. In Conference on Computer Vision and Pattern Recognition (CVPR), 2021. https://arxiv.org/abs/2006.06666.7 +[19] Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout, 2017. https://arxiv.org/abs/1708.04552.17 +[20] Thomas G Dietterich. Ensemble methods in machine learning. In International workshop on multiple classifier systems, 2000. https://link.springer.com/chapter/10.1007/3-540-45014-9_1.5, 7 +[21] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvania Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations (ICLR), 2021. https://arxiv.org/abs/2010.11929.3,4,5,7,8,16,30,33 +[22] Logan Engstrom, Brandon Tran, Dimitris Tsipras, Ludwig Schmidt, and Aleksander Madry. Exploring the landscape of spatial robustness. In International Conference on Machine Learning (ICML), 2019. https://arxiv.org/abs/1712.02779.17 +[23] Kevin Eykholt, Ivan Evtimov, Earlence Fernandes, Bo Li, Amir Rahmati, Chaowei Xiao, Atul Prakash, Tadayoshi + +Kohno, and Dawn Song. Robust physical-world attacks on deep learning visual classification. In Conference on Computer Vision and Pattern Recognition (CVPR), 2018. https://arxiv.org/abs/1707.08945.7 +[24] Stanislav Fort, Gintare Karolina Dziugaite, Mansheej Paul, Sepideh Kharaghani, Daniel M Roy, and Surya Ganguli. Deep learning versus kernel learning: an empirical study of loss landscape geometry and the time evolution of the neural tangent kernel. In Advances in Neural Information Processing Systems (NeurIPS), 2020. https://arxiv.org/abs/2010.15110.44 +[25] Jonathan Frankle, Gintare Karolina Dziugaite, Daniel Roy, and Michael Carbin. Linear mode connectivity and the lottery ticket hypothesis. In International Conference on Machine Learning (ICML), 2020. https://arxiv.org/abs/1912.05671.3, 5, 8, 15 +[26] Yoav Freund and Robert E Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of Computer and System Sciences, 1997. https://www.sciencedirect.com/science/article/pii/S002200009791504X.5,7 +[27] Jerome Friedman, Trevor Hastie, Robert Tibshirani, et al. The elements of statistical learning. Springer series in statistics New York, 2001. 7 +[28] Robert Geirhos, Patricia Rubisch, Claudio Michaelis, Matthias Bethge, Felix A Wichmann, and Wieland Brendel. Imagenet-trained cnns are biased towards texture; increasing shape bias improves accuracy and robustness. In International Conference on Learning Representations (ICLR), 2018. https://arxiv.org/abs/1811.12231.17 +[29] Robert Geirhos, Carlos R Medina Temme, Jonas Rauber, Heiko H Schütt, Matthias Bethge, and Felix A Wichmann. Generalisation in humans and deep neural networks. In Advances in Neural Information Processing Systems (NeurIPS), 2018. https://arxiv.org/abs/1808.08750.3, 7 +[30] Raphael Gontijo-Lopes, Yann Dauphin, and Ekin D Cubuk. No one representation to rule them all: Overlapping features of training methods, 2021. https://arxiv.org/abs/2007.01434.14 +[31] Raphael Gontijo-Lopes, Yann Dauphin, and Ekin D. Cubuk. No one representation to rule them all: overlapping features of training methods, 2021. https://arxiv.org/abs/2110.12899.16 +[32] Ian J Goodfellow, Oriol Vinyals, and Andrew M Saxe. Qualitatively characterizing neural network optimization problems. In International Conference on Learning Representations (ICLR), 2014. https://arxiv.org/abs/1412.6544.8 +[33] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In International Conference on Machine Learning (ICML), 2017. https://arxiv.org/abs/1706.04599.14 +[34] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. https://arxiv.org/abs/1512.03385.4 + +[35] Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath, Frank Wang, Evan Dorundo, Rahul Desai, Tyler Zhu, Samyak Parajuli, Mike Guo, Dawn Song, Jacob Steinhardt, and Justin Gilmer. The many faces of robustness: A critical analysis of out-of-distribution generalization. International Conference on Computer Vision (ICCV), 2021. https://arxiv.org/abs/2006.16241.3,4,7 +[36] Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. International Conference on Learning Representations (ICLR), 2019. https://arxiv.org/abs/1903.12261.3,7 +[37] Dan Hendrycks, Norman Mu, Ekin D. Cubuk, Barret Zoph, Justin Gilmer, and Balaji Lakshminarayanan. AugMix: A simple data processing method to improve robustness and uncertainty. In International Conference on Learning Representations (ICLR), 2020. https://arxiv.org/abs/1912.02781.17 +[38] Dan Hendrycks, Kevin Zhao, Steven Basart, Jacob Steinhardt, and Dawn Song. Natural adversarial examples. Conference on Computer Vision and Pattern Recognition (CVPR), 2021. https://arxiv.org/abs/1907.07174.3,4,7 +[39] John Hewitt, Xiang Lisa Li, Sang Michael Xie, Benjamin Newman, and Percy Liang. Ensembles and cocktails: Robust finetuning for natural language generation. In NeurIPS 2021 Workshop on Distribution Shifts, 2021. https://openreview.net/forum?id=qXucB21w1C3. 15, 16 +[40] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. In Advances in Neural Information Processing Systems (NeurIPS) Deep Learning Workshop, 2015. https://arxiv.org/abs/1503.02531.24 +[41] Tin Kam Ho. The random subspace method for constructing decision forests. IEEE transactions on pattern analysis and machine intelligence, 1998. https://ieeexplore.ieee.org/document/709601.40 +[42] Pavel Izmailov, Dmitrii Podoprikhin, Timur Garipov, Dmitry Vetrov, and Andrew Gordon Wilson. Averaging weights leads to wider optima and better generalization. In Conference on Uncertainty in Artificial Intelligence (UAI), 2018. https://arxiv.org/abs/1803.05407.4, 5, 8, 15 +[43] Arthur Jacot, Franck Gabriel, and Clément Hongler. Neural tangent kernel: Convergence and generalization in neural networks. In Advances in Neural Information Processing Systems (NeurIPS), 2018. https://arxiv.org/abs/1806.07572.44 +[44] 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. In International Conference on Machine Learning (ICML), 2021. https://arxiv.org/abs/2102.05918. 1, 3, 4, 5, 7, 8, 16, 30, 31 +[45] Haoming Jiang, Pengcheng He, Weizhu Chen, Xiaodong Liu, Jianfeng Gao, and Tuo Zhao. Smart: Robust and efficient fine-tuning for pre-trained natural language models + +through principled regularized optimization. In Association for Computational Linguistics (ACL), 2019. https://arxiv.org/abs/1911.03437.7 +[46] 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 (PNAS), 2017. https://arxiv.org/abs/1612.00796.7 +[47] Pang Wei Koh, Shiori Sagawa, Henrik Marklund, Sang Michael Xie, Marvin Zhang, Akshay Balsubramani, Weihua Hu, Michihiro Yasunaga, Richard Lanas Phillips, Irena Gao, Tony Lee, Etienne David, Ian Stavness, Wei Guo, Berton A. Earnshaw, Imran S. Haque, Sara Beery, Jure Leskovec, Anshul Kundaje, Emma Pierson, Sergey Levine, Chelsea Finn, and Percy Liang. WILDS: A benchmark of in-the-wild distribution shifts. In International Conference on Machine Learning (ICML), 2021. https://arxiv.org/abs/2012.07421.3,5,7,21,22 +[48] Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, and Neil Houlsby. Big transfer (bit): General visual representation learning. In European Conference on Computer Vision (ECCV), 2020. https://arxiv.org/abs/1912.11370.7 +[49] Simon Kornblith, Mohammad Norouzi, Honglak Lee, and Geoffrey Hinton. Similarity of neural network representations revisited. In International Conference on Machine Learning (ICML), 2019. https://arxiv.org/abs/1905.00414.14, 41 +[50] Simon Kornblith, Jonathon Shlens, and Quoc V Le. Do better imagenet models transfer better? In Conference on Computer Vision and Pattern Recognition (CVPR), 2019. https://arxiv.org/abs/1805.08974.25, 26 +[51] Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. 3d object representations for fine-grained categorization. In International Conference on Computer Vision (ICCV) Workshops, 2013. https://ieeexplore.ieee.org/document/6755945.3, 25, 26, 27 +[52] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images, 2009. https://www.cs.toronto.edu/~kriz/learning-features-2009-TR.pdf.3,5,21,25,26,27 +[53] Ananya Kumar, Aditi Raghunathan, Robbie Jones, Tengyu Ma, and Percy Liang. Fine-tuning distorts pretrained features and underperforms out-of-distribution, 2021. https://openreview.net/forum?id=UYneFzXJSJWh.15 +[54] Ananya Kumar, Aditi Raghunathan, Tengyu Ma, and Percy Liang. Calibrated ensembles: A simple way to mitigate ID-OOD accuracy tradeoffs. In NeurIPS 2021 Workshop on Distribution Shifts, 2021. https://openreview.net/forum?id=dmDE-9e9F_x.15 +[55] Ludmila I Kuncheva and Christopher J Whitaker. Measures of diversity in classifier ensembles and their relationship with the ensemble accuracy. Machine learning, 2003. https://doi.org/10.1023/A:1022859003006.14 + +[56] Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. In Advances in Neural Information Processing Systems (NeurIPS), 2017. https://arxiv.org/abs/1612.01474.7,8 +[57] Hao Li, Pratik Chaudhari, Hao Yang, Michael Lam, Avinash Ravichandran, Rahul Bhotika, and Stefano Soatto. Rethinking the hyperparameters for fine-tuning. In International Conference on Learning Representations (ICLR), 2020. https://arxiv.org/abs/2002.11770.7 +[58] Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. In International Conference on Learning Representations (ICLR), 2016. https:// arxiv.org/abs/1608.03983.23, 39 +[59] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations (ICLR), 2019. https://openreview.net/forum?id=Bkg6RiCqY7.6, 23, 39 +[60] Shangyun Lu, Bradley Nott, Aaron Olson, Alberto Todeschini, Hossein Vahabi, Yair Carmon, and Ludwig Schmidt. Harder or different? a closer look at distribution shift in dataset reproduction. In International Conference on Machine Learning (ICML) Workshop on Uncertainty and Robustness in Deep Learning, 2020. http://www.gatsby.ucl.ac.uk/~balaji/udl2020/ accepted-papers/UDL2020-paper-101.pdf.3, 5, 21, 22 +[61] Ekdeep Singh Lubana, Puja Trivedi, Danai Koutra, and Robert P. Dick. How do quadratic regularizers prevent catastrophic forgetting: The role of interpolation, 2021. https://arxiv.org/abs/2102.02805.7 +[62] James Lucas, Juhan Bae, Michael R Zhang, Stanislav Fort, Richard Zemel, and Roger Grosse. Analyzing monotonic linear interpolation in neural network loss landscapes. In International Conference on Machine Learning (ICML), 2021. https://arxiv.org/abs/2104.11044.8 +[63] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In International Conference on Learning Representations (ICLR), 2017. https://arxiv.org/abs/1706.06083.7, 17 +[64] Michael Matena and Colin Raffel. Merging models with fisher-weighted averaging, 2021. https://arxiv.org/abs/2111.09832.16 +[65] Michael McCloskey and Neal J. Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. Psychology of Learning and Motivation, 1989. https://www.sciencedirect.com/science/article/pii/S0079742108605368.7 +[66] Mary L McHugh. Interrater reliability: the kappa statistic. Biochemia medica, 2012. 40 +[67] John Miller, Karl Krauth, Benjamin Recht, and Ludwig Schmidt. The effect of natural distribution shift on question answering models. In International Conference on Machine Learning (ICML), 2020. https://arxiv.org/abs/2004.14444.7 + +[68] John P Miller, Rohan Taori, Aditi Raghunathan, Shiori Sagawa, Pang Wei Koh, Vaishaal Shankar, Percy Liang, Yair Carmon, and Ludwig Schmidt. Accuracy on the line: on the strong correlation between out-of-distribution and in-distribution generalization. In International Conference on Machine Learning (ICML), 2021. https://arxiv.org/abs/2107.04649.1, 4, 7, 17 +[69] Rafael Müller, Simon Kornblith, and Geoffrey Hinton. When does label smoothing help? In Advances in Neural Information Processing Systems (NeurIPS), 2019. https://arxiv.org/abs/1906.02629.23, 39 +[70] Basil Mustafa, Carlos Riquelme, Joan Puigcerver, André Susano Pinto, Daniel Keysers, and Neil Houlsby. Deep ensembles for low-data transfer learning, 2020. https://arxiv.org/abs/2010.06866.8 +[71] Behnam Neyshabur, Hanie Sedghi, and Chiyuan Zhang. What is being transferred in transfer learning? In Advances in Neural Information Processing Systems (NeurIPS), 2020. https://arxiv.org/abs/2008.11687.3,4,5,15 +[72] Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms, 2018. https://arxiv.org/abs/1803.02999.8 +[73] Yaniv Ovadia, Emily Fertig, Jie Ren, Zachary Nado, David Sculley, Sebastian Nowozin, Joshua V Dillon, Balaji Lakshminarayanan, and Jasper Snoek. Can you trust your model's uncertainty? evaluating predictive uncertainty under dataset shift. In Advances in Neural Information Processing Systems (NeurIPS), 2019. https://arxiv.org/abs/1906.02530.8 +[74] 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 Advances in Neural Information Processing Systems (NeurIPS), 2019. https://arxiv.org/abs/1912.01703.23, 39 +[75] Hieu Pham, Zihang Dai, Golnaz Ghiasi, Hanxiao Liu, Adams Wei Yu, Minh-Thang Luong, Mingxing Tan, and Quoc V. Le. Combined scaling for zero-shot transfer learning, 2021. https://arxiv.org/abs/2111.10050.1,3,4,5,7,8,16,30,34,35 +[76] Boris Teodorovich Polyak. New method of stochastic approximation type. Automation and remote control, 1990. 2 +[77] Boris T Polyak and Anatoli B Juditsky. Acceleration of stochastic approximation by averaging. SIAM journal on control and optimization, 1992. https://epubs.siam.org/doi/abs/10.1137/0330046?journalCode=sjcodc.8 +[78] Joaquin Quinonero-Candela, Masashi Sugiyama, Neil D Lawrence, and Anton Schwaighofer. Dataset shift in machine learning. Mit Press, 2009. 7 +[79] 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 International Conference on Machine Learning (ICML), 2021. + +https://arxiv.org/abs/2103.00020.1,3,4,5, 6,7,8,24,25,30,39 +[80] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language Models are Unsupervised Multitask Learners, 2019. https://openai.com/blog/better-language-models/.3,7 +[81] Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do ImageNet classifiers generalize to ImageNet? In International Conference on Machine Learning (ICML), 2019. https://arxiv.org/abs/1902.10811.3, 4, 5, 21, 22 +[82] David Ruppert. Efficient estimations from a slowly convergent robbins-monro process, 1988. https://ecommons.cornell.edu/handle/1813/8664.2, 8 +[83] Hadi Salman, Greg Yang, Jerry Li, Pengchuan Zhang, Huan Zhang, Ilya Razenshteyn, and Sebastien Bubeck. Provably robust deep learning via adversarially trained smoothed classifiers. In Advances in Neural Information Processing Systems (NeurIPS), 2019. https://arxiv.org/abs/1906.04584.17 +[84] Mert Bulent Sariyildiz, Julien Perez, and Diane Larlus. Learning visual representations with caption annotations. In European Conference on Computer Vision (ECCV), 2020. https://arxiv.org/abs/2008.01392.7 +[85] Ali Shafahi, Mahyar Najibi, Amin Ghiasi, Zheng Xu, John Dickerson, Christoph Studer, Larry S Davis, Gavin Taylor, and Tom Goldstein. Adversarial training for free! In Advances in Neural Information Processing Systems (NeurIPS), 2019. https://arxiv.org/abs/1904.12843.17 +[86] Vaishaal Shankar, Achal Dave, Rebecca Roelofs, Deva Ramanan, Benjamin Recht, and Ludwig Schmidt. Do image classifiers generalize across time?, 2019. https://arxiv.org/abs/1906.02168.3, 21, 22 +[87] Vaishaal Shankar, Rebecca Roelofs, Horia Mania, Alex Fang, Benjamin Recht, and Ludwig Schmidt. Evaluating machine accuracy on imagenet. In International Conference on Machine Learning (ICML), 2020. http://proceedings.mlr.press/v119/shankar20c/shankar20c.pdf.3,5 +[88] Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. Cnn features off-the-shelf: an astounding baseline for recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition workshops, 2014. https://arxiv.org/abs/1403.6382.7 +[89] David B Skalak et al. The sources of increased accuracy for two proposed boosting algorithms. In American Association for Artificial Intelligence (AAAI), Integrating Multiple Learned Models Workshop, 1996. https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.40.2269&rep=rep1&type=pdf.40 +[90] Asa Cooper Stickland and Iain Murray. Diverse ensembles improve calibration. In International Conference on Machine Learning (ICML) Workshop on Uncertainty and Robustness in Deep Learning, 2020. https://arxiv.org/abs/2007.04206.8 +[91] Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting unreasonable effectiveness of data in + +deep learning era. In International Conference on Computer Vision (ICCV), 2017. https://arxiv.org/abs/1707.02968.5,7,8,33 +[92] 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 Conference on Computer Vision and Pattern Recognition (CVPR), 2020. https://arxiv.org/abs/1912.04838.7 +[93] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. https://arxiv.org/abs/1512.00567.7,8,23 +[94] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning (ICML), 2019. https://proceedings.mlr.press/v97/tan19a/tan19a.pdf.38 +[95] Rohan Taori, Achal Dave, Vaishaal Shankar, Nicholas Carlini, Benjamin Recht, and Ludwig Schmidt. Measuring robustness to natural distribution shifts in image classification. In Advances in Neural Information Processing Systems (NeurIPS), 2020. https://arxiv.org/abs/2007.00644.1, 2, 3, 4, 7, 17, 18 +[96] Antonio Torralba and Alexei A Efros. Unbiased look at dataset bias. In Conference on Computer Vision and Pattern Recognition (CVPR), 2011. https://people.csail.mit.edu/torralba/publications/datasetscvpr11.pdf.7 +[97] Florian Tramèr, Alexey Kurakin, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick McDaniel. Ensemble adversarial training: Attacks and defenses. In International Conference on Learning Representations (ICLR), 2017. https://arxiv.org/abs/1705.07204.7 +[98] Haohan Wang, Songwei Ge, Zachary Lipton, and Eric P Xing. Learning robust global representations by penalizing local predictive power. In Advances in Neural Information Processing Systems (NeurIPS), 2019. https://arxiv.org/abs/1905.13549.3, 4, 7 +[99] Ross Wightman. Pytorch image models. https://github.com/rwrightman/pytorch-image-models, 2019.23, 25, 26, 39 +[100] Mitchell Wortsman, Maxwell C Horton, Carlos Guestrin, Ali Farhadi, and Mohammad Rastegari. Learning neural network subspaces. In International Conference on Machine Learning (ICML), 2021. https://arxiv.org/abs/2102.10472.15 +[101] Jianxiong Xiao, Krista A Ehinger, James Hays, Antonio Torralba, and Aude Oliva. Sun database: Exploring a large collection of scene categories. International Journal of Computer Vision, 2016. https://link.springer.com/article/10.1007/s11263-014-0748-y.3, 25, 26, 27 +[102] Qizhe Xie, Minh-Thang Luong, Eduard Hovy, and Quoc V Le. Self-training with noisy student improves imagenet classification. In Conference on Computer Vision and Pat + +tern Recognition (CVPR), 2020. https://arxiv.org/abs/1911.04252.38 +[103] LI Xuhong, Yves Grandvalet, and Franck Davoine. Explicit inductive bias for transfer learning with convolutional networks. In International Conference on Machine Learning (ICML), 2018. https://arxiv.org/abs/1802.01483.7 +[104] Chhavi Yadav and Léon Bottou. Cold case: The lost mnist digits. In Advances in Neural Information Processing Systems (NeurIPS), 2019. https://arxiv.org/abs/1905.10498.7 +[105] I Zeki Yalniz, Herve Jégou, Kan Chen, Manohar Paluri, and Dhruv Mahajan. Billion-scale semi-supervised learning for image classification, 2019. https://arxiv.org/abs/1905.00546.7 +[106] Friedemann Zenke, Ben Poole, and Surya Ganguli. Continual learning through synaptic intelligence. In International Conference on Machine Learning (ICML), 2017. https://arxiv.org/abs/1703.04200.7 +[107] 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. https://arxiv.org/abs/2111.07991.7 +[108] Michael R Zhang, James Lucas, Geoffrey Hinton, and Jimmy Ba. Lookahead optimizer: k steps forward, 1 step back. In Advances in Neural Information Processing Systems (NeurIPS), 2019. https://arxiv.org/abs/1907.08610.8 +[109] Yuhao Zhang, Hang Jiang, Yasuhide Miura, Christopher D Manning, and Curtis P Langlotz. Contrastive learning of medical visual representations from paired images and text, 2020. https://arxiv.org/abs/2010.00747.7 +[110] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Learning to prompt for vision-language models, 2021. https://arxiv.org/abs/2109.01134.7, 16, 24, 25 +[111] Chen Zhu, Yu Cheng, Zhe Gan, Siqi Sun, Tom Goldstein, and Jingjing Liu. Freelb: Enhanced adversarial training for natural language understanding. In International Conference on Learning Representations (ICLR), 2020. https://arxiv.org/abs/1909.11764.7 \ No newline at end of file diff --git a/robustfinetuningofzeroshotmodels/images.zip b/robustfinetuningofzeroshotmodels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..52412b72d5e4301a3ed2be8ad1a7c0b2dc487a16 --- /dev/null +++ b/robustfinetuningofzeroshotmodels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3da66f93e3a493d3eb013d161b09a8eb38863597deac5c8abc754c0951539cf5 +size 503364 diff --git a/robustfinetuningofzeroshotmodels/layout.json b/robustfinetuningofzeroshotmodels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..b5cf088e884df683792cb449d900f445bb199f27 --- /dev/null +++ b/robustfinetuningofzeroshotmodels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe9c23a440460d22e78f3de9fbbd972d4987d400cbb718a901a33d2525654c82 +size 500701 diff --git a/robustimageforgerydetectionoveronlinesocialnetworksharedimages/5a71c40b-d120-4abd-8d9d-8d5f6d03d024_content_list.json b/robustimageforgerydetectionoveronlinesocialnetworksharedimages/5a71c40b-d120-4abd-8d9d-8d5f6d03d024_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..21f924bddbf10846b018ccb5514d71640144c188 --- /dev/null +++ b/robustimageforgerydetectionoveronlinesocialnetworksharedimages/5a71c40b-d120-4abd-8d9d-8d5f6d03d024_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:001de4df94d9ee4db6cabe8bce71f2043933febfef03cd42d3374d4c90e7835e +size 78407 diff --git a/robustimageforgerydetectionoveronlinesocialnetworksharedimages/5a71c40b-d120-4abd-8d9d-8d5f6d03d024_model.json b/robustimageforgerydetectionoveronlinesocialnetworksharedimages/5a71c40b-d120-4abd-8d9d-8d5f6d03d024_model.json new file mode 100644 index 0000000000000000000000000000000000000000..24151df547c635b6f35b93f84f7df63f9233bb0d --- /dev/null +++ b/robustimageforgerydetectionoveronlinesocialnetworksharedimages/5a71c40b-d120-4abd-8d9d-8d5f6d03d024_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e826000b73fc8a66d4049c8fdb14df6e54348b51eb02bd128ef4d0543273e8c3 +size 94630 diff --git a/robustimageforgerydetectionoveronlinesocialnetworksharedimages/5a71c40b-d120-4abd-8d9d-8d5f6d03d024_origin.pdf b/robustimageforgerydetectionoveronlinesocialnetworksharedimages/5a71c40b-d120-4abd-8d9d-8d5f6d03d024_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..287f201a319ed8b191f33583b412738f37fe9c32 --- /dev/null +++ b/robustimageforgerydetectionoveronlinesocialnetworksharedimages/5a71c40b-d120-4abd-8d9d-8d5f6d03d024_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10c9d20048ef37fa59191f7837237105dfa2cb860667aae7b648fd9aed87b3b4 +size 4632247 diff --git a/robustimageforgerydetectionoveronlinesocialnetworksharedimages/full.md b/robustimageforgerydetectionoveronlinesocialnetworksharedimages/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4e8de76f29523716f465073f3c6730defbc49b7b --- /dev/null +++ b/robustimageforgerydetectionoveronlinesocialnetworksharedimages/full.md @@ -0,0 +1,331 @@ +# Robust Image Forgery Detection over Online Social Network Shared Images + +Haiwei Wu, Jiantao Zhou, Jinyu Tian, and Jun Liu +State Key Laboratory of Internet of Things for Smart City +Department of Computer and Information Science, University of Macau +{yc07912, jtzhou, yb77405, yc07453}@um.edu.mo + +# Abstract + +The increasing abuse of image editing softwares, such as Photoshop and Meitu, causes the authenticity of digital images questionable. Meanwhile, the widespread availability of online social networks (OSNs) makes them the dominant channels for transmitting forged images to report fake news, propagate rumors, etc. Unfortunately, various lossy operations adopted by OSNs, e.g., compression and resizing, impose great challenges for implementing the robust image forgery detection. To fight against the OSN-shared forgeries, in this work, a novel robust training scheme is proposed. We first conduct a thorough analysis of the noise introduced by OSNs, and decouple it into two parts, i.e., predictable noise and unseen noise, which are modelled separately. The former simulates the noise introduced by the disclosed (known) operations of OSNs, while the latter is designed to not only complete the previous one, but also take into account the defects of the detector itself. We then incorporate the modelled noise into a robust training framework, significantly improving the robustness of the image forgery detector. Extensive experimental results are presented to validate the superiority of the proposed scheme compared with several state-of-the-art competitors. Finally, to promote the future development of the image forgery detection, we build a public forgeries dataset based on four existing datasets and three most popular OSNs. The designed detector recently won the top ranking in a certificate forgery detection competition1. The source code and dataset are available at https://github.com/HighwayWu/ImageForensicsOSN. + +# 1. Introduction + +The ever-increasing popularity of powerful image editing softwares has made the manipulation of images an extremely easy task. The manipulated or forged images are becoming increasingly dangerous in various fields such as + +![](images/9fc64410c3d6a9e43543a850aa815dd06d69d5108ac886a1b0b7aa1483651f0f.jpg) +Figure 1. The detection results of DFCN [42] and ours by using an original forgery and the one transmitted through an OSN. The left girl is spliced (forged). + +removing copyright watermarks, producing fake news, and being forged evidence in court. Meanwhile, with the vigorous development of the Internet, online social networks (OSNs) have become dominant platforms for information transmission, where images occupy a large portion. Many forged images are transmitted over various OSNs, influencing people's opinion towards e.g., important documents (certificates), commercial products, political issues, etc. + +A large number of methods [4, 5, 8, 11, 12, 18, 20–23, 26, 27, 36, 37, 39, 42] have been proposed to detect and localize image forgery. Some of them are designed to detect specific forms of tampering, such as splicing [18, 26], copy-move [23, 39] and inpainting [21, 22, 36], while the others aim to identify more complex or compound forgeries. However, few research has been done to explicitly address the design of the robust forgery detection against the lossy operations in the ubiquitous OSN platforms. Such a topic is very important because these lossy operations can severely degrade the detection performance. As shown in Fig. 1, the state-of-the-art algorithm [42] can accurately detect the forged regions from the original forgery; but the detection performance would be severely degraded when handling the forgery transmitted through Facebook. + +For mitigating the negative impacts of OSNs, the first + +critical issue is to analyze and model the noise introduced by the OSN lossy channels. However, this is a rather difficult problem mainly because current platforms do not disclose the process for manipulating the transmitted images. Although some works [33, 34] revealed part of the operations adopted by OSNs, there are still many unknown ones, e.g., the enhancement filtering in Facebook. More importantly, OSNs often adjust their image processing pipelines, making the modeling even more challenging. + +To deal with the aforementioned challenges, in this paper, we aim to design a robust image forgery detection method to defeat the lossy operations in OSNs. Specifically, for dealing with the OSN degradations, we propose a noise modeling scheme and integrate the mimetic noises into a robust training framework. We decouple the OSN noises into two components: 1) predictable noise and 2) unseen noise. The former is designed to simulate the predictable loss brought by known operations, (e.g., JPEG compression), whose modeling relies on a deep neural network (DNN) with the residual learning and an embedded differentiable JPEG layer. While the latter is mainly in response to the unknowable actions conducted by OSNs and/or the discrepancy between the training and testing of various OSNs. Apparently, it is unrealistic to build a suitable model for the unseen noise from the perspective of the signal itself. To address this difficulty, we transfer our observations from the noise perspective to the forgery detector, only focusing on the noise that may cause deterioration of the detection performance. Such a strategy naturally incubates a new algorithm to model the unseen noise by utilizing the core idea of adversarial noise [35], which is essentially imperceptible perturbation that can severely degrade the model performance. It is shown that our robust image forgery detection method demonstrates superior robustness and outperforms several state-of-the-art algorithms. An example of the detection result of our scheme is shown in Fig. 1. Finally, we build a public forgeries dataset with more than 5000 items based on four existing datasets [1, 6, 14, 17] and three OSN platforms (Facebook, Weibo, and Wechat). Our major contributions can be summarized as follows: + +- We propose a novel training scheme for robust image forgery detection against transmission over OSNs. The training scheme not only models the predictable noise introduced by OSNs, but also incorporates the unseen noise to further promote the robustness. +- Our model achieves better detection performance in comparison with several state-of-the-art methods [12, 27,37,42], especially in the scenario of fighting against the transmission over OSNs. +- We build a public forgeries dataset based on four existing datasets [1, 6, 14, 17] and three platforms (Facebook, Weibo, and Wechat). + +The rest of this paper is organized as follows. Sec. 2 reviews the related works. Sec. 3 presents the details on the robust image forgery detection through the proposed robust training strategy. Experimental results are given in Sec. 4 and Sec. 5 concludes. + +# 2. Related works + +# 2.1. Image forgery detection + +Many forensics methods (e.g., [2, 3, 5, 7, 8, 18-23, 26, 36, 39, 40]) have been proposed to verify the authenticity of digital images. These methods detect the forged regions through specific artifacts left by, e.g., splicing [18,26], copy-move [23, 39], median filtering [8, 20], inpainting [21, 22, 36], etc. To better fit the practical requirements, more and more methods have been developed to address the problem of detecting general (compound) types of forgeries [4,5,11,12,27,37,41,42], among which deep learning based methods are the most successful. Along this line, Wu et al. [37] proposed the MT-Net, a general forgery detection network, which first extracts image manipulation features and then identifies anomalous regions. Mayer and Stamm recently [27] introduced the forensic similarity to determine whether two image patches contain the same forensic traces. From the perspective of the camera fingerprint, Cozzolino and Verdoliva [12] designed a method for extracting a camera model fingerprint, called noiseprint, so as to disclose the forged regions. For learning the traces of generic forgeries, Zhuang et al. [42] utilized a training data generation strategy by using the Photoshop scripting. + +# 2.2. Online Social Network (OSN) + +The popularity of various OSN platforms, e.g., Facebook, Wechat, Weibo, etc, significantly simplifies the dissemination and sharing of images. However, as indicated by many existing works [33, 34], almost all OSNs manipulate the uploaded images in a lossy fashion. The noise introduced by these lossy operations could severely affect the effectiveness of forensic methods. Taking Facebook as an example, as discovered in [32-34], these manipulations mainly consist of three stages: resizing, enhancement filtering, and JPEG compression. Specifically, resizing would be applied if the resolution of the image is above 2048 pixels. After that, some selected blocks in the image undergo highly adaptive and complex enhancement filtering. As mentioned in [33, 34], it is very challenging to precisely know these enhancement filtering operations due to their adaptiveness. Finally, the image is subject to a round of JPEG compression with a quality factor (QF) adaptively determined according to the image content. Through the analysis of the dataset provided in [33], the QF values used by Facebook range from 71 to 95. Although the image manipulations on different OSN platforms are different, the op + +erations conducted by mainstream OSNs still share many similarities (e.g., ubiquitous JPEG compression) [33]. + +Some existing forensics [9, 24, 38] are designed to identify the involved transmission operations. Liao et al. [9, 24] first raised a feature decoupling method for the identification of two manipulations based on blind signal separation. To further reveal a long chain, You et al. [38] presented a solution by innovatively representing the manipulation chain detection as a machine translation problem. + +# 3. Robust image forgery detection against transmission over OSNs + +In this section, we present the details on the robust image forgery detection scheme against the transmission over OSNs. The key technique leading to the success is to appropriately model the degradations incurred by OSNs, and integrate such knowledge into a robust training framework. Recall from Sec. 2.2 that the image processing operations in an OSN are rather complicated; some of them can be precisely known, while some others can only be partially known or even completely unknown. Therefore, we propose to divide the OSN noise into two types: 1) predictable noise and 2) unseen noise. The former type corresponds to the case that the degradation source is clearly identified. While the latter type is a combination of various noise uncertainties, including the unknown modeling/parameters, the discrepancy between the training and testing OSNs, and even some totally unseen degradation sources. By adding the modelled OSN noise in the training phase, the detector is expected to learn more generalized features that could survive the OSN transmission, making the overall forgery detection performance significantly improved. + +In Fig. 2, we illustrate the framework of our robust training scheme for the forgery detection, which consists of four stages. Roughly speaking, Stage 1 and Stage 2 are devoted to simulate the predictable noise via a differentiable network. Stage 3 deals with the modeling of the unseen noise through an adversarial noise generation strategy. Eventually, Stage 4 handles the actual robust training of the image forgery detector $f_{\theta}$ . Note that our robust training scheme can be incorporated with any deep learning based image forgery detectors. As the focus of this work is more on the robust training, we in the following restrict our attention to the Stages 1-3, while leaving the details of $f_{\theta}$ in Sec. 4.1. + +Formally, let $\pmb{\tau}$ and $\pmb{\xi}$ denote the predictable noise and unseen noise, respectively, and hence the compound noise considered in the robust training stage becomes + +$$ +\delta = \tau + \xi . \tag {1} +$$ + +For each training iteration, we first sample two pristine 3-channel (RGB) color images $\{\mathbf{p}_1,\mathbf{p}_2\} \in \mathbb{R}^{H\times W\times 3}$ , and one binary mask $\mathbf{y}\in \{0,1\}^{H\times W\times 1}$ , where 1's are assigned + +to the forged regions and 0's elsewhere. Then a forged image $\mathbf{x}$ can be synthesized as + +$$ +\mathbf {x} = \mathbf {p} _ {1} \odot (1 - \mathbf {y}) + \mathbf {p} _ {2} \odot \mathbf {y}, \tag {2} +$$ + +where $\odot$ denotes the element-wise multiplication. Upon having the pairs of forged image and the corresponding ground-truth mask, we can create a dataset $\mathcal{D} = \{\left(\mathbf{x}_i,\mathbf{y}_i\right)\}_{i = 1}^N$ for the training, where $i$ is the index for the training sample. The robust training of the image forgery detector $f_{\theta}$ under the compound noise $\delta$ can then be formulated as: + +$$ +\arg \min _ {\boldsymbol {\theta}} \frac {1}{N} \sum_ {i = 1} ^ {N} \mathbb {E} _ {P (\boldsymbol {\delta})} \left\{\mathcal {L} _ {b} \left(f _ {\boldsymbol {\theta}} \left(\mathbf {x} _ {i} + \boldsymbol {\delta}\right), \mathbf {y} _ {i}\right) \right\}, \tag {3} +$$ + +where $P(\delta)$ denotes the distribution of the compound noise $\delta$ , $N$ is the number of training samples, and $\mathcal{L}_b$ is the binary cross-entropy (BCE) loss. + +In our noise model, we consider a rather general setting that the two noise components $\pmb{\tau}$ and $\pmb{\xi}$ are dependent. Then, the robust training scheme Eq. (3) can be further written as + +$$ +\arg \min _ {\boldsymbol {\theta}} \frac {1}{N} \sum_ {i = 1} ^ {N} \mathbb {E} _ {P (\boldsymbol {\tau})} \left\{\mathbb {E} _ {P (\boldsymbol {\xi} | \boldsymbol {\tau})} \left\{\mathcal {L} _ {b} \left(f _ {\boldsymbol {\theta}} \left(\mathbf {x} _ {i} + \boldsymbol {\tau} + \boldsymbol {\xi}\right), \mathbf {y} _ {i}\right) \right\} \right\}, \tag {4} +$$ + +where $P(\tau)$ is the marginal distribution of $\pmb{\tau}$ , and $P(\pmb{\xi}|\pmb{\tau})$ is the conditional distribution of $\pmb{\xi}$ given $\pmb{\tau}$ . From the implementation perspective, such expected values could be efficiently and accurately computed upon having a sufficient number of noise samples. To conduct the robust training given in Eq. (4), a crucial task is to model the marginal distribution $P(\pmb{\tau})$ and the conditional distribution $P(\pmb{\xi}|\pmb{\tau})$ . + +# 3.1. Modeling the distribution $P(\tau)$ + +We now model the distribution $P(\tau)$ , where the degradation is caused by the lossy operations of OSN platforms. From Sec. 2.2, we know that the dominating degradation source of $\tau$ is the applied JPEG compression, and the postprocessing (e.g., enhancement filtering) also partially contributes to $\tau$ . For an image $\mathbf{x}_i$ and a fixed OSN platform, the incurred noise can be easily calculated by + +$$ +\boldsymbol {\tau} _ {i} = \operatorname {O S N} \left(\mathbf {x} _ {i}\right) - \mathbf {x} _ {i}, \tag {5} +$$ + +where the function $\mathrm{OSN}(\cdot)$ reflects all the operations conducted by the given OSN platform. Note that $\tau_{i}$ depends on $\mathbf{x}_i$ , namely, the noise is signal dependent. Seemingly, in this way, we can generate a lot of noise samples, which can be used to model the distribution of $P(\tau)$ . However, in practice, such a naive modeling scheme is quite problematic. The processed image $\mathrm{OSN}(\mathbf{x}_i)$ has to be obtained by uploading $\mathbf{x}_i$ to the specific OSN platform, and then downloading it. Such procedure, on one hand, is time-consuming; on the other hand, many OSNs do not allow + +# Training Phase + +![](images/9b89f91fc6d279e3e51220facec0fe0705496e8dd6d1bda2cd66a876ac018c7f.jpg) +Figure 2. The overview of our proposed training scheme and the corresponding testing phase. + +too many times of the uploading/downloading operations. For instance, Weibo even bans the account if too many uploading operations are observed in a short period of time. This seriously limits the number of obtained noise samples, making such a naive scheme highly ineffective in practice. + +To resolve this challenge, we resort to another strategy of modeling $P(\tau)$ in an inexplicit manner. We propose to use a substitute deep network for mimicking the OSN operations, so as to conveniently produce a large number of noise samples $\tau_{i}$ . Specifically, to be consistent with the image processing pipeline in the OSN platform, we train a DNN model, which explicitly embeds a differentiable layer to describe the JPEG compression. For an input image $\mathbf{x}_i$ , we aim to learn a mapping $g_{\phi}: \mathbb{R}^d \to \mathbb{R}^d$ , where $g_{\phi}$ is a network with trainable parameters $\phi$ , predicting the OSN output. We employ a U-Net architecture [28] for $g_{\phi}$ , as it is essentially an image-to-image mapping. The training procedure is illustrated in Stage 1 of Fig. 2, and then the well-trained $g_{\phi^{*}}$ is employed in the Stage 2 for modeling $P(\tau)$ . At the training stage, we collect pairs of input image $\mathbf{x}_i \in \mathbb{R}^d$ and the OSN transmitted version $\mathrm{OSN}(\mathbf{x}_i) \in \mathbb{R}^d$ in an offline manner. The objective function for training $g_{\phi}$ can be formulated as + +$$ +\min _ {\phi} \left\{\mathcal {L} _ {r} \left(g _ {\phi} \left(\mathbf {x} _ {i}\right), \operatorname {O S N} \left(\mathbf {x} _ {i}\right)\right) \right\}, \tag {6} +$$ + +where $\mathcal{L}_r(\mathbf{x},\mathbf{y}) = \| \mathbf{x} - \mathbf{y}\| _2$ + +As we are more interested in learning the noise incurred + +by the OSN transmission rather than the image content itself, we adopt a residual learning structure [16] when designing $g_{\phi}$ . Bearing this in mind, we change the objective function into + +$$ +\min _ {\phi} \left\{\mathcal {L} _ {r} \left(\mathbf {x} _ {i} + g _ {\phi} (\mathbf {x} _ {i}), \operatorname {O S N} (\mathbf {x} _ {i})\right) \right\}. \tag {7} +$$ + +The residual learning is beneficial for the model optimization, significantly boosting the modeling performance. + +Furthermore, we explicitly integrate a special JPEG layer into the model for better generating the structural, JPEG-like artifacts, which reflects the true situation in various OSN platforms. To enable the end-to-end optimization of the objective function in Eq. (7), we need to ensure that every step of the JPEG compression remains differentiable. It is easy to find that the quantization is the only nondifferentiable step, mainly because the employed rounding function $\lfloor \cdot \rfloor$ has 0 derivative everywhere. To deal with it, we approximate the rounding function with a differentiable version [31]: + +$$ +\lfloor x \rceil_ {a} = \lfloor x \rceil + (x - \lfloor x \rceil) ^ {3}. \tag {8} +$$ + +Upon having a differentiable JPEG layer, the objective function for training $g_{\phi}$ becomes + +$$ +\min _ {\phi} \mathcal {L} _ {r} \left(\mathcal {J} _ {q} \left(\mathbf {x} _ {i} + g _ {\phi} (\mathbf {x} _ {i})\right), \operatorname {O S N} (\mathbf {x} _ {i})\right), \tag {9} +$$ + +where $\mathcal{I}_q$ represents the differentiable JPEG layer with a given QF $q$ . In our training, $q$ is uniformly sampled in the + +range [71, 95] as adopted by Facebook. It is then straightforward to derive the noise $\pmb{\tau}_i$ as + +$$ +\boldsymbol {\tau} _ {i} (q) = \mathcal {J} _ {q} \left(\mathbf {x} _ {i} + g _ {\phi^ {*}} \left(\mathbf {x} _ {i}\right)\right) - \mathbf {x} _ {i}, \tag {10} +$$ + +where $\phi^{*}$ is obtained by solving the optimization problem Eq. (9) and $q$ is the QF associated with the JPEG compression. Monte Carlo (MC) sampling scheme can then be implemented to generate a large number of noise samples for modeling the distribution $P(\tau)$ . + +# 3.2. Modeling the conditional distribution $P(\xi|\tau)$ + +We then tackle the issue of modeling the conditional distribution $P(\pmb{\xi}|\tau)$ so that we can solve the optimization problem in Eq. (4). The reason why we incorporate the noise term $\pmb{\xi}$ is that the predictable noise $\pmb{\tau}$ cannot fully capture the noise behavior encountered in practice. For instance, different OSNs may adopt distinct procedures, e.g., adjusting the QF dynamically, performing resizing adaptively, or even introducing completely unknown operations. + +A critical problem now is how to build a proper model for the unseen noise $\pmb{\xi}$ . Obviously, it is unrealistic to model $\pmb{\xi}$ from the characteristic of the signal itself, as we do in Sec. 3.1. To resolve this challenge, we shift our position from the noise aspect to the detector $f_{\theta}$ , by studying the noise effect on the detection performance. Among the various underlying unseen noise $\pmb{\xi}$ , we actually only need to pay attention to the ones that degrade the detection performance, while neglecting those that have little effect to the detection. This motivates us to employ a type of adversarial noise [35] when modeling $P(\pmb{\xi}|\pmb{\tau})$ . Essentially, adversarial noises are generally imperceptible to the human senses while being able to cause severe model output errors. Meanwhile, the unseen noise $\pmb{\xi}$ that we focus on is the one capable of fooling the detector and is also usually small (a highly distorted image would deviate from the purpose of making a forgery). Such a similarity in terms of the effect to the detector $f_{\theta}$ makes the adversarial noise a suitable candidate for modeling $\pmb{\xi}$ . + +From the adversarial point of view, there are various ways of defining the noise $\pmb{\xi}$ , as long as the adversarial example, created by adding the noise $\pmb{\xi}$ to the original normal example, goes across the decision boundary. Noticing the fact that the noise $\pmb{\xi}$ is typically of small amplitude, we propose to set the direction of $\pmb{\xi}$ along the gradient of the cost function with respect to the input, so as to minimize the noise energy. Therefore, for a given input $\mathbf{x}_i$ , the predictable noise $\tau_{i}$ , and the target output $\mathbf{y}_i$ , the unseen noise $\pmb{\xi}_i$ is formulated as + +$$ +\boldsymbol {\xi} _ {i} = \mathcal {S} \left(\nabla_ {\mathbf {x} _ {i}} \mathcal {L} _ {b} \left(f _ {\boldsymbol {\theta}} \left(\mathbf {x} _ {i} + \boldsymbol {\tau} _ {i}\right), \mathbf {y} _ {i}\right)\right), \tag {11} +$$ + +where $S$ returns the sign of the gradient. By adding such adversarial noises during the training, it is expected to make + +![](images/b767347bc4c61938a1139da151ba4840d0e7d59a150576b136b7410f9927edf0.jpg) +Figure 3. Visualization of $1000\xi$ samples by using t-SNE [13]. + +the learned model robust against not only the specific adversarial noise but also more general unseen noise. + +However, the noise calculated by Eq. (11) depends on the specific input $\mathbf{x}_i$ , rather than a general one applicable to all the examples in the training set and unknown examples. For comprehensively enhancing the generalization ability of the detector, we propose to adjust the direction of the adversarial noise to a global gradient direction. To this end, we adopt a strategy similar to the Stochastic Gradient Descend (SGD) [30], by a stochastic approximation approach from randomly selected subsets of the training dataset. More specifically, for the $(t + 1)$ -th input $\mathbf{x}_{t + 1}$ , the $\xi_{t + 1}$ (conditioning on $\tau$ ) could be set as the average gradient calculated from the first $t$ inputs, namely, + +$$ +\boldsymbol {\xi} _ {t + 1} = \frac {1}{t} \sum_ {i = 0} ^ {t} \mathcal {S} \left(\nabla_ {\mathbf {x} _ {i}} \mathcal {L} _ {b} \left(f _ {\boldsymbol {\theta}} \left(\mathbf {x} _ {i} + \boldsymbol {\tau} _ {i} + \boldsymbol {\xi} _ {i}\right), \mathbf {y} _ {i}\right)\right), \tag {12} +$$ + +where $\xi_0$ is initialized as 0. Although Eq. (12) can be used to estimate the average gradients, it only reflects the gradients of specific known data (the training data). To alleviate the aforementioned problem and further improve the robustness, we propose to perturb the $\xi_{t + 1}$ in a small range. Here, it would be more ideal to use a parametric model to characterize the average gradients. To find an appropriate model for the average gradient, we first take a data-driven approach, analyzing the statistics of 1000 samples of $\xi$ that are randomly selected from the training process. In Fig. 3, we visualize these 1000 random samples in a 2D space by using the t-SNE [13]. It can be seen that the sample points are concentrated around a certain center, and gradually vanish when they move away from the center. This phenomenon suggests us to use a Gaussian distribution for modeling the average gradient, i.e., + +$$ +\left. \boldsymbol {\xi} _ {t + 1} \right| \tau \sim \mathcal {N} \left(\boldsymbol {u} _ {t + 1}, \sigma^ {2} \mathbf {I}\right), \tag {13} +$$ + +where $\sigma$ is an empirically set parameter for controlling the variance, + +$$ +\boldsymbol {u} _ {t + 1} = \epsilon \cdot \frac {1}{t} \sum_ {i = 0} ^ {t} \mathcal {S} \left(\nabla_ {\mathbf {x} _ {i}} \mathcal {L} _ {b} \left(f _ {\boldsymbol {\theta}} \left(\mathbf {x} _ {i} + \boldsymbol {\tau} _ {i} + \boldsymbol {\xi} _ {i}\right), \mathbf {y} _ {i}\right)\right), \tag {14} +$$ + +and $\epsilon$ is a parameter used for constraining the magnitude of the perturbations to avoid unnecessary model degradation. + +Upon having the parametric model in Eq. (13), we can easily generate noise samples for modeling the conditional + +Algorithm 1: The training algorithm +Input: Training datasets $\mathcal{D}_1$ and $\mathcal{D}_2$ ; training epochs $N_{1}$ and $N_{2}$ ; learning rates $l_{\phi}$ and $l_{\theta}$ . Output: Trained detector $f_{\theta^*}$ +1 Randomly initialize $\phi$ and $\theta$ +2 for epoch = 1 to $N_{1}$ do +3 for minibatch $(\mathbf{x}_i, \mathbf{y}_i) \subset \mathcal{D}_2$ do +4 $\mathbf{g}_{\phi} = \nabla_{\phi}[\mathcal{L}_r(\mathcal{J}_q(\mathbf{x}_i + g_{\phi}(\mathbf{x}_i)), \mathbf{y}_i)] \triangleright$ Eq. (9) +5 $\phi = \phi - l_{\phi} \cdot \mathbf{g}_{\phi} \triangleright$ Update $g_{\phi}$ +6 end +7 end +8 Temporary output $g_{\phi^*} = g_{\phi}$ +9 Initialize $\mathbf{u}_0 = \mathbf{0}$ +10 for epoch = 1 to $N_{2}$ do +11 for minibatch $(\mathbf{x}_i, \mathbf{y}_i) \subset \mathcal{D}_2$ do +12 Initialize $\mathbf{L}_0 = \mathbf{0}$ +13 for $j = 1$ to $m$ do +14 $q_j \sim$ Uniform(71,95) ▷ Sample QF +15 $\tau_j = \mathcal{I}_{q_j}(\mathbf{x}_i + g_{\phi^*}(\mathbf{x}_i)) - \mathbf{x}_i \triangleright$ Model $\pmb{\tau}$ +16 $\{\xi_1, \dots, \xi_h\} \sim \mathcal{N}(u_{i-1}, \sigma^2\mathbf{I}) \triangleright$ Model $\pmb{\xi}$ +17 $\mathbf{L}_j = \mathbf{L}_{j-1} + \sum_{k=1}^{h} \mathcal{L}_b(f_\theta(\mathbf{x}_i + \tau_j + \xi_k), \mathbf{y}_i) \triangleright$ Eq. (15) +18 end +19 $\mathbf{g}_{\theta} = \nabla_{\theta}\mathbf{L}_m, \mathbf{g}_{\mathbf{x}_i} = \nabla_{\mathbf{x}_i}\mathbf{L}_m$ +20 $\pmb{\theta} = \pmb{\theta} - l_{\theta} \cdot \mathbf{g}_{\pmb{\theta}} \triangleright$ Update $f_{\theta}$ +21 $\mathbf{u}_i = u_{i-1} + \epsilon \cdot S(\mathbf{g}_{\mathbf{x}_i}) \triangleright$ Eq. (14) +22 end +23 end +24 Final output $f_{\theta^*} = f_{\theta}$ + +distribution $P(\pmb {\xi}|\pmb {\tau})$ . Thereupon, Eq. (4) can be expanded as + +$$ +\min _ {\boldsymbol {\theta}} \sum_ {i = 1} ^ {N} \sum_ {j = 1} ^ {m} \sum_ {k = 1} ^ {h} \mathcal {L} _ {b} \left(f _ {\boldsymbol {\theta}} \left(\mathbf {x} _ {i} + \boldsymbol {\tau} _ {j} + \boldsymbol {\xi} _ {k}\right), \mathbf {y} _ {i}\right), \tag {15} +$$ + +where the expectations with respect to $\pmb{\tau}$ and $\pmb{\xi}$ are approximated with $m$ and $h$ MC samples, respectively. With this computable loss function, we are able to perform the robust training, as summarized in Algorithm 1. + +# 4. Experimental results + +In this section, we present the experimental results to show the superior performance of our proposed method. Due to the space limit, more results are given in the supplementary file. + +# 4.1. Experimental setup + +Baseline detector. The detector aims to detect the forged regions at the pixel level accuracy. Specifically, the detector $f_{\theta}:\mathbb{R}^{H\times W\times 3}\to \mathbb{R}^{H\times W\times 1}$ takes a color image with the resolution $H\times W$ as input, and eventually outputs the binary map for the detection result. In our implementation, + +we adopt the U-Net [28] architecture in the baseline detector. To improve the capability of extracting forgery relevant features, we further augment the architecture by incorporating the spatial channel "Squeeze-and-Excitation (SE)" mechanism [29], resulting a variant called SE-U-Net, rather than simply using the traditional vanilla U-Net. + +Training/Validation datasets. For the training of the OSN network $g_{\phi}$ , we adopt the dataset WEI (denoted as $\mathcal{D}_1$ ) [33], which contains over 1300 original images and their processed versions upon the transmission over Facebook. It should be noted that we only use the data from Facebook for training $g_{\phi}$ . While for the training of $f_{\theta}$ , we use the Dresden [15] dataset as the source of pristine images. We then generate the forged images by splicing the pristine images with the objects from the MS-COCO [25] dataset. The dataset of these forged images is denoted as $\mathcal{D}_2$ . Also, $\mathcal{D}_1$ and $\mathcal{D}_2$ are randomly divided into training and validation sets with the ratio of $9:1$ . + +Testing datasets. We create testing datasets by adopting four widely-used ones (DSO [6], Columbia [17], NIST [1] and CASIA [14]), and producing their OSN-transmitted versions. More specifically, we manually upload and download the aforementioned datasets over three most popular OSNs (Facebook, Wechat and Weibo), resulting in OSN-transmitted datasets with 5232 forgeries and corresponding masks. These collected datasets are made available at https://github.com/HighwayWu/ImageForensicsOSN. We hope that these datasets can serve as useful benchmarks to our research community for fighting against the forgeries shared over OSNs. + +Competitors. We compare our proposed scheme with four state-of-the-art methods: MT-Net [37], NoiPri [12], For-Sim [27], and DFCN [42]. + +# 4.2. Quantitative comparisons + +The quantitative comparisons in terms of the AUC, F1 and IoU (higher are better) in the pixel domain are presented in Tab. 1. Here we also report the results of the baseline detector for demonstrating the improvement of our robust training scheme in a comparative way. As can be observed, when the forgeries are not transmitted through an OSN, the detection methods ForSim [27], DFCN [42] and ours achieve comparable results, while MT-Net [37] and NoiPri [12] perform slightly worse. It should be noted that, NoiPri cannot be applied to detect the forgeries in CASIA due to their small resolutions, while our method has no such limitation and performs even better than the other competitors on CASIA. + +In the scenario that the forgeries are passed through OSNs, the detection performance of all existing methods has deteriorated significantly. For instance, after the transmission over Facebook, Weibo and Wechat, the IoU scores associated with MT-Net drop by $10.1\%$ , $11.1\%$ , and $9.4\%$ , + +
ModelsOSNsTest Datasets
DSO [6]Columbia [17]NIST [1]CASIA [14]Average
AUCF1IoUAUCF1IoUAUCF1IoUAUCF1IoUAUCF1IoU
MT-Net [37]-.795.344.253.747.357.258.634.088.054.776.130.086.738.230.163
NoiPri [12]-.902.339.253.840.362.260.672.119.078---.804.273.197
ForSim [27]-.796.487.371.731.604.474.642.188.123.554.169.102.681.362.268
DFCN [42]-.724.303.227.789.541.395.778.250.204.654.192.119.736.322.236
Baseline-.761.312.194.763.616.501.682.221.139.774.402.342.745.388.294
Ours-.854.436.308.862.707.608.783.332.255.873.509.465.843.496.409
MT-Net [37]Facebook.638.109.071.626.103.056.652.095.057.763.102.065.670.102.062
NoiPri [12]Facebook.777.150.097.722.223.143.583.057.034---.694.143.091
ForSim [27]Facebook.689.356.238.607.450.304.580.140.085.537.157.094.603.276.180
DFCN [42]Facebook.673.238.184.687.479.338.705.207.138.654.190.116.680.278.194
BaselineFacebook.714.180.105.689.594.497.646.200.136.728.350.298.694.331.259
OursFacebook.859.447.320.883.714.611.783.329.253.862.462.417.847.488.400
MT-Net [37]Weibo.606.057.036.620.103.056.671.088.053.754.099.063.663.087.052
NoiPri [12]Weibo.606.093.061.664.175.108.580.054.030---.616.107.066
ForSim [27]Weibo.568.260.165.610.453.312.581.150.094.542.165.100.575.257.168
DFCN [42]Weibo.639.227.140.676.458.319.706.192.125.653.191.117.668.267.175
BaselineWeibo.703.120.073.681.558.477.683.163.116.762.338.310.707.294.244
OursWeibo.808.370.253.883.724.626.780.294.219.858.466.421.832.463.380
MT-Net [37]Wechat.582.076.045.613.199.125.654.095.057.724.080.048.643.113.069
NoiPri [12]Wechat.618.098.062.639.202.124.575.041.026---.610.114.070
ForSim [27]Wechat.564.247.147.650.496.354.581.136.082.532.153.091.582.258.168
DFCN [42]Wechat.653.221.137.676.487.344.701.176.114.651.193.119.670.269.179
BaselineWechat.668.076.051.655.535.431.626.170.128.670.182.152.655.241.191
OursWechat.823.366.252.883.727.631.764.286.214.833.405.358.826.446.364
+ +Table 1. Quantitative comparisons by using AUC, F1 and IoU as criteria. For each column within the same OSN transmission, the highest value is bold, and “-” indicates not applicable. + +![](images/3878006d7e1931190a197e0d47fbc964c20fa403f85cfae869db2a7bd19161c7.jpg) +Figure 4. Qualitative comparisons for detecting the OSN-transmitted forgeries. For each row, the images from left to right are forgery (input), ground-truth, detection result (output) generated by MT-Net [37], NoiPri [12], ForSim [27], DFCN [42] and ours. The forgeries from top to bottom are the cases without OSN transmission, and with Facebook, Weibo and Wechat transmissions, respectively. + +respectively, compared to the scenario without OSN transmission. In contrast, thanks to the appropriate noise modeling of $\pmb{\tau}$ and $\pmb{\xi}$ , our proposed method exhibits rather desirable robustness against the OSN transmissions and still leads to accurate forgery detections. Taking Facebook for example, the IoU reduction is only $0.9\%$ . It can also be noticed that the degradations of the forgery detection performance are slightly larger for Weibo and Wechat, with IoU reductions being $2.0\%$ and $4.5\%$ , respectively. This is mainly because, compared with Facebook, Weibo and Wechat adopt more stringent compressions for uploaded + +images, causing more evidence loss. In addition, for training our method, we only use the Facebook data, without any Weibo or Wechat data at all. From Tab. 1, we can see the scheme trained by using Facebook data can generalize well to Weibo and Wechat transmitted forgeries. + +# 4.3. Qualitative comparisons + +In addition to the quantitative comparisons, Fig. 4 gives two representative examples (see the supplementary file for more results). It can be seen that in the normal case (no OSN transmission), the existing detection methods perform + +
Detector fθTest Datasets
Trans. w/o OSNTrans. w/ Facebook
AUCF1IOUAUCF1IOU
#1 SE-U-Net (baseline).745.388.294.694.331.259
#2 SE-U-Net + τ.755 (+.010).400 (+.012).325 (+.031).733 (+.039).377 (+.046).311 (+.052)
#3 SE-U-Net + ξ.794 (+.049).471 (+.083).383 (+.089).753 (+.059).417 (+.086).340 (+.081)
#4 SE-U-Net + τ + ξ.843 (+.098).496 (+.108).409 (+.115).847 (+.153).488 (+.157).400 (+.141)
#5 DPN.719.319.224.651.208.135
#6 DPN + τ + ξ.778 (+.059).421 (+.102).350 (+.126).776 (+.125).449 (+.241).385 (+.250)
+ +Table 2. Ablation studies regarding the modeling of $\tau$ and $\xi$ . Values in brackets represent the differences with the baseline detector. + +relatively well, e.g., the MT-Net and ForSim in the first case, and the NoiPri and DFCN in the second case. However, these methods cannot achieve satisfactory detection performance in the cases of OSN transmitted versions. Take NoiPri in the second case for example. For Facebook, Weibo and Wechat transmitted images, the identified forged regions spread over several objects, making the forgery detection results much less useful. In contrast, our proposed method can learn more robust forgery features, and thereby generate more precise detection results over these challenging cases, primarily thanks to the robust training scheme with the compound noise modeling. + +# 4.4. Ablation studies + +We now conduct the ablation studies of our proposed training scheme by analyzing how each modelled noise (i.e., the predictable noise $\tau$ and the unseen noise $\xi$ ) contributes to the final detection performance. To this end, we first prohibit the use of each noise in the scheme, and then evaluate the performance of different retrained detectors with appropriate settings. The obtained results are given in Tab. 2. + +As can be seen, introducing the predictable noise $\tau$ in the training of the detector (#2 row) can slightly improve the detection performance (e.g., $1.2\%$ gains in F1), which is more obvious in the case of Facebook transmission (e.g., $4.6\%$ gains in F1). However, since it is incomplete to only adopt $\tau$ , as mentioned in Sec. 3.2, we further involve the designed unseen noise $\xi$ . The results in #3 row imply that $\xi$ can effectively enhance the robustness of the detector, bringing a more significant improvement (e.g., $8.6\%$ gains in F1). Finally, #4 row demonstrates that when the compound noise $\tau$ and $\xi$ are applied simultaneously, the detector can be much more robust to the target environment, which is crucial for the forgery detection task over OSN transmission (e.g., $15.7\%$ gains in F1). + +Further, instead of only using the SE-U-Net as the detector, we adopt another well-known architecture, DPN [10], to show the versatility of our proposed training scheme. As shown in rows #5 and #6, the robustness of the DPN can also be well strengthened by our robust training method. + +# 4.5. Some further robustness evaluations + +Although the proposed scheme is mainly designed to counter the lossy operations conducted by OSNs, we would + +![](images/1dd02904724077655574bba6cc4297dd6a0ba85242bf5f42b6e02b246eb6277a.jpg) +Figure 5. Robustness evaluations against cropping, resizing, blurring, noising and JPEG compression. + +also like to evaluate its robustness under some more commonly used degradation scenarios, such as noise addition, cropping, resizing, blurring, and standalone JPEG compression. Such evaluation is very critical in real-world cases because these types of post-processing operations are often adopted to erase or conceal the forged artifacts. To this end, we apply these post-processing operations to the original test set Columbia and report the quantitative comparisons in Fig. 5. For the convenience of demonstration, we utilize a unified parameter $p$ for controlling the magnitudes of different operations. The origin of the horizontal axis ( $p = 0$ ) corresponds to the case without any post-processing. As can be observed, the competitors [12,27,37,42] cannot perform consistently with the increase of the perturbation intensity, while our method can generalize well to defeat these post-processing operations. + +# 5. Conclusions + +In this paper, we propose a novel training scheme for improving the robustness of the image forgery detection against various OSN-based transmissions. The proposed scheme is designed with the assistance of the modeling of a predictable noise $\pmb{\tau}$ as well as an intentionally introduced unseen noise $\xi$ . Experimental results are provided to demonstrate the superiority of our scheme compared with several state-of-the-art methods. Further, we build an OSN-transmitted forgery dataset for the future research of the forensic community. + +Acknowledgments: This work was supported by Macau Science and Technology Development Fund under SKL-IOTSC-2021-2023, 0072/2020/AMJ, 0015/2019/AKP, 060/2019/A1, and 077/2018/A2, by Research Committee at University of Macau under MYRG2018-00029-FST and MYRG2019-00023-FST, by Natural Science Foundation of China under 61971476, and by Alibaba Group through Alibaba Innovative Research Program. + +# References + +[1] Nist nimble 2016 datasets. https://www.nist.gov/itl/iad/mig/nimble-challenge-2017-evaluation/.2,6,7 +[2] I. Amerini, T. Uricchio, L. Ballan, and R. Caldelli. Localization of jpeg double compression through multi-domain convolutional neural networks. In Proc. IEEE Conf. Comput. Vis. Pattern Recogn. Workshop, 2017. 2 +[3] Q. Bammey, R. Gioi, and J. Morel. An adaptive neural network for unsupervised mosaic consistency analysis in image forensics. In Proc. IEEE Conf. Comput. Vis. Pattern Recogn., pages 14194-14204, 2020. 2 +[4] B. Bayar and M. C. Stamm. Constrained convolutional neural networks: a new approach towards general purpose image manipulation detection. IEEE Trans. Inf. Forensics and Security, 13(11):2691-2706, 2018. 1, 2 +[5] L. Bondi, S. Lameri, D. Guera, P. Bestagini, E. J. Delp, and S. Tubaro. Tampering detection and localization through clustering of camera-based cnn features. In Proc. IEEE Conf. Comput. Vis. Pattern Recogn. Workshops, pages 1855-1864, 2017. 1, 2 +[6] T. Carvalho, C. Riess, E. Angelopoulou, H. Pedrini, and A. Rezende Rocha. Exposing digital image forgeries by illumination color classification. IEEE Trans. Inf. Forensics and Security, 8(7):1182-1194, 2013. 2, 6, 7 +[7] C. Chen, S. McCloskey, and J. Yu. Image splicing detection via camera response function analysis. In Proc. IEEE Conf. Comput. Vis. Pattern Recogn., pages 5087-5096, 2017. 2 +[8] J. Chen, X. Kang, Y. Liu, and Z. J. Wang. Median filtering forensics based on convolutional neural networks. IEEE Signal. Proc. Let., 22(11):1849-1853, 2015. 1, 2 +[9] J. Chen, X. Liao, W. Wang, and Z. Qin. A features decoupling method for multiple manipulations identification in image operation chains. In Proc. IEEE Int. Conf. Acoust. Speech Signal Process, pages 2505-2509, 2021. 3 +[10] Y. Chen, J. Li, H. Xiao, X. Jin, S. Yan, and J. Feng. Dual path networks. In Proc. Neural Info. Process. Syst., pages 4470-4478, 2017. 8 +[11] D. Cozzolino, G. Poggi, and L. Verdoliva. Splicebuster: A new blind image splicing detector. In Proc. IEEE Int. Workshop Inf. Forensics Secur., pages 1-6, 2015. 1, 2 +[12] D. Cozzolino and L. Verdoliva. Noiseprint: a cnn-based camera model fingerprint. IEEE Trans. Inf. Forensics and Security, 15(1):114-159, 2020. 1, 2, 6, 7, 8 +[13] L. Van der Maaten and G. Hinton. Visualizing data using t-sne. Journal of Mach. Learn. Res, 9(11), 2008. 5 +[14] J. Dong, W. Wang, and T. Tan. Casia image tampering detection evaluation database. In IEEE China Summit Inter. Conf. Signal Info. Proc., pages 422-426. IEEE, 2013. 2, 6, 7 +[15] T. Gloe and R. Bohme. The dresden image database for benchmarking digital image forensics. J. of Digit. Forensic Pract., 3(2-4):150-159, 2010. 6 +[16] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proc. IEEE Conf. Comput. Vis. Pattern Recogn., pages 770-778, 2016. 4 +[17] Y. Hsu and S. Chang. Detecting image splicing using geometry invariants and camera characteristics consistency. In + +IEEE Inter. Conf. Multim. Expo, pages 549-552. IEEE, 2006. 2, 6, 7 +[18] M. Huh, A. Liu, A. Owens, and A. A. Efros. Fighting fake news: image splice detection via learned self-consistency. In Proc. Eur. Conf. Comput. Vis., pages 101-117, 2018. 1, 2 +[19] A. Islam, C. Long, A. Basharat, and A. Hoogs. Doa-gan: Dual-order attentive generative adversarial network for image copy-move forgery detection and localization. In Proc. IEEE Conf. Comput. Vis. Pattern Recogn., pages 4676-4685, 2020. 2 +[20] X. Kang, M. C. Stamm, A. Peng, and K. R. Liu. Robust median filtering forensics using an autoregressive model. IEEE Trans. Inf. Forensics and Security, 8(9):1456-1468, 2013. 1, 2 +[21] A. Li, Q. Ke, X. Ma, H. Weng, Z. Zong, F. Xue, and R. Zhang. Noise doesn't lie: towards universal detection of deep inpainting. In Proc. Int. Jt. Conf. AI, pages 1-7, 2021. 1, 2 +[22] H. Li, W. Luo, and J. Huang. Localization of diffusion-based inpainting in digital images. IEEE Trans. Inf. Forensics and Security, 12(12):3050-3064, 2017. 1, 2 +[23] Y. Li and J. Zhou. Fast and effective image copy-move forgery detection via hierarchical feature point matching. IEEE Trans. Inf. Forensics and Security, 14(5):1307-1322, 2019. 1, 2 +[24] X. Liao, K. Li, X. Zhu, and K. J. Liu. Robust detection of image operator chain with two-stream convolutional neural network. IEEE J. Sel. Top. Signal Process., 14(5):955-968, 2020. 3 +[25] T. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollar, and C. L. Zitnick. Microsoft coco: common objects in context. In Proc. Eur. Conf. Comput. Vis., pages 740-755, 2014. 6 +[26] S. Lyu, X. Pan, and X. Zhang. Exposing region splicing forgeries with blind local noise estimation. Int. J. Comput. Vis., 110(2):202-221, 2014. 1, 2 +[27] O. Mayer and M. C. Stamm. Forensic similarity for digital images. IEEE Trans. Inf. Forensics and Security, 15(1):1331-1346, 2020. 1, 2, 6, 7, 8 +[28] O. Ronneberger, P. Fischer, and T. Brox. U-net: convolutional networks for biomedical image segmentation. In Proc. Int. Conf. Med. Image Comput. Computer-Assisted Int., pages 234-241. Springer, 2015. 4, 6 +[29] A. G. Roy, N. Navab, and C. Wachinger. Recalibrating fully convolutional networks with spatial and channel "squeeze and excitation" blocks. IEEE Trans. Medical Imaging, 38(2):540-549, 2018. 6 +[30] S. Ruder. An overview of gradient descent optimization algorithms. arXiv preprint arXiv:1609.04747, 2016. 5 +[31] R. Shin and D. Song. Jpeg-resistant adversarial images. In Proc. Neural Info. Process. Syst. Workshop, pages 1-6, 2017. 4 +[32] W. Sun, J. Zhou, L. Dong, J. Tian, and J. Liu. Optimal prefiltering for improving facebook shared images. IEEE Trans. Image Process., 30(1):6292-6306, 2021. 2 +[33] W. Sun, J. Zhou, Y. Li, M. Cheung, and J. She. Robust highcapacity watermarking over online social network shared im + +ages. IEEE Trans. Circuits Syst. Video Technol., 31(3):1208-1221, 2020. 2, 3, 6 +[34] W. Sun, J. Zhou, R. Lyu, and S. Zhu. Processing-aware privacy-preserving photo sharing over online social networks. In ACM Int. Conf. Multimedia, pages 581-585. ACM, 2016. 2 +[35] C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and B. Fergus. Intriguing properties of neural networks. In Proc. Int. Conf. Learn. Representat., pages 1-10, 2014. 2, 5 +[36] H. Wu and J. Zhou. Iid-net: image inpainting detection network via neural architecture search and attention. IEEE Trans. Circuits Syst. Video Technol., pages 1-14, 2021. 1, 2 +[37] Y. Wu, W. AbdAlmageed, and P. Natarajan. *Mantra-net: manipulation tracing network for detection and localization of image forgeries with anomalous features*. In *Proc. IEEE Conf. Comput. Vis. Pattern Recogn.*, pages 9543-9552, 2019, 1, 2, 6, 7, 8 +[38] J. You, Y. Li, J. Zhou, Z. Hua, W. Sun, and X. Li. A transformer based approach for image manipulation chain detection. In ACM Int. Conf. Multimedia, pages 3510-3517. ACM, 2021. 3 +[39] J. Zhong and C. Pun. An end-to-end dense-inceptionnet for image copy-move forgery detection. IEEE Trans. Inf. Forensics and Security, 15(1):2134-2146, 2020. 1, 2 +[40] P. Zhou, X. Han, V. Morariu, and L. Davis. Two-stream neural networks for tampered face detection. In Proc. IEEE Conf. Comput. Vis. Pattern Recogn. Workshop, 2017. 2 +[41] P. Zhou, X. Han, V. I. Morariu, , and L. S. Davis. Learning rich features for image manipulation detection. In Proc. IEEE Conf. Comput. Vis. Pattern Recogn., pages 1907-1915, 2018. 2 +[42] P. Zhuang, H. Li, S. Tan, B. Li, and J. Huang. Image tampering localization using a dense fully convolutional network. IEEE Trans. Inf. Forensics and Security, 16(1):2986-2999, 2021. 1, 2, 6, 7, 8 \ No newline at end of file diff --git a/robustimageforgerydetectionoveronlinesocialnetworksharedimages/images.zip b/robustimageforgerydetectionoveronlinesocialnetworksharedimages/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f809a64b24a4bb14772dd08329440d24168e1d91 --- /dev/null +++ b/robustimageforgerydetectionoveronlinesocialnetworksharedimages/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c69952d0d0cdb70f542d1323a19e1ae291ebbeff6e97207908d854a2403ef2d3 +size 490340 diff --git a/robustimageforgerydetectionoveronlinesocialnetworksharedimages/layout.json b/robustimageforgerydetectionoveronlinesocialnetworksharedimages/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..12f715830f1a54f88266d03c09c1d5438478fdc6 --- /dev/null +++ b/robustimageforgerydetectionoveronlinesocialnetworksharedimages/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b36a971840dc090e3c5384075329f548bfd3266591b4789a258ebfc17215f538 +size 424100 diff --git a/robustinvertibleimagesteganography/de6ccab8-cbfb-46e7-8910-2dd6d5213084_content_list.json b/robustinvertibleimagesteganography/de6ccab8-cbfb-46e7-8910-2dd6d5213084_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..cbe8ccc1301fc8e4b63d5c55a4d89a84e3cc9b43 --- /dev/null +++ b/robustinvertibleimagesteganography/de6ccab8-cbfb-46e7-8910-2dd6d5213084_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8757d0f015761b38fbfdeafae9d400117bd36bdfa31575f63bbb39d972914e02 +size 79150 diff --git a/robustinvertibleimagesteganography/de6ccab8-cbfb-46e7-8910-2dd6d5213084_model.json b/robustinvertibleimagesteganography/de6ccab8-cbfb-46e7-8910-2dd6d5213084_model.json new file mode 100644 index 0000000000000000000000000000000000000000..5862bcc6a9b4c7ce64ecfdb31f33391e2ec764ce --- /dev/null +++ b/robustinvertibleimagesteganography/de6ccab8-cbfb-46e7-8910-2dd6d5213084_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91acf0cc2b63dbb08afaae245cb5586ca5c399845bd30e0b1a5ee28f77d7ac0c +size 99331 diff --git a/robustinvertibleimagesteganography/de6ccab8-cbfb-46e7-8910-2dd6d5213084_origin.pdf b/robustinvertibleimagesteganography/de6ccab8-cbfb-46e7-8910-2dd6d5213084_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e5fea3696e4c5375ecd26a8b3a6c2703f8f01912 --- /dev/null +++ b/robustinvertibleimagesteganography/de6ccab8-cbfb-46e7-8910-2dd6d5213084_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed6ffa3e3fd16ac5b6b3da2407105d9aa71f77e0bf1b4ef8d8cf0044a1fa164d +size 6651788 diff --git a/robustinvertibleimagesteganography/full.md b/robustinvertibleimagesteganography/full.md new file mode 100644 index 0000000000000000000000000000000000000000..be62e92a53418b61db6b7dba4057d214f86de638 --- /dev/null +++ b/robustinvertibleimagesteganography/full.md @@ -0,0 +1,314 @@ +# Robust Invertible Image Steganography + +Youmin Xu†, Chong Mou†, Yujie Hu†, Jingfen Xie†, Jian Zhang†,‡ +†Peking University Shenzhen Graduate School, Shenzhen, China +‡Peng Cheng Laboratory, Shenzhen, China + +youmin.xu@stu.pku.edu.cn; eechongm@gmail.com; hhuyujie@stu.pku.edu.cn; + +xiejf@stu.pku.edu.cn; zhangjian.sz@pku.edu.cn + +# Abstract + +Image steganography aims to hide secret images into a container image, where the secret is hidden from human vision and can be restored when necessary. Previous image steganography methods are limited in hiding capacity and robustness, commonly vulnerable to distortion on container images such as Gaussian noise, Poisson noise, and lossy compression. This paper presents a novel flow-based framework for robust invertible image steganography, dubbed as RIIS. A conditional normalizing flow is introduced to model the distribution of the redundant high-frequency component with the condition of the container image. Moreover, a well-designed container enhancement module (CEM) also contributes to the robust reconstruction. To regulate the network parameters for different distortion levels, a distortion-guided modulation (DGM) is implemented over flow-based blocks to make it a one-size-fits-all model. In terms of both clean and distorted image steganography, extensive experiments reveal that the proposed RIIS efficiently improves the robustness while maintaining imperceptibility and capacity. As far as we know, we are the first to propose a learning-based scheme to enhance the robustness of image steganography in the literature. The guarantee of steganography robustness significantly broadens the application of steganography in real-world applications. + +# 1. Introduction + +Steganography is a widely studied topic [12], which aims to hide messages like audio, image, and hyperlink into one container in an undetected way. In Fig. 1, image steganography takes the secret and host image as input to produce the container image. In its reverse process, it is only possible for the receivers with a specific revealing network to reconstruct secret information from the container image, which + +This work was supported in part by Shenzhen Fundamental Research Program (No.GXWD20201231165807007-20200807164903001). (Corresponding author: Jian Zhang.) + +![](images/dd147e4fa8955827e4b085e25ddda7b61f6c49328078feca807863b9eb156819.jpg) +Figure 1. The upper row depicts the universal pipeline of image steganography. Previous steganography like ISN [35] gains poor revealed secret and revealed host image when the container is under slight distortion. On the contrary, our RIIS takes various distortion into consideration, which shows satisfactory robustness. + +is visually identical to the host image. Steganalysis techniques usually distinguish the container and host image by color, frequency, and other features. Thus the secret image should be hidden in the invisible domain of the container image. It is also valuable in applications to embed as much confidential data as possible into the host image, which is evaluated as payload capacity. + +The image steganography is designed to keep the hiding capacity while considering security and imperceptibility against steganalysis. Existing steganography schemes [11, 43, 59] fail to strike a balance between imperceptibility and high payload capacity. Traditional methods transform the secret messages in the spatial or adaptive domains [29], achieving the capacities of $0.2 \sim 4$ bits per pixel (bpp). The secret data is usually embedded into fewer significance bits [11] or indistinguishable parts, limiting the amount of secret information capacity. Recent learning-based steganography methods [7, 8] make an effort to exploit the potential capacity of secret. Most of them take the pre-processing, concealing, and revealing as separate modules and design specific + +networks with independent parameters to handle them. + +Recent attempts [50] to introduce invertible neural networks (INN) into low-level inverse problems like denoising, rescaling, and colorization show impressive potential over auto-encoder, GAN [2, 52], and other learning-based architectures. The image steganography composed of concealing and revealing process can be considered as a pair of inverse problems. Thus flow-based INN is naturally suitable for this task. Besides, multiple secret images can be easily hidden into one container by increasing the number of channels of INN branches. That incredibly improves steganography capacity and makes ISN [35] the state-of-the-art image hiding technique in the literature. + +Since the earlier image steganography works stress capacity and invisibility rather than robustness and ignores the noise and compression interference in practice, they are usually sensitive to the interference during the media spread of container. Due to the dependence on inherent invertible bijective transformation property, flows tend to be more vulnerable to intermediate distortion [27, 31, 41]. In Fig. 1, we take the state-off-the-art ISN [35] for example. Once a slight noise or lossy compression is implemented on the container, the secret revealed is barely recognizable and also the host image at the receiver end. Even if the network is specifically finetuned against pre-defined noise or JPEG compression level, the reconstruction quality and generalization are still limited. + +In this paper, we design a conditional flow-based framework, dubbed as Robust Invertible Image Steganography (RIIS), to alleviate the distortion influence and improve robustness. Inspired by conditional normalizing flow, we simultaneously model container image distribution and disposable high-frequency information to keep valuable secret information implicitly. As the flow model is bijective, our corresponding enhancement module and optimization strategy handle irreversible processes like channel reduction and quantization. The main contributions are listed as follows: + +- To solve the substantial performance drop under distortion in former learning-based steganography methods, we proposed a general and robust framework RIIS for image steganography under diverse distortion (Gaussian noise, Poisson noise, and JPEG compression). +- We introduce the conditional flow into the steganography framework by regulating the high-frequency distribution conditional on the container image to implicitly preserve essential information for the revealing. +- We propose a distortion-guided modulation (DGM) over flow-based blocks to modulate the parameters for different distortion levels. The modulation makes it a general, controllable model for various types and distortion levels, with just one copy of parameters. + +- Whether in a lossless or a distorted environment, abundant experiments demonstrate the superior robustness of our proposed RIIS while maintaining the imperceptibility and capacity of steganography. The robustness of RIIS has been proved successful in broader applications like real-world steganography, face-swap detection, and grayscale colorization. + +# 2. Related Work + +Image Steganography. Unlike cryptography, Steganography is designed to hide secret data into a host to produce an information container. As for the image steganography task, the host image acts as the cover of the secret image, which is confidential. The hiding network first hides the secret into the host image to produce a container. Next, the container image can be restored to secret and host image by the revealing network at the receiver end. + +Traditionally, spatial-based [25, 37, 40, 44] methods utilize the Least Significant Bits (LSB), pixel value differencing (PVD) [40], histogram shifting [48], multiplebitplanes [37] and palettes [25, 39] to hide images. They usually arise statistical suspicion and vulnerable to steganalysis methods. Adaptive methods [32, 43] decomposed the steganography into embedding distortion minimization and data coding, which is indistinguishable by appearance but limited in capacity. Various transform-based schemes [12, 29] including JSteg [44] and DCT steganography [22] also fail to offer high payload capacity. + +Various deep learning-based schemes have been produced to solve image steganography recently. Generative adversarial networks (GANs) [45] are introduced to synthesize container images. Probability map methods focus on generating various cost functions satisfying minimal-distortion embedding [43, 47]. [51] proposed a generator with U-Net architecture. [46] presents an adversarial scheme under the distortion minimization framework. Three-player game methods like SteganogAN [56] and HiDDeN [59] learn information embedding and recovery by auto-encoder architecture to adversarially resist steganalysis. Deep Steganography [8] involved a fully convolutional network consisting of preparation, hiding, and revealing parts. The previous schemes reveal the potential of image steganography in digital communication, copyright protection, information certification, e-commerce, and many other practical fields [13]. + +Normalizing Flow-based Model. Normalizing flow [18, 19, 30] is a kind of powerful generative model with the advantage of straightforward calculation of likelihood. They are designed to learn a bijective mapping between the input domain and the target domain. The invertible neural network (INN), which involves the forward and backpropagation operations in the same network, is taken as the backbone of normalizing flow. Pioneering researches such as + +![](images/29f53dd47a7635d05c85761f93e04c96ff2921fb0ca9b47aa562e1bae0397062.jpg) +Figure 2. Overview of our proposed RIIS steganography framework. The flow-based invertible blocks map the input pair $[\mathbf{x}_{\mathrm{s}},\mathbf{x}_{\mathrm{h}}]$ into high frequency $\mathbf{h}_{\mathrm{f}}$ and container image $\mathbf{y}$ . The CANP project $\mathbf{h}_{\mathrm{f}}$ to Gaussian-like noise $\mathbf{z}$ under the condition feature extracted from $\mathbf{y}$ . Only $\mathbf{y}$ is transmitted by internet media and then receiver will get the distorted container image $\tilde{\mathbf{y}}$ . Conversely, restored $\hat{\mathbf{h}}_{\mathrm{f}}$ along with enhanced container $\hat{\mathbf{y}}$ are taken into the reversed backward flow-based blocks, which is the same as the forward pass in parameters. Finally we get the revealed secret and host images $[\hat{\mathbf{x}}_{\mathrm{s}},\hat{\mathbf{x}}_{\mathrm{h}}]$ . + +![](images/bce50e646ad098f20a5cdf44cf5f0f47a402e83e104ee7714e3d8f8f38195104.jpg) + +NICE [18] and RealNVP [19] mainly stress on the generation ability of flow-based model. In [20], a further explanation for the invertibility is explored. An unbiased flow-based generative model is introduced in [14]. Besides, glow [30] and i-RevNet [26] further improve coupling layers for density estimation achieving better generation results. + +The theory of flow has recently attracted widespread attention in image processing, especially in low-level problems. Flow models have been proved to share the advantages in estimating the posterior of an inverse problem [6]. Recent flow-based models [3,23,34,38] are capable of handling the image hiding and restoration problems. Due to the powerful representation ability, normalizing flow is also exploited in various inference tasks such as image rescaling [50], compression [53] and video super-resolution [60]. + +Although the existing steganography methods perform well in given application domains, they are not robust against distortion [6, 24]. There are also marvelous works about deblocking [54, 57] and denoising [16, 36]. However, it is impractical to apply these off-the-shelf methods into steganography tasks directly. The latest steganography method ISN [35] takes advantage of normalizing flow to perform probabilistic bijective construction for the steganography task. ISN [35] utilizes a single invertible network to hide and reveal images efficiently. HiNet [28] keeps almost the same architecture as ISN [35] despite the discrete wavelet transformation (DWT) channel squeezing. Flow-based methods [28, 35] show superiority over traditional schemes but severely rely on the reversibility of the framework. Since most steganography methods ignore the intermediate distortion, a subtle interference on the container usually causes a considerable drop in performance. Simply introducing distortion or simulation into model training can only handle a limited range of distortion and fail to produce satisfactory restoration and generalization. + +# 3. Method + +# 3.1. Overview + +The major target of RIIS is to design a general and robust framework for image steganography under diverse distortion. It hides several secret images $\mathbf{x}_{\mathrm{s}}$ into one informative container image $\mathbf{y}$ , which is resistant to image distortion. For training stabilization, our framework directly learns the bijective mapping between secret images $\mathbf{x}_{\mathrm{s}}$ , host image $\mathbf{x}_{\mathrm{h}}$ and container image $\mathbf{y}$ instead of explicitly modeling the distribution of inner latent. We mark the input as $\mathbf{x}$ , composed of host $\mathbf{x}_{\mathrm{h}}$ and secret image $\mathbf{x}_{\mathrm{s}}$ . The container image is capable of covering multiple images in it while keeping the appearance identical to the host image $\mathbf{x}_{\mathrm{h}}$ . Our robust model enables the receiver to restore revealed host $\hat{\mathbf{x}}_{\mathrm{h}}$ and secret images $\hat{\mathbf{x}}_{\mathrm{s}}$ from the distorted container image $\tilde{\mathbf{y}}$ . + +# 3.2. Flow-based Invertible Block + +The flow-based network is naturally and intuitively suitable for the image steganography task because of its reversibility. The hiding and revealing procedure are ideally invertible with shared parameters and should be treated as the forward and backward processes of normalizing flow to enable end-to-end optimization. There are two main characteristics of the normalizing-flow model: the log-determinant of inference function $f_{\theta}(\cdot)$ is simple to compute; the corresponding inverse function $f_{\theta}^{-1}(\cdot)$ is tractable to solve. + +In Fig. 2, we build up invertible blocks based on IRN [50]. For a input variable (e.g., an image) $\mathbf{x} = [\mathbf{x_s},\mathbf{x_h}]$ with distribution $\mathbf{x}\sim p(\mathbf{x})$ and a output variable $[\mathbf{h_f},\mathbf{y}]$ with simple tractable distribution $[\mathbf{h_f},\mathbf{y}]\sim p([\mathbf{h_f},\mathbf{y}])$ , flow models perform a bijective projection $f_{\theta}\colon [\mathbf{h_f},\mathbf{y}] = f_{\theta}([\mathbf{x_s},\mathbf{x_h}])$ . Conversely, $\mathbf{x}$ can be recovered from $[\mathbf{h_f},\mathbf{y}]$ by the inverse mapping $[\mathbf{x_s},\mathbf{x_h}] = f_{\theta}^{-1}([\mathbf{h_f},\mathbf{y}])$ . The input and output size of normalizing flow are exactly identical. $f_{\theta}$ is composed of a series of invertible flow blocks: $f_{\theta} =$ + +![](images/687c8d876b7f379665b8abb4e941971b67477f735dc68d297e40fce2e93edd91.jpg) +Figure 3. The distortion-guided modulation (DGM) over flow-based invertible blocks. The basic flow block is composed of act-norm, $1 \times 1$ conv, and affine coupling layer. $\phi_{bi}, \phi_{sc}, \psi_{bi}$ and $\psi_{sc}$ are built up with denseblocks to produce the affine-transformation factors (bias or scale). The CRes module takes the noise level $\sigma$ or JPEG QF as an input condition feature to modulate the factors. + +$f_{\pmb{\theta}}^{1}\circ f_{\pmb{\theta}}^{2}\circ \dots \circ f_{\pmb{\theta}}^{N}$ . Concretely, block $f_{\pmb{\theta}}^{k}$ for $k\in \{1,\ldots ,N\}$ is composed of $1\times 1$ convolution permuting, activation-normalization layer and affine coupling layer. The intermediate variables are defined as $\mathbf{u}^k = f_\pmb {\theta}^k (\mathbf{u}^{k - 1})$ , where $\mathbf{u}^0$ represents $\mathbf{x}$ and $\mathbf{u}^N$ is output $[\mathbf{h}_{\mathbf{f}},\mathbf{y}]$ . + +In Fig. 3, $\mathbf{u}^k$ is split into $\mathbf{u}_A^k$ and $\mathbf{u}_B^k$ in the $k$ -th block. Then, they will pass through affine couplings where $\phi$ and $\psi$ constructed by denseblocks with ReLU activation that produce the scaling and bias on the $\mathbf{u}^k$ : + +$$ +\mathbf {u} _ {A} ^ {k + 1} = \exp \left(\phi_ {s c} \left(\mathbf {u} _ {B} ^ {k}\right)\right) \odot \mathbf {u} _ {A} ^ {k} + \phi_ {b i} \left(\mathbf {u} _ {B} ^ {k}\right), \tag {1} +$$ + +$$ +\mathbf {u} _ {B} ^ {k + 1} = \exp \left(\psi_ {s c} \left(\mathbf {u} _ {A} ^ {k + 1}\right)\right) \odot \mathbf {u} _ {B} ^ {k} + \psi_ {b i} \left(\mathbf {u} _ {A} ^ {k + 1}\right). +$$ + +Obviously, the above affine coupling layer is mathematically invertible and has a triangular Jacobian matrix whose log-determinant is tractable to compute. + +# 3.3. Content-Aware Noise Projection (CANP) + +Earlier normalizing-flows always transform input into a target image and Gaussian noise distribution. However, due to the limited network depth and mapping ability of flow models, the direct target output of Gaussian distribution may lead to unsatisfactory results. + +Inspired by the conditional flow [33], the high-frequency output $\mathbf{h}_{\mathbf{f}}$ is assumed to rely on the container $\mathbf{y}$ . Once trained, the forward process will squeeze the input host and secret images pair $[\mathbf{x_s},\mathbf{x_h}]$ and transform it to container image $\mathbf{y}$ and high-frequency $\mathbf{h_f}$ as $p(\mathbf{x}|\mathbf{x_h})\leftrightarrow p(\mathbf{y},\mathbf{h_f}|\mathbf{x_h})$ . $\mathbf{y}$ is constrained to approach host image $\mathbf{x_h}$ while containing information from $\mathbf{x_s}$ . For the tacitness, the model is aimed to generate exactly the same container $\mathbf{y}$ as the input host image $\mathbf{x_h}$ . The relation is presented as a Dirac delta function $\delta (\mathbf{x_h} - \mathbf{y})$ in Eq. (2): + +$$ +\begin{array}{l} p (\mathbf {y} | \mathbf {x} _ {\mathbf {h}}) p \left(\mathbf {h} _ {\mathbf {f}} | \mathbf {y}, \mathbf {x} _ {\mathbf {h}}\right) = \delta \left(\mathbf {x} _ {\mathbf {h}} - \mathbf {y}\right) p \left(\mathbf {h} _ {\mathbf {f}} | \mathbf {y}\right) (2) \\ = \lim _ {\boldsymbol {\Sigma} \rightarrow \mathbf {0}} \mathcal {N} (\mathbf {y} | \mathbf {x} _ {\mathbf {h}}, \boldsymbol {\Sigma}) p (\mathbf {h} _ {\mathbf {f}} | \mathbf {y}), (2) \\ \end{array} +$$ + +![](images/25df7c9edc87930fe0f7256af6a3a9082fcee9c85a7be6cfcc2ba00de8b41288.jpg) +Figure 4. Network architecture of the Content-Aware Noise Projection module based on conditional flow block. It maps the high-frequency input part $\mathbf{h}_{\mathbf{f}}$ to Gaussian distribution constrained $\mathbf{z}$ with the conditional feature extracted from containing $\mathbf{y}$ . + +$$ +p (\mathbf {x} | \mathbf {x} _ {\mathbf {h}}) \leftrightarrow \lim _ {\boldsymbol {\Sigma} \rightarrow \mathbf {0}} \mathcal {N} (\mathbf {y} | \mathbf {x} _ {\mathbf {h}}, \boldsymbol {\Sigma}) \mathcal {N} (\mathbf {z} | \mathbf {0}, \mathbf {I}), \tag {3} +$$ + +where the limit of Gaussian distribution is utilized to model Dirac function. $\Sigma$ is a covariance matrix where all diagonal elements are approximately zero. In this conditional flow, the dependent relation between high-frequency component $\mathbf{h}_{\mathbf{f}}$ and container image $\mathbf{y}$ is deconstructed by the cascaded conditional mapping. Thus, $p(\mathbf{h}_{\mathbf{f}}|\mathbf{y})$ is modeled as a Gaussian distribution $p(\mathbf{z})\sim \mathcal{N}(\mathbf{z}|\mathbf{0},\mathbf{I})$ in Eq. (3). + +This process is dubbed as content-aware noise projection(CANP) where $\mathbf{h}_{\mathbf{f}}$ is projected to $\mathbf{z}$ with the conditional feature from $\mathbf{y}$ . During the forward direction, CANP can transform the input image pair $[\mathbf{x_s},\mathbf{x_h}]$ into container image $\mathbf{y}$ and nearly Gaussain-random variable $\mathbf{z}$ . Given the container $\mathbf{y}$ and random samples $\tilde{\mathbf{z}}$ from $\mathcal{N}(\mathbf{0},\mathbf{I})$ , the bijective RIIS can generate $[\hat{\mathbf{x}}_{\mathbf{s}},\hat{\mathbf{x}}_{\mathbf{h}}]$ in the backward pass. In Fig. 4, we build the CANP based on the conditional affine coupling that is powerful and still invertible. A branch of input dataflow $\mathbf{u}_B^k$ is merged with conditional features $\mathcal{G}(\mathbf{y})$ extracted from container image $\mathbf{y}$ and then be taken as the input of $\phi$ . Since there is permutation operation such as $1\times 1$ convolution at the start of each flow block, the information in $\mathbf{u}_A$ and $\mathbf{u}_B$ are both affected by $\mathcal{G}(\mathbf{y})$ as: + +$$ +\begin{array}{l} \mathbf {u} _ {A} ^ {k + 1} = \exp \left(\phi_ {s c} \left(\mathbf {u} _ {B} ^ {k}; \mathcal {G} (\mathbf {y})\right)\right) \odot \mathbf {u} _ {A} ^ {k} + \phi_ {b i} \left(\mathbf {u} _ {B} ^ {k}; \mathcal {G} (\mathbf {y})\right) \tag {4} \\ \mathbf {u} _ {B} ^ {k + 1} = \exp \left(\psi_ {s c} \left(\mathbf {u} _ {A} ^ {k + 1}\right)\right) \odot \mathbf {u} _ {B} ^ {k} + \psi_ {b i} \left(\mathbf {u} _ {A} ^ {k + 1}\right). \\ \end{array} +$$ + +# 3.4. Container Enhancement Module (CEM) + +A Container Enhancement Module (CEM) is utilized as the pre-processing module at the receiver end to eliminate the influence of image distortion like JPEG. In Fig. 2, We take a compromised step by integrating the CEM in the RIIS revealing network. The Batch-Normalization layer in the DnCNN [55] is removed for a lighter and suitable structure. Ahead of the flow blocks in the revealing network, the distorted image is firstly pre-processed by a simplified DnCNN network for denoising and JPEG deblocking. Given the distortion pattern, the CEM will process the container image to achieve a cleaner input for flow blocks. + +# 3.5. End-to-End Optimization Strategy + +Two-Stage Decoupled Tuning of Flow. To make the flow model adaptive to the distortion on the container image, we involve the decoupled training scheme into the latter half of our training process. In a flow-based model, inference forward and reverse passes are theoretically symmetrical and equal in parameters. However, there exist irreversible operations such as quantization in CODECs, noise interference, and CEM network. These changes on intermediate container images require adjustment of the flow-based model. To a certain extent, the forward and backward parameters are proposed to be incompletely equal during the latter half stage of model training. The relaxation of parameters brings variance into the forward and backward passes. This strategy is named as Two-Stage Decoupled Tuning (2DT). + +Loss Functions. It is required that the revealed host $\hat{\mathbf{x}}_{\mathbf{h}}$ and secret images $\hat{\mathbf{x}}_{\mathbf{s}}$ should be as close as possible to the input host $\mathbf{x}_{\mathbf{h}}$ and secret $\mathbf{x}_{\mathbf{s}}$ . Here we employ the term $\mathcal{L}_{rev}$ to minimize the average distance among each pair of the restored and original images. The Container Enhancement Module (CEM) is meant to reconstruct clean container $\mathbf{y}$ , from the distorted one $\tilde{\mathbf{y}}$ to restored $\hat{\mathbf{y}}$ with the term $\mathcal{L}_{CEM}$ : + +$$ +\mathcal {L} _ {r e v} = \left\| \mathbf {x} _ {s} - \hat {\mathbf {x}} _ {\mathbf {s}} \right\| _ {2} + \left\| \mathbf {x} _ {\mathbf {h}} - \hat {\mathbf {x}} _ {\mathbf {h}} \right\| _ {2}. \tag {5} +$$ + +$$ +\mathcal {L} _ {C E M} = \left\| \mathbf {y} - \tilde {\mathbf {y}} \right\| _ {2}. \tag {6} +$$ + +$$ +\mathcal {L} _ {\text {d i s t r}} = \ell_ {\mathcal {C E}} (p (\mathbf {z}), \mathcal {N} (\mathbf {0}, \mathbf {I})). \tag {7} +$$ + +$$ +\mathcal {L} _ {\text {c o n}} = \left| \left| \mathbf {x} _ {\mathbf {h}} - \mathbf {y} \right| \right| _ {2} + \left| \left| \operatorname {F F T} \left(\mathbf {x} _ {\mathbf {h}}\right) - \operatorname {F F T} (\mathbf {y}) \right| \right| _ {2}. \tag {8} +$$ + +Concretely, since the distribution can be tractably depicted in flow-based models, CANP encourages the $p(\mathbf{z})$ to be independent from $p(\mathbf{h}_{\mathbf{f}})$ and $p(\mathbf{y})$ and approximate to Gaussian distribution by distribution loss $\mathcal{L}_{\text{distr}}$ in Eq. (7). We depict the distribution distance by cross-entropy (CE) on $\mathbf{z}$ . In order to guide the container image $\mathbf{y}$ to be approximately identical to the host image $\mathbf{x}_{\mathbf{h}}$ both in spatial and frequency domain, we further apply fast fourier transform (FFT) [10] to extract frequency component in Eq. (8). + +In summary, The total loss function in Eq. (9) considers the following four components: embedded image revealing, container invisibility, distortion enhancement, and noise distribution distance: + +$$ +\mathcal {L} _ {\text {t o t a l}} = \lambda_ {1} \mathcal {L} _ {\text {r e v}} + \lambda_ {2} \mathcal {L} _ {\text {c o n}} + \lambda_ {3} \mathcal {L} _ {\text {C E M}} + \lambda_ {4} \mathcal {L} _ {\text {d i s t r}}, \tag {9} +$$ + +JPEG Simulation. The tolerance against JPEG compression is an essential concern in RIIS. JPEG pipeline consists of four main steps: color space transformation, discrete cosine transformation (DCT), quantization, and entropy encoding [42]. In fact, quantization is a lossy and nondifferentiable step in JPEG compression. Thus, JPEG is not suitable for direct end-to-end optimization. To enable training over JPEG operations, a differentiable simulator module for JPEG compression is introduced in RIIS by replacing the quantization with fourier transformations(FT) [10]. + +![](images/81c3042dfd3b2707d9ad803bf6ccc8aeabeeead470738e8a0b477c43c38888ed.jpg) +Figure 5. Visual results of ablation study on CEM and CANP. Container images here are distorted by the Gaussian noise ( $\sigma = 10$ ). It reveals that the participation of CEM enhances the reconstruction and the CANP evidently adjusts the distribution. + +# 3.6. Distortion-Guided Modulation (DGM) + +It is not practical to train a specific network for every type and level of distortion. For general image steganography, we should make the RIIS parameter controllable with the strength of distortion. Here we propose a distortion-guided modulation (DGM) to control the affine coupling layer to handle container images corrupted with Gaussian noise or JPEG compression artifact. Concretely, given the distortion level ( $\sigma$ for the Gaussian noise and QF for the JPEG compression), the parameters in the DGM module will change with the distortion level through the affine transformation. + +In Fig. 3, our DGM is constructed by deploying CResMD [21] into the affine coupling layer. Specifically, given the noise level or quality factor, the condition network produces the weight $\alpha$ to modulate the features by multiplying. The condition network is composed of several fully-connection layers. In this way, our method can handle various distortion levels by a single model. The unified framework built up with DGM is marked as $\mathbf{R}\mathbf{I}\mathbf{S}^{*}$ . + +# 4. Experimental Results + +# 4.1. Implementation and Setup Details + +Our proposed framework RIIS successfully maintains the payload capacity by hiding multiple images in one container image. RIIS is implemented with the NVIDIA Tesla V100 GPU for acceleration. We implement the Adam optimizer with $\beta_{1} = 0.9$ and $\beta_{2} = 0.99$ . The learning rate is set to be 0.0001, and the batch size is set to be 16 for training. The dataset for training and testing is DIV2K [4], if not specified. For the loss, the corresponding weight factors are $\lambda_{1} = 1$ , $\lambda_{2} = 16$ , $\lambda_{3} = 1$ and $\lambda_{4} = 0.5$ . The PSNR (Peak Signal to Noise Ratio) metric is utilized to evaluate the performance. + +Table 1. Ablation studies for every model design, including 2DT, CANP and CEM in RIIS under various distortion. The results are evaluated on the pair of revealed secret and original secret images, by PSNR metric. It proves that all the modules make sense in our robust framework, among which the CANP is the most indispensable. + +
2DTCANPCEMGaussian σ = 10Poisson NoiseJPEG Q=40JPEG Q=80JPEG Q=90Clean
×✓✓27.6127.4226.7727.5527.8842.91
✓×✓27.3827.3526.4027.2827.7242.74
✓✓×27.8227.6226.6427.4627.9643.21
✓✓✓28.0828.0127.3228.2528.7144.19
+ +Table 2. The reveal secret image PSNR of different schemes to producing $\mathbf{h}_{\mathbf{f}}$ input during the backward pass. The experiments are evaluated under noise $\sigma = 10$ to hide one secret into a container image. The CANP is proved to be the best mapping of $\mathbf{h}_{\mathbf{f}}$ . + +
h_f Source\(\tilde{\mathbf{z}} \sim \mathcal{N}(\mathbf{0},\mathbf{I})\)Copy from yResblock from yCANP from \(\tilde{\mathbf{z}}\) (Ours)
Secret42.5343.1843.5644.19
+ +![](images/bad6d63d2556702e5e1bc91fade1ff8015a995cc7379e6c02565d61406a702f6.jpg) +Figure 6. Visual results of ablation study on DGM. It reveals that the parameters in the unified framework $\mathsf{RIIS^{*}}$ are efficiently modulated by DGM, evidently better than RIIS-Blind. + +# 4.2. Ablation Study + +Effect of CANP. When we assume the high-frequency component $\mathbf{h}_{\mathrm{f}}$ is independent with the container image $\mathbf{y}$ and like IRN [50], the performance remains limited as it fails to keep an informative prior for image steganography. Experiments in Tab. 2 show that relating $\mathbf{h}_{\mathrm{f}}$ with the container image $\mathbf{y}$ as conditional prior effectively improves revealing quality. The simplest modulation of backward input $\mathbf{h}_{\mathrm{f}}$ is the copy of container image $\mathbf{y}$ , which does not contain any useful information for revealing except for $\mathbf{y}$ . We also implement a residual block to extract feature from the container $\mathbf{y}$ as input to produce $\mathbf{h}_{\mathrm{f}}$ . The performance growth from these two simple types of modulation over $\mathbf{h}_{\mathrm{f}}$ proves the effectiveness of condition input from container $\mathbf{y}$ . + +The CANP is proposed due to the discovery that the high-frequency component $\mathbf{h}_{\mathbf{f}}$ is highly dependent on the container (low-frequency component $\mathbf{y}$ ). Tab. 1 and Fig. 5 show that the conditional mechanism CANP efficiently models the relation between high-frequency $\mathbf{h}_{\mathbf{f}}$ and low-frequency components $\mathbf{y}$ . Though half the forward output $\mathbf{y}$ is evacuated, the high-frequency part of the input image pair is implicitly stored. When the Gaussian sampling $\tilde{\mathbf{z}}$ is mapped into $\hat{\mathbf{h}}_{\mathbf{f}}$ with the condition of $\mathbf{y}$ in CANP, we get a + +![](images/92e591a1c43c045c7c69e48c1e6fd1a1b920c966df146c40f259062ed4295ac2.jpg) +Figure 7. The capacity performance for hiding multiple or single secret images into one container under distortion on ImageNet [17] (1000 random samples). With the increase of secret number, The reconstruction quality drops but still maintains acceptable fidelity. + +approximate reconstruction $\hat{\mathbf{h}}_{\mathrm{f}}$ of original signal. + +Effect of 2DT. We involve two-stage decoupled tuning into the flow-based model to adapt it against distortion and irreversible operations. According to our experimental result in Tab. 1, the decoupling evidently improves the reconstruction performance. After end-to-end training, our decoupled model learns to mitigate the loss of quantization and noise interference. + +Effect of CEM. The CEM employs the DnCNN-like network to perform pre-processing over the distorted container image $\tilde{\mathbf{y}}$ to eliminate the effect of distortion. Results in Tab. 1 and Fig. 5 show that the participation of CEM plays an indispensable role in the total robust steganography. + +# 4.3. Comparison with SOTA + +In the image steganography task, the most common concern is the fidelity of two pairs: revealed secret $\hat{\mathbf{x}}_{\mathrm{s}}$ and origin $\mathbf{x}_{\mathrm{s}}$ , container $\mathbf{y}$ and host image $\mathbf{x_h}$ . For the comparison with the latest method, we reproduce the State-of-the-art ISN [35] and reach the performance itself claimed on the DIV2K [5]. + +Container Image under distortion. Our model mainly focuses on the image steganography with the container image under various distortion. In Fig. 8, even under slight interference on container image, the secret restoration of HiNet [28] witnesses a substantial drop in performance. It shows that the previous methods ignorant of distortion are vulnerable and fragile, limiting their application in practice. Since the performance of the original ISN model ignorant of distortion [35] is too poor, we finetuned the ISN network + +![](images/b575d65811c08c32aafc4fa9f6e4081ff2e490f681b5b7f251824893a7b53000.jpg) +Figure 8. Visual comparison of latest HiNet [28], finetuned $\mathrm{ISN}^{+}$ [35] and our RIIS under the same JPEG QF=90 (blue border) or Gaussian noise $\sigma = 10$ (green border). Under both distortion, the left-most column shows the failure of the latest HiNet [28], especially the revealed secret image. The reconstruction quality of our RIIS shows substantial superiority compared with the latest $\mathrm{ISN}^{+}$ [35]. + +![](images/29ba0255a404192a5d1638b0049569215c7ac460e7c967ca1d12acd5ede3ddbb.jpg) +Figure 9. The PSNR curves with different Gaussian noise $\sigma$ and JPEG QF in our experiment settings. RIIS* with distortion-guided (DGM) modulation achieves a subtle performance gap with RIIS and only requires one controllable network for all distortion. The improvement from RIIS-Blind to RIIS* proves that the DGM successfully adjust RIIS for different distortion levels. + +![](images/e5961a898d6726fc9a34565b4ef549313b572203c2209ddc9711118a3eff6f9b.jpg) + +separately for every distortion level in our experiment settings as the baseline. In contrast to the original ISN model, we name the finetuned ISN as $\mathbf{ISN}^{+}$ . The $\mathbf{ISN}^{+}$ is also finetuned for every specific noise or compression level, but it still fails to offer satisfactory performance. Despite the variety of colors and structures of the images, RIIS can restore them with no viewable artifacts. The performance of hiding images with the container image stained by noise or JPEG compression is shown in Tab. 3. The results reveal that our proposed method RIIS successfully maintains higher reconstruction quality compared with the latest methods. + +To prove the payload capacity of our method, we increase the channel of RIIS for hiding multiple secret images into one container. Fig. 7 shows the model performance for hiding single or multiple secret images into one container under different distortion. Since RIIS is the first model to hide multiple images under distortion, no other previous + +Table 3. Comparison of secret image restoration quality when container image is under diverse distortion. Our RIIS is the highest under every distortion. The unified model $\mathsf{RIIS^{*}}$ also shows evident performance superiority compared with previous methods. + +
MethodGaussian NoisePoisson NoiseJPEG
σ = 10σ = 1QF=40QF=90
HiNet [28]9.9826.9321.2311.5212.59
ISN [35]8.5525.1919.3810.1111.25
\( \mathrm{ISN}^{+} \) [35]27.1228.9826.7126.2527.48
RIIS*28.0330.0127.2327.1828.44
RIIS28.2230.3227.4727.3228.71
+ +method is available for comparison. + +Discussion on unified $\mathsf{RIIS^{*}}$ with DGM. We introduce distortion-guided modulation (DGM) to make network parameters vary with different distortion levels. The unified framework for all distortion built up with DGM is marked as $\mathsf{RIIS^{*}}$ . DGM allows RIIS to handle all the distortion levels with the shared base parameters. We also evaluate the RIIS-Blind model without DGM as the baseline, also trained under random types and levels of distortion. In Fig. 9, there is only a subtle gap between the unified $\mathsf{RIIS^{*}}$ with DGM and separately tuned RIIS. In terms of the unified network for all distortion, the DGM gains substantial performance growth compared with RIIS-Blind in Fig. 6. The DGM scheme makes RIIS the first general steganography framework applicable under various distortions in practice. + +Container Image without distortion. Comparison tests with the latest steganography methods [28, 35] with clean container images are conducted here. The results for hiding 1 or 5 secret images into a container image are numerically compared in Tab. 4. Our method shows superior perfor + +Table 4. Steganography performance comparison for hiding 5 or 1 secret images in a container on ImageNet [17]. Our RIIS shows the best performance under both circumstances. + +
MethodMulti SecretsSingle Secret
ContainerSecretContainerSecret
AutoEncoder [49]32.3531.21--
ISN [35]33.7736.0242.5343.58
IICNet [15]35.6437.94--
HiNet [28]--44.1646.48
RIIS35.9238.1343.9746.71
+ +![](images/839ae6b0f1720a64636807f17e3a175220fdcc5a276bc7136710153795c05718.jpg) +Figure 10. Real-world steganography to take photo as container. The right-most QR-code is the example of the secret revealed from the container photo, which can still be scanned out. It can be used for hiding messages on the screen or presswork. + +![](images/b1ee9361babce4c233df2cce282f3d1885984e2c0c103dc267c12dbcf79123a0.jpg) +Figure 11. Process of and face-swap detection. The public watermark image is hidden into the container image by RIIS to protect a series of images. When a face-swap is deployed on the container, the revealed watermark will mismatch with the public-distributed watermark copy, which helps to locate manipulation. + +mance compared with the latest methods when there is no distortion on the container image. As the HiNet [28] ignores multiple images steganography, it is not listed. The average PSNR for our restoration of images is evidently higher than IICNet [15], HiNet [28] and ISN [35]. The results show that our method achieves better performance even when hiding 5 images into one container, demonstrating the superior capacity and generality of our method. + +# 4.4. Applications Derived from Robustness + +Hiding secret in the real world. If we put the container image on display or print it on paper and capture it by a CMOS sensor, it suffers from transformation, sensor noise, motion blur, etc. In Fig. 10, our method can even reveal the secret from photos due to incredible robustness. This would implicitly bridge the cyberspace and real-world vision, which is potential in the construction of the meta-verse industry. It also makes sense in the protection of copyright and integrity of digital assets and artworks. + +![](images/c747b0435c6372368cb780dade290c9fd4cb72e4a8c981823494f527e097d7cb.jpg) +Figure 12. Visual comparison of RIIS and IDN [58] with grayscale image as container, under JPEG compression $\mathrm{QF} = 80$ . Notice the areas like sky and wall, the compression significantly harms the restored color image by IDN [58]. In contrast, the image produced by RIIS remains vivid color and fidelity due to reliable robustness. + +Face-Swap Detection. Fig. 11 demonstrates our scheme of face-swap detection. On receiving the attacked version of the protected image produced by the RIIS hiding network, the watermark will be extracted, and the feature matching operation [9] is conducted between the original and revealed watermark to determine where the manipulation is. Due to the robustness of RIIS, the detection is effective and accurate under compression. We also extend our work to detect stretching and trimming. + +Invertible Colorization. Since our framework can efficiently embed multiple images into a single container image, the YUV-channel color image can be embedded into a single grayscale channel in the same way. In the backward pass, RIIS reconstructs the color image from the grayscale container. Previous flow-based SOTA colorization method IDN [58] highly relies on the distribution of the synthetic grayscale. IDN also declares it still suffers from the JPEG compression on grayscale container images. Fig. 12 shows our superiority under the usual lossy compression situation. Our robustness against distortion addresses the application problem of image colorization in practice. + +# 5. Conclusion and Discussion + +The image steganography tasks are challenging when a great capacity of secret images need to be hidden in a limited size of a container image, especially under noise or JPEG interference. In this paper, we present a general and novel robust invertible image steganography (RIIS) framework, where the proposed CANP and CEM module, along with a well-designed training strategy are leveraged to prevent the container image during steganography from distortion such as Poisson noise, Gaussian noise, and JPEG compression. Experiments prove that our model design guarantees us the highest performance. The improvement of steganography robustness significantly broadens the application of information steganography in real-world applications. The efficiency of our model design is also proved on other low-level inverse problems like decolorization. Our future work will support RIIS on MindSpore [1], which is a new deep learning computing framework. + +# References + +[1] Mindspore. https://www.mindspore.cn/, 2020.8 +[2] Rameen Abdul, Yipeng Qin, and Peter Wonka. Image2stylegan: How to embed images into the stylegan latent space? In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 4432-4441, 2019. 2 +[3] Abdelrahman Abdelhamed, Marcus A Brubaker, and Michael S Brown. Noise flow: Noise modeling with conditional normalizing flows. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3165-3173, 2019. 3 +[4] Eirikur Agustsson and Radu Timofte. Ntire 2017 challenge on single image super-resolution: Dataset and study. In IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 126-135, 2017. 5 +[5] Eirikur Agustsson and Radu Timofte. Ntire 2017 challenge on single image super-resolution: Dataset and study. In IEEE Conference on International Conference on Computer Vision Workshops (CVPRW), 2017. 6 +[6] Lynton Ardizzone, Jakob Kruse, Carsten Rother, and Ullrich Kothe. Analyzing inverse problems with invertible neural networks. In International Conference on Learning Representations (ICLR), 2018. 3 +[7] Shumeet Baluja. Hiding images in plain sight: Deep steganography. In Advances in Neural Information Processing Systems (NeurIPS), 2017. 1 +[8] Shumeet Baluja. Hiding images within images. TPAMI, 2019. 1, 2 +[9] Herbert Bay, Tinne Tuytelaars, and Luc Van Gool. Surf: Speeded up robust features. In European Conference on Computer Vision (ECCV), 2006. 8 +[10] E Oran Brigham. The fast Fourier transform and its applications. 1988. 5 +[11] Chi-Kwong Chan and Lee-Ming Cheng. Hiding data in images by simple lsb substitution. Pattern recognition, 37(3):469-474, 2004. 1 +[12] Yambem Jina Chanu, Kh Manglem Singh, and Themrichon Tuithung. Image steganography and steganalysis: A survey. In International Joint Conference on Artificial Intelligence (IJCAI), 2012. 1, 2 +[13] Abbas Cheddad, Joan Condell, Kevin Curran, and Paul Mc Kevitt. Digital image steganography: Survey and analysis of current methods. IEEE Transactions on Signal Processing (TSP), 2010. 2 +[14] Ricky TQ Chen, Jens Behrmann, David K Duvenaud, and Joern-Henrik Jacobsen. Residual flows for invertible generative modeling. In Advances in Neural Information Processing Systems (NeurIPS), 2019. 3 +[15] Ka Leong Cheng, Yueqi Xie, and Qifeng Chen. Iicnet: A generic framework for reversible image conversion. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2021. 8 +[16] Mou Chong, Zhang Jian, Fan Xiaopeng, Liu Hangfan, and Wang Ronggang. Cola-net: Collaborative attention network for image restoration. IEEE Transactions on Multimedia (TMM), 2021. 3 + +[17] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2009. 6, 8 +[18] Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. In International Conference on Learning Representations (ICLR), 2014. 2, 3 +[19] Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. In International Conference on Learning Representations (ICLR), 2016. 2, 3 +[20] Anna C Gilbert, Yi Zhang, Kibok Lee, Yuting Zhang, and Honglak Lee. Towards understanding the invertibility of convolutional neural networks. In International Joint Conference on Artificial Intelligence (IJCAI), 2017. 3 +[21] Jingwen He, Chao Dong, and Yu Qiao. Interactive multidimensional modulation with dynamic controllable residual learning for image restoration. In European Conference on Computer Vision (ECCV), 2020. 5 +[22] Stefan Hetzl and Petra Mutzel. A graph-theoretic approach to steganography. In IFIP International Conference on Communications and Multimedia Security, 2005. 2 +[23] Jonathan Ho, Xi Chen, Aravind Srinivas, Yan Duan, and Pieter Abbeel. Flow++: Improving flow-based generative models with variational dequantization and architecture design. In International Conference on Machine Learning (ICML), 2019. 3 +[24] Chin-Wei Huang, David Krueger, Alexandre Lacoste, and Aaron Courville. Neural autoregressive flows. In International Conference on Machine Learning (ICML), 2018. 3 +[25] Shoko Imaizumi and Kei Ozawa. Multibit embedding algorithm for steganography of palette-based images. In Pacific-Rim Symposium on Image and Video Technology (PSIVT), pages 99-110. Springer, 2013. 2 +[26] Jorn-Henrik Jacobsen, Arnold Smeulders, and Edouard Oyallon. i-revnet: Deep invertible networks. In International Conference on Learning Representations (ICLR), 2018. 3 +[27] Priyank Jaini, Kira A Selby, and Yaoliang Yu. Sum-of-squares polynomial flow. In International Conference on Machine Learning (ICML), 2019. 2 +[28] Junpeng Jing, Xin Deng, Mai Xu, Jianyi Wang, and Zhenyu Guan. Hinet: Deep image hiding by invertible network. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2021. 3, 6, 7, 8 +[29] Inas Jawad Kadhim, Prashan Premaratne, Peter James Vial, and Brendan Halloran. Comprehensive survey of image steganography: Techniques, evaluations, and trends in future research. Neurocomputing, 2019. 1, 2 +[30] Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In Advances in Neural Information Processing Systems (NeurIPS), 2018. 2, 3 +[31] Durk P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved variational inference with inverse autoregressive flow. In Advances in Neural Information Processing Systems (NeurIPS), 2016. 2 + +[32] Bin Li, Ming Wang, Jiwu Huang, and Xiaolong Li. A new cost function for spatial image steganography. In IEEE International Conference on Image Processing (ICIP), 2014. 2 +[33] Jingyun Liang, Andreas Lugmayr, Kai Zhang, Martin Danelljan, Luc Van Gool, and Radu Timofte. Hierarchical conditional flow: A unified framework for image superresolution and image rescaling. In IEEE Conference on International Conference on Computer Vision, 2021. 4 +[34] Jingyun Liang, Kai Zhang, Shuhang Gu, Luc Van Gool, and Radu Timofte. Flow-based kernel prior with application to blind super-resolution. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 3 +[35] Shao-Ping Lu, Rong Wang, Tao Zhong, and Paul L Rosin. Large-capacity image steganography based on invertible neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 1, 2, 3, 6, 7, 8 +[36] Chong Mou, Jian Zhang, and Zhuoyuan Wu. Dynamic attentive graph learning for image restoration. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 4328-4337, 2021. 3 +[37] Bui Cong Nguyen, Sang Moon Yoon, and Heung-Kyu Lee. Multi bit plane image steganography. In International Workshop on Digital Watermarking, 2006. 2 +[38] Didrik Nielsen, Priyank Jaini, Emiel Hoogeboom, Ole Winther, and Max Welling. Survae flows: Surjections to bridge the gap between vaes and flows. In Advances in Neural Information Processing Systems (NeurIPS), 2020. 3 +[39] Michiharu Niimi, Hideki Noda, Eiji Kawaguchi, and Richard O Eason. High capacity and secure digital steganography to palette-based images. In IEEE International Conference on Image Processing (ICIP), 2002. 2 +[40] Feng Pan, Jun Li, and Xiaoyuan Yang. Image steganography method based on pvd and modulus function. In International Conference on Electronics, Communications and Control(ICECC), 2011. 2 +[41] George Papamakarios, Theo Pavlakou, and Iain Murray. Masked autoregressive flow for density estimation. In Advances in Neural Information Processing Systems (NeurIPS), 2017. 2 +[42] William B Pennebaker and Joan L Mitchell. JPEG: Still image data compression standard. 1992. 5 +[43] Tomás Pevny, Tomás Filler, and Patrick Bas. Using high-dimensional image models to perform highly undetectable steganography. In International Workshop on Information Hiding (IHIP), 2010. 1, 2 +[44] Niels Provos and Peter Honeyman. Hide and seek: An introduction to steganography. IEEE Symposium on Security and Privacy, 2003. 2 +[45] Haichao Shi, Jing Dong, Wei Wang, Yinlong Qian, and Xiaoyu Zhang. Ssgan: secure steganography based on generative adversarial networks. In Pacific Rim Conference on Multimedia, 2017. 2 +[46] Weixuan Tang, Bin Li, Shunquan Tan, Mauro Barni, and Jiwu Huang. Cnn-based adversarial embedding for image + +steganography. IEEE Transactions on Information Forensics and Security (TIFS), 2019. 2 +[47] Weixuan Tang, Shunquan Tan, Bin Li, and Jiwu Huang. Automatic steganographic distortion learning using a generative adversarial network. IEEE Signal Processing Letters (SPL), 2017. 2 +[48] Piyu Tsai, Yu-Chen Hu, and Hsiu-Lien Yeh. Reversible image hiding scheme using predictive coding and histogram shifting. Signal Processing, 2009. 2 +[49] Menghan Xia, Xueting Liu, and Tien-Tsin Wong. Invertible grayscale. TOG, 2018. 8 +[50] Mingqing Xiao, Shuxin Zheng, Chang Liu, Yaolong Wang, Di He, Guolin Ke, Jiang Bian, Zhouchen Lin, and Tie-Yan Liu. Invertible image rescaling. In European Conference on Computer Vision (ECCV), 2020. 2, 3, 6 +[51] Jianhua Yang, Danyang Ruan, Jiwu Huang, Xiangui Kang, and Yun-Qing Shi. An embedding cost learning framework using gan. IEEE Transactions on Information Forensics and Security (TIFS), 2019. 2 +[52] Jian Zhang Youmin Xu. Expressive and compressive gan inversion network. In IEEE International Conference on Image Processing (ICIP), 2021. 2 +[53] Jian Zhang Youmin Xu. Invertible resampling-based layered image compression. In Data Compression Conference (DCC), 2021. 3 +[54] Jian Zhang, Ruiqin Xiong, Chen Zhao, Yongbing Zhang, Siwei Ma, and Wen Gao. Concolor: Constrained non-convex low-rank model for image deblocking. IEEE Transactions on Image Processing (TIP), 25(3):1246-1259, 2016. 3 +[55] Kai Zhang, Wangmeng Zuo, Yunjin Chen, Deyu Meng, and Lei Zhang. Beyond a gaussian denoiser: Residual learning of deep cnn for image denoising. IEEE Transactions on Image Processing (TIP), 2017. 4 +[56] Kevin Alex Zhang, Alfredo Cuesta-Infante, Lei Xu, and Kalyan Veeramachaneni. Steganogan: High capacity image steganography with gans. arXiv:1901.03892, 2019. 2 +[57] Chen Zhao, Jian Zhang, Siwei Ma, Xiaopeng Fan, Yongbing Zhang, and Wen Gao. Reducing image compression artifacts by structural sparse representation and quantization constraint prior. IEEE Transactions on Circuits and Systems for Video Technology (TCSVT), 27(10):2057-2071, 2016. 3 +[58] Rui Zhao, Tianshan Liu, Jun Xiao, Daniel PK Lun, and Kin-Man Lam. Invertible image decolorization. IEEE Transactions on Image Processing (TIP), 2021. 8 +[59] Jiren Zhu, Russell Kaplan, Justin Johnson, and Li Fei-Fei. Hidden: Hiding data with deep networks. In European Conference on Computer Vision (ECCV), 2018. 1, 2 +[60] Xiaobin Zhu, Zhuangzi Li, Xiao-Yu Zhang, Changsheng Li, Yaqi Liu, and Ziyu Xue. Residual invertible spatio-temporal network for video super-resolution. In Proceedings of the AAAI conference on artificial intelligence (AAAI), 2019. 3 \ No newline at end of file diff --git a/robustinvertibleimagesteganography/images.zip b/robustinvertibleimagesteganography/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b5fffd2078261c38d12f7ece07aa4966194110e6 --- /dev/null +++ b/robustinvertibleimagesteganography/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a085b8001053adca87daad98d01a9a94366566a1fea8f41cff3b578da99d0712 +size 683244 diff --git a/robustinvertibleimagesteganography/layout.json b/robustinvertibleimagesteganography/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1966cdecfbb43aa85c89c3ef0c089950ead0e1e2 --- /dev/null +++ b/robustinvertibleimagesteganography/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcb9a208af6562b09ac34c31574e454fc6cadf50f2369466a1fa3653101683db +size 455451 diff --git a/robustoptimizationasdataaugmentationforlargescalegraphs/060520c7-26e1-4d32-9ab4-d4cf4fa98da8_content_list.json b/robustoptimizationasdataaugmentationforlargescalegraphs/060520c7-26e1-4d32-9ab4-d4cf4fa98da8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0eb63145f8c06bef898c7b50e0a9498584d8dcbd --- /dev/null +++ b/robustoptimizationasdataaugmentationforlargescalegraphs/060520c7-26e1-4d32-9ab4-d4cf4fa98da8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f3b4a24b03bb2b00ed1bc4e5e16bf6247b5d765eb4b8771fadb66a5d5fe750c +size 72989 diff --git a/robustoptimizationasdataaugmentationforlargescalegraphs/060520c7-26e1-4d32-9ab4-d4cf4fa98da8_model.json b/robustoptimizationasdataaugmentationforlargescalegraphs/060520c7-26e1-4d32-9ab4-d4cf4fa98da8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e82e4c6c87788dbc44d2e17450a3c379d5a3c31b --- /dev/null +++ b/robustoptimizationasdataaugmentationforlargescalegraphs/060520c7-26e1-4d32-9ab4-d4cf4fa98da8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:350d14179fe76a85d3efda69b1a9e8c82d1a87f8b319dbf66d8e4160ce4777d7 +size 89558 diff --git a/robustoptimizationasdataaugmentationforlargescalegraphs/060520c7-26e1-4d32-9ab4-d4cf4fa98da8_origin.pdf b/robustoptimizationasdataaugmentationforlargescalegraphs/060520c7-26e1-4d32-9ab4-d4cf4fa98da8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d2ac4e6a7bf78a7e9ae8c3c368ad59f82b385547 --- /dev/null +++ b/robustoptimizationasdataaugmentationforlargescalegraphs/060520c7-26e1-4d32-9ab4-d4cf4fa98da8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3caef8da51fb53c369f475537df3f40c0d330e8bb3a294e7d4992161d5982b2 +size 476031 diff --git a/robustoptimizationasdataaugmentationforlargescalegraphs/full.md b/robustoptimizationasdataaugmentationforlargescalegraphs/full.md new file mode 100644 index 0000000000000000000000000000000000000000..2939e8bf1fbefadaa40085cd662af726be6c6e7f --- /dev/null +++ b/robustoptimizationasdataaugmentationforlargescalegraphs/full.md @@ -0,0 +1,295 @@ +# Robust Optimization as Data Augmentation for Large-scale Graphs + +Kezhi Kong1, Guohao Li2, Mucong Ding1, Zuxuan Wu1, Chen Zhu1, Bernard Ghanem2, Gavin Taylor3, Tom Goldstein1 + +1 University of Maryland, College Park {kong, mcding, zxwu, chenzhu, tomg}@cs.umd.edu + +$^{2}$ King Abdullah University of Science and Technology {guohao.li, bernard.ghanem}@kaust.edu.sa + +$^{3}$ US Naval Academy taylor@usna.edu + +# Abstract + +Data augmentation helps neural networks generalize better by enlarging the training set, but it remains an open question how to effectively augment graph data to enhance the performance of GNNs (Graph Neural Networks). While most existing graph regularizers focus on manipulating graph topological structures by adding/removing edges, we offer a method to augment node features for better performance. We propose FLAG (Free Large-scale Adversarial Augmentation on Graphs), which iteratively augments node features with gradient-based adversarial perturbations during training. By making the model invariant to small fluctuations in input data, our method helps models generalize to out-of-distribution samples and boosts model performance at test time. FLAG is a general-purpose approach for graph data, which universally works in node classification, link prediction, and graph classification tasks. FLAG is also highly flexible and scalable, and is deployable with arbitrary GNN backbones and large-scale datasets. We demonstrate the efficacy and stability of our method through extensive experiments and ablation studies. We also provide intuitive observations for a deeper understanding of our method. We open source our implementation at https://github.com/devnkong/FLAG. + +# 1. Introduction + +Graph Neural Networks (GNNs) have emerged as powerful architectures for learning and analyzing graph representations. The Graph Convolutional Network (GCN) [21] and its variants have been applied to a wide range of tasks, including visual recognition [33], meta-learning [11], social analysis [23,29], and recommender systems [41]. However, the training of GNNs on large-scale datasets usually suffers + +from overfitting, and realistic graph datasets often involve a high volume of out-of-distribution test nodes [17], posing significant challenges for prediction problems. + +One promising solution to combat overfitting in deep neural networks is data augmentation [22], which is commonplace in computer vision tasks. Data augmentations apply label-preserving transformations to the inputs, such as translations and reflections for images. As a result, data augmentation effectively enlarges the training set while incurring negligible computational overhead. However, it remains an open problem how to effectively generalize the notion of data augmentation to GNNs. Transformations on images rely heavily on image structures [3], and it is challenging to design low-cost transformations that preserve semantic meaning for non-visual tasks like natural language processing [38] and graph learning. Generally speaking, graph data for machine learning comes with graph structure (or edge features) and node features. In the limited cases where data augmentation can be done on graphs, it generally focuses exclusively on the graph structure by adding/removing edges [13, 14, 16, 30, 37, 42]. + +In the meantime, adversarial data augmentation, which applies small perturbations in the input feature space to maximally alter model outputs, is known to boost neural network robustness and promote resistance to adversarially chosen inputs [15, 26]. Despite the wide belief that adversarial training harms standard generalization and leads to worse accuracy [1, 35], recently a growing amount of attention has been paid to using adversarial perturbations to augment datasets and ultimately alleviate overfitting. For example, [36] and [34] showed adversarial data augmentation is a data-dependent regularization that could help generalize to out-of-distribution samples, and its efficacy has been verified in domains including computer vision [40], language understanding [19, 27, 44], and visual question answering [10]. Despite the success of adversarial augmenta + +![](images/4dc2cca3f14ceea55c4d4dc241aec4f1fb4388ad182fce0492dd4502cb594533.jpg) +Figure 1. Generalization performance of FLAG on all three tasks. Left: node classification with GAT as baseline on ogbn-products; Middle: link prediction with hits@20 as metric (the higher the better) and GraphSAGE as baseline on ogbl-ddi; Right: graph classification with GIN as baseline on ogbg-molhiv. Plotted lines are attained by smoothing the original lines (the shallow ones), where smooth weights are 0.75, 0.75, and 0.5 respectively. + +![](images/7624b3b121284080d8eaeec6e73af71713cc0703c2726677d298253140bdb093.jpg) + +![](images/1bea273a0cda8d7d277131c3bd07d30fb104ae01a505df541c785eb11a2465a5.jpg) + +tion in language and vision, it remains unclear how to effectively and efficiently improve GNNs' clean accuracy using adversarial augmentation. + +Present work. We propose FLAG, Free Large-scale Adversarial Augmentation on Graphs, to tackle the overfitting problem. While existing literature focuses on modifying graph structures to augment datasets, FLAG works purely in the node feature space by adding adversarial perturbations (generated by gradient-based robust optimization algorithms), to the input node features with graph structures unchanged. FLAG leverages "free" adversarial training methods [31] to conduct efficient adversarial training so that it is highly scalable to large datasets. The method also takes advantage of multi-scale adversarial augmentation to make the model fully generalized in the input feature space. We verify the effectiveness of our method on the Open Graph Benchmark (OGB) [17], which is a collection of large-scale, realistic, and diverse graph datasets for node, link, and graph property prediction tasks. We conduct extensive experiments across OGB datasets by applying FLAG to competitive GNN baselines and show that FLAG brings nontrivial improvements in most cases. For example, FLAG lifts the test accuracy of GAT on ogbn-products by an absolute value of $2.31\%$ . FLAG is simple (easy to implement with a dozen lines of code in PyTorch), general (model-free and task-free), and efficient (able to bring salient improvement at tractable or even no extra cost). Our main contributions are summarized as follows: + +- Method: To the best of our knowledge, our work is the first general-purpose feature-based data augmentation method on graph data, which is complementary to other regularizers (e.g., dropout) and topological augmentations. The novel method incorporates "free" and multi-scale techniques to craft feature augmentations more effectively. +- Experiments: We show the efficacy and scalability of our method through extensive experiments and abla + +tion studies on large-scale datasets across node, link, and graph property prediction tasks. We validate that FLAG is superior to existing adversarial augmentation methods. + +- Analysis: We provide observations and analysis to support our conjecture that the discrete vs. continuous distribution discrepancy of input features is the key to different effects (beneficial vs. harmful) of adversarial augmentations on model accuracy. + +# 2. Preliminaries and Related Work + +Graph Neural Networks (GNNs). We denote a graph as $\mathcal{G}(\mathcal{V},\mathcal{E})$ with initial node features $x_{v}$ for $v\in \mathcal{V}$ and edge features $e_{uv}$ for $(u,v)\in \mathcal{E}$ . GNNs are built on graph structures to learn representation vectors $h_v$ for every node $v\in \mathcal{V}$ and a vector $h_{\mathcal{G}}$ for the entire graph $\mathcal{G}$ . Following [18], formally the $k$ -th iteration of message passing, or the $k$ -th layer of GNN forward path is defined as: + +$$ +\begin{array}{l} m s g _ {v} ^ {(k)} = \operatorname {A G G R E G A T E} _ {\theta} ^ {(k)} \left(\left\{\left(h _ {v} ^ {(k - 1)}, h _ {u} ^ {(k - 1)}, e _ {u v}\right), \forall u \in \mathcal {N} (v) \right\}\right) \\ h _ {v} ^ {(k)} = \operatorname {C O M B I N E} _ {\phi} ^ {(k)} \left(h _ {v} ^ {(k - 1)}, m s g _ {v} ^ {(k)}\right), \tag {1} \\ \end{array} +$$ + +where $h_v^{(k)}$ is the embedding of node $v$ at the $k$ -th layer, $e_{uv}$ is the feature vector of the edge between node $u$ and $v$ , $\mathcal{N}(v)$ is node $v$ 's neighbor set, and $h_v^{(0)} = x_v$ . AGGREGATE( $\cdot$ ) and COMBINE( $\cdot$ ) functions are parameterized by neural networks. + +To obtain the representation of the entire graph $h_{\mathcal{G}}$ , the permutation-invariant READOUT(\cdot) function pools node features from the final iteration $K$ as: + +$$ +h _ {\mathcal {G}} = \operatorname {R E A D O U T} \left(\left\{h _ {v} ^ {(K)} \mid v \in \mathcal {V} \right\}\right), \tag {2} +$$ + +Existing graph regularizers mainly focus on augmenting graph structures by modifying edges [2, 16, 30]. GraphAT [8], BVAT [5], and LAT [20] are three semi-supervised methods on the node classification task. GraphAT promotes + +local smoothness by reinforcing the similarity between the predictions of perturbed nodes and their neighbors. BVAT proposed two graph VAT schemes to enhance the output smoothness of GCN; LAT virtually perturbed the first-layer embedding of a GCN classifier. The usage scenario of these methods is limited to node classification, while data augmentation should function regardless of tasks. Besides, the formulation of VAT [28] utilized by these works involves both supervised clean and adversarial robust losses simultaneously. Practically this will consume at least twice the GPU memory as the baseline, making them not scalable to large-scale datasets. Overall, no work so far has considered general-purpose feature-based data augmentations for large-scale graphs. + +# 3. Proposed Method + +In this work, we investigate how to effectively improve the generalization of GNNs through a feature-based augmentation. Graph node features are usually constructed as discrete embeddings, such as binary bag-of-words vectors or categorical variables. As a result, standard hand-crafted augmentations, like flipping and cropping transforms used in computer vision, are not applicable to graphs node features. + +By hunting for and stamping out small perturbations that cause the classifier to fail, one may hope that adversarial training could benefit standard accuracy [15, 28, 35]. It is widely observed that when the data distribution is sparse and discrete, the beneficial effect of adversarial perturbations on generalization takes over [10, 35]. [36] viewed adversarial perturbation as a data-dependent regularization, which could intuitively generalize to out-of-distribution samples. Highlighted by [17], the out-of-distribution phenomenon of data is salient in the graph domain, and also considering the sparsity of labeled node samples in the semi-supervised node classification task, we view adversarial perturbation as a strong candidate method for input feature augmentation. + +Min-Max Optimization. Adversarial training is the process of crafting adversarial data points, and then injecting them into training data. This process is often formulated as the following min-max problem: + +$$ +\min _ {\boldsymbol {\theta}} E _ {(x, y) \sim \mathcal {D}} \left[ \max _ {\| \delta \| _ {p} \leq \epsilon} L \left(f _ {\boldsymbol {\theta}} (x + \boldsymbol {\delta}), y\right) \right], \tag {3} +$$ + +where $\mathcal{D}$ is the data distribution, $y$ is the label, $\| \cdot \| _p$ is some $\ell_p$ -norm distance metric, $\epsilon$ is the perturbation budget, and $L$ is the objective function. [26] showed that this saddle-point optimization problem could be reliably tackled by Stochastic Gradient Descent (SGD) for the outer minimization and Projected Gradient Descent (PGD) for the inner maximization. In practice, the typical approximation of the inner maximization under an $l_{\infty}$ -norm constraint is as follows, + +![](images/9fff7cd33b05c734dcab7849b8a1af368e4bef2548a65bce47fb25f4977770f5.jpg) +Figure 2. Augmentation distance distributions of FLAG and PGD. We run the test on ogbn-arxiv with GCN as backbone. Ascent steps are both set to 3. + +$$ +\boldsymbol {\delta} _ {t + 1} = \Pi_ {\| \boldsymbol {\delta} \| _ {\infty} \leq \epsilon} \left(\boldsymbol {\delta} _ {t} + \alpha \cdot \operatorname {s i g n} \left(\nabla_ {\boldsymbol {\delta}} L \left(f _ {\boldsymbol {\theta}} \left(x + \boldsymbol {\delta} _ {t}\right), y\right)\right)\right), \tag {4} +$$ + +where the perturbation $\delta$ is updated iteratively, and $\Pi_{\| \delta \|_{\infty} \leq \epsilon}$ performs projection onto the $\epsilon$ -ball in the $l_{\infty}$ -norm. For maximum robustness, this iterative updating procedure usually loops $M$ times to craft the worst-case noise, which requires $M$ forward and backward passes end-to-end. Afterwards the most vicious noise $\delta_{M}$ is applied to the input feature, on which the model weight is optimized. The algorithm above is called PGD. + +Multi-scale Augmentation. On visual tasks, [3] highlighted the importance of using diverse types of data augmentations such as random cropping, color distortion, and Gaussian blur. The authors showed that a single transformation is not sufficient to learn good representations. To fully exploit the generalizing ability and enhance the diversity and quality of adversarial perturbations, we propose to craft multi-scale augmentations. To realize this goal, we leverage the techniques below. + +"Free" training. We leverage "free" adversarial training [31] to craft adversarial data augmentations. PGD is a powerful yet inefficient way of solving the min-max optimization. It runs $M$ full forward and backward passes to craft a refined perturbation $\delta_{1:M}$ , but the model weights $\theta$ only get updated once using the final $\delta_M$ . This process makes model training $M$ times slower. In contrast, while computing the gradient for the perturbation $\delta$ , "free" training simultaneously produces the model parameter $\theta$ on the same backward pass. This enables a parameter update to be computed in parallel with a perturbation update at virtually no additional cost. The authors proposed to train on the same minibatch $M$ times in a row to simulate the inner maximization in Eq. (3), while compensating by performing $M$ times fewer epochs of training. The resulting algorithm yields accuracy and robustness competitive with standard adversarial training, but with the same runtime as clean training. + +Besides the efficiency, the "free" method achieves our idea of optimizing $\theta$ with multi-scale augmentations. Note that $X$ is augmented with additive perturbations $\delta_{1:M}$ of which each can have a maximum scale of $m\alpha, m \in \{1, \dots, M\}$ , in contrast to PGD whose perturbation is a single $\delta_M$ with an $M\alpha$ scaling. This greatly adds to the diversity of our augmentations. However, the "free" algorithm is suboptimal in terms of min-max optimization in that during the batch-replay process, the approximated perturbation computed to maximize the objective on $\theta_t$ is used to robustly optimize $\theta_{t+1}$ rather than $\theta_t$ . To tackle this problem, instead of directly updating $\theta$ using the "by-product" gradient attained from the gradient ascent step on $\delta$ , we accumulate the gradients $\nabla_\theta L$ , and apply them to the model parameters all at once later. Formally, the optimization step is + +$$ +\boldsymbol {\theta} _ {i + 1} = \boldsymbol {\theta} _ {i} - \frac {\tau}{M} \sum_ {t = 1} ^ {M} \nabla_ {\boldsymbol {\theta}} L \left(f _ {\boldsymbol {\theta}} \left(x + \boldsymbol {\delta} _ {t}\right), y\right), \tag {5} +$$ + +where $\tau$ is learning rate and $\delta_{1}$ is uniform noise. Note that the gradients in Eq.(5) are restored when crafting perturbation in Eq.(4). We save one backward pass and $M$ times extra GPU memory through accumulating gradients (which is fully supported by PyTorch) during the batch replay process. Figure 2 depicts the effects of our design. We can see that PGD inevitably produces concentrated augmentations in terms of the magnitude, whereas our method produces perturbations with a broader range of sizes, which adds to the diversity and quality of the augmentations. + +Moreover on the node classification task, we propose to augment labeled vs. unlabeled nodes with diverse magnitudes of perturbations during training time to further diversify the augmentations. We call it Weighted perturbation. When classifying one target node, messages from the whole $k$ -hop neighborhood are aggregated and combined into its embedding. It is natural to believe that a further neighbor should have lower impact, i.e. higher smoothness, on the final decision of the target node, which can also be intuitively reflected by the recursive message passing procedure of GNNs in Eq.(1). In practice we find that a larger perturbation for unlabeled nodes can be beneficial to the performance. Algorithm 1 summarizes the pseudo code of our method on node classification task. Figure 1 illustrates the generalization ability of our proposed method. + +# 4. Experiments + +In this section, we conduct extensive experiments to fully reveal the efficacy of our method. + +Datasets. We demonstrate FLAG's effectiveness through extensive experiments on the Open Graph Benchmark (OGB), which consists of a wide range of challenging large-scale datasets. [32], [7], and [6] showed that tradi + +Algorithm 1 FLAG: Free Large-scale Adversarial Augmentation on Graphs (Node Classification Task) + +Require: Graph $\mathcal{G} = (\mathcal{V},\mathcal{E})$ , $\mathcal{V}_l$ is the labeled node set; learning rate $\tau$ ; ascent steps $M$ ; ascent step size $\alpha_v$ for labeled node, $\alpha_u$ for unlabeled, we assume the neighbors of labeled nodes are all unlabeled ones; $L(\cdot)$ as objective function; $\mathrm{A}(\cdot)$ and $\mathrm{C}(\cdot)$ denote the AGGREGATE and COMBINE functions in Eq.(1). The backward function at line 12 refers to back-propagation gradient computation for both model weights and noises. + +1: Initialize $(\theta, \phi)$ +2: for $v \in \mathcal{V}_l$ do +3: $\delta_v^{(0)} \gets U(-\alpha_v, \alpha_v)$ +4: $\delta_u^{(0)} \gets U(-\alpha_u, \alpha_u)$ +5: for $t = 1 \dots M$ do +6: $h_v^{(0)} \gets x_v + \delta_v^{(t-1)}$ +7: $h_u^{(0)} \gets x_u + \delta_u^{(t-1)}$ +8: for $k = 1 \dots K$ do +9: $msg_v^{(k)} \gets A_\theta^{(k)} \left( \left\{ (h_v^{(k-1)}, h_u^{(k-1)}, e_{uv}) \right. \right.$ , $\forall u \in \mathcal{N}(v) \}$ +10: $h_v^{(k)} \gets C_\phi^{(k)} \left( h_v^{(k-1)}, msg_v^{(k)} \right)$ +11: end for +12: $L(h_v^{(K)}, y)$ .backward() +13: $g_{\theta, \phi}^{(t)} \gets g_{\theta, \phi}^{(t-1)} + \frac{1}{M} \cdot \text{grad}(\theta, \phi)$ +14: $\delta_v^{(t)} \gets \delta_v^{(t-1)} + \alpha_v \cdot \text{sign}(\text{grad}(\delta_v))$ +15: $\delta_u^{(t)} \gets \delta_u^{(t-1)} + \alpha_u \cdot \text{sign}(\text{grad}(\delta_u))$ +16: end for +17: ( $\theta, \phi$ ) $\leftarrow (\theta, \phi) - \tau \cdot g_{\theta, \phi}^{(M)}$ +18: end for + +tional graph datasets suffered from problems such as unrealistic and arbitrary data splits, highly limited data sizes, nonrigorous evaluation metrics, and common neglect of validation set, etc. In order to empirically study FLAG's effects in a fair and reliable manner, we conduct experiments on the OGB [17] datasets, which have tackled those major issues and brought more realistic challenges to the graph research community. + +Setup. FLAG drops the projection step when performing the inner maximization, in light of the positive effect of large perturbations on generalization [36], and also to simplify hyperparameter search. Usually on images, the inner maximization has a norm constraint on the perturbation; the largest perturbation one can add is bounded by the hyperparameter $\epsilon$ , typically 8/255 under the $l_{\infty}$ -norm. This $\epsilon$ encourages the visual imperceptibility of the perturbations, thus making defenses realistic and practical. However, graph node features or language word embeddings do not have an established distance threshold for imperceptibility, which makes the selection of $\epsilon$ highly heuristic. Note that, although the perturbation is no longer bounded by an explicit $\epsilon$ in FLAG, it is still implicitly bounded in the furthest distance that $\delta$ can reach, i.e. the step size $\alpha$ times the number of ascending steps $M$ . + +Also unless otherwise stated, all of the baseline test statistics come from the official OGB leaderboard website, and we conduct all of our experiments using publicly re + +
Backboneogbn-products Test Accogbn-proteins Test ROC-AUCogbn-arxiv Test Acc
GCN-72.51±0.3571.74±0.29
+FLAG-71.71±0.5072.04±0.20
GraphSAGE78.70±0.3677.68±0.2071.49±0.27
+FLAG79.36±0.5776.57±0.7572.19±0.21
GAT79.45±0.59-73.65±0.11
+FLAG81.76±0.45-73.71±0.13
DeeperGCN80.98±0.2085.80±0.1771.92±0.16
+FLAG81.93±0.3185.96±0.2772.14±0.19
+ +leased implementations without touching the original model architecture or training setup for fair comparisons. We report mean and standard deviations from 10 runs with different random seeds. Following common practice on this benchmark, we report the test performance associated with the best validation result. We choose GCN, GraphSAGE, GAT, and GIN as our baseline models. In addition, we apply FLAG to the DeeperGCN model to demonstrate its effectiveness on the GNNs with significantly deeper depth. Our implementation always uses $M = 3$ ascent steps for simplicity. Following [15, 26], we use $\mathrm{sign}(\cdot)$ for gradient normalization. + +Large-scale Node Property Prediction. We summarize the results of node classification in Table 1. Notably, FLAG yields a $2.31\%$ test accuracy lift for GAT, making GAT competitive on the ogbn-products dataset. Considering the specialty of not having input node features in ogbn-proteins, we provide detailed discussions on the effect of different node feature constructions in Section 5. ogbn-mag is a heterogeneous network where only "paper" nodes come with node features. We use the neighbor sampling mini-batch algorithm to train R-GCN and report its results in the Table 2. Surprisingly, FLAG can also directly bring nontrivial accuracy improvement without special designs for heterogeneous graphs, which demonstrates its versatility. + +Table 1. Node property prediction test performance on ogbn-products, ogbn-proteins, and ogbn-arxiv datasets. Blank denotes no statistics on the leaderboard. + +
Backboneogbn-mag +Test Acc
R-GCN46.78±0.67
+FLAG47.37±0.48
+ +Large-scale Link Property Prediction. We evaluate our method on two OGB link prediction datasets, which are ogbl-ddi and ogbl-collab. The authors of OGB selected Hits@K as the official evaluation metric. We study the performance of FLAG with GCN and GraphSAGE as backbone on this task. We follow the practice of the baselines to train the models in the full-batch manner. Re + +Table 2. Test performance on the heterogeneous OGB node property prediction dataset ogn-bn-mag. + +
Backboneogbl-ddi Hits@20ogbl-collab Hits@50
GCN37.07 ±5.0744.75±1.07
+FLAG51.41±3.7646.22±0.81
GraphSAGE53.90 ±4.7448.10 ±0.81
+FLAG63.31±6.0648.44±0.40
+ +Table 3. Link property prediction test performance on ogbl-ddi and ogbl-collab datasets. + +sults are reported in Table 3. We highlight that FLAG brings a salient boost to both GCN and GraphSAGE on the ogbl-ddi dataset. + +Large-scale Graph Property Prediction. Table 4 summarizes the test scores of GCN, GIN, and DeeperGCN on all four OGB graph property prediction datasets. "Virtual" means the model is augmented with virtual nodes [13, 17, 25]. As adversarial perturbations are crafted by gradient ascent, it would be unnatural and suboptimal to add noises to discrete input node features [45]. We firstly project discrete node features into the continuous space and then adversarily augment the hidden embeddings. On ogbg-molhiv, FLAG yields notable improvements, but when GCN has already been hurt by virtual nodes, FLAG appears to exaggerate the harm. On ogbg-molpcba, GIN-Virtual with FLAG receives an absolute value $1.31\%$ test AP value increase. Besides node classification and link prediction, FLAG's strong effects on graph classification prove its high versatility. + +# 5. Ablation Studies and Discussions + +Compatibility with graph structure regularizers. As our augmentation manipulates the input features, it is highly complementary to structure-based regularizers. We validate this point through the experiments below. We mainly focus on two widely-used topological augmentation methods to illustrate $^{1}$ : (i) Neighbor sampling [16] randomly samples neighbors for information aggregation. It not only contributes to GNN scalability but also acts as a structure regularizer. A full-batch GraphSAGE reaches $78.50 \pm 0.14\%$ test accuracy on ogbn-products, and neighbor sampling alone generalizes the model to $78.70 \pm 0.36\%$ . When FLAG is also used, the test accuracy is increased to $79.36 \pm 0.57\%$ . (ii) Virtual node [13] adds one synthetic node that connects to all existing nodes. Nearly all the numbers from Table 4 supports that our method works well with virtual node to generalize GNNs further. Here We highlight one representative group of experiments on ogbg-ppa with GIN as baseline. Vanilla GIN gets $68.92 \pm 1.00\%$ test accuracy. By adding virtual node alone, it goes to $70.37 \pm 1.07\%$ . When FLAG is further deployed, test accuracy reaches + +
Backboneogbg-molhiv Test ROC-AUCogbg-molpcba Test APogbg-ppa Test Accogbg-code Test F1
GCN76.06±0.9720.20±0.2468.39±0.3431.63±0.18
+FLAG76.83±1.0221.16±0.1768.38±0.4732.09±0.19
GCN-Virtual75.99±1.1924.24±0.3468.57±0.6132.63±0.13
+FLAG75.45±1.5824.83±0.3769.44±0.5233.16±0.25
GIN75.58±1.4022.66±0.2868.92±1.0031.63±0.20
+FLAG76.54±1.1423.95±0.4069.05±0.9232.41±0.40
GIN-Virtual77.07±1.4927.03±0.2370.37±1.0732.04±0.18
+FLAG77.48±0.9628.34±0.3872.45±1.1432.96±0.36
DeeperGCN78.58±1.1727.81²±0.3877.12±0.71-
+FLAG79.42±1.2028.42³±0.4377.52±0.69-
+ +Table 4. Graph property test performance on ogbg-molhiv, ogbg-molpcba, ogbg-ppa, and ogbg-code datasets. $\sharp$ denotes the existence of virtual nodes; blank denotes no statistics on the leaderboard. + +
MethodGCNGraphSAGE
w/o BN71.09±0.2269.58±0.76
w/ BN71.74±0.2971.49±0.27
w/ BN +FLAG72.04±0.2072.19±0.21
w/ Dual BN +FLAG72.11±0.2372.21±0.20
+ +Table 5. Test Accuracy on the ogbn-arxiv dataset with different BN methods. + +
ogbn-products +Test Accogbl-ddi +Hits@20ogbg-molhiv +Test ROC-AUC
Baseline79.45±0.5953.90±4.7475.58±1.40
+PGD80.96±0.4162.02±6.5676.14±1.62
+“Free”79.42±0.8458.61±6.074.93±1.29
+FLAG81.76±0.4563.31±6.0676.54±1.14
+FLAG (fast)80.64±0.74--
+ +$72.45 \pm 1.14\%$ . + +Compatibility with batch norm. Batch norm is appearing more and more frequently in top-performing GNNs. [40] argued that there was a potential risk, that adversarial examples could distort BN parameters away from natural distribution so to cause the adversially trained model to fail on clean samples. The authors proposed to use dual batch norms (one for adversaries and the other for clean ones) at training time to better exploit the generalization ability of adversarial augmentations. To test the dual batch norm method on graph data, we run experiments as summarized in Table 5. We find that the utilization of dual BN can produce a slight performance gain. As there is growing attention on using batch norms on GNNs, it will be interesting to see how to better synergize adversarial augmentation with batch norms in future research. + +Comparison with other robust optimization methods. Table 6 shows performances with different adversarial augmentations. For PGD and "free", we compute 8 ascent + +Table 6. Test performances on different datasets trained with different adversarial augmentations. Baselines are GAT, GraphSAGE, and GIN respectively. FLAG (fast) means the training epoch number is decreased to make our method trained as fast as the baseline. + +
BackboneTest Acc
GAT w/o dropout75.67±0.27
GAT w/ dropout79.45±0.59
GAT w/ dropout +FLAG81.76±0.45
+ +Table 7. Test Accuracy on the ogbn-products dataset. + +
Backboneogbn-products +Test Acc
GraphSAGE w/ NS78.70±0.36
+FLAG79.36±0.57
GraphSAGE w/ Cluster78.97±0.33
+FLAG78.60±0.27
GraphSAGE w/ SAINT79.08±0.24
+FLAG79.60±0.19
+ +Table 8. Test accuracy on ogbn-products with GraphSAGE trained with diverse mini-batch algorithms. + +steps for the inner-maximization to make the attack strong enough, while for FLAG we only compute 3 steps. We can see that FLAG outperforms all other methods. We attribute that to the practice of our multi-scale augmentation, which diversifies the scale range of feature perturbations, and helps the model see diverse input features to generalize better, especially on out-distribution samples. Although "free" method incorporates diversifying augmentations, but here the benefits are overwhelmed by the suboptimal problem. + +Effects of weighted perturbation. The effects of biased perturbation are reported in Figure 3c. Generally speaking, when $\log_2(\alpha_u / \alpha_l) > 0$ , which means that unlabeled nodes receive larger augmentations, the performance gains are more salient. The phenomenon supports our practice of using weighted perturbation to promote multi-scale augmentations. Empirically we find that the benefit of weighted perturbation is more evident on ogbn-products than on ogbn-arxiv. Our understanding is that, ogbn-products is better suited with our practice of labeled vs. unlabeled split because of its high la + +bel sparsity compared with ogbn-arxiv (label rate $8\%$ vs. $54\%$ ). When labeled nodes are more sparse, the neighborhood of labeled nodes will be more overwhelmed by unlabeled ones, where our approximation is more accurate. + +Hyperparameter sensitivity. Figure 3a and Figure 3b show the hyperparameter sensitivity of our method. Overall, our method is stable to yield consistent accuracy boost compared with baseline. + +Compatibility with mini-batch methods. Graph minibatch algorithms are critical to training GNNs on large-scale datasets. We test how different algorithms will work with adversarial data augmentation with GraphSAGE as the backbone. From Table 8, we see that neighbor sampling [16] and GraphSAINT [43] can all work with FLAG to further boost performance, while Cluster [4] suffers an accuracy drop. + +Compatibility with dropout. Dropout is widely used in GNNs. Table 7 shows that, when trained without dropout, GAT accuracy drops steeply by a large margin. What is more, FLAG can further generalize GNN models together with dropout, similar to the phenomenon of image augmentations. It demonstrates that our method is fully compatible with this domain/model-agnostic regularizer. + +Towards going "free". FLAG introduces tractable extra training overhead. We empirically show that, when we decrease the total number of training epochs to make it as fast as the standard GNN training pipeline, FLAG still brings significant performance gains. Table 6 shows that FLAG with fewer epochs still generalizes the baseline. Empirically, on a single Nvidia RTX 2080Ti, 100-epoch vanilla GAT takes 88 mins, while FLAG (fast) in Table 6 takes 91 mins. We note that heuristics like early stopping and cyclic learning rates can further accelerate the adversarial training process [39], so there are abundant opportunities for further research on adversarial augmentation at lower or even no cost. + +Towards going deep. Over-smoothing stops GNNs from going deep. FLAG shows its ability to boost both shallow and deep baselines, e.g., GCN and DeeperGCN. We carefully examine FLAG's effects on generalization when a GNN goes progressively deeper in Figure 4a. The experiments are conducted on ogbn-arxiv with GraphSAGE as the backbone, where a consistent improvement is evident. + +What if there's no node feature? One natural question can be raised: what if no input node features are provided? ogbn-proteins is a dataset without input node features. [17] proposed to average incoming edge features to obtain initial node features, while [24] used summation and achieved competitive results. Note that the GCN and GraphSAGE baselines in Table 1 use the "mean" node features as input and suffer an accuracy drop with FLAG; DeeperGCN leverages the "sum" and gets further improved. Interestingly, when DeeperGCN is trained with "mean" + +node features, it receives high invariance, so that even large magnitude perturbations will not change its result. The diverse behavior of adversarial augmentation implies the importance of node feature construction method selection. + +Where Does the Boost Come from? It is now widely believed that model robustness appears to be at odds with clean accuracy. Despite the recent proliferation of literature in using adversarial data augmentation to promote standard performance, it is still unsettled where the boost or detriment of adversarial training comes from. Like one-hot word embeddings for language models, input node features usually come from discrete spaces, e.g., the bag-of-words binary features in ogbn-products. We conjecture that the diverse effects of adversarial training in different domains stem from differences in the input data distribution rather than model architectures. To ground our claim, we have the following observations. + +Observation 1: We utilize FLAG to augment MLPs (an architecture where adversarial training has adverse effects in the image domain), and successfully boost generalization. FLAG directly improves the test accuracy from $61.06 \pm 0.08\%$ to $62.41 \pm 0.16\%$ on ogbn-product, and from $55.50 \pm 0.23\%$ to $56.02 \pm 0.19\%$ on ogbn-arxiv. + +Observation 2: In general, adversarial training hurts the clean accuracy in image classification, but [35] showed that CNNs could benefit from adversarial augmentations on MNIST, where the pixel values are closer to discrete distribution than other more natural image datasets. + +Observation 3: To illustrate, we provide a simple example on the Cora [12] dataset. To simplify the scenario, we choose FGSM to craft adversarial augmentations for a GCN. By adding Gaussian noise with standard deviation $\sigma$ , we simulate node features drawn from a continuous distribution. The result is summarized in Figure 4b. When $\sigma = 0$ , the discrete distribution of node features persists. At this moment, a GCN with adversarial augmentation outperforms the non-augmented model. With increased noise level $\sigma$ , the features are continuously distributed with large support and FGSM starts to harm the clean accuracy, which validates our conjecture. All these observations support our conjecture that data distribution has more to do with the effect of adversarial augmentation, while the lack of rigorous theoretical justification is a limitation of our analysis. + +Applicability to computer vision tasks. Despite the focus on graph learning, we believe our work benefits the vision community. Graph is widely used in CV, e.g., 3D vision and scene understanding. Also 2D images can be represented as grid graphs with pixels as nodes, so we can use GNNs for image recognition smoothly. Here we provide some preliminary results of FLAG on MNIST superpixel dataset [9]. GCN reaches $87.83 \pm 0.70\%$ while GCN+FLAG gets $89.1 \pm 0.37\%$ , which is an evidence of FLAG's potential of contributing to the vision community. + +![](images/f4ae05a3fcfd6c8947867f9c711529d0a3212d83049bfea993d76a73816df627.jpg) +(a) step size + +![](images/fcf26336575b13e90fe0c5a337bbde8638de665100d42744f67d8e14c2cba963.jpg) +(b) ascent steps + +![](images/2844463f1ad683c22a3806ec11cde74be4eb3b755ee42f3a63e7292a48713837.jpg) +(c) weighted perturbation + +![](images/fb92df12f616dc1149bc2a89184380b340f560bd747eea48328b1d3e1746fe9a.jpg) +Figure 3. Results of GraphSAGE and GAT on the ogbn-products dataset. +(a) +Figure 4. (a) Test accuracy on ogbn-arxiv; (b) Performance gap on Cora. + +![](images/3efd2597e924d60a1d295526db266328804ff06c6c520d1db247f5755f5e618a.jpg) +(b) + +# 6. Conclusion + +We propose FLAG, a simple, scalable, and general data augmentation method for better GNN generalization. Like widely-used image augmentations, FLAG can be easily incorporated into any GNN training pipeline. FLAG yields improvements over a range of GNN baselines. Besides extensive experiments, we also provide conceptual analysis to validate adversarial augmentation's different behavior on varied data types. The effects of adversarial augmentation on generalization are still not entirely understood, and we think this is a fertile space for future exploration. However, for the potential negative social impact, our work may be deployed as regularizer of fine-grained social tracker for large-scale social network to undermine personal privacy. + +Acknowledgements. Kezhi Kong and Tom Goldstein were supported by DARPA GARD, Office of Naval Research, AFOSR MURI program, the DARPA Young Faculty Award, and the National Science Foundation Division of Mathematical Sciences. Additional support was provided by Capital One Bank and JP Morgan Chase. Guohao Li and Bernard Ghanem were supported by the King Abdullah University of Science and Technology (KAUST) Office of Sponsored Research through the Visual Computing Center (VCC) funding. + +# References + +[1] Yogesh Balaji, Tom Goldstein, and Judy Hoffman. Instance adaptive adversarial training: Improved accuracy tradeoffs in neural nets. arXiv preprint arXiv:1910.08051, 2019. 1 +[2] Jie Chen, Tengfei Ma, and Cao Xiao. Fastgcn: fast learning with graph convolutional networks via importance sampling. arXiv preprint arXiv:1801.10247, 2018. 2 +[3] 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, 3 +[4] Wei-Lin Chiang, Xuanqing Liu, Si Si, Yang Li, Samy Bengio, and Cho-Jui Hsieh. Cluster-gcn: An efficient algorithm for training deep and large graph convolutional networks. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 257-266, 2019. 7 +[5] Zhijie Deng, Yinpeng Dong, and Jun Zhu. Batch virtual adversarial training for graph convolutional networks. arXiv preprint arXiv:1902.09192, 2019. 2 +[6] Vijay Prakash Dwivedi, Chaitanya K Joshi, Thomas Laurent, Yoshua Bengio, and Xavier Bresson. Benchmarking graph neural networks. arXiv preprint arXiv:2003.00982, 2020. 4 +[7] Federico Errica, Marco Podda, Davide Bacciu, and Alessio Micheli. A fair comparison of graph neural networks for + +graph classification. arXiv preprint arXiv:1912.09893, 2019.4 +[8] Fuli Feng, Xiangnan He, Jie Tang, and Tat-Seng Chua. Graph adversarial training: Dynamically regularizing based on graph structure. IEEE Transactions on Knowledge and Data Engineering, 2019. 2 +[9] Matthias Fey, Jan Eric Lenssen, Frank Weichert, and Heinrich Müller. Splinecnn: Fast geometric deep learning with continuous b-spline kernels. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 869-877, 2018. 7 +[10] Zhe Gan, Yen-Chun Chen, Linjie Li, Chen Zhu, Yu Cheng, and Jingjing Liu. Large-scale adversarial training for vision-and-language representation learning. arXiv preprint arXiv:2006.06195, 2020. 1, 3 +[11] Victor Garcia and Joan Bruna. Few-shot learning with graph neural networks. arXiv preprint arXiv:1711.04043, 2017. 1 +[12] Lise Getoor. Link-based classification. In Advanced methods for knowledge discovery from complex data, pages 189–207. Springer, 2005. 7 +[13] Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. arXiv preprint arXiv:1704.01212, 2017. 1, 5 +[14] Jonathan Godwin, Michael Schaarschmidt, Alexander L Gaunt, Alvaro Sanchez-Gonzalez, Yulia Rubanova, Petar Velickovic, James Kirkpatrick, and Peter Battaglia. Simple GNN regularisation for 3d molecular property prediction and beyond. In International Conference on Learning Representations, 2022. 1 +[15] Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014. 1, 3, 5 +[16] Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in neural information processing systems, pages 1024-1034, 2017. 1, 2, 5, 7 +[17] Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. Open graph benchmark: Datasets for machine learning on graphs. arXiv preprint arXiv:2005.00687, 2020. 1, 2, 3, 4, 5, 7 +[18] Weihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik, Percy Liang, Vijay Pande, and Jure Leskovec. Strategies for pre-training graph neural networks. arXiv preprint arXiv:1905.12265, 2019. 2 +[19] Haoming Jiang, Pengcheng He, Weizhu Chen, Xiaodong Liu, Jianfeng Gao, and Tuo Zhao. Smart: Robust and efficient fine-tuning for pre-trained natural language models through principled regularized optimization. arXiv preprint arXiv:1911.03437, 2019. 1 +[20] Hongwei Jin and Xinhua Zhang. Latent adversarial training of graph convolution networks. In ICML Workshop on Learning and Reasoning with Graph-Structured Representations, 2019. 2 +[21] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016. 1 + +[22] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097-1105, 2012. 1 +[23] Chang Li and Dan Goldwasser. Encoding social information with graph convolutional networks for political perspective detection in news media. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2594-2604, 2019. 1 +[24] Guohao Li, Chenxin Xiong, Ali Thabet, and Bernard Ghanem. Deepergcn: All you need to train deeper gcns. arXiv preprint arXiv:2006.07739, 2020. 7 +[25] Junying Li, Deng Cai, and Xiaofei He. Learning graph-level representation for drug discovery. arXiv preprint arXiv:1709.03741, 2017. 5 +[26] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017. 1, 3, 5 +[27] Takeru Miyato, Andrew M Dai, and Ian Goodfellow. Adversarial training methods for semi-supervised text classification. arXiv preprint arXiv:1605.07725, 2016. 1 +[28] Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. IEEE transactions on pattern analysis and machine intelligence, 41(8):1979–1993, 2018. 3 +[29] Jiezhong Qiu, Jian Tang, Hao Ma, Yuxiao Dong, Kuansan Wang, and Jie Tang. Deepinf: Social influence prediction with deep learning. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 2110-2119, 2018. 1 +[30] Yu Rong, Wenbing Huang, Tingyang Xu, and Junzhou Huang. Droppedge: Towards deep graph convolutional networks on node classification. In International Conference on Learning Representations, 2019. 1, 2, 5 +[31] Ali Shafahi, Mahyar Najibi, Mohammad Amin Ghiasi, Zheng Xu, John Dickerson, Christoph Studer, Larry S Davis, Gavin Taylor, and Tom Goldstein. Adversarial training for free! In Advances in Neural Information Processing Systems, pages 3358-3369, 2019. 2, 3 +[32] Oleksandr Shchur, Maximilian Mumme, Aleksandar Bojchevski, and Stephan Gunnemann. Pitfalls of graph neural network evaluation. arXiv preprint arXiv:1811.05868, 2018. 4 +[33] Yantao Shen, Hongsheng Li, Shuai Yi, Dapeng Chen, and Xiaogang Wang. Person re-identification with deep similarity-guided graph neural network. In Proceedings of the European conference on computer vision (ECCV), pages 486–504, 2018. 1 +[34] Manli Shu, Zuxuan Wu, Micah Goldblum, and Tom Goldstein. Prepare for the worst: Generalizing across domain shifts with adversarial batch normalization. arXiv e-prints, pages arXiv-2009, 2020. 1 +[35] Dimitris Tsipras, Shibani Santurkar, Logan Engstrom, Alexander Turner, and Aleksander Madry. Robustness may be at odds with accuracy. arXiv preprint arXiv:1805.12152, 2018. 1, 3, 7 + +[36] Riccardo Volpi, Hongseok Namkoong, Ozan Sener, John C Duchi, Vittorio Murino, and Silvio Savarese. Generalizing to unseen domains via adversarial data augmentation. In Advances in neural information processing systems, pages 5334-5344, 2018. 1, 3, 4 +[37] Yiwei Wang, Wei Wang, Yuxuan Liang, Yujun Cai, Juncheng Liu, and Bryan Hooi. Nodeaug: Semi-supervised node classification with data augmentation. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 207-217, 2020. 1 +[38] Jason Wei and Kai Zou. Eda: Easy data augmentation techniques for boosting performance on text classification tasks. arXiv preprint arXiv:1901.11196, 2019. 1 +[39] Eric Wong, Leslie Rice, and J Zico Kolter. Fast is better than free: Revisiting adversarial training. arXiv preprint arXiv:2001.03994, 2020. 7 +[40] Cihang Xie, Mingxing Tan, Boqing Gong, Jiang Wang, Alan L Yuille, and Quoc V Le. Adversarial examples improve image recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 819-828, 2020. 1, 6 +[41] Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L Hamilton, and Jure Leskovec. Graph convolutional neural networks for web-scale recommender systems. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 974–983, 2018. 1 +[42] Yuning You, Tianlong Chen, Yongduo Sui, Ting Chen, Zhangyang Wang, and Yang Shen. Graph contrastive learning with augmentations. Advances in Neural Information Processing Systems, 33, 2020. 1 +[43] Hanqing Zeng, Hongkuan Zhou, Ajitesh Srivastava, Rajgopal Kannan, and Viktor Prasanna. Graphsaint: Graph sampling based inductive learning method. arXiv preprint arXiv:1907.04931, 2019. 7 +[44] Chen Zhu, Yu Cheng, Zhe Gan, Siqi Sun, Thomas Goldstein, and Jingjing Liu. Freelb: Enhanced adversarial training for language understanding. arXiv preprint arXiv:1909.11764, 2019. 1 +[45] Daniel Züigner, Amir Akbarnejad, and Stephan Gunnemann. Adversarial attacks on neural networks for graph data. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 2847-2856, 2018. 5 \ No newline at end of file diff --git a/robustoptimizationasdataaugmentationforlargescalegraphs/images.zip b/robustoptimizationasdataaugmentationforlargescalegraphs/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..eb20c5f7a2373c81bb286aa9595d015f9f7d30d4 --- /dev/null +++ b/robustoptimizationasdataaugmentationforlargescalegraphs/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa976408e84c7da697ac12b6b7133255419cbfc43a6085cc08a94ed95badfe52 +size 360289 diff --git a/robustoptimizationasdataaugmentationforlargescalegraphs/layout.json b/robustoptimizationasdataaugmentationforlargescalegraphs/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..90d59efacce004cf7456f2db08a42f3869d1f605 --- /dev/null +++ b/robustoptimizationasdataaugmentationforlargescalegraphs/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:632c9f8ae2f603d38820f877d4041baaf50be999cc1c697ba9d77df40d064eb6 +size 386321 diff --git a/robustoutlierdetectionbydebiasingvaelikelihoods/bab142c1-34f2-4e98-8b84-e1d3794d8d6e_content_list.json b/robustoutlierdetectionbydebiasingvaelikelihoods/bab142c1-34f2-4e98-8b84-e1d3794d8d6e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..bd71c38b4413884b40b128e05938a7a1c89df2f6 --- /dev/null +++ b/robustoutlierdetectionbydebiasingvaelikelihoods/bab142c1-34f2-4e98-8b84-e1d3794d8d6e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdcf1fc13157eb44aa0664ecb31f4b3ad3c5d4724502c9000c4c3132092680dd +size 68493 diff --git a/robustoutlierdetectionbydebiasingvaelikelihoods/bab142c1-34f2-4e98-8b84-e1d3794d8d6e_model.json b/robustoutlierdetectionbydebiasingvaelikelihoods/bab142c1-34f2-4e98-8b84-e1d3794d8d6e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1f7a22e368c0a1b6b56028b83b28c89a94cac1d8 --- /dev/null +++ b/robustoutlierdetectionbydebiasingvaelikelihoods/bab142c1-34f2-4e98-8b84-e1d3794d8d6e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50ff222f3770788bb81a10b7e371aada2ac7ce1aed78f1e0b917758b4798e75c +size 83512 diff --git a/robustoutlierdetectionbydebiasingvaelikelihoods/bab142c1-34f2-4e98-8b84-e1d3794d8d6e_origin.pdf b/robustoutlierdetectionbydebiasingvaelikelihoods/bab142c1-34f2-4e98-8b84-e1d3794d8d6e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f5ed07244a76f14a9220743396b3dca6aed97b07 --- /dev/null +++ b/robustoutlierdetectionbydebiasingvaelikelihoods/bab142c1-34f2-4e98-8b84-e1d3794d8d6e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e316874a96c3c577ad11d4b3e9be07370a3c931b639a5da9069fc1be8ed09818 +size 4634220 diff --git a/robustoutlierdetectionbydebiasingvaelikelihoods/full.md b/robustoutlierdetectionbydebiasingvaelikelihoods/full.md new file mode 100644 index 0000000000000000000000000000000000000000..47761ee35958af699b50e10f1d253ed025d5fe32 --- /dev/null +++ b/robustoutlierdetectionbydebiasingvaelikelihoods/full.md @@ -0,0 +1,285 @@ +# Robust outlier detection by de-biasing VAE likelihoods + +Kushal Chauhan1, Barath Mohan U2, Pradeep Shenoy1, Manish Gupta1, Devarajan Sridharan2* +1 Google Research +{kushalchauhan, shenoypradeep, manishgupt}@google.com +2 Center for Neuroscience, and Computer Science and Automation, Indian Institute of Science +{barathu, sridhar}@iisc.ac.in + +# Abstract + +Deep networks often make confident, yet, incorrect, predictions when tested with outlier data that is far removed from their training distributions. Likelihoods computed by deep generative models (DGMs) are a candidate metric for outlier detection with unlabeled data. Yet, previous studies have shown that DGM likelihoods are unreliable and can be easily biased by simple transformations to input data. Here, we examine outlier detection with variational autoencoders (VAEs), among the simplest of DGMs. We propose novel analytical and algorithmic approaches to ameliorate key biases with VAE likelihoods. Our bias corrections are sample-specific, computationally inexpensive, and readily computed for various decoder visible distributions. Next, we show that a well-known image preprocessing technique - contrast stretching - extends the effectiveness of bias correction to further improve outlier detection. Our approach achieves state-of-the-art accuracies with nine grayscale and natural image datasets, and demonstrates significant advantages - both with speed and performance - over four recent, competing approaches. In summary, lightweight remedies suffice to achieve robust outlier detection with VAEs.1 + +# 1. Introduction + +Deep neural networks are increasingly deployed in real-world computer vision applications. A key issue with such deployments is over-confident predictions: the tendency of these networks to make confident, yet incorrect, predictions when tested with images whose statistics are far removed from the training data distribution [21]. Developing robust methods for outlier detection is, therefore, an important challenge with critical real-world implications. + +A popular class of approaches for outlier detection, espe + +![](images/9accfbc11981411397d9e15c4f1b0d7582b9e084f02ac3fc4cdc95d98b70804a.jpg) +Figure 1. Schematic of the proposed approach. Variational autoencoders (VAEs) are routinely employed for unsupervised outlier detection with real-world images. Yet, variations in low-level image features, like overall intensity or contrast, can readily bias VAE likelihoods $(p(\mathbf{x}))$ . We analyze these biases, and propose lightweight analytical and algorithmic remedies (Bias Correction and Contrast Stretching) for de-biasing VAE likelihoods $(p^{c}(\mathbf{x}))$ , to achieve robust outlier detection. + +cially with label-free data, involves computing sample likelihoods with deep generative models like variational autoencoders (VAEs [8]) or flow-based models (e.g. Glow [7]). Here, we explore outlier detection with VAEs, arguably among the simplest of deep generative models. In VAEs, both the generative model $p_{\theta}(\mathbf{x}|\mathbf{z})$ and the inference model $q_{\phi}(\mathbf{z}|\mathbf{x})$ are parameterized by deep neural networks with parameters $\theta$ (decoder) and $\phi$ (encoder) respectively; the stochastic latent representation $\mathbf{z}$ is typically of considerably lower dimensionality than the input data $\mathbf{x}$ . VAEs dif + +fer from other kinds of deep generative models, like flow models, in that rather than directly optimizing the marginal likelihood $p(\mathbf{x})$ , they seek to optimize the evidence lower bound (ELBO) as a proxy for maximizing $p(\mathbf{x})$ . + +Several previous studies have shown that likelihoods computed by deep generative models, including VAEs, are unreliable for outlier detection [3, 16, 19, 25]. For example, these likelihoods are readily biased by differences in low-level image statistics, like the number of zeros in a sample [19] or the variance in the distribution of pixel intensities [16]. A few solutions have been proposed to overcome these challenges. However, these suffer from computational bottlenecks [19, 25] or do not work well in low-sample regimes [15] (see Section 2, Related Work). + +In this context, we propose and test efficient remedies that achieve or approach state-of-the-art for outlier detection. Our key contributions are as follows: + +- We present a careful analysis of bias in VAE likelihoods and propose analytical and algorithmic approaches to correct this bias. These corrections can be computed inexpensively, post hoc, during evaluation time. +- We show that a standard image pre-processing step (contrast normalization) enables competitive outlier detection. +- We present a comprehensive evaluation of outlier detection with VAEs, with nine datasets (four grayscale and five natural image datasets), in all. +- We demonstrate key advantages in terms of both speed and accuracy over multiple competing, state-of-the-art approaches [3, 19, 20, 25]. + +In sum, lightweight and computationally efficient remedies suffice to achieve robust outlier detection with VAEs. + +# 2. The challenge of outlier detection with VAE likelihoods + +We briefly recapitulate a well-known challenge of outlier detection with VAE likelihoods, by taking a fresh look at two previously reported sources of bias [16, 19]. + +Bias arising from pixel intensity. As a first example, we train a VAE on grayscale FMNIST images [24] and compute the likelihoods for in-distribution (ID) FMNIST and out-of-distribution (OOD) MNIST [12] test samples. We employ the continuous Bernoulli visible distribution [14] for the VAE decoder (model details, Appendix A. We replicate the well-known issue with VAE likelihoods: FMNIST VAE likelihoods are higher for OOD (MNIST) samples as compared to ID (FMNIST) samples (Fig. 2a). The highest likelihoods are assigned to FMNIST samples with a large number of black pixels (Fig. 2b, top row), whereas the lowest likelihoods are assigned to samples with many intermediate (gray) pixel values (Fig. 2b, bottom row), consistent with previous reports [19]. On simulated images with different (constant) pixel intensities, we find a U-shape trend in likelihood bias (Fig. 3a, gray line). + +Bias arising from channel variance or image contrast. Next, we train a VAE on the CelebA dataset [13], and compute ID (CelebA) and OOD (GTSRB [22]) likelihoods. Again, the VAE assigns high likelihoods to OOD samples (Fig. 2f). Faces with dark backgrounds and high contrast + +![](images/c76c701ff4bfae196b81fee90be4bf82a34044c5e925bd6eb227aecc12afabea.jpg) +(a) + +![](images/4fd50a872b9678f54675e16a59955e455fc08c829415a29a0cb0a86101f7d60f.jpg) + +![](images/a343d6d370b86558d76085303941b6d546a58c0c669f6737fbaa72f7c14085e9.jpg) +Low LL +(b) + +![](images/00f9506a7d7d9497958fec940c9522d7f613edec733df386427a85b165315686.jpg) +(c) + +![](images/de6526cda878308f912206d5377f04ba930c777411534ad42e7680c8b08813f6.jpg) + +![](images/548c255755c03c7f492b874b4bbff20ee4c1e6b60cecd2e8fe5cb588813628c8.jpg) +Low BC-LL +(d) + +![](images/098f511c8ee5bc87ff190ad514ddd9bb29a9922e848a1d3a06332326700200f7.jpg) +(e) + +![](images/8cdb41f75b6f1160e9de2ba3981deeeddea73e0931bab179f2261419e2653ff3.jpg) +(f) + +![](images/6e7a94a0ba7bb2fa0fe769dad9feffa076a5fa0733f6fefde43bbc316d16e67e.jpg) + +![](images/eff8142c3ed91148c05bc9a22231dbdb1f308d15d3b68201d59727f067cd3f61.jpg) +Low LL +(g) +Figure 2. Bias correction improves outlier detection. (a) Kernel density estimate of Fashion-MNIST (FMNIST) VAE log likelihoods. Out-of-distribution (OOD) MNIST samples get higher log likelihoods as compared to in-distribution (ID) FMNIST samples. (b) Top and bottom rows: FMNIST images assigned highest and lowest log-likelihoods, respectively, by the FMNIST VAE. (c) Same as in panel (a), but with bias correction (d) Same as in panel (b), but with bias correction. (e) AUROC curves for outlier detection with the FMNIST VAE likelihoods using MNIST (OOD) test samples without (blue) bias correction and with bias correction (orange) (f-j) Same as in panels (a-e), but for the CelebA VAE with CelebA (ID) and GTSRB (OOD) samples. + +![](images/5c7ac91ec8dc93ca4c5cfa2c6697066686b89d7a7ea05eceea0c4873209444ab.jpg) +(h) + +![](images/77a4f8115b945bae08667be8082e1dd14d67b0929148eb943c76d0e1e8bfce8a.jpg) +(i) + +![](images/0699af8c7c9a4c6b6205543a77a0e30dbbb4b47766003a951c0fceb09ede7ac3.jpg) +(j) + +between the face and background are assigned the highest likelihoods (Fig. 2g, top row), and vice versa for low contrast faces (Fig. 2g, bottom row). With simulated images, we observe that VAE likelihoods are strongly biased by contrast (Fig. 3b, gray line). + +In this context, we develop efficient remedies for outlier detection with VAE likelihoods. First, we correct for pixel intensity bias using both analytical and empirical approaches. Second, we correct for the image contrast bias using a standard image pre-processing step (contrast stretching). Finally, we evaluate our remedies with multiple (nine) grayscale and natural image datasets, to show state-of-the-art outlier detection. + +# Related work + +Our bias correction is most closely related to the work of Serra et al. (2019) [20] who proposed a correction for Glow and PixelCNN++ model likelihoods based on "input complexity" (IC). Their out-of-distribution score is computed by subtracting a sample-specific complexity estimate $L(\mathbf{x})$ from the negative log-likelihood. Yet, IC depends on an ad hoc choice of a compression algorithm (e.g. PNG, JPEG2000, FLIF), whereas our correction is analytically derived from the VAE decoder visible distribution. We also demonstrate superior performance over IC for multiple grayscale and natural image datasets. + +Ren et al. (2019) [19] originally highlighted the problem of bias in deep generative model likelihoods, for samples with many zero-valued pixels. They proposed correcting for this bias by training a second generative model with noise-corrupted samples to capture background statistics; the "likelihood ratio" between the original and noisy VAEs provided a sensitive readout of foreground object statistics. Yet, this approach does not appear to work well with VAEs (see also [25]). Moreover, our bias correction obviates the need for training multiple, duplicate models. Similarly, Nalisnick et al. (2019) [16] originally identified the problem of bias in likelihoods arising from sample variance [15]. However, their solution - a "typicality" test - works best with batches of samples, and performs relatively poorly with single outlier samples. + +Recent work by Yong et al. (2020) [27] proposed employing bias-free Gaussian likelihoods and their variances for outlier detection. Yet, Gaussian visible distributions are not theoretically appropriate to model the finite range of pixel values (0-255) encountered in images. We develop bias corrections for Bernoulli, continuous Bernoulli, truncated Gaussian and categorical visible distributions, which are appropriate for modeling pixel values in images. Moreover, Yong et al.'s approach does not work well with natural image datasets (their Appendix C). Our results show robust outlier detection, even with natural image datasets. + +Xiao et al. (2020) [25] proposed a "likelihood re + +gret" metric that involves quantifying the improvement in marginal likelihood by retraining the encoder network to obtain optimal likelihood for each sample. Such sample-specific optimizations are computationally expensive, for example, when millions of samples need to be evaluated on-the-fly. In contrast, our proposed metrics are readily computed with a single forward pass through pre-trained VAEs, leading to a 50-100x speedup in evaluation times over likelihood regret. + +# 3. De-biasing VAE likelihoods + +To improve outlier detection with VAE likelihoods, we develop remedies for correcting for the two sources of bias discussed in the previous section. + +# 3.1. Analytical correction for intensity bias + +We develop an analytically-derived correction for VAE likelihoods, based on the recently developed continuous Bernoulli visible distribution for the decoder [14]. The procedure for computing the correction for a conventional Bernoulli visible distribution is presented in Appendix B. + +The VAE marginal likelihood can be written as: + +$$ +\log p _ {\theta} (\mathbf {x}) = \log \mathbb {E} _ {q _ {\phi} (\mathbf {z} | \mathbf {x})} [ p _ {\theta} (\mathbf {x} | \mathbf {z}) p (\mathbf {z}) / q _ {\phi} (\mathbf {z} | \mathbf {x}) ] +$$ + +We examine the negative reconstruction error term $p_{\theta}(\mathbf{x}|\mathbf{z})$ , assuming perfect reconstruction of the input samples by the VAE. We denote this as $p_{c\mathrm{B}}(\mathbf{x};\boldsymbol{\lambda}^{*})$ where $p_{c\mathrm{B}}$ denotes the continuous Bernoulli pdf, and $\boldsymbol{\lambda}^{*}$ are optimal parameters that correspond to perfect reconstruction $(\hat{\mathbf{x}} = \mathbf{x})$ . We plot $\log p_{c\mathrm{B}}(\mathbf{x};\boldsymbol{\lambda}^{*})$ for simulated images in Figure 3a (dashed green). $\log p_{c\mathrm{B}}(\mathbf{x};\boldsymbol{\lambda}^{*})$ exhibits a bias that is nearly identical with the marginal likelihood (Fig. 3a, gray). Thus, even if two input samples are perfectly reconstructed by the VAE, these will be assigned different likelihoods, depending on the average pixel intensity in each sample; a bias that is largely driven by the reconstruction error term. + +We eliminate this bias in the reconstruction error by dividing by the error for perfect reconstruction. For the continuous Bernoulli visible distribution, the negative reconstruction error is given by: + +$$ +\begin{array}{l} \log p _ {\theta} (\mathbf {x} | \mathbf {z}) = \log p _ {c B} (\mathbf {x}; \boldsymbol {\lambda} _ {\theta} (\mathbf {z})) \\ = \sum_ {i = 1} ^ {D} \log C \left(\lambda_ {i}\right) + x _ {i} \log \lambda_ {i} + \left(1 - x _ {i}\right) \log \left(1 - \lambda_ {i}\right) \tag {1} \\ \end{array} +$$ + +Note that the continuous Bernoulli decoder outputs the shape parameter $(\lambda_{i})$ for the $i^{\mathrm{th}}$ pixel. The decoded pixel value itself is given by: + +$$ +\begin{array}{l} \hat {x} _ {i} = \frac {\lambda_ {i}}{2 \lambda_ {i} - 1} + \frac {1}{2 \tanh ^ {- 1} (1 - 2 \lambda_ {i})} \quad \mathrm {i f} \quad \lambda_ {i} \neq \frac {1}{2} \\ = \frac {1}{2} \quad \text {i f} \quad \lambda_ {i} = \frac {1}{2} \\ \end{array} +$$ + +![](images/792a31202c984559123136a2e44a16f17a9a16eb4a9b07c44be35b74abac37c4.jpg) +(a) + +![](images/6992ae593f375416cee15338c1206bb65463dbdcfbf9e59b3946d84f7236d208.jpg) +(b) + +![](images/12d8392d32ea82a5788f15cfa3765be2ba866b686a65e15da460f64de29bf1cb.jpg) +(c) + +![](images/0fc1fc19e9e583a1f8f3a2590fcce2b67b006eca9073a09e80089ac68a69fa9e.jpg) +(d) +Figure 3. Correcting for biases arising from pixel intensities and image contrasts. (a) Negative reconstruction error for simulated images with uniform pixel intensities, ranging from full-black to full-white before (blue) and after (orange) analytical bias correction (BC) (y-axes units are kilonats). (b) Negative reconstruction error for simulated images with varying contrasts, from highest to lowest values before (blue) and after (orange) contrast stretching (CS) and analytical bias correction. (Both panels) Dashed green line: negative reconstruction error for perfect reconstruction with the continuous Bernoulli visible distribution. Gray line: log-likelihood before bias correction. (c-d) Same as in (a) and (b) but for VAE trained with categorical visible distribution, and algorithmic bias correction. + +For perfect reconstruction we set $\hat{x}_i = x_i$ . To find the optimal $\lambda_i^*$ corresponding to perfect reconstruction, we used SciPy's implementation of Nelder-Mead simplex algorithm to iteratively maximize $\log p_{c\mathrm{B}}(x_i;\lambda_i)$ ; the correction is then calculated by setting $\lambda_i = \lambda_i^*$ in equation (1) above. + +Thus, the "bias-corrected" marginal likelihood (BC) evaluates to: + +$$ +\begin{array}{l} \log p _ {\theta} ^ {c} (\mathbf {x}) = \log \mathbb {E} _ {q _ {\phi} (\mathbf {z} | \mathbf {x})} \left[ \frac {p _ {\theta} (\mathbf {x} | \mathbf {z})}{p _ {c B} (\mathbf {x} ; \boldsymbol {\lambda} ^ {*})} \frac {p (\mathbf {z})}{q _ {\phi} (\mathbf {z} | \mathbf {x})} \right] (2) \\ = \log p _ {\theta} (\mathbf {x}) - \log p _ {c b} (\mathbf {x}; \boldsymbol {\lambda} ^ {*}) (3) \\ \end{array} +$$ + +Following this analytical bias correction, the bias in the negative reconstruction error is eliminated (Fig. 3a, orange). We note that this correction can be computed during evaluation time and does not require retraining the VAE. + +# 3.2. Algorithmic correction for intensity bias + +Next, we demonstrate an algorithmic approach for correcting biases with VAE likelihoods. Such an approach is relevant for decoder visible distributions for which the analytical correction is not tractable, or for which biases must be evaluated empirically. We illustrate this latter scenario with the "categorical" visible distribution - a popular choice of visible distribution for various generative models, + +including VAEs [19,25] and autoregressive models like PixelCNN [23]. + +In theory, the categorical distribution does not suffer from an analytical bias. As a result, perfectly reconstructed images should not suffer from any bias in the reconstruction error term, $p_{\theta}(\mathbf{x}|\mathbf{z})$ . Yet, in practice, we find such a bias arises in a VAE trained with the categorical visible distribution for the decoder. + +To illustrate this, we compute the empirical bias in the log likelihood for a CelebA VAE for images with various uniform pixel intensities (0-255) (Fig. 3c, gray). We observe a U-shaped profile, similar to that observed for VAEs trained with the continuous Bernoulli visible distribution (Fig. 3a). This bias can be explained as follows: For target pixel values close to full black or full white, the VAE decoder concentrates probability mass (PMF) at the target pixel value. On the other hand, for target values close to the middle of the gray range, the PMF is more dispersed around the target pixel value, resulting in lower PMF at the target pixel itself (Appendix F.1, for details). + +We correct for this empirical bias with the following algorithmic approach. We compute the average categorical distribution output for every target pixel value (0-255) employing all of the training (inlier) samples for that VAE. Then, for each test sample, we compute the correction term for the negative reconstruction error as its average value across pixels, under the categorical visible distribution. The procedure is described in detail in Algorithm 1. + +Again, following this algorithmic bias correction, the empirical bias with the categorical distribution is eliminated (Fig. 3c, orange). Such an algorithmic correction generalizes to other types of visible distributions as well: results for VAEs trained with the truncated Gaussian visible distribution are presented in Appendix F.2. + +# 3.3. Correction for contrast bias: Normalization + +Variation in image contrasts produces systematic biases in the likelihood and negative reconstruction error, both with the continuous Bernoulli visible distribution (Fig. 3b, blue), as well as with the categorical visible distribution (Fig. 3d, blue). This is particularly surprising because the categorical distribution is, in theory, bias-free. Nonetheless this bias arises, in practice, due to practical limitations with achieving perfect reconstructions with VAEs. Specifically, the VAE achieves systematically worse reconstructions – as measured by the categorical negative reconstruction error – for high-contrast, as compared to low-contrast, images (Fig. 3d, blue line). As a consequence, the contrast-related bias in the categorical distribution is in a direction opposite to that observed with the continuous Bernoulli distribution (compare Fig. 3d with Fig. 3b). + +For eliminating this additional source of bias arising from image contrasts, we propose a standard image pre + +Algorithm 1: Algorithmic Bias correction +Data: Training Set $\mathbf{X} = \{\mathbf{x}_1,\mathbf{x}_2,\dots \mathbf{x}_n\}$ with $\mathbf{x_p}$ of shape $32\times 32\times nc$ (no. of channels), Encoder Parameters $\phi$ , and Decoder Parameters $\theta$ +Result: Log Correction Factor $\mathbf{C}:(v,k)\rightarrow Float$ for $v = 0,1,\ldots 255$ and $k = 1,2,\ldots nc$ +Init: Map A : $(v,k)\to EmptyList$ for $v = 0,1,\ldots 255$ and $k = 1,2,\ldots nc$ +for $\mathbf{x_p}\in \mathbf{X}$ do Init: Map B : $(v,k)\to EmptyList$ for $v = 0,1,\ldots 255$ and $k = 1,2,\ldots nc$ $\mathbf{z}\sim q_{\phi}(\mathbf{z}|\mathbf{x_p})$ for $i\gets 1$ to 32, $j\gets 1$ to 32, $k\gets 1$ to nc do Append $p_{\theta}^{ijk}(x_p^{ijk}|\overline{\mathbf{z}})$ to $\mathbf{B}(x_p^{ijk},k)$ end for $v\gets 0$ to 255, $k\gets 1$ to nc do Append Mean(B(v,k)) to A(v,k) end +end +Init: Map C : $(v,k)\to 0$ for $v = 0,1,\ldots 255$ and $k = 1,2,\ldots nc$ +for $v\gets 0$ to 255, $k\gets 1$ to nc do | C(v,k) $\leftarrow$ Log(Mean(A(v,k))) +end + +processing step - "contrast stretching" - which is known to improve the robustness of deep classifier models [5]. For our case, each image sample, both from the training and testing datasets, is contrast normalized with the following transformation: $x_{i} = \min (\max (0,[x_{i} - a] / r),1)$ , where $x_{i}$ refers to the $i^{\mathrm{th}}$ pixel of image $\mathbf{x}$ , $r = P_{95}(\mathbf{x}) - P_5(\mathbf{x})$ , $a = P_5(\mathbf{x})$ , $P_{j}$ refers to the $j^{\mathrm{th}}$ percentile and $\mathbf{x}$ refers to the vectorized input sample tensor. Following contrast stretching, we observe more homogeneous distributions of per-channel variance across datasets (see Appendix E.4). + +Contrast stretching and bias correction ameliorate this bias for both types of visible distributions (Fig. 3b, orange, Fig. 3d, orange). + +# 4. Experiments + +We trained and tested VAEs with multiple grayscale and natural image datasets. These included four grayscale image datasets - MNIST, Fashion-MNIST, EMNIST (hand-written English letters [4]) and Sign Language-MNIST (hand gesture thumbnails [1]) - and tested them against four outlier datasets each. These outlier datasets comprised each of the other three datasets (the ones that the VAE was not trained on) and a grayscale, uniform noise dataset. Similarly, we trained VAEs with five natural im + +age datasets – SVHN (Street View House Numbers [17]), CelebA, ComprehensiveCars (traffic surveillance camera views of cars [26]), GTSRB (German Traffic Sign Recognition Benchmark) and CIFAR-10 [10] – and tested them against five outlier datasets each. Again, the outlier datasets comprised each of the other four datasets, and a colored, uniform noise dataset. Data sources and pre-processing details are provided in Appendix C. Each VAE was trained 6 times, with 3 different random initializations of the network weights across 2 train-validation splits; we report average performance measures across all 6 runs (e.g. Figs. 4, 5). + +# 4.1. De-biased likelihoods improve outlier detection + +We compared the outlier detection performance of the vanilla (uncorrected) VAE likelihood (LL) against the bias corrected likelihood (BC-LL). Both train and test images were contrast stretched prior to computing BC-LL scores. The results are shown as a grid $(4\times 5$ or $5\times 6)$ of area under the ROC curve (AUROC) values, separately for the grayscale (1 channel) and natural image (3 channel) datasets. Corresponding results for area under the precision-recall curve (AUPRC) and false-positive rate at $80\%$ true-positive rate (FPR@ $80\%$ TPR) are provided in Appendices E.2-E.3, and details regarding each measure are provided in Appendix D. + +We evaluated the effectiveness of the analytical bias correction, first, with VAEs trained with the continuous Bernoulli visible distribution. + +First, we evaluated our remedies for outlier detection with VAEs trained on grayscale image datasets. In nearly every case, we found that bias-corrected likelihoods (BC-LL, Fig. 4, unfilled orange squares) outperformed uncorrected likelihoods (LL, Fig. 4, unfilled blue circles); AUROC values for outlier detection approached ceiling levels, in many cases. For example, bias correction resolved the problematic case of the Fashion-MNIST VAE such that indistribution Fashion-MNIST samples were assigned higher bias-corrected likelihoods than out-of-distribution MNIST samples (Fig. 2c), resulting in a perfect AUROC (Fig. 2e). Moreover, samples that were assigned the highest and lowest bias-corrected likelihoods were visually more typical and atypical, respectively (Fig. 2d), as compared to those based on uncorrected likelihoods (Fig. 2b). Across all outlier datasets tested with the Fashion-MNIST VAE, AUROC was typically at or near ceiling with the bias-corrected likelihoods (Fig. 4, second column). On average, we found accuracy improvements of up to $\sim 70\%$ following bias correction, across all grayscale VAEs (Fig. 4, last row). + +Second, we tested these remedies with VAEs trained on natural image datasets. Again, in nearly every case the BC-LL score (Fig. 5, unfilled orange squares) outperformed uncorrected likelihoods (Fig. 5, unfilled blue circles). For example, for the CelebA VAE, AUROC values ranged be + +![](images/8b50decf840b6c7dfa2583c5f5b2570d4cefe5e61968cbb4359817a0fd2d1221.jpg) +Figure 4. Outlier detection with bias-corrected likelihoods, and comparison with competing approaches: Grayscale datasets. Outlier detection AUROC values for VAEs trained with grayscale image datasets and tested with other grayscale datasets (or noise). Each column represents a training dataset, and each row represents a test dataset. Last row: average AUROC across all test datasets for each VAE. Unfilled blue and orange symbols: AUROC with uncorrected log likelihoods (LL), and bias-corrected log likelihoods (BC-LL) respectively for VAE trained with continuous Bernoulli visible distribution. Filled blue and orange symbols: Same as the unfilled symbols but for VAE trained categorical visible distribution. Green, red, purple, and brown symbols show AUROC scores of competing outlier detection approaches: Input Complexity (IC), Likelihood Ratio (LRat), Likelihood Regret (LReg), and Watanabe Akaike Information Criterion (WAIC), respectively. Higher values indicate better outlier detection performance. Numbers in bold indicate highest AUROC values across all scores for each train-test combination. Gray shading in the last row: range of AUROC values for each score across all test datasets. + +tween 47-79 with the uncorrected likelihoods (across all out-of-distribution datasets, except Noise), whereas these values improved to 85-88 with bias correction (Fig. 5, second column, Fig. 2h, and Fig. 2j). As with the Fashion-MNIST dataset, CelebA samples assigned the highest bias-corrected likelihoods were visually more typical; containing face images on typical plain backgrounds, whereas the lowest likelihood samples comprised of face images with extraneous objects, such headgear, unconventional attire or unusual backgrounds (Fig. 2i). On average, we observed accuracy improvements of $\sim 10 - 40\%$ following bias correction, across all natural image VAEs (Fig. 5, last row). + +Ablation experiments revealed the relative contributions of contrast stretching and bias correction; the results are presented in Appendix E.4. First, contrast stretching was essential to achieving high accuracies, particularly with the natural image datasets. Moreover, contrast stretching, even at test time, sufficed to achieve robust outlier detection: With a VAE trained on the original images (without contrast stretching), outlier detection accuracies improved if contrast stretching was applied at test time alone. Lastly, contrast normalization with techniques other than contrast stretching (e.g. histogram equalization) also yielded comparable + +outlier detection accuracies (see Appendix E.4). + +Contrast stretching and bias correction generally improved outlier detection even with milder perturbations to the data, such as with adding various kinds of noise (Gaussian, impulse etc; see Appendix E.5). On the other hand, training the VAE by introducing intensity and contrast variations in the training samples was not as effective as contrast stretching and bias correction (Appendix E.6). Similarly, an alternative approach for normalizing per channel variance using image whitening (Zero-phase Component Analysis or ZCA) was also comparatively unsuccessful, especially with natural image datasets (Appendix E.7). + +Finally, we replicated these results with the algorithmic bias correction with VAEs trained with the categorical visible distribution. Again, in nearly every case we observed significant improvements in outlier detection performance following bias correction (Fig. 4 and Fig. 5, filled blue circles/LL versus filled orange squares/BC-LL). + +# 4.2. Comparison with competing approaches + +We compared accuracies with the bias-corrected likelihood (BC-LL) scores against four competing, state-of-the-art approaches: i) input complexity (IC), ii) likelihood + +![](images/14d8124e200af7bb3c48f1e8bb6631c677d5adf2d20925a43703a918a5bd7dd6.jpg) +Figure 5. Outlier detection with bias-corrected likelihoods, and comparison with competing approaches: Natural image datasets. Same as in Figure 4 but for VAEs trained with natural image datasets and tested with other natural image datasets (or noise). Other conventions are the same in Figure 4. + +ratio (LRat), iii) likelihood regret (LReg) and iv) WAIC (Watanabe-Akaike Information Criterion). Briefly, IC employs a subtractive bias correction for each sample; the correction is computed based on sample complexity estimated with one of many compression algorithms (e.g. PNG) [20]. The likelihood ratio score computes the ratio between the sample likelihood obtained with a VAE trained with the original data, and one trained with noise-corrupted images [19]. Likelihood regret computes the improvement in the log-likelihood for a particular sample that can be achieved with a sample-specific optimization of the posterior $q_{\phi}(\mathbf{z}|\mathbf{x})$ [25]. Finally, WAIC is computed as $\mathbb{E}_{\theta}[\log p_{\theta}(\mathbf{x})] - \mathrm{Var}_{\theta}[\log p_{\theta}(\mathbf{x})]$ , from an ensemble of deep generative models [3] (Appendix D, for details). + +First, we performed an exhaustive $(4\times 5)$ comparison of approaches with grayscale VAEs and datasets. For illustration, we discuss results for the problematic Fashion-MNIST VAE (Fig. 4, second column). The BC-LL score outperformed, or performed comparably with, other state-of-the-art methods for detecting outliers with the Fashion-MNIST VAE. Interestingly, IC performed relatively poorly for this VAE (Fig. 4, green symbols). Similar results were observed with the other grayscale VAEs: on average, BC-LL AUROC values were comparable with these state-of-the-art approaches (Fig. 4, bottom row, Average). + +Next, we performed an exhaustive $(5\times 6)$ comparison of all approaches with natural image VAEs and datasets. Again, we illustrate the results with the CelebA VAE + +(Fig. 5, second column). As before, we noticed superlative outlier detection performance with the BC-LL score. Although, other methods (e.g. IC or LReg) performed better at detecting outliers belonging to specific datasets (e.g. SVHN, Fig. 5, top row, second column), BC-LL yielded the highest average AUROC values across all outlier datasets tested with the CelebA VAE (Fig. 5, bottom row, second column). Overall, across all combinations of VAEs and outlier datasets tested, BC-LL performed more consistently and yielded AUROC values on par with, or exceeding, state-of-the-art (Fig. 5, bottom row, Average). + +Interestingly, outlier detection with BC-LL was relatively poor for the CIFAR-10 dataset, a failure shared by other approaches as well. Even IC that achieved high AUROC values for the challenging case of the CIFAR-10/ID versus SVHN/OOD case, performed sub-par when tested with the opposite pairing (SVHN/ID vs CIFAR-10/OOD) (Fig. 5, compare first row, last column with fifth row, first column). Moreover, IC's performance significantly deteriorated when tested against Noise OOD images for multiple ID datasets (e.g. SVHN, CelebA, CIFAR-10; Fig. 5, penultimate row, first, third and fifth columns). Similarly, the likelihood ratio metric that achieved superlative AUROCs for the SVHN/ID versus CelebA/OOD case failed when tested with the opposite pairing (CelebA/ID vs SVHN/OOD). The results indicate an important caveat with claiming superlative outlier detection by evaluating specific, challenging ID/OOD pairs (e.g. CIFAR-10/ID versus + +![](images/ae51d8d642d11b30bb0851ac508f4334daf72a1137445190b6492009e787a818.jpg) +Figure 6. Bias correction is significantly faster than competing approaches. (a) (Top row) Compute times (ms) averaged across 500 test samples with each approach, for a grayscale image VAE (lower is better). (Bottom row) Speedup factor computed as the ratio of the compute time for each approach to the compute time for the BC-LL score (higher is better) (b) Same as in panel (a), but showing compute times (top row) and speedups (bottom row) using a natural image VAE. Other conventions are the same in Figures 4 and 5. + +SVHN/OOD). It is possible that high outlier detection accuracies may occur for such specific pairings due to "overcorrection" of the OOD likelihood by the respective methods. We discuss this case in the Limitations section and, in further detail, in Appendix G. + +Finally, we compared compute times for our scores with previous outlier detection approaches, based on the inference time averaged across 500 randomly selected samples from each test dataset. Compute times for BC-LL scores outperformed competing approaches by a factor of up to $100\mathrm{x}$ (Fig. 6), for both grayscale and natural image datasets. In summary, the bias corrected likelihood provides a simple, and computationally inexpensive approach for achieving state-of-the-art outlier detection. + +# 5. Limitations and Conclusions + +We have proposed, and extensively tested, a simple and efficient remedy to achieve robust outlier detection by debiasing VAE likelihoods. We demonstrate the effectiveness of this remedy for outlier detection with multiple grayscale and natural image datasets (total of 9 datasets), using four different, popular VAE visible distributions (continuous Bernoulli, Bernoulli, categorical and truncated Gaussian), and comparing performance with four competing state-of-the-art, approaches [3, 19, 20, 25]. In nearly all cases, our correction approached or achieved state-of-the-art outlier detection performance. We also show that outlier detection is robust to the number of latent dimensions in the VAE (Appendix E.1). In addition, our remedy is computationally inexpensive and significantly outperforms all competing approaches in terms of evaluation times. In sum, lightweight remedies suffice to ameliorate biases arising from low-level image statistics (e.g. intensity or contrast variations), to + +achieve robust outlier detection with VAE likelihoods. + +Yet, we note that certain kinds of datasets pose a challenge for outlier detection with VAE likelihoods. For example, even with bias correction VAE likelihoods failed to achieve superlative outlier detection with the CIFAR-10 dataset (Fig. 5, last column). In fact, nearly all of the other competing approaches under-performed when tested with this dataset. These results suggest that the failure may be due to the unique nature of the CIFAR-10 dataset. Should we, or should we not, then discount VAE likelihoods as a generally applicable metric for outlier detection? + +To answer this question we ask what, specifically, the VAE ELBO objective seeks to optimize. On the one hand, the VAE must learn a sparse representation of features in a low-dimensional latent space (the KL-divergence term). On the other hand, the VAE must also faithfully reconstruct the image, pixel-for-pixel (negative reconstruction error). In fact, minimizing the reconstruction error is key to achieving high VAE likelihoods. To achieve this latter objective, the VAE must also learn spatial relationships among its input features in a coordinate frame locked to the bounding frame (edges) of the image. Consequently, VAE likelihoods cannot (and do not) reflect solely high-level, semantic features of the image. + +We propose that VAE likelihoods are ideally suited for outlier detection for datasets with relatively homogeneous images, in which features of the foreground objects (e.g. faces, cars) appear at consistent spatial locations in a coordinate frame locked to the edge of the image (e.g. CompCars, GTSRB, CelebA, SVHN). In all of these cases, our bias correction sufficed to achieve excellent, and state-of-the-art outlier detection. Yet, when image features associated with the foreground object are heterogeneously and inconsistently distributed relative to edge coordinates (e.g. CIFAR-10), bias corrected likelihoods were not as effective. This reasoning also explains why conventional deep network models [11], or approaches based on optimizing VAE latent feature representations [25], or approaches that train models on deep classifier-based semantic feature representations [9] may outperform conventional VAE likelihood-based approaches for outlier detection, especially with heterogeneous datasets like CIFAR-10. We explore this hypothesis further in Appendix G. + +Nonetheless, the bias correction we propose for VAEs will be relevant for outlier detection in key real-world applications. For example, medical imaging data such as retinal scans or MRI images are typically acquired in highly stereotyped spatial coordinates. In these cases, VAEs can be deployed as expert deep learning systems that are sensitive to fine-grained spatial relationships among image features (e.g. the morphology of pathological tissues) for accurate outlier detection. Future work will explore these applications. + +# References + +[1] Sign Language MNIST. https://www.kaggle.com/datamunge/sign-language-mnist. Kaggle, 2017. 5 +[2] Yuri Burda, Roger B. Grosse, and Ruslan Salakhutdinov. Importance weighted autoencoders. In International Conference on Learning Representations (Poster), 2016. 11 +[3] Hyunsun Choi, Eric Jang, and Alexander A. Alemi. WAIC, but Why? Generative Ensembles for Robust Anomaly Detection. arXiv e-prints, page arXiv:1810.01392, Oct. 2018. 2, 7, 8, 12 +[4] Gregory Cohen, Saeed Afshar, Jonathan Tapson, and André van Schaik. EMNIST: Extending MNIST to handwritten letters. In 2017 International Joint Conference on Neural Networks (IJCNN), pages 2921-2926, 2017. 5 +[5] Dan Hendrycks and Thomas G. Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. In 7th International Conference on Learning Representations, ICLR 2019. OpenReview.net, 2019. 5, 15, 16, 19 +[6] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, Conference Track Proceedings, 2015. 11 +[7] Diederik P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. 1 +[8] Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In 2nd International Conference on Learning Representations, ICLR 2014, Conference Track Proceedings, 2014. 1, 11 +[9] Polina Kirichenko, Pavel Izmailov, and Andrew G Wilson. Why normalizing flows fail to detect out-of-distribution data. In Advances in Neural Information Processing Systems, volume 33, pages 20578-20589. Curran Associates, Inc., 2020. 8, 19 +[10] Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009. 5 +[11] Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017. 8, 19 +[12] Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010. 2 +[13] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In 2015 IEEE International Conference on Computer Vision (ICCV), pages 3730-3738, 2015. 2 +[14] Gabriel Loaiza-Ganem and John P Cunningham. The continuous bernoulli: fixing a pervasive error in variational autoencoders. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. 2, 3 +[15] Eric Nalisnick, Akihiro Matsukawa, Yee Whye Teh, and Balaji Lakshminarayanan. Detecting Out-of-Distribution Inputs + +to Deep Generative Models Using Typicality. arXiv e-prints, page arXiv:1906.02994, June 2019. 2, 3 +[16] Eric T. Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Gorir, and Balaji Lakshminarayanan. Do deep generative models know what they don't know? In 7th International Conference on Learning Representations, ICLR 2019. Open-Review.net, 2019. 2, 3 +[17] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In Neural Information Processing Systems workshop on Deep Learning and Unsupervised Feature Learning, 2011. 5 +[18] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In 4th International Conference on Learning Representations, ICLR 2016, Conference Track Proceedings, 2016. 11 +[19] Jie Ren, Peter J. Liu, Emily Fertig, Jasper Snoek, Ryan Poplin, Mark Depristo, Joshua Dillon, and Balaji Lakshminarayanan. Likelihood ratios for out-of-distribution detection. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. 2, 3, 4, 7, 8, 11, 12 +[20] Joan Serrà, David Álvarez, Vicenç Gómez, Olga Slizovskaia, José F. Núñez, and Jordi Luque. Input complexity and out-of-distribution detection with likelihood-based generative models. In 8th International Conference on Learning Representations, ICLR 2020. OpenReview.net, 2020. 2, 3, 7, 8 +[21] Jasper Snoek, Hugo Larochelle, and Ryan P Adams. Practical bayesian optimization of machine learning algorithms. In Advances in Neural Information Processing Systems, volume 25. Curran Associates, Inc., 2012. 1 +[22] Johannes Stallkamp, Marc Schlipsing, Jan Salmen, and Christian Igel. Man vs. computer: Benchmarking machine learning algorithms for traffic sign recognition. *Neural Networks*, 32:323–332, 2012. Selected Papers from IJCNN 2011. 2 +[23] Aaron Van Den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. In Proceedings of the 33rd International Conference on International Conference on Machine Learning - Volume 48, ICML'16, page 1747-1756. JMLR.org, 2016. 4 +[24] Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms, 2017. 2 +[25] Zhisheng Xiao, Qing Yan, and Yali Amit. Likelihood regret: An out-of-distribution detection score for variational auto-encoder. In Advances in Neural Information Processing Systems, volume 33, pages 20685–20696. Curran Associates, Inc., 2020. 2, 3, 4, 7, 8, 11, 12 +[26] Linjie Yang, Ping Luo, Chen Change Loy, and Xiaou Tang. A large-scale car dataset for fine-grained categorization and verification. In 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3973-3981, 2015. 5 +[27] Bang Xiang Yong, Tim Pearce, and Alexandra Melike Brintrup. Bayesian autoencoders : Analysing and fixing the + +bernoulli likelihood for out-of-distribution detection. In International Conference on Machine Learning Workshop on Uncertainty & Robustness in Deep Learning, 2020. 3 \ No newline at end of file diff --git a/robustoutlierdetectionbydebiasingvaelikelihoods/images.zip b/robustoutlierdetectionbydebiasingvaelikelihoods/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6c94f4337bf6a95db5724be9357747849e52f2c2 --- /dev/null +++ b/robustoutlierdetectionbydebiasingvaelikelihoods/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74b645c7f24fd6dccf9c230ae97c6c72ff370baeaf4b2a1f5de41a33e3e4a78a +size 406224 diff --git a/robustoutlierdetectionbydebiasingvaelikelihoods/layout.json b/robustoutlierdetectionbydebiasingvaelikelihoods/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..746277c3f5e33922948fc8d75f4c3ffdca36ca8e --- /dev/null +++ b/robustoutlierdetectionbydebiasingvaelikelihoods/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b64443b1e509c6ab23f38799b1d604127cc9883913842f66d9093e54f2d25de +size 341012 diff --git a/robustregionfeaturesynthesizerforzeroshotobjectdetection/ec48605d-3227-4b85-b454-cbdda7bad842_content_list.json b/robustregionfeaturesynthesizerforzeroshotobjectdetection/ec48605d-3227-4b85-b454-cbdda7bad842_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8b1ae1e9741c3a8dd928a5afbf431487b4365840 --- /dev/null +++ b/robustregionfeaturesynthesizerforzeroshotobjectdetection/ec48605d-3227-4b85-b454-cbdda7bad842_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33c016b698afbcbf0588d2773137b3abcb86ec37eac1a3102d5391cc079f43f6 +size 77453 diff --git a/robustregionfeaturesynthesizerforzeroshotobjectdetection/ec48605d-3227-4b85-b454-cbdda7bad842_model.json b/robustregionfeaturesynthesizerforzeroshotobjectdetection/ec48605d-3227-4b85-b454-cbdda7bad842_model.json new file mode 100644 index 0000000000000000000000000000000000000000..78ba0cbff7f44a2bc9f19b13960d7547424c688d --- /dev/null +++ b/robustregionfeaturesynthesizerforzeroshotobjectdetection/ec48605d-3227-4b85-b454-cbdda7bad842_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2decb6a2594c49dddfaa9ba50b132455007dc2b81b949a9d4748a7224e37ae6 +size 99103 diff --git a/robustregionfeaturesynthesizerforzeroshotobjectdetection/ec48605d-3227-4b85-b454-cbdda7bad842_origin.pdf b/robustregionfeaturesynthesizerforzeroshotobjectdetection/ec48605d-3227-4b85-b454-cbdda7bad842_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8975a01c4aa91d587155b9db29642f29e9949422 --- /dev/null +++ b/robustregionfeaturesynthesizerforzeroshotobjectdetection/ec48605d-3227-4b85-b454-cbdda7bad842_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56e5f0f0b88908045b0401261c3be9ae9e1541cae457d0b2ec57339b666df22d +size 1806772 diff --git a/robustregionfeaturesynthesizerforzeroshotobjectdetection/full.md b/robustregionfeaturesynthesizerforzeroshotobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..54a332dadebde49b12a321c7867e09b821f762bf --- /dev/null +++ b/robustregionfeaturesynthesizerforzeroshotobjectdetection/full.md @@ -0,0 +1,292 @@ +# Robust Region Feature Synthesizer for Zero-Shot Object Detection + +Peiliang Huang $^{1}$ , Junwei Han $^{1*}$ , De Cheng $^{2}$ , Dingwen Zhang $^{1*}$ + +$^{1}$ Brain and Artificial Intelligence Lab, School of Automation, Northwestern Polytechnical University + +$^{2}$ State Key Laboratory of Integrated Services Networks, School of Telecommunications Engineering, Xidian University + +{peilianghuang2017, junweihan2010, zhangdingwen2006yyy}@gmail.com, dcheng@xidian.edu.cn + +# Abstract + +Zero-shot object detection aims at incorporating class semantic vectors to realize the detection of (both seen and) unseen classes given an unconstrained test image. In this study, we reveal the core challenges in this research area: how to synthesize robust region features (for unseen objects) that are as intra-class diverse and inter-class separable as the real samples, so that strong unseen object detectors can be trained upon them. To address these challenges, we build a novel zero-shot object detection framework that contains an Intra-class Semantic Diverging component and an Inter-class Structure Preserving component. The former is used to realize the one-to-more mapping to obtain diverse visual features from each class semantic vector, preventing miss-classifying the real unseen objects as image backgrounds. While the latter is used to avoid the synthesized features too scattered to mix up the inter-class and foreground-background relationship. To demonstrate the effectiveness of the proposed approach, comprehensive experiments on PASCAL VOC, COCO, and DIOR datasets are conducted. Notably, our approach achieves the new state-of-the-art performance on PASCAL VOC and COCO and it is the first study to carry out zero-shot object detection in remote sensing imagery. + +# 1. Introduction + +With the rapid development of the deep learning technologies, such as CNN [14, 34, 48] and Transformer [6, 26], great progresses have been made in the research field of object detection. Although the detection performance achieved by existing methods looks promising and encouraging, it exists a hidden drawback for applying them in real-world scenarios—The mainstream detection approaches have the strict constraint on the category to detect. Once the model is trained, it can only recognize objects that appear in the training data, whereas other objects appearing in the test images but unseen during training would confuse + +the model dramatically, leading to avoidless faults in detection results. To address this problem, the task of zero-shot object detection (ZSD) [4, 17, 33, 51] was raised in recent years. The goal is to enable the detection models to predict unseen objects which are without any available samples during training. + +Earlier efforts on zero-shot object detection (ZSD) [4,33] focus on mapping function-based methods, which learn mapping functions from the visual space to the semantic space. With the learned mapping functions, unseen object categories can be predicted by mapping their visual features into the semantic space and then performing the nearest neighbor search in the semantic space. However, due to that the mapping functions are learned all upon the seen categories provided by the training data, the models would get significantly biased towards the seen categories when dealing with the visual features in testing [17]. Recently, generative model-based methods [17, 51] are presented as an alternative solution. Usually, these methods utilize generative models to synthesize visual features from the provided semantic embeddings [2, 30] corresponding to each object category. The synthesized visual features can then be used for training a standard detector for unseen classes. Generative model-based methods show stronger performance compared with mapping function-based methods in solving the bias problem as, although the samples corresponding to the unseen objects are still absent, the detectors are trained with synthesized visual features for the unseen objects. + +However, the current generative model-based methods mainly follow the ideas presented in zero-short classification frameworks, such as [31, 41], where the synthesized visual features may perform well in the less complex classification scenarios but are not robust enough to obtain satisfying results in the complicated detection scenarios. To our best knowledge, there are two-fold challenges for synthesizing visual features for detection scenarios: + +- Intra-class diversity: Objects in real-world detection scenarios present high variation in pose, shape, texture, etc., and one object instance may be covered by + +![](images/bde7d0e4e4e49dcf08af7a359634bc33d86a731b9d9e8901926170cfdfbc8fc1.jpg) +(a) Feature distribution of real samples + +![](images/fb02d10088c9b8df64b901f166a67f012d6d78bea0e1cb3f244d7b6fbe750d8a.jpg) +(b) Distribution of the synthesized visual features (Case I) + +(c) Distribution of the synthesized visual features (Case II) +Figure 1. Illustrations of the problem studied in this work. In real cases, the feature space built by the samples show high intra-class diversity but still with inter-class separability like in (a), whereas the spaces of the synthesized visual features learned by existing approaches either have insufficient intra-class diversity, as shown in (b), or have excess intra-class diversity to make inter-class inseparable, as shown in (c). +![](images/38c046af0b1877ed53c607a4ca9032d5a8084ce4d5e4f5ba5fe7cb99d81aace5.jpg) +Feature distribution of real samples for the cat class +Feature distribution of real samples for the dog class +Feature distribution of real samples for image backgrounds +Distribution of synthesized visual features for the cat class +Distribution of synthesized visual features for the dog class + +several bounding boxes with different sizes and locations. This leads to the high diversity in their feature representations. + +- Inter-class separability: Though having such variations, each object category still has easy-to-recognized characteristics that are distinct from other object categories as well as the image backgrounds, making the feature representations from different classes (including the background class) highly separable. + +Although some existing approaches have recognized the importance of intra-class diversity [17, 49], without jointly considering the inter-class separability, these methods would either impose insufficient diversity to the synthesized visual features, leading to miss-classify the real unseen objects as image backgrounds (see Fig 1 (b)), or go too far to make the visual features synthesized for different class semantics mixed together, thus making the learned detection models obtain inaccurate object categories for foreground regions or suffer from errors in dealing with the image backgrounds (see Fig 1 (c)). + +To overcome the feature synthesizing problems toward real-world detection scenarios, we build a novel zero-shot object detection framework as shown in Fig 2. Specifically, we design two components for learning robust region features. To enable the model to synthesize diverse visual features, we propose an Intra-class Semantic Diverging (IntraSD) component which can diverge the semantic vector of a single class into a set of visual features. To prevent the intra-class diversity of the synthesized features goes too far to mix up the inter-class relationship, we further propose an Inter-class Structure Preserving (InterSP) component that utilizes real visual samples from different object categories to constrain the separability of the synthesized visual features. + +It is also worth mentioning that in the design of InterSP, we fully leverage the region features sampled from the real image scenes for detection instead of implementing it on the + +synthesized visual features. This enables our model to synthesize visual features as separable as in real cases and obtain much better performance when compared to the aforementioned counterpart (see experiments in Section 4.2). + +To sum up, this paper mainly has the following three-fold contributions: + +- We reveal the key challenges, i.e., the intra-class diversity and inter-class separability, for feature synthesizing in real-world object detection scenarios. +- With the goal to synthesize robust region features for ZSD, we build a novel framework that contains an Intra-class Semantic Diverging component and an Inter-class Structure Preserving component. +- Comprehensive experiments on three datasets, including PASCAL VOC, COCO, and DIOR, demonstrate the effectiveness of the proposed approach. Notably, this is also the first attempt for implementing zero-shot object detection in remote sensing imagery. + +# 2. Related Work + +Zero-shot Learning (ZSL). ZSL aims to use seen examples to train the network and reason about unseen classes by leveraging the semantic label embeddings (e.g. word-vector [30] or semantic attributes [2]) as side information [15, 39]. Earlier ZSL research works focus on the embedding function-based methods, which embed the visual features into the semantic descriptor space, or vice versa [1, 5, 12, 21]. As a result, the visual features and the semantic features will lie in a same embedding space and the ZSL classification can be accomplished by searching the nearest semantic descriptor in the embedding space [16]. Embedding function-based methods work well in conventional ZSL scenario [1, 5, 13, 42] but tend to be highly overfitting the seen classes in the more challenging GZSL scenario [7, 16, 37, 43]. To tackle this overfitting problem, + +![](images/6592d063db59da54f6a4ecff5cd38b60d87a000db5ccba84ce234c2f78bfdd92.jpg) +Figure 2. Illustration of the proposed overall framework. Our method contains an object detection module and a unseen classifier learning module. The basic idea is to learn object detector based on the labeled seen category data firstly, and then use the synthesized unseen region features to train unseen classifiers. To keep the framework simple and easy to understand, we do not show the discriminator used in the learning process. + +some researchers have introduced generative-based methods [7, 16, 20, 35], which learn to complement the training samples for unseen classes by using a conditional generative model e.g. Variational Autoencoder (VAE) [20] and Generative Adversarial Networks (GAN) [44]. With the synthesized unseen classes examples, they can transform the zero-shot classification problem to a general fully-supervised problem and relieve the overfitting problem [47]. In this paper, we also employ a generative model to synthesize unseen visual features for converting the ZSL into a fully supervised way [38]. However, as our goal is to solve the more challenging ZSD problem, we need to handle heavier intra-class diversity and inter-class separability in model design. + +Zero-shot object detection. ZSD receives great research interest in recent years [4, 8, 17, 23, 32, 33, 49-51]. Some researches focus on embedding function-based methods [4, 8, 23, 32, 33, 50]. Unfortunately, these methods would suffer from the overfitting problem like in ZSL, where the unseen objects are significantly biased towards the seen classes or background [11, 17, 46]. Generative model-based methods [17, 49, 51] show strong performance in solving the bias problem [33, 40, 45]. Zhu et al. [51] synthesized visual features for unseen objects from semantic information and augments existing training algorithms to incorporate unseen object detection. Zhao et al. [49] proposed a Generative Transfer Network for zero-shot object detection. Hayat et al. [17] proposed a feature synthesis approach for zero-shot object detection and used the mode seeking regularization [28] to enhance the diversity of synthesized features. However, these methods do not have sufficient learning capacity for synthesizing region features that are as intra-class diverse and inter-class separable as the real samples, and this + +is the core problem studied in this work. + +# 3. Method + +# 3.1. Problem Definition and Framework Overview + +In ZSD, we have two disjoint sets of classes: seen classes in $\mathcal{Y}^{\mathrm{s}}$ and unseen classes in $\mathcal{Y}^{\mathrm{u}}$ , where $\mathcal{Y}^{\mathrm{s}} \cap \mathcal{Y}^{\mathrm{u}} = \emptyset$ . The training set contains seen objects, where each image is provided with the corresponding class labels and bounding box coordinates. In contrast, the test set may contain unseen objects only (i.e., the ZSD setting) or both seen and unseen objects (i.e., the GZSD setting). During learning and testing, the semantic word-vectors $\mathcal{W} = \{\mathcal{W}^{\mathrm{s}}, \mathcal{W}^{\mathrm{u}}\}$ are provided for both seen and unseen classes. The task of ZSD is to learn detectors (parameterized by $\theta$ ) that can localize and recognize unseen objects corresponding to semantic word-vectors. + +Figure 2 shows the proposed overall framework for ZSD. As can be seen, it contains an object detection module and an unseen classifier learning module. The object detection module is a Faster-RCNN model [34] with the ResNet-101 as the backbone [18]. First of all, we train the Faster-RCNN model with seen images and their corresponding ground-truth annotations. Once the model is obtained, we can use it to extract region features using RPN for seen classes. Second, we train the region feature synthesizer to learn the mapping between semantic word-vectors and the visual features. Then, we use the learned feature synthesizer to generate region features for unseen classes. With these synthesized unseen region features and their corresponding class labels, we can train the unseen classifier for unseen classes. Finally, we update the classifier in the Faster-RCNN model to achieve a new detector for the ZSD task. The overall + +training procedure is also elaborated in Algorithm 1. + +Notice that the core of our method is how to learn a unified generative model to learn the relationship between visual and semantic domains. Specifically, we design a unified region feature synthesizer for feature synthesizing in real-world detection scenarios, which contains an intra-class semantic diverging component and an inter-class structure preserving component. + +# 3.2. The Robust Region Feature Synthesizer + +Given the object feature collection $\mathcal{F}^s$ , the corresponding label collection $\mathcal{V}^s$ , and the semantic vector $\mathcal{W}^s$ for seen training data $\mathcal{X}^s$ , the goal is to learn a conditional generator $G: \mathcal{W} \times \mathcal{Z} \mapsto \mathcal{F}$ . That is to say, when we take a class embedding $\mathbf{w} \in \mathcal{W}$ and a random noise vector $\mathbf{z} \sim \mathcal{N}(0,1) \in \mathbb{R}^d$ sampled from a Gaussian distribution as inputs, we can generate the visual feature $\tilde{\mathbf{f}} \in \mathcal{F}$ for the object regions belonging to this class. Then, with the synthesized region features for the unseen classes, we can learn the classifiers for unseen objects. In other words, the generator $G$ learns the mapping between the semantic vectors and the corresponding region features. To learn such a region feature synthesizer, we propose the following learning objective function: + +$$ +\min _ {G} \max _ {D} \mathcal {L} _ {\mathrm {W G A N}} + \lambda_ {1} \mathcal {L} _ {\mathrm {C} _ {\mathrm {s}}} + \lambda_ {2} \mathcal {L} _ {\mathrm {S} _ {\mathrm {d}}} + \lambda_ {3} \mathcal {L} _ {\mathrm {S} _ {\mathrm {p}}}, \tag {1} +$$ + +where $\mathcal{L}_{WGAN}$ is the Wasserstein GAN loss [3] used to enforce the generator to synthesize region features that are aligned well with the distribution of the real region features: + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {W G A N}} = \mathbb {E} \left[ D \left(\mathbf {f} ^ {\mathrm {s}}, \mathbf {w} ^ {\mathrm {s}}\right) \right] - \mathbb {E} \left[ D \left(\tilde {\mathbf {f}} ^ {\mathrm {s}}, \mathbf {w} ^ {\mathrm {s}}\right) \right] \tag {2} \\ - \lambda \mathbb {E} \left[ \left(\left\| \nabla_ {\hat {\mathbf {f}} ^ {\mathrm {s}}} D \left(\hat {\mathbf {f}} ^ {\mathrm {s}}, \mathbf {w} ^ {\mathrm {s}}\right) \right\| _ {2} - 1\right) ^ {2} \right], \\ \end{array} +$$ + +where $\mathbf{f}^{\mathrm{s}}$ is the real visual features of the object regions from the seen classes, $\tilde{\mathbf{f}}^{\mathrm{s}} = G(\mathbf{w}^{\mathrm{s}},\mathbf{z})$ denotes the generated visual features conditioned on class semantic vector $\mathbf{w}^{\mathrm{s}}\in \mathcal{W}^{\mathrm{s}}$ , $\hat{\mathbf{f}}^{\mathrm{s}} = \mu \mathbf{f}^{\mathrm{s}} + (1 - \mu)\tilde{\mathbf{f}}^{\mathrm{s}}$ with $\mu$ sampled from the uniform distribution $\mu \sim \mathcal{N}(0,1)$ , and $\lambda$ is the penalty coefficient. The discriminator $D\colon \mathcal{F}^{\mathrm{s}}(\tilde{\mathcal{F}}^{\mathrm{s}})\times \mathcal{W}^{\mathrm{s}}\to [0,1]$ , takes a real region feature $\mathbf{f}^{\mathrm{s}}\in \mathcal{F}^{\mathrm{s}}$ or a synthetic visual feature $\tilde{\mathbf{f}}^{\mathrm{s}}$ with the corresponding class-semantic embedding $\mathbf{w}^{\mathrm{s}}$ as input. It tries to accurately distinguish real visual features from synthetic visual features. In $\mathcal{L}_{\mathrm{WGAN}}$ , the first two terms calculate Wasserstein distance, while the third term constrains the gradient of the discriminator $G$ to have unit norm along with the line connecting pairs of real feature $\mathbf{f}^{\mathrm{s}}$ and synthesized feature $\tilde{\mathbf{f}}^{\mathrm{s}}$ . $\mathcal{L}_{C_s}$ ensures the generated visual features aligned with the pre-trained classifier on the seen data, which refers to [17]. + +To improve the robustness of the region feature synthesizer, we explore two new learning terms, including $\mathcal{L}_{S_d}$ and $\mathcal{L}_{S_p}$ . Specifically, $\mathcal{L}_{S_d}$ is the proposed intra-class se + +# Algorithm 1 Training procedure for our framework. + +Input: Training image collection with the corresponding class and bounding box annotations $\{\mathcal{X}^{\mathrm{s}},\mathcal{Y}^{\mathrm{s}},\mathcal{B}^{\mathrm{s}}\}$ , Semantic-word vector collection $\mathcal{W}$ ; +Output: Object detector parameters $\theta = \{\theta^p, \theta^s, \theta^u\}$ ( $\theta^p$ indicates the parameter for RPN proposal extraction); +1: $\{\theta^p,\theta^s\} \gets$ Train object detector on $\{\mathcal{X}^{\mathrm{s}},\mathcal{Y}^{\mathrm{s}},\mathcal{B}^{\mathrm{s}}\}$ +2: $\mathcal{F}^{\mathrm{s}}\gets$ Extract region features from $\chi^{\mathrm{s}}$ using RPN; +3: $G \gets$ Train region feature synthesizer on $\mathcal{F}^{\mathrm{s}}$ and $\mathcal{Y}^{\mathrm{s}}$ by optimizing the loss function in Eq. 1; +4: $\bar{\mathcal{F}}^{\mathrm{u}}\gets$ Synthesize region features for unseen classes using the trained $G$ and $\mathcal{W}^u$ +5: $\theta^{\mathrm{u}}\gets$ Train unseen object classifier $\theta^{\mathrm{u}}$ using $\tilde{\mathcal{F}}^{\mathrm{u}},\mathcal{V}^{\mathrm{u}}$ +6: $\theta \gets$ Update classifier $\theta$ of the object detection module with $\theta^{\mathrm{u}}$ ; +7: return $\theta$ ; + +mantic diverging loss, which diverges the semantic word-vector of one object category into a set of region visual features. $\mathcal{L}_{S_p}$ is the proposed Inter-class Structure Preserving loss, whose goal is to constrain the separability of the synthesized visual features. $\lambda_{1},\lambda_{2}$ and $\lambda_{3}$ are the weighting hyper-parameters to balance each component. + +# 3.3. Intra-class Semantic Diverging + +To enable the model to synthesize diverse visual features, we consider the IntraSD component to diverge the semantic vector of one semantic word-vector into a set of visual features. Specifically, we conjecture that the above issue could be alleviated by enhancing the influence of noise vectors on the synthetic visual features while preserving the fitness of the synthetic visual features to the class-semantic embeddings. To this end, we propose a novel Intra-class Semantic Diverging loss, where the visual features synthesized from adjacent noise vectors will be pulled closer while those synthesized from distinct noise vectors will be pushed away. + +The key design underlying the Intra-class Semantic Diverging loss is how to select the "positive" and "negative" sample pairs. We design positive samples and negative samples by manipulating the input noise vectors [25]. Specifically, given a query noise vector $\mathbf{z} \sim \mathcal{N}(0,1)$ , we define a small hyper-sphere with radius $r$ centered at the query noise vector $\mathbf{z}$ . We random sample a positive query noise vector $\mathbf{z}_{+}$ as a vector with the sphere $\mathbf{z}_{+} = \mathbf{z} + \boldsymbol{\rho}$ , where $\boldsymbol{\rho}$ is a randomly sampled vector from a uniform distribution $\boldsymbol{\rho} \sim \mathcal{U}[-r,r]$ . We sample the negative noise vectors as random vectors outside the sphere within a latent space, i.e., $\mathbf{z}_{i-} \sim \{\mathbf{z}_{i-} | \mathbf{z}_{i-} \sim \mathcal{N}(0,1) \cap |\mathbf{z}_{i-} - \mathbf{z}| \succ r\}$ for $i = 1, \ldots, N$ , where $\succ$ is the element-wise greater-than operator. Once these noise vectors are determined, we can define the "positive" and "negative" samples. For a query visual feature $\tilde{\mathbf{f}}^{\mathrm{s}} = G(\mathbf{z}, \mathbf{w}^{\mathrm{s}})$ synthesized from the noise vector $\mathbf{z}$ , we define + +its "positive" sample as $\mathbf{f}_{+}^{\mathrm{s}} = G(\mathbf{z}_{+},\mathbf{w}^{\mathrm{s}})$ synthesized from the noise vector $\mathbf{z}^{+}$ . The $N$ "negative" samples synthesized from the sets of noise vectors $\{\mathbf{z}_{i - }\}$ can be defined as $\mathbf{f}_{i - }^{\mathrm{s}} = G(\mathbf{z}_{i - },\mathbf{w}^{\mathrm{s}})$ . The Intra-class Semantic Diverging loss is given by + +$$ +\mathcal {L} _ {\mathrm {S} _ {\mathrm {d}}} = \mathbb {E} [ - \log \frac {\exp \left(\tilde {\mathbf {f}} ^ {\mathrm {s}} \cdot \tilde {\mathbf {f}} _ {+} ^ {\mathrm {s}} / \tau\right)}{\exp \left(\tilde {\mathbf {f}} ^ {\mathrm {s}} \cdot \tilde {\mathbf {f}} _ {+} ^ {\mathrm {s}} / \tau\right) + \sum_ {i = 1} ^ {N} \exp \left(\tilde {\mathbf {f}} ^ {\mathrm {s}} \cdot \tilde {\mathbf {f}} _ {i -} ^ {\mathrm {s}} / \tau\right)} ], \tag {3} +$$ + +where “.” is the dot product between two visual feature vectors to measure the cosine similarity and $\tau$ is a temperature scale factor. + +# 3.4. Inter-class Structure Preserving + +In order to make the synthesized visual features approximate distributions of the real data, meanwhile improving the discrimination of the learned visual features, we further introduce the Inter-class Structure Preserving component into the learning framework. In this learning component, we not only consider the synthesized visual features of different categories, but also pay attention to the real region features extracted by the window proposals, which contain both the positive object proposals, i.e., proposals with the same class as the synthesized feature, and many negative and background proposals. + +By doing so, the proposed Inter-class Structure Preserving component has the following merits: 1) The proposed method surpasses the reconstruction error-based loss in the conventional WGAN as it can force the synthesized visual features to be close to other different real visual features of the same category in the window proposal pool. By this way, the synthesized visual features can well approximate the distribution of the real data, facilitating robust one-to-many projection from the semantic word vector to the synthesized region features. 2) By pushing away the visual features from different categories (both in real and synthesized feature space), this learning component can effectively enhance the discrimination of the synthesized visual features. + +From the above description, we can observe that the proposed method uses both the synthesized region features and real proposal features to implement the learning process, which essentially constructs a hybrid visual feature pool denoted as $\mathbf{g} = \{\tilde{\mathbf{f}}^{\mathrm{s}},\mathbf{f}^{\mathrm{r}},\mathbf{f}^{\mathrm{bg}}\}$ , where $\mathbf{f}^{\mathrm{r}}$ denotes the real features of the window proposals for different object categories and $\mathbf{f}^{\mathrm{bg}}$ indicates the background visual features extracted from the training images. Then, the learning objective function of the proposed Inter-class Structure Preserving component can be written as: + +$$ +\mathcal {L} _ {\mathrm {S} _ {\mathrm {p}}} = \mathbb {E} [ - \log \frac {\exp \left(\tilde {\mathbf {f}} ^ {\mathrm {s}} \cdot \mathbf {g} _ {+} / \tau\right)}{\exp \left(\tilde {\mathbf {f}} ^ {\mathrm {s}} \cdot \mathbf {g} _ {+} / \tau\right) + \sum_ {j \in \Phi} \exp \left(\tilde {\mathbf {f}} ^ {\mathrm {s}} \cdot \mathbf {g} _ {j} / \tau\right)} ], \tag {4} +$$ + +Table 1. Comparison of mAP at IoU=0.5, under ZSD and GZSD settings on PASCAL VOC dataset. + +
MethodZSDGZSD
SUHM
SAN [33]59.148.037.041.8
HRE [8]54.262.425.536.2
PL [32]62.1---
BLC [50]55.258.222.932.9
SU [17]64.9---
Ours65.547.149.148.1
+ +where $\Phi = \{\mathbf{g_j}\}$ indicates the collection of visual features satisfying $y(\mathbf{g}_j)\neq y(\tilde{\mathbf{f}}^{\mathrm{s}})$ in the hybrid visual feature pool, $y(\cdot)$ is the category indicator function, i.e., $y(\tilde{\mathbf{f}}^{\mathrm{s}})$ is the class label for visual feature $\tilde{\mathbf{f}}^{\mathrm{s}}$ . $\mathbf{g}_{+}$ is the positive examples corresponding to the current synthesized visual feature $\tilde{\mathbf{f}}^{\mathrm{s}}$ . It can be selected from the synthesized visual features or the object proposals generated by the detector which share the same category label with the current synthesized visual feature $\tilde{\mathbf{f}}^{\mathrm{s}}$ . Therefore, this Inter-class Structure Preserving loss enables the synthesized visual feature $\tilde{\mathbf{f}}^{\mathrm{s}}$ to be close to both the synthesized and real object proposals of the same category, while far apart from all other visual features from different class labels in the hybrid visual feature pool. + +# 4. Experiment + +Datasets: We evaluate the proposed method on three popular object detection benchmark datasets: PASCAL VOC 2007+2012 [10], MS COCO 2014 [24], and DIOR [22]. The PASCAL VOC 2007 contains 2501 training images, 2510 validation images, and 5011 test images with 20 categories. PASCAL VOC 2012 contains 5717 training images and 5823 validation images also with 20 categories. MS COCO 2014 contains 82783 training images and 40504 validation images with 80 categories. DIOR contains 5862 training images, 5863 validation images, and 11738 test images with 20 categories. For PASCAL VOC and MS COCO, we adopt the FastText method [29] to extract the semantic word-vector following [17]. For DIOR, we adopt the Bert model [9] to generate the semantic word-vector. + +Seen/unseen split: We follow the 16/4 seen/unseen split proposed in [8] on the PASCAL VOC dataset. For MS COCO, we adopt the same setting as [4, 32] to divide the dataset with two different splits: (1) 48/17 seen/unseen split (2) 65/15 seen/unseen split. We divide the DIOR dataset with 16/4 seen/unseen split and the details of the split are provided in the supplementary material. For all the above datasets and splits, we remove all the images of unseen categories from the training set to guarantee that unseen objects will not be available during model training. + +Evaluation Protocols: We follow the evaluation strat + +Table 2. Class-wise AP and mAP comparison of different methods on unseen classes of PASCAL VOC dataset for ZSD. + +
MethodcardogsofatrainmAP
SAN [33]56.285.362.626.457.6
HRE [8]55.082.055.026.054.5
PL [32]63.787.253.244.162.1
BLC [50]43.786.060.830.155.2
SU [17]59.692.762.345.264.9
Ours60.193.059.749.165.5
+ +Table 3. ZSD performance of Recall@100 and mAP with different IoU thresholds on MS COCO dataset. + +
MethodSplitRecall@100mAP
IoU=0.4IoU=0.5IoU=0.6IoU=0.5
SB [4]48/1734.522.111.30.3
DSES [4]48/1740.227.213.60.5
TD [23]48/1745.534.318.1-
PL [32]48/17-43.5-10.1
BLC [50]48/1751.348.845.010.6
Ours48/1758.153.547.913.4
PL [32]65/15-37.7-12.4
BLC [50]65/1557.254.751.214.7
SU [17]65/1554.454.047.019.0
Ours65/1565.362.355.919.8
+ +egy proposed in [4, 8]. For PASCAL VOC and DIOR, we utilize mean average precision (mAP) with IoU threshold 0.5 to evaluate the performance. For MS COCO, we utilize mAP with IoU threshold 0.5 and recall@100 with three different IoU thresholds (i.e. 0.4, 0.5, and 0.6) as the metric. Furthermore, since the test set consists of seen and unseen images, the performance of GZSD is evaluated by the Harmonic Mean (HM) [15]. + +Implementation Details: Our object detection module adopts the widely-used Faster-RCNN model [34] with the ResNet-101 as the backbone [18]. The generator $G$ and discriminator $D$ are both two fully-connected layers with LeakyReLU activation [27]. For each unseen class, we synthesize 250/250/500 region features for COCO/DIOR/PASCAL VOC to train the classifiers. The hyperparameter $\lambda_{1}$ in Eq. (1) is set to 0.001/0.001/0.01 for COCO/DIOR/PASCAL VOC. Empirically, in the IntraSD component, the trade-off parameter $\lambda_{2}$ is set to 0.001, the number of negative samples $N$ is set to 10, the temperature coefficient $\tau$ is set to 0.1, and the radius $r$ is set to $10^{-4} / 10^{-4} / 10^{-6}$ for COCO/DIOR/PASCAL VOC. For the IntraSP component, the trade-off parameter $\lambda_{3}$ is set to 0.001 and the temperature coefficient $\tau$ is set to 0.1. Code is available at https://github.com/HPL123/RRFS. + +Table 4. Comparison of Recall@100 and mAP at IoU=0.5 over two seen/unseen splits, under GZSD setting on MS COCO dataset. + +
MethodSplitRecall@100mAP
SUHMSUHM
PL [32]48/1738.226.331.235.94.17.4
BLC [50]48/1757.646.451.442.14.58.2
Ours48/1759.758.859.242.313.420.4
PL [32]65/1536.437.236.834.112.418.2
BLC [50]65/1556.451.753.936.013.119.2
SU [17]65/1557.753.955.836.919.025.1
Ours65/1558.661.860.237.419.826.0
+ +# 4.1. Comparison with the State-of-the-art + +In Table 1, we compare with state-of-the-art methods on the PASCAL VOC dataset on ZSD and GZSD settings. We can observe that our method outperforms all the comparison methods in terms of the ZSD setting. Compared with the second-best method SU [17], our method improves the mAP of ZSD performance from $64.9\%$ to $65.5\%$ . Our method achieves the best performance on unseen classes denoted as "U" among all the comparing methods in terms of GZSD setting. Although our seen performance denoted as "S" is lower, our method achieves the best performance in terms of "HM", which reveals that our method maintains a good balance between seen and unseen classes. This benefits from the robust region feature synthesizer trained with the Intra-class Semantic Diverging component and the Inter-class Structure Preserving component. We also report the class-wise mAP performance in terms of ZSD setting on the PASCAL VOC dataset in Table 2. Our method achieves the best performance on 3 out of 4 classes, which further demonstrates the superiority of our method on ZSD. + +In Table 3, we compare our method with the state-of-the-art methods on MS COCO dataset over two splits. For the 47/17 split, our method outperforms all the compared methods by a large margin in terms of both Recall@100 and mAP measurements. Compared with the second-best method BLC [50], our method improves the Recall@100 by $9.6\%$ and mAP by $26.4\%$ at IoU=0.5. For the 65/15 split, we can observe that our method also achieves a significant performance gain, which improves the Recall@100 and mAP of method SU [17] from $54.0\%$ and $19.0\%$ to $62.3\%$ and $19.8\%$ at IoU=0.5. + +In Table 4, we compare our method with other methods under the GZSD scenario, which is more realistic and challenging. Our method outperforms all the comparison methods over two splits in terms of all the metrics. Compared with the second-best method BLC [50], our method improves the "HM" performance in Recall@100 and mAP from $51.4\%$ and $8.2\%$ to $59.2\%$ and $20.4\%$ under the split 48/17. For the 65/15 split, our method improves the "HM" + +Table 5. Class-wise AP and mAP comparison of different methods on unseen classes of MS COCO dataset for ZSD. + +
65/15airptraimetrcatbearscsefrbesnrdforkswichdogtletmosetstrhiermAP
PL [32]2048.20.628.313.812.421.815.18.98.50.95.70.01.70.012.4
SU [17]10.148.71.264.064.112.20.72816.419.40.118.71.20.50.219.0
Ours20.853.01.364.355.511.60.431.318.020.30.115.24.20.50.619.8
+ +Table 6. Comparison of mAP at IoU=0.5, under ZSD and GZSD settings on DIOR dataset. + +
MethodZSDGZSD
SUHM
PL [32]0.44.300
BLC [50]1.16.10.40.8
SU [17]10.530.92.95.3
Ours11.330.93.46.1
+ +performance achieved by the second-best method SU [17] from $55.8\%$ and $25.1\%$ to $60.2\%$ and $26.0\%$ . This "HM" performance gain proves that our region feature synthesizer can synthesize robust features for unseen classes. + +We report clas-wise AP of our method in Table 5 for 65/15 split. Our method achieves the best performance on 9 out of 15 classes and comparable performance on other classes. Since other methods did not report their class-wise AP results on the 48/17 split, we show our class-wise AP in the supplementary material, individually. + +To further verify the effectiveness of our method, we conduct the experiment on the DIOR dataset, which is the first attempt for implementing zero-shot object detection in remote sensing imagery. We re-implement the state-of-the-art zero-shot object detection methods based on their released codes on the DIOR dataset for comparison in Table 6. Compared with the second-best method SU [17], the "ZSD", "U", and "HM" are improved from $10.5\%$ , $2.9\%$ , and $5.3\%$ to $11.3\%$ , $3.4\%$ , and $6.1\%$ , respectively. We also achieve the same S performance as method SU [17]. Due to space limitation, the concrete class-wise AP scores will be reported in the supplementary material. + +# 4.2. Ablation Study + +To provide further insight into our method, we conduct ablation studies on the PASCAL VOC dataset to analyze the contributions of each component in our method. In Table 7, We report the ZSD and GZSD performance in terms of mAP metric at IoU 0.5. $\mathcal{L}_{\mathrm{b}}$ contains the $\mathcal{L}_{\mathrm{WGAN}}$ and $\mathcal{L}_{\mathrm{Cs}}$ , which can be regarded as our baseline method. $\mathcal{L}_{\mathrm{Sps}}$ means the hybrid visual feature pool $g$ only contains the synthesized visual features $\tilde{\mathbf{f}}_{\mathrm{s}}$ . “√” denotes the model with the corresponding component. + +IntraSD Component Analysis. We first analyze the effectiveness of the proposed IntraSD component. To verify its contributions, we compare the performances of our + +Table 7. Performance of ablation studies under the ZSD and GZSD settings, measured by the mAP on PASCAL VOC dataset. + +
LbLSeDLSpSLSpZSDGZSD
SUHM
✓62.147.145.946.5
✓✓64.047.148.347.7
✓✓✓64.747.148.747.9
✓✓✓65.547.149.148.1
+ +![](images/5d2d9d8381d64df436136745b9900187e477c3effbf7d4813203302822db54fb.jpg) +(a) Baseline +Figure 3. The t-SNE [36] visualization of the synthesized region features for the unseen classes on PASCAL VOC dataset. + +![](images/d5be96e0a5f994337b4483593daae2d085c32ed97c11a6a541757b7c13c212b3.jpg) +(b) Ours + +baseline model and the variant by adding the IntraSD during training. We can observe that the "ZSD" performance and the "U" performance of GZSD all have been improved significantly from $62.1\%$ and $45.9\%$ to $64.0\%$ and $48.3\%$ , respectively. The HM performance is improved from $46.5\%$ to $47.7\%$ . These large performance gains demonstrate the effectiveness of the proposed IntraSD component in the ZSD model, which can encourage our generator to synthesize more diverse visual features for unseen classes. The seen performances of GZSD do not obtain performance gains since the parameters of the classifier for seen class is fixed. + +InterSP Component Analysis. To verify the effectiveness of the InterSP component, we first add the $\mathcal{L}_{\mathrm{S_{ps}}}$ component on top of the $\mathcal{L}_{\mathrm{b}}$ and $\mathcal{L}_{\mathrm{S_d}}$ . As a result, the mAP measurements of "ZSD", "U", and "HM" are improved from $64.0\%$ , $48.3\%$ , and $47.7\%$ to $64.7\%$ , $48.7\%$ , and $47.9\%$ . Secondly, we further add the $\mathcal{L}_{\mathrm{S_p}}$ component on top of the $\mathcal{L}_{\mathrm{b}}$ and $\mathcal{L}_{\mathrm{S_d}}$ . The mAP measurement of "ZSD", "U", and "HM" are improved from $64.0\%$ , $48.3\%$ , and $47.7\%$ to $65.5\%$ , $49.1\%$ , and $48.1\%$ . These two comparisons demonstrate that our InterSP component can improve + +![](images/c68c6a13bc1fd512bd83a379582f6720959cf01942431445db5b2392b38eadd0.jpg) +Figure 4. Qualitative results on PASCAL VOC, MS COCO (48/17 and 65/15) and DIOR datasets. For each dataset, the first column and second column are the results of ZSD and GZSD, respectively. Seen classes are shown with green and unseen with red. + +the discrimination of the learned visual features. Compared with the method variant $\mathcal{L}_{\mathrm{S_{ps}}}$ , the variant with $\mathcal{L}_{\mathrm{S_p}}$ gains an absolute improvement of $1.2\%$ , $0.8\%$ , and $0.4\%$ . This phenomenon indicates that the real features of the window proposals play an important role in our InterSP module, since it contains the ground-truth positive object proposals and many background negative proposals. + +# 4.3. Qualitative Results + +Feature visualization In Fig 3, we conduct the t-SNE [36] visualization for the synthesized region features of the unseen classes on the PASCAL VOC dataset. The visual feature distributions corresponding to our baseline model and the proposed model have been illustrated in Fig 3(a) and Fig 3(b). Features from similar classes (car and train in Fig 3(a)) are confused with each other due to high similarity in their semantic space, which may lead to miss-classify these similar classes. The synthesized features in Fig 3(b) have obvious segregated clusters. This verifies that our synthesizer is robust in synthesizing intra-class diverse and interclass discriminative region features, which benefits learning a more discriminative classifier to improve the detection performance for ZSD. + +Detection Results. To further show the effectiveness of our method, we show the detection results of our method on PASCAL VOC, MS COCO, and DIOR datasets in Fig 4. For the ZSD setting, the images only contain unseen objects. For the GZSD setting, the images may contain seen and unseen objects together. The qualitative results prove the effectiveness of our method in detecting seen and un + +seen objects simultaneously in the challenging scenarios. + +# 5. Conclusion and Limitation + +In this work, we focus on ZSD task by addressing the challenge of synthesizing robust region features for unseen objects. Specifically, we propose a novel ZSD framework by constructing a robust region feature synthesizer, which includes the IntraSD and InterSP components. The IntraSD realizes the one-to-more mapping to obtain diverse visual features from each class semantic vector, preventing miss-classifying the real unseen objects as image backgrounds. The InterSP component improves the discrimination of the synthesized visual features by making full use of both synthesized and real region features from different object categories. Extensive experimental results demonstrate that our method is superior to state-of-the-art approaches for ZSD. + +Limitation. One major limitation in this study is that the proposed method is based on the two-stage object detector, e.g., Faster-RCNN [34], whose detection speed is relatively slow. We hope to integrate our method into some one-stage object detector, e.g., YOLOv5 [19], to further improve the detection speed in the future. + +Acknowledgments: This work was supported in part by Key-Area Research and Development Program of Guangdong Province (No.2021B0101200001), and the National Natural Science Foundation of China under Grant 61876140, 62176198, U20B2065, U21B2048, and the Open Research Projects of Zhejiang Lab (No.2019KD0AD01/010). + +# References + +[1] Zeynep Akata, Florent Perronnin, Zaid Harchaoui, and Cordelia Schmid. Label-embedding for attribute-based classification. In CVPR, pages 819–826, 2013. 2 +[2] Zeynep Akata, Scott Reed, Daniel Walter, Honglak Lee, and Bernt Schiele. Evaluation of output embeddings for fine-grained image classification. In CVPR, pages 2927-2936, 2015. 1, 2 +[3] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In ICML, pages 214-223. PMLR, 2017. 4 +[4] Ankan Bansal, Karan Sikka, Gaurav Sharma, Rama Chellappa, and Ajay Divakaran. Zero-shot object detection. In ECCV, pages 384-400, 2018. 1, 3, 5, 6 +[5] Maxime Bucher, Stéphane Herbin, and Frédéric Jurie. Improving semantic embedding consistency by metric learning for zero-shot classification. In ECCV, pages 730-746. Springer, 2016. 2 +[6] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, pages 213-229. Springer, 2020. 1 +[7] Shiming Chen, Wenjie Wang, Beihao Xia, Qinmu Peng, Xinge You, Feng Zheng, and Ling Shao. Free: Feature refinement for generalized zero-shot learning. In ICCV, pages 122-131, 2021. 2, 3 +[8] Berkan Demirel, Ramazan Gokberk Cinbis, and Nazli Ikizler-Cinbis. Zero-shot object detection by hybrid region embedding. In BMVC, 2018. 3, 5, 6 +[9] 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 +[10] Mark Everingham, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. IJCV, 88(2):303-338, 2010. 5 +[11] Lijie Fan, Tianhong Li, Rongyao Fang, Rumen Hristov, Yuan Yuan, and Dina Katabi. Learning longterm representations for person re-identification using radio signals. In CVPR, pages 10699–10709, 2020. 3 +[12] Yanwei Fu, Timothy M Hospedales, Tao Xiang, Zhenyong Fu, and Shaogang Gong. Transductive multi-view embedding for zero-shot recognition and annotation. In ECCV, pages 584-599. Springer, 2014. 2 +[13] Zhenyong Fu, Tao Xiang, Elyor Kodirov, and Shaogang Gong. Zero-shot object recognition by semantic manifold distance. In CVPR, pages 2635-2644, 2015. 2 +[14] Junwei Han, Dingwen Zhang, Gong Cheng, Nian Liu, and Dong Xu. Advanced deep-learning techniques for salient and category-specific object detection: a survey. IEEE Signal Processing Magazine, 35(1):84-100, 2018. 1 +[15] Zongyan Han, Zhenyong Fu, Shuo Chen, and Jian Yang. Contrastive embedding for generalized zero-shot learning. In CVPR, pages 2371-2381, 2021. 2, 6 +[16] Zongyan Han, Zhenyong Fu, and Jian Yang. Learning the redundancy-free features for generalized zero-shot object recognition. In CVPR, pages 12865-12874, 2020. 2, 3 + +[17] Nasir Hayat, Munawar Hayat, Shafin Rahman, Salman Khan, Syed Waqas Zamir, and Fahad Shahbaz Khan. Synthesizing the unseen for zero-shot object detection. In ACCV, 2020. 1, 2, 3, 4, 5, 6, 7 +[18] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 3, 6 +[19] Glenn Jocher, Alex Stoken, Jirka Borovec, Ayush Chaurasia, L Changyu, VA Laughing, A Hogan, J Hajek, L Diaconu, Y Kwon, et al. ultralytics/yolov5: v5. 0-yolov5-p6 1280 models, aws, supervise. ly and youtube integrations. Version v5. 0. Apr, 2021. 8 +[20] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. 3 +[21] Elyor Kodirov, Tao Xiang, and Shaogang Gong. Semantic autoencoder for zero-shot learning. In CVPR, pages 3174-3183, 2017. 2 +[22] 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 J PHOTOGRAPHM, 159:296-307, 2020. 5 +[23] Zhihui Li, Lina Yao, Xiaqin Zhang, Xianzhi Wang, Salil Kanhere, and Huaxiang Zhang. Zero-shot object detection with textual descriptions. In AAAI, volume 33, pages 8690-8697, 2019. 3, 6 +[24] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, pages 740-755, 2014. 5 +[25] Rui Liu, Yixiao Ge, Ching Lam Choi, Xiaogang Wang, and Hongsheng Li. Divco: Diverse conditional image synthesis via contrastive generative adversarial network. In CVPR, pages 16377-16386, 2021. 4 +[26] 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 +[27] Andrew L Maas, Awni Y Hannun, Andrew Y Ng, et al. Rectifier nonlinearities improve neural network acoustic models. In Proc. icml, volume 30, page 3. Citeseer, 2013. 6 +[28] Qi Mao, Hsin-Ying Lee, Hung-Yu Tseng, Siwei Ma, and Ming-Hsuan Yang. Mode seeking generative adversarial networks for diverse image synthesis. In CVPR, pages 1429-1437, 2019. 3 +[29] Tomas Mikolov, Edouard Grave, Piotr Bojanowski, Christian Puhrsch, and Armand Joulin. Advances in pre-training distributed word representations. In LREC, 2018. 5 +[30] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In NIPS, pages 3111-3119, 2013. 1, 2 +[31] Ayyappa Pambala, Titir Dutta, and Soma Biswas. Generative model with semantic embedding and integrated classifier for generalized zero-shot learning. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 1237–1246, 2020. 1 + +[32] Shafin Rahman, Salman Khan, and Nick Barnes. Polarity loss for zero-shot object detection. arXiv preprint arXiv:1811.08982, 2018. 3, 5, 6, 7 +[33] Shafin Rahman, Salman Khan, and Fatih Porikli. Zero-shot object detection: Learning to simultaneously recognize and localize novel concepts. In ACCV, pages 547-563. Springer, 2018. 1, 3, 5, 6 +[34] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: towards real-time object detection with region proposal networks. TPAMI, 39(6):1137-1149, 2016. 1, 3, 6, 8 +[35] Edgar Schonfeld, Sayna Ebrahimi, Samarth Sinha, Trevor Darrell, and Zeynep Akata. Generalized zero-and few-shot learning via aligned variational autoencoders. In CVPR, pages 8247-8255, 2019. 3 +[36] Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(11), 2008. 7, 8 +[37] Vinay Kumar Verma, Gundeep Arora, Ashish Mishra, and Piyush Rai. Generalized zero-shot learning via synthesized examples. In CVPR, pages 4281-4289, 2018. 2 +[38] Binglu Wang, Tao Hu, Baoshan Li, Xiaojuan Chen, and Zhijie Zhang. Gatector: A unified framework for gaze object prediction. In CVPR, 2022. 3 +[39] Binglu Wang, Xun Zhang, and Yongqiang Zhao. Exploring sub-action granularity for weakly supervised temporal action localization. CSVT, 2021. 2 +[40] Wenguan Wang, Tianfei Zhou, Siyuan Qi, Jianbing Shen, and Song-Chun Zhu. Hierarchical human semantic parsing with comprehensive part-relation modeling. TIP, 2021. 3 +[41] Jiamin Wu, Tianzhu Zhang, Zheng-Jun Zha, Jiebo Luo, Yongdong Zhang, and Feng Wu. Self-supervised domain-aware generative network for generalized zero-shot learning. In CVPR, pages 12767–12776, 2020. 1 +[42] Yongqin Xian, Zeynep Akata, Gaurav Sharma, Quynh Nguyen, Matthias Hein, and Bernt Schiele. Latent embeddings for zero-shot classification. In CVPR, pages 69-77, 2016. 2 +[43] Yongqin Xian, Tobias Lorenz, Bernt Schiele, and Zeynep Akata. Feature generating networks for zero-shot learning. In CVPR, pages 5542-5551, 2018. 2 +[44] Yongqin Xian, Saurabh Sharma, Bernt Schiele, and Zeynep Akata. f-vaegan-d2: A feature generating framework for any-shot learning. In CVPR, pages 10275-10284, 2019. 3 +[45] Le Yang, Junwei Han, and Dingwen Zhang. Colar: Effective and efficient online action detection by consulting exemplars. In CVPR, 2022. 3 +[46] Le Yang, Junwei Han, Tao Zhao, Tianwei Lin, Dingwen Zhang, and Jianxin Chen. Background-click supervision for temporal action localization. PAMI, 2021. 3 +[47] Le Yang, Houwen Peng, Dingwen Zhang, Jianlong Fu, and Junwei Han. Revisiting anchor mechanisms for temporal action localization. TIP, 29:8535-8548, 2020. 3 +[48] Yuan Yuan, Xiaodan Liang, Xiaolong Wang, Dit-Yan Yeung, and Abhinav Gupta. Temporal dynamic graph lstm for action-driven video object detection. In ICCV, pages 1801-1810, 2017. 1 + +[49] Shizhen Zhao, Changxin Gao, Yuanjie Shao, Lerenhan Li, Changqian Yu, Zhong Ji, and Nong Sang. GTnet: Generative transfer network for zero-shot object detection. In AAAI, volume 34, pages 12967-12974, 2020. 2, 3 +[50] Ye Zheng, Ruoran Huang, Chuanqi Han, Xi Huang, and Li Cui. Background learnable cascade for zero-shot object detection. In ACCV, 2020. 3, 5, 6, 7 +[51] Pengkai Zhu, Hanxiao Wang, and Venkatesh Saligrama. Don't even look once: Synthesizing features for zero-shot detection. In CVPR, pages 11693-11702, 2020. 1, 3 \ No newline at end of file diff --git a/robustregionfeaturesynthesizerforzeroshotobjectdetection/images.zip b/robustregionfeaturesynthesizerforzeroshotobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b885dce31a901fd6f09741daa717e250a2cacded --- /dev/null +++ b/robustregionfeaturesynthesizerforzeroshotobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30e5a03c0e95a6106c375eb881c92767b84cb804dde5f5acf4e7d6f934ba1452 +size 621421 diff --git a/robustregionfeaturesynthesizerforzeroshotobjectdetection/layout.json b/robustregionfeaturesynthesizerforzeroshotobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..bf96b1f3b44913f259adc836affa577bec8c304a --- /dev/null +++ b/robustregionfeaturesynthesizerforzeroshotobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d34e8e5135672095df11ee7fb9e91e8dd53d41a7e384fa80fd7bc9c9823bd3c9 +size 447844 diff --git a/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/3f7a2865-4285-4710-bd93-2a447c55ee69_content_list.json b/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/3f7a2865-4285-4710-bd93-2a447c55ee69_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e241102154493adeee1a962479fae7dd168db980 --- /dev/null +++ b/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/3f7a2865-4285-4710-bd93-2a447c55ee69_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52990803713ce8fd70600af3b57af95a223845995977c318fa63ad56b225d5ac +size 90422 diff --git a/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/3f7a2865-4285-4710-bd93-2a447c55ee69_model.json b/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/3f7a2865-4285-4710-bd93-2a447c55ee69_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7cc3fc213b27e2e9c824c187ce28de53ac76f769 --- /dev/null +++ b/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/3f7a2865-4285-4710-bd93-2a447c55ee69_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac6d7fea768ecca10a1b08e40c627600fe7774bfbc1b8bd0346681ddbe8fe5b8 +size 117339 diff --git a/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/3f7a2865-4285-4710-bd93-2a447c55ee69_origin.pdf b/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/3f7a2865-4285-4710-bd93-2a447c55ee69_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d84daf15c8d848948d2aec296394f016dff993ee --- /dev/null +++ b/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/3f7a2865-4285-4710-bd93-2a447c55ee69_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d57744d6865bd4206951d8004a05b3a34d39fe9e3582022bf0c4cf19e3dd180 +size 1035136 diff --git a/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/full.md b/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/full.md new file mode 100644 index 0000000000000000000000000000000000000000..bfb480df20ee0da409e7791193f56768600141c0 --- /dev/null +++ b/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/full.md @@ -0,0 +1,356 @@ +# Robust Structured Declarative Classifiers for 3D Point Clouds: Defending Adversarial Attacks with Implicit Gradients + +Kaidong Li $^{1}$ , Ziming Zhang $^{2*}$ , Cuncong Zhong $^{1}$ , Guanghui Wang $^{3}$ + +$^{1}$ Department of EECS, University of Kansas, KS, USA + +$^{2}$ Department of ECE, Worcester Polytechnic Institute, MA, USA + +$^{3}$ Department of CS, Ryerson University, Toronto ON, Canada + +{kaidong.li, cczhong}@ku.edu, zzhang15@wpi.edu, wangcs@ryerson.ca + +# Abstract + +Deep neural networks for 3D point cloud classification, such as PointNet, have been demonstrated to be vulnerable to adversarial attacks. Current adversarial defenders often learn to denoise the (attacked) point clouds by reconstruction, and then feed them to the classifiers as input. In contrast to the literature, we propose a family of robust structured declarative classifiers for point cloud classification, where the internal constrained optimization mechanism can effectively defend adversarial attacks through implicit gradients. Such classifiers can be formulated using a bilevel optimization framework. We further propose an effective and efficient instantiation of our approach, namely, Lattice Point Classifier (LPC), based on structured sparse coding in the permutohedral lattice and 2D convolutional neural networks (CNNs) that is end-to-end trainable. We demonstrate state-of-the-art robust point cloud classification performance on ModelNet40 and ScanNet under seven different attackers. For instance, we achieve $89.51\%$ and $83.16\%$ test accuracy on each dataset under the recent JGBA attacker that outperforms DUP-Net and IF-Defense with PointNet by $\sim 70\%$ . The demo code is available at https://zhang-vislab.github.io. + +# 1. Introduction + +Point clouds are unstructured data which is widely used in real-world applications such as autonomous driving. To recognize them using deep neural networks, point clouds can be represented as points [36], images [30], voxels [61], or graphs [56]. Recent works [74, 63, 31, 14, 62, 58, 28] have demonstrated that such deep networks are vulnerable to (gradient-based) adversarial attacks. Accordingly, several adversarial defenders [75, 60, 29] have been proposed for robust point cloud classification. The basic ideas are often to + +![](images/3057ab22dd34df49669313f8de62e7d465863ab63b3e889b69681c987f58449e.jpg) +Figure 1: Illustration of robust structured declarative classifiers, where our defender is optimized in a structural space. + +denoise the (attacked) point clouds before feeding them into the classifiers as input to preserve their prediction accuracy. + +Obfuscated gradients. In the white-box adversarial attacks, the attackers are assumed to have full access to both classifiers and defenders. To defend such attacks, one common way is to break the gradient over the input data in the backpropagation (either inadvertently or intentionally, e.g., a defender is non-differentiable or prevents gradient signal from flowing through the network) so that the attackers fail to be optimized. Such scenarios are called obfuscated gradients. In [4] Athalye et al. have discussed the false sense of security in such defenders and proposed new methods, such as Backward Pass Differentiable Approximation (BPDA), to attack them successfully. Take DUP-Net [75] for example, where a non-differentiable Statistical Outlier Removal (SOR) defense strategy was proposed. In [31] Ma et al. proposed Joint Gradient Based Attack (JGBA) that can compute the gradient with a linear approximation (an instantiation of BPDA) of the SOR defense to attack DUP-Net successfully. + +Implicit gradients. Now let us consider the scenarios where both defenders and classifiers are differentiable. Then in order to defend the adversarial attacks, one way is to make the calculation of the gradient challenging. To this end, implicit gradients [40] may be more suitable for designing the defenders. An implicit gradient, $\frac{\partial y}{\partial x}$ , is defined by a differentiable function $h$ that takes $x, y$ as its input, i.e., $\frac{\partial y}{\partial x} = h(x, y)$ . Such an equation can be also considered as a first-order ordinary differential equation (ODE), which is + +solvable (approximately) using Euler's Method [19]. Here we assume that the gradients through the classifiers can be easily computed, which often holds empirically. To our best knowledge, so far there is no work on designing adversarial defenders for 3D point clouds based on implicit gradients. + +Declarative networks. Implicit gradients require equations that contain both the input and output of a defender. One potential solution for this is to introduce optimization problems as the defenders, where the first-order optimality conditions provide such equations. In the literature, there have been some works [3, 2, 25, 40] that proposed optimization as network layers in deep neural networks. Recently in [12] Gould et al. generalized these ideas and proposed deep declarative networks. A declarative network node is introduced where the exact implementation of the forward processing function is not defined; rather the input-output relationship $(x \mapsto \tilde{x})$ is defined in terms of behavior specified as the solution to an optimization problem $\tilde{x} \in \arg \min_{z \in \mathcal{Z}} f(x, z; \theta)$ . Here $f$ is an objective function, $\theta$ denotes the node parameters, and $\mathcal{Z}$ is the feasible solution space. In [12] a robust pooling layer was proposed as a declarative node using unconstrained minimization with various penalty functions such as Huber or Welsch, which can be efficiently solved using Newton's method or gradient descent. The effectiveness of such pooling layers was demonstrated for point cloud classification. + +Our approach. Motivated by the methods above, in this paper we propose a novel robust structured declarative classifiers for 3D point clouds by embedding a declarative node into the networks, as illustrated by Fig. 1. Different from robust pooling layers in [12], our declarative defender is designed to reconstruct each point cloud in a (learnable) structural space as a means of denoising. To this end, we borrow the idea from structured sparse coding [49, 20, 57] by representing each point as a linear combination of atoms in a dictionary. Together with the backbone networks, the training of our robust classifiers can lead to a bilevel optimization problem. Considering the inference efficiency, one plausible instantiation of our classifiers, as illustrated in Fig. 2, is to define the structural space using the permutohedral lattice [1, 47, 13], project each point cloud onto the lattice, generate a 2D image based on the barycentric weights, and feed the image to a 2D convolutional neural network (CNN) for classification. We call this instantiation Lattice Point Classifier (LPC). + +Our contributions. We summarize our contributions below: + +- We propose a family of novel robust structured declarative classifiers for 3D point clouds where the declarative nodes defend the adversarial attacks through implicit gradients. To the best of our knowledge, we are the first to explore implicit gradients in robust point cloud classification. +- We propose a bilevel optimization framework to learn the network parameters in an end-to-end fashion. + +![](images/cece10f845a4244d531b0e83fae99bd5f24c139d993f92db341adb097e0d3e67.jpg) +Figure 2: Illustration of our Lattice Point Classifier (LPC). + +- We propose an effective and efficient instantiation of our robust classifiers based on the structured sparse coding in the permutohedral lattice and 2D CNNs. +- We demonstrate superior performance of our approach by comparing with the state-of-the-art adversarial defenders under the state-of-the-art adversarial attackers. + +# 2. Related Works + +Deep learning for 3D point clouds. Based on the point cloud representations, we simply group some typical deep networks into four categories. Point-based networks [36, 38, 26, 65, 59] directly take each point cloud as input, extract point-wise features using multi-layer perceptrons (MLPs), and fuse them to generate a feature for the point cloud. Image-based networks [48, 37, 68, 67, 30, 33] often project a 3D point cloud onto a (or multiple) 2D plane to generate a (or multiple) 2D image for further process. Voxel-based networks [32, 61, 41, 55, 24] usually voxelize each point cloud into a volumetric occupancy grid and further some classification techniques such as 3D CNNs are used for the tasks. Graph-based networks [23, 56, 44, 10, 39] often represent each point cloud as a graph such as KNN or adjacency graph which are fed to train graph convolutional networks (GCNs). A nice survey can be found in [15]. + +Adversarial attacks on point clouds. Such attacks aim to modify the input point clouds in a way that is not noticeable but can fool a classifier. Attackers can either have a target or not. Targeted attackers try to fool the classifier to predict a specified wrong class, while untargeted ones do not care about the predicted class as long as it is wrong. Nice surveys on adversarial attacks can be found in [34, 54, 5]. Below we summarize some typical attackers for point clouds: + +- Point perturbation [27, 66, 62, 21, 31]. Inspired by Fast Gradient Sign Method (FGSM) [11], they add on each point a small perturbation constrained by distance metrics (e.g., $L_{p}$ norm [62], on the surface of an $\epsilon$ -ball [27]). +- Point addition [62, 58, 66]. Independent point attackers initially pick some points from target classes, add small perturbations and finally append these points to the victim point clouds. Cluster attackers similarly pick most critical points and then find a specified number of small point clusters to append to the victim point clouds. Object + +attackers attach scaled and rotated foreign object to the original point clouds. + +- Point dropping. Adversarial attackers pick critical points from each input point cloud, and drop them to fool the classifier. However, it is a non-differentiable operation. To address the issue in learning, [73] proposed creating saliency maps by viewing dropping a point as moving it to the cloud center. Wicker et al. [58] designed an algorithm to iteratively find the points to drop by minimizing a predefined objective function, similarly in [66]. +- Others. Hamdi et al. [16] proposed a transferable adversarial perturbation attacker based on an adversarial loss that can learn the data distribution. Zhao et al. [72] proposed a black-box (i.e., no access to the models) attacker with zero loss in isometry, as well as a white-box (i.e., full access to the models) attacker based on the spectral norm. LG-GAN [74] is generative adversarial network (GAN) based, which learns and incorporates target features into victim point clouds. A backdoor attacker was proposed in [63] to trick the 3D models by inserting adversarial point patterns into the training set so that the victim models learn to recognize the adversarial patterns during inference. + +Adversarial defense on point clouds. Adversarial defenses aim to denoise the input point clouds to recover the ground-truth labels from the classifiers. Nice surveys on adversarial defenses can be found in [34, 54, 5]. Below we summarize some typical defenders for point clouds: + +- Statistical outlier removal (SOR) [43]. SOR can be used to remove local roughness on the (smooth) surface as a means of defense. SOR is not differentiable, producing obfuscated gradients for defenders. DUP-Net [75] uses SOR and an upsampling network to reconstruct higher resolution point clouds. Similarly, IF-Defense [60] utilizes SOR, followed by a geometry-aware model to encourage evenly distributed points. However, such defenders have been demonstrated to be attackable in [52, 31]. Dong et al. [8] proposed replacing SOR by attention mechanism. +- Random sampling. Yang et al. [66] suggested that 3D models with random sampling are robust to adversarial attacks. PointGuard [29] proposed majority voting for point cloud classification by predicting multiple randomly subsampled point clouds. +- Data augmentation. Tramer et al. [51] demonstrated that data augmentation can effectively account for adversarial attacks. Tu et al. [53] proposed generating physically realizable adversarial examples to train robust Lidar object detectors. Zhang et al. [70] proposed randomly permuting training data as a simple data augmentation strategy. Point-CutMix [69] pairs two training clouds and swaps some points between the pair to generate new training data. + +Permutohedral lattice. Permutohedral lattice is a powerful operation to project the coordinates from a high dimensional space onto a hyperplane that defines the lattice. It has been + +widely used in high dimensional filtering [1, 18] that consists of three components, i.e., splat, blur and slice. In particular, we illustrate the splat in Fig. 2, where each square represents a projection (i.e., projected point) from a 3D coordinate. The splat first locates the enclosing lattice simplex for the 3D point and calculates the vertex coordinates of the simplex. Then each projection distributes its value to the vertices using barycentric interpolation with barycentric weights that are calculated as the normalized triangular areas between the projection and any pair of its corresponding lattice vertices. We refer the readers to [1] for more details. Recently permutohedral lattice has been successfully explored in point cloud segmentation [47, 13, 42] with remarkable performance. + +# 3. Robust Structured Declarative Classifiers + +# 3.1. Structured Declarative Defender + +Recall that adversarial defenders often aim to denoise the input point clouds by reconstructing them in certain ways, and sparse coding [71] is one of the classic approaches for finding a sparse representation of the input data in the form of a linear combination of basic elements as well as those basic elements themselves. Due to its simplicity, we consider using sparse coding as a means to construct declarative nodes. + +Specifically, in the 3D space given a (learnable) dictionary $\mathbf{B} \in \mathbb{R}^{3 \times N}$ with $N \gg 3$ atoms, (structured) sparse coding aims to solve the following optimization problem for each point $\mathbf{x}_i \in \mathbb{R}^3$ in a point cloud $\mathbf{x} = \{\mathbf{x}_i\} \subseteq \mathbb{R}^3$ : + +$$ +\tilde {\mathbf {x}} _ {i} \in \underset {\mathbf {z} \in \mathcal {Z}} {\arg \min } f (\mathbf {x} _ {i}, \mathbf {z}) = \frac {1}{2} \| \mathbf {x} _ {i} - \mathbf {B} \mathbf {z} \| ^ {2} + \phi (\mathbf {z}), \tag {1} +$$ + +where $\phi$ denotes a regularization term, and $\mathcal{Z} \subseteq \mathbb{R}^N$ denotes a structural feasible solution space. + +Obfuscated & implicit gradients in $\left.\frac{\partial\tilde{\mathbf{x}}_i}{\partial\mathbf{x}_i}\right|_{\mathbf{z} = \tilde{\mathbf{x}}_i}$ . To see this, we can rewrite Eq. (1) as $\tilde{\mathbf{x}}_i \in \arg \min_{\mathbf{z}} F(\mathbf{x}_i, \mathbf{z}) = f(\mathbf{x}_i, \mathbf{z}) + \phi(\mathbf{z}) + \delta(\mathbf{z})$ , where $\delta(\mathbf{z})$ denotes the Dirac delta function returning 0 if $\mathbf{z} \in \mathcal{Z}$ holds, otherwise, $+\infty$ . Therefore, $F$ will become non-differentiable when $\mathbf{z} \notin \mathcal{Z}$ or $\phi$ is non-differentiable over $\mathbf{z} \in \mathcal{Z}$ , leading to obfuscated gradients. Otherwise, based on the first-order optimality condition, we have $\mathbf{B}^T\mathbf{B}\tilde{\mathbf{x}}_i - \mathbf{B}^T\mathbf{x}_i + \phi'(\tilde{\mathbf{x}}_i) = \mathbf{0}$ , where $(\cdot)^T$ denotes the matrix transpose operator and $\phi'$ denotes the first-order derivative of $\phi$ . By taking another derivative on both sides, we then have a linear system $\left(\mathbf{B}^T\mathbf{B} + \phi''(\tilde{\mathbf{x}}_i)\right) \cdot \frac{\partial\tilde{\mathbf{x}}_i}{\partial\mathbf{x}_i} = \mathbf{B}^T$ , if the second-order derivative, $\phi''$ , exists at $\mathbf{z} \in \mathcal{Z}$ . Clearly, solving this linear system may be challenging, because $\phi''(\tilde{\mathbf{x}}_i)$ may not be computable and the matrix $\mathbf{B}^T\mathbf{B} + \phi''(\tilde{\mathbf{x}}_i)$ may be rank-deficient. Such phenomenons lead to implicit gradients. + +# 3.2. Parameter Learning via Bilevel Optimization + +Fig. 1 illustrates our approach with two components, i.e., a declarative defender $f$ and a network backbone $g$ that + +takes the outputs of the defender as input and then makes predictions. Equivalently we can formulate the training of such networks as a bilevel optimization problem as follows: + +$$ +\min _ {\mathbf {B}, \omega} \sum_ {(\mathbf {x}, y) \in \mathcal {X} \times \mathcal {Y}} \ell (g (\tilde {\mathbf {x}}; \omega), y), \tag {2} +$$ + +$$ +\mathrm {s . t .} \tilde {\mathbf {x}} _ {i} \in \underset {\mathbf {z} \in \mathcal {Z}} {\arg \min} \frac {1}{2} \| \mathbf {x} _ {i} - \mathbf {B z} \| ^ {2} + \phi (\mathbf {z}), \forall \mathbf {x} _ {i} \in \mathbf {x}, +$$ + +where $(\mathbf{x},y)\in \mathcal{X}\times \mathcal{Y}$ denotes a training sample with data $\mathbf{x}$ and label $y$ , $\ell$ denotes a loss function such as cross-entropy, and $\mathbf{B},\omega$ denote the defender and network parameters, respectively. Same as training deep networks, we can solve this optimization problem using (stochastic) gradient descent. + +Validity of $\frac{\partial g}{\partial\tilde{\mathbf{x}}_i} = \frac{\partial g}{\partial\mathbf{z}}\bigg|_{\mathbf{z} = \tilde{\mathbf{x}}_i}$ in the structural space. In a gradient based adversarial attack, the gradient for modifying an input point $\mathbf{x}_i$ through backpropagation can be written as $\frac{\partial g}{\partial\tilde{\mathbf{x}}_i}\frac{\partial\tilde{\mathbf{x}}_i}{\partial\mathbf{x}_i}$ . Assuming that $\frac{\partial\tilde{\mathbf{x}}_i}{\partial\mathbf{x}_i}$ can be computed exactly, then the gradient in the attack would hold in general only if $\mathbf{z}$ was unconstrained so that $\frac{\partial g}{\partial\tilde{\mathbf{x}}_i}$ is valid. Unfortunately in our case this is not true as we constrain $\mathbf{z}\in \mathcal{Z}$ . Therefore, the attack in the declarative node will produce inaccurate gradients, and such errors will be propagated to the adversarial examples, leading to failure cases together with $\frac{\partial\tilde{\mathbf{x}}_i}{\partial\mathbf{x}_i}$ . + +# 3.3. Instantiation: Lattice Point Classifier + +So far we have explained the learning principles and defense philosophy in our approach. The key challenge now is how to design the structural space $\mathcal{Z}$ and the regularizer $\phi$ to achieve robust point cloud classifiers that can be trained and inferred effectively and efficiently. To address this issue, we borrow the idea from permutohedral lattice, and propose an instantiation, namely, Lattice Point Classifier (LPC). + +# Geometric view on barycentric coordinates and their weights. Barycentric coordinates $(\vec{A},\vec{B},$ $\vec{C}$ in Fig. 3) can be used to express the position of any point $(\vec{P})$ located on the entire triangle with three scalar weights $(\alpha ,\beta ,\gamma)$ + +To compute $\overrightarrow{P}$ using barycentric coordinates we can always use the following equation: + +![](images/6ab8a8483da896a94db2d148f4a692f7149ae9915c3c083d5114f95898a2be9b.jpg) +Figure 3: Illustration of barycentric coordinates and weights. + +$$ +\overrightarrow {P} = \alpha \overrightarrow {A} + \beta \overrightarrow {B} + \gamma \overrightarrow {C}, \exists \alpha , \beta , \gamma \geq 0, \alpha + \beta + \gamma = 1. \tag {3} +$$ + +Note that this equation holds for an arbitrary dimensional space, including the 3D space. Now given $\vec{A},\vec{B},\vec{C},\vec{P}$ , we can compute $\alpha ,\beta ,\alpha$ using the normalized areas. Taking $\gamma$ for example, we can compute it as follows: + +$$ +\gamma = \frac {\| \overrightarrow {A B} \times \overrightarrow {A P} \|}{\| \overrightarrow {A B} \times \overrightarrow {A C} \|} \propto \| \overrightarrow {A B} \times \overrightarrow {A P} \|, \tag {4} +$$ + +where $\overrightarrow{AB} = \overrightarrow{B} -\overrightarrow{A},\overrightarrow{AP} = \overrightarrow{P} -\overrightarrow{A},\overrightarrow{AC} = \overrightarrow{C} -\overrightarrow{A},$ $\times$ denotes the cross product operator, and $\| \cdot \|$ denotes the $\ell_2$ norm of a vector measuring its length. Clearly, the barycentric weights define a nonlinear mapping that can be computed efficiently using the splat operation for the permutohedral lattice. + +Constructing $\mathcal{Z}$ and $\phi$ using barycentric weights. By substituting Eq. (3) into Eq. (1), we manage to define a structured sparse coding problem, where the structural space $\mathcal{Z}$ and the regularizer $\phi$ can be constructed as follows: + +$$ +\mathcal {Z} \stackrel {\text {d e f}} {=} \left\{\mathbf {z} \mid \mathbf {z} ^ {T} \mathbf {e} = 1, \mathbf {z} \succeq \mathbf {0} \right\}, \tag {5} +$$ + +$$ +\phi (\mathbf {z}) \stackrel {\text {d e f}} {=} \lambda \sum_ {n = 1} ^ {N} \| \mathbf {B z} - \mathbf {B} _ {n} \| \cdot 1 _ {\left\{\mathbf {z} _ {n} > 0 \right\}}, \tag {6} +$$ + +where $\mathbf{e}$ denotes a vector of 1's, $\succeq$ denotes the entry-wise operator of $\geq$ , $\mathbf{B}_n \in \mathbb{R}^3$ denotes the $n$ -th column in $\mathbf{B}$ , $1_{\{\cdot\}}$ denotes a binary indicator returning 1 if the condition holds, otherwise 0 (i.e., the binarization of barycentric weights), and $\lambda \geq 0$ is a small constant controlling the contribution of $\phi$ to the objective so that it will not be dominated by $\phi$ . + +Proposition 1. Supposing that $\mathbf{B}$ in Eq. (1) represents the vertices in a permutohedral lattice that is large enough to cover all possible projections from points among the data, then there exists a solution to minimize the reconstruction loss using three vertices, at most, and the minimum loss is equal to the projection loss onto the lattice. + +This is because Eq. (3) defines a lossless representation using a linear combination of three vertices. The only loss occurs when projecting a point to the permutohedral lattice. + +Defense mechanism in LPC. Fig. 4 illustrates how our declarative defender works with the permutohedral lattice, where the triangle, circles and squares represent a lattice cell, 3D points and their projections on the cell, respectively. In the adversarial point cloud, the attacker modifies a point from $\mathbf{x}_i$ to $\mathbf{x}_i'$ . Then during the inference, our defender projects $\mathbf{x}_i'$ to $\tilde{\mathbf{x}}_i'$ on the lattice. + +![](images/053acab2aa9889ddf2ad1df51aadd30a43873d7ae4710ccd0d3fa3022ec6d511.jpg) +Figure 4: Illustration of our defense mechanism. + +Proposition 2. Supposing $\tilde{\mathbf{x}}_i = \alpha \vec{A} +\beta \vec{B} +\gamma \vec{C}$ where $\alpha ,\beta ,\gamma$ are the barycentric weights, then in order to guarantee that $\tilde{\mathbf{x}}_i,\tilde{\mathbf{x}}_i'$ lie in different cells, the distance between $\mathbf{x}_i$ and $\mathbf{x}_i^\prime$ should be bigger than the shortest distance between $\tilde{\mathbf{x}}_i^\prime$ and the boundary of the triangle, that is: + +$$ +\left\| \mathbf {x} _ {i} - \mathbf {x} _ {i} ^ {\prime} \right\| > \min \left\{\frac {\alpha}{\| \overrightarrow {B C} \|}, \frac {\beta}{\| \overrightarrow {A C} \|}, \frac {\gamma}{\| \overrightarrow {A B} \|} \right\} \cdot s, \tag {7} +$$ + +![](images/c988990db3de69aa8381270b296fd90f43b2ff7c24bb556290938014c6727116.jpg) +Figure 5: Illustration of (left) a point cloud, (middle) its lattice representation, (right) its image for classification. + +![](images/74e831a45912c9ea7f6269195041f27c1e20aabfe70240d258af61b3e9edfc07.jpg) + +![](images/20a8435d1c3c85ac2631c9af358a4f846e6ba5cd9e301ee439c100fdcd02e901.jpg) +Figure 6: Training loss comparison on both datasets using EfficientNet-B5 as the backbone. + +where $s$ denotes the area of the triangle. In particular, if the triangle is equilateral, then $\| \mathbf{x}_i - \mathbf{x}_i' \| > \frac{\sqrt{3}}{2} l \cdot \min \{\alpha, \beta, \gamma\}$ where $l$ denotes the side length. + +It will be more intuitive to understand this result if we binarize the barycentric weights before feeding them into the backbone network for classification, because different projections lying in the same lattice cell will lead to the same representation. This could be an effective way to remove the adversarial noise in the data. Also, this result indicates that (1) the points whose projections are closer to the boundary are easier to change their sparse representations, (2) the movements that make such changes are proportional to the scale of the lattice cell. In general, larger cells will be more tolerant to the adversarial noise, but they may sacrifice the generalization of the classifiers. + +Workflow of LPC. To summarize, it is operated as follows: + +1. Given a point cloud, the barycentric weights of each point are computed using the splat for permutohedral lattice; +2. Generate an image for the point cloud by averaging the barycentric weights over all the points (after binarization if applied) and aligning the lattice with the image representation (see Fig. 5 for illustration); +3. Apply a 2D CNN as the backbone network to classify the image produced by the point cloud. + +Implementation. The key challenge in our implementation of LPC is how to determine the projection matrix for the hyperplane and the scale of each permutohedral lattice cell. + +- Projection matrix: By referring to [1], we initialize the + +projection matrix as $\left[ \begin{array}{rrr}2 & -1 & -1\\ -1 & 2 & -1\\ -1 & -1 & 2 \end{array} \right]$ and train the network in an end-to-end fashion. However, we observe that a big update of this matrix will make the training crash, and to avoid this issue, the update per iteration has to be tiny, leading to almost unnoticeable change eventually. The reason for this phenomenon is that this matrix has to satisfy certain requirements (see [1]), and thus the unconstrained update in backpropagation cannot work here. Therefore, in our experiments we initialize and fix the projection matrix. We refer to [13] for the lattice transformation. + +- Scale of lattice cell: The parameter is simply not differentiable in backpropagation, and thus we tune it as a predefined hyper-parameter using cross-validation with grid search, same for the other hyper-parameters such as + +![](images/4b030cf7cfd0d9210595dc60138b114d124db866cc067e2eabf6b56a84e4b68c.jpg) +(a) ModelNet40 + +![](images/90da10b7fb47c414d5d38422c436da0a8972962281b0c2216f3492ed3e4089e9.jpg) +(b) ScanNet + +learning rate. Such scales have a significant impact on the image resolution used in 2D CNNs for classification. + +Specifically, we evaluate our LPC comprehensively based on three different CNNs, i.e., VGG16 [45], ResNet50 [17], and EfficientNet-B5 [50] as the backbone network with randomly initialization. By default, the image resolution for each backbone network is $512 \times 512$ , $128 \times 128$ and $456 \times 456$ , respectively. On ModelNet40 [61] we train the three models using a learning rate of $10^{-4}$ , but on ScanNet [6] we only train our best model, i.e., EfficientNet-B5, using a learning rate of $5 \times 10^{-5}$ . We use Adam [22] as our optimizer in all of our experiments with weight decay of $10^{-4}$ and learning rate decay of 0.7 for every 20 epochs. Dropout [46] and data augmentation are applied as well when needed. + +# 4. Experiments + +Datasets. We conduct our experiments on ModelNet40 [61] and ScanNet [6]. ModelNet40 has a collection of 12,311 3D CAD objects from 40 common categories. It is split into 9,843 training and 2,468 test samples. Following [36, 62], we uniformly sample 1,024 points from the surface of the original point cloud per object and scale them into a unit ball. ScanNet contains 1,513 RGB-D scans from over 707 real indoor scenes with 2.5 million views. Following [26], we generate 12,445 training and 3,528 test point clouds from 17 categories, with 1,024 points for each point cloud as well. + +Baselines. We compare our Lattice Point Classifier (LPC) with different adversarial defenders for point clouds that work with PointNet [36], including DUP-Net [75] (with SOR and the upsampling network), IF-Defense [60] (with ConvONet [35]), and robust pooling layer (RPL) [12]. We utilize public code [64] to train PointNet using the default setting and evaluate DUP-Net and IF-Defense based on the implementation in [60]. We report the best performance for each defender after fine-tuning. Specifically, we set $k = 2$ (the number of neighbor points) in KNN and $\alpha = 1.1$ (the percentage of outliers) for SOR, use 2 for the upsampling rate in DUP-Net, and choose the Welsch penalty function [7] for RPL [12] to replace the max pooling layer in PointNet. The model with RPL is trained with adversarial point clouds + +where $10\%$ of input points are replaced by random outliers. + +Adversarial attackers. Eight attackers are utilized to evaluate the robustness of different point cloud classifiers, including untargeted attackers (FGSM [11] and JGBA [31]), targeted attackers (perturbation, add, cluster and object attackers [62]), isometry transformation based attackers [72] (the untargeted black-box TSI attack and the targeted white-box CTRI attack), and GAN based LG-GAN attacker [74]. + +We apply both FGSM and JGBA to the full test set of both datasets. We slightly modify FGSM for attacking DUP-Net and IF-Defense under the white-box setting as both defenders are non-differentiable. To do so, during an attack we simulate the SOR process and obtain the indices of the remaining points based on which the gradient is passed to the remaining points. By default, the parameter $\epsilon$ in FGSM is set to 0.1, and the perturbation norm constraint $\epsilon$ , number of iterations $n$ and step size $\alpha$ in JGBA are set to 0.1, 40, 0.01, respectively. Such parameters work well in practice. + +For the targeted attackers, by following [62] we pick 10 large classes from ModelNet40, where a batch of 6 point clouds per class is randomly selected and attacked using the other 9 classes as the targets, leading to $10 \times 9 \times 6 = 540$ victim-target pairs. Similarly, from ScanNet we randomly select a batch of 6 point clouds as well from the 7 classes that contain more than 100 point clouds in test data. The learning rate of all the targeted attackers is set to 0.01. For DUP-Net and IF-Defense, we first attack clean PointNet to obtain adversarial point clouds, and then feed them into DUP-Net and IF-Defense for prediction. The perturbation attack first introduces small random perturbations on all original points, and uses $L_{2}$ norm to constrain the adversarial shifts. Using the add attacker, we add 60 points to each cloud and use Chamfer distance as the metric. Cluster and object attackers generate the initial clusters with parameter $\epsilon = 0.11$ in DBSCAN [9]. Using the cluster attacker, we add 3 clusters of 32 points to the original clouds. Using the object attacker, three 64-point adversarial objects are attached to each original point cloud. + +For the TSI/CTRI attacker in [72], we evaluate the performance of LPC on ModelNet40 using EfficientNet-B5. By following [72] we use this attacker with the default settings to attack 2,000 randomly selected point clouds. The attacker applies the black-box TSI attacker first to trick the models, and then the white-box CTRI attacker if TSI fails. + +We implemented a vanilla version of LPC in TensorFlow with binarized weights, ResNet50 as the backbone and $128 \times 128$ as the 2D image size. On ModelNet40, we trained a TensorFlow LPC model and integrated it into LGAN to generate adversarial samples. For the benchmark models, we trained a TensorFlow PointNet [36] model and generates adversarial samples with it since all other benchmark defenses are PointNet based. We followed the setups in [74] and set weight factor $\alpha = 100$ . + +Table 1: Our learning choice comparison in terms of test accuracy $(\%)$ with learning rate $10^{-4}$ . + +
T-Net [36]✓✓
Binarized weights✓✓✓
Random rotation✓✓
ResNet-50 on ModelNet4088.287.388.960.0
EfficientNet-B5 on ModelNet40--89.583.3
EfficientNet-B5 on ScanNet80.5-80.082.6
+ +Table 2: Inference Time (ms) on an NVIDIA V100S GPU with batch size 1 (clean PointNet [36] takes $8.6\mathrm{ms}$ ) + +
DUP-Net [75]IF-Defense [60]RPL [12]LPC w/ VGGLPC w/ ResNetLPC w/ EfficientNet
808.11793.662.021.425.159.0
+ +# 4.1. Ablation Study + +Learning choices. In Table 1 we list three learning choices that we would like to evaluate for improving the performance of vanilla LPC, i.e., T-Net used in PointNet, binarized barycentric weights, and random rotation in data augmentation (together with point cloud random shifting and dropping [36]). We can see that: (1) T-Net seems to deteriorate the performance always. (2) Binarized weights work better on ModelNet40 than ScanNet, but compared with using barycentric weights the difference is $< 1\%$ . (3) Random rotation improves the performance on ScanNet, but worsens it on ModelNet40. This phenomenon can be partially explained from the training loss curves as shown in Fig. 6, where on ScanNet the overfitting occurs clearly without random rotation while on ModelNet40 random rotation makes the convergence slower and unstable. + +Running time. Overall LPC achieves the fastest inference speed among all competing defenses as shown in Table 2. Our deepest model (17fps) is over 13 times faster than SOR based defenses. We can also improve the running time using shallower networks such as VGG16 (45fps) by slightly sacrificing the performance. We also tested the running time for each key component (declarative node and backbone 2D networks). With EfficientNet-B5 as the backbone, the declarative node and 2D network take 17.1 and $41.9~\mathrm{ms}$ respectively during inference, and 15.5 and $165.3~\mathrm{ms}$ during backpropagation. Clearly, the gradient passing through the declarative node takes relatively constant time in both feedforward and backpropagation. Considering the depth of EfficientNet-B5, the time spent on the declarative node is actually pretty long (recall that there is no learnable parameter inside), especially during inference. This partially validates our intuition of defending the adversarial attacks using implicit gradients. + +Table 3: Test accuracy (%) comparison (higher is better) on the full test datasets, where “-” indicates no result. + +
PointNetPointNet w/DUP-Net [75]PointNet w/IF-Defense [60]PointNet w/RPL [12]LPC w/VGG16LPC w/ResNet50LPC w/EfficientNet
ModelNet40No attack90.1589.3087.6084.7688.6588.9089.51
FGSM [11]45.9961.6338.750.0488.6588.9089.51
JGBA [31]0.001.145.370.0088.6588.9089.51
ScanNetNo attack84.6183.6280.1976.02--83.16
FGSM [11]45.6673.6771.141.70--83.16
JGBA [31]0.007.7713.450.00--83.16
+ +Table 4: Attack success rate (%) comparison (lower is better), where “-” indicates no result. The standard deviations of our LPC range from $0\%$ to $0.28\%$ in success rate on ModelNet40. + +
PointNetPointNet w/DUP-Net [75]PointNet w/IF-Defense [60]PointNet w/RPL [12]LPC w/VGG16LPC w/ResNet50LPC w/EfficientNet
ModelNet40FGSM [11]48.9930.7755.7899.950.000.000.00
JGBA [31]100.0098.7393.85100.000.000.000.00
Perturbation [62]100.000.0950.0953.950.560.370.38
Add [62]99.720.0950.0953.330.560.190.19
Cluster [62]98.346.766.3017.041.110.931.21
Object [62]98.431.021.1174.070.931.110.75
ScanNetFGSM [11]46.0310.2911.2897.76--0.00
JGBA [31]100.0090.5583.21100.00--0.00
Perturbation [62]100.003.172.383.03--12.70
Add [62]100.001.982.3818.65--2.78
Cluster [62]100.0030.1623.8140.87--9.92
Object [62]100.007.147.5485.71--5.95
+ +Table 5: Performance comparisons under LG-GAN [74] attacks. Attack success rate (Succ., %) on different models and their classification accuracy (Accu., %) under attack + +
PointNet [36]DUP-Net [75]IF-Defense [60]RPL [12]LPC w/ ResNet
Accu.0.631.637.256.876.7
Succ.97.013.910.42.60.8
+ +# 4.2. State-of-the-art Performance Comparison + +We measure the robustness of classifiers using two metrics, i.e., classification accuracy, and attack success rate. Classification accuracy under attacks is measured by feeding the entire adversarial attacked test set to the victim models. It is only calculated for untargeted attackers. The attack success rate is the ratio between the number of successful attacks to the number of all attempt attacks. For untargeted attacks, tricking the model to predict a wrong class is considered a success, while for targeted attacks it will have to trick the victim model to a specific class to be considered as successful. Untargeted attackers will only attack the point clouds that are correctly classified by the victim models, and targeted attackers will attack victim-target pairs. + +# 4.2.1 Classification Accuracy + +We summarize our comparison in Table 3. On ScanNet, we only show the performance of LPC with EfficientNet-B5, because it achieves the best accuracy on ModelNet40. We can see that: (1) On the clean test data with no attack, PointNet outperforms all the robust classifiers by small margins. (2) Using both attackers, our LPC variants work consistently and significantly better than the other defender-based robust classifiers as well as vanilla PointNet by large margins. For instance, compared with PointNet with IF-Defense under the JGBA attacks, the performance gaps are $84.14\%$ and $69.71\%$ on ModelNet40 and ScanNet, respectively. (3) For the backbone networks in LPC, it seems that the difference in performance is small among different CNNs. Though more evaluations are needed to confirm this, it also demonstrates the robustness of our approach. + +# 4.2.2 Attack Success Rate + +Performance summary. We list our comparison in Table 4 and Table 5. We can see that: (1) Our LPC variants achieve perfect results under both FGSM and JGBA attacks. Notice that compared with the other attackers, these two attackers + +![](images/70f233064fe9bd5668f3dd899cfaea8eadd60d7cda8e645b425de348916e36ac.jpg) +Figure 7: Distribution comparison of successful perturbation attacks on ModelNet40. To avoid the sparsity, LPC statistics are collected based on the cases from all the three models. + +![](images/b243c19cab93599a1e9f91bced0d7b327a1b5ad0968d76d27364c3b927562989.jpg) +Figure 8: Successful adversarial perturbation examples on ModelNet40 for LPC with EfficientNet-B5. + +aim to find adversarial examples fully based on gradients with no sampling. Their failure again strongly demonstrates the power of implicit gradients in defending gradient based adversarial attacks. (2) The SOR defense mechanism seems to work better for the perturbation and add attackers, but worse for the cluster and object attackers, compared with our LPC. However, overall LPC still achieves the best performance. (3) Our LPC also outperforms other defenses under GAN based attacks. Interestingly RPL [12] outperforms SOR defenses under LG-GAN attack, while under gradient based attacks the SOR methods are better. It implies LG-GAN has better transferability. The two SOR based defenses are gray-box attacks (partial access to the model). Gradient based adversarial samples suffer significant success rate drop as shown in Table 4. But LG-GAN transfers well to SOR based defenses, maintaining over $10\%$ attack success rate. + +Using the TSI/CTRI attacker [72], our LPC with EfficientNet-B5 achieves the same success rate for both TSI and CTRI attackers on ModelNet40. Without random rotation, the result is $99.54\%$ , but with random rotation, the performance decreases to $67.33\%$ which is significantly better than PointNet (99.50% and 99.55% for TSI and CTRI, respectively). Such results also demonstrate that random rotation to point clouds as a means of data augmentation improves not only accuracy but also model robustness. + +Importance of gradients in finding successful adversarial examples for LPC. To attack each point cloud, the four + +targeted attackers in [62] conduct 10 random searches where 500 iterations are done to find the optimal adversarial samples. We notice that for PointNet, the best attacks could occur at any time within these 500 iterations, but for our LPC most optimal attacks happen at the first few iterations, as shown in Fig. 7 with different learning rates for the perturbation attacker. This behavior indicates that, in order to attack LPC, random search (a sampling based method) has contributed more to most of the successful attacks, rather than gradient-based iterations. With the increase of the learning rate, the gradients start to find more optimal adversarial samples. However, as we illustrate in Fig. 8, with larger learning rates, the adversarial samples will not look similar to the original point clouds. For instance, with learning rate of 1, the point cloud of airplane has been totally changed to a mixture of smaller airplane point clouds, which is not an adversarial attack anymore. To sum up, such analysis again demonstrates the great potential of implicit gradients in defending adversarial attacks. + +# 5. Conclusion + +In this paper, we aim to address the problem of robust 3D point cloud classification by proposing a family of novel robust structured declarative classifiers, where a declarative node is defined by a constrained optimization problem such as the reconstruction of point clouds. The key insight in our approach is that the implicit gradients through the declarative node can help defend the adversarial attacks by leading them to wrong updating directions for inputs. We formulate the learning of our classifiers based on bilevel optimization, and further propose an effective and efficient instantiation, namely, Lattice Point Classifier (LPC). The declarative node in LPC is defined as structured sparse coding in the permutohedral lattice, whose outputs, i.e., barycentric weights, are further transformed into images for classification using 2D CNNs. LPC is end-to-end trainable, and achieves state-of-the-art performance on robust classification on ModelNet40 and ScanNet using seven different adversarial attackers. + +Limitations. Currently the projection in the permutohedral lattice transformation in LPC is not learned but simply fixed as initialization. Also more evaluations for demonstrating the robustness of our approach across different backbone networks and datasets are desirable. Therefore, in our future work we will investigate more on how to properly learn the projection with its physical conditions and conduct more experiments to further demonstrate our robustness. + +# Acknowledgement + +K. Li and C. Zhong were supported in part by USDA NIFA under the award no. 2019-67021-28996. Z. Zhang was supported in part by NSF grant CCF-2006738. G. Wang was partly supported by NSERC grant RGPIN-2021-04244. + +# References + +[1] Andrew Adams, Jongmin Baek, and Myers Abraham Davis. Fast high-dimensional filtering using the permutohedral lattice. In Computer graphics forum, volume 29, pages 753-762. Wiley Online Library, 2010. 2, 3, 5 +[2] Akshay Agrawal, Brandon Amos, Shane Barratt, Stephen Boyd, Steven Diamond, and J Zico Kolter. Differentiable convex optimization layers. Advances in Neural Information Processing Systems, 32:9562-9574, 2019. 2 +[3] Brandon Amos and J Zico Kolter. Optnet: Differentiable optimization as a layer in neural networks. In International Conference on Machine Learning, pages 136-145. PMLR, 2017. 2 +[4] Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In International conference on machine learning, pages 274-283. PMLR, 2018. 1 +[5] Anirban Chakraborty, Manaar Alam, Vishal Dey, Anupam Chattopadhyay, and Debdeep Mukhopadhyay. A survey on adversarial attacks and defences. CAAI Transactions on Intelligence Technology, 6(1):25-45, 2021. 2, 3 +[6] Angela Dai, Angel X. Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In Proc. Computer Vision and Pattern Recognition (CVPR), IEEE, 2017. 5 +[7] John E Dennis Jr and Roy E Welsch. Techniques for nonlinear least squares and robust regression. Communications in Statistics-simulation and Computation, 7(4):345-359, 1978. 5 +[8] Xiaoyi Dong, Dongdong Chen, Hang Zhou, Gang Hua, Weiming Zhang, and Nenghai Yu. Self-robust 3d point recognition via gather-vector guidance. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 11513–11521. IEEE, 2020. 3 +[9] Martin Ester, Hans-Peter Kriegel, Jörg Sander, Xiaowei Xu, et al. A density-based algorithm for discovering clusters in large spatial databases with noise. In kdd, volume 96, pages 226-231, 1996. 6 +[10] Kexue Fu, Shaolei Liu, Xiaoyuan Luo, and Manning Wang. Robust point cloud registration framework based on deep graph matching. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8893-8902, 2021. 2 +[11] Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014. 2, 6, 7 +[12] Stephen Gould, Richard Hartley, and Dylan John Campbell. Deep declarative networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021. 2, 5, 6, 7, 8 +[13] Xiuye Gu, Yijie Wang, Chongruo Wu, Yong Jae Lee, and Panqu Wang. Hplflownet: Hierarchical permutohedral lattice flownet for scene flow estimation on large-scale point clouds. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3254-3263, 2019. 2, 3, 5 +[14] 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. 1 +[15] Yulan Guo, Hanyun Wang, Qingyong Hu, Hao Liu, Li Liu, and Mohammed Bennamoun. Deep learning for 3d point clouds: A survey. IEEE transactions on pattern analysis and machine intelligence, 2020. 2 +[16] Abdullah Hamdi, Sara Rojas, Ali Thabet, and Bernard Ghanem. Advpc: Transferable adversarial perturbations on 3d point clouds. In European Conference on Computer Vision, pages 241-257. Springer, 2020. 3 +[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. 5 +[18] Varun Jampani, Martin Kiefel, and Peter V Gehler. Learning sparse high dimensional filters: Image filtering, dense crfs and bilateral neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4452-4461, 2016. 3 +[19] Anil Kag, Ziming Zhang, and Venkatesh Saligrama. Rnns incrementally evolving on an equilibrium manifold: A panacea for vanishing and exploding gradients? In International Conference on Learning Representations, 2019. 2 +[20] Sofia Karygianni and Pascal Frossard. Structured sparse coding for image denoising or pattern detection. In 2014 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 3533-3537. IEEE, 2014. 2 +[21] Jaeyeon Kim, Binh-Son Hua, Thanh Nguyen, and Sai-Kit Yeung. Minimal adversarial examples for deep learning on 3d point clouds. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7797-7806, 2021. 2 +[22] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.5 +[23] Loic Landrieu and Mohamed Boussaha. Point cloud over-segmentation with graph-structured deep metric learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7440–7449, 2019. 2 +[24] Truc Le and Ye Duan. Pointgrid: A deep network for 3d shape understanding. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 9204-9214, 2018. 2 +[25] Kwonjoon Lee, Subhransu Maji, Avinash Ravichandran, and Stefano Soatto. Meta-learning with differentiable convex optimization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10657-10665, 2019. 2 +[26] Yangyan Li, Rui Bu, Mingchao Sun, Wei Wu, Xinhan Di, and Baoquan Chen. Pointcnn: Convolution on x-transformed points. Advances in neural information processing systems, 31:820-830, 2018. 2, 5 +[27] Daniel Liu, Ronald Yu, and Hao Su. Extending adversarial attacks and defenses to deep 3d point cloud classifiers. In 2019 IEEE International Conference on Image Processing (ICIP), pages 2279-2283. IEEE, 2019. 2 +[28] Daniel Liu, Ronald Yu, and Hao Su. Adversarial shape perturbations on 3d point clouds. In European Conference on Computer Vision, pages 88-104. Springer, 2020. 1 +[29] Hongbin Liu, Jinyuan Jia, and Neil Zhenqiang Gong. Point + +guard: Provably robust 3d point cloud classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6186-6195, 2021. 1, 3 +[30] Yecheng Lyu, Xinming Huang, and Ziming Zhang. Learning to segment 3d point clouds in 2d image space. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12255–12264, 2020. 1, 2 +[31] Chengcheng Ma, Weiliang Meng, Baoyuan Wu, Shibiao Xu, and Xiaopeng Zhang. Efficient joint gradient based attack against sor defense for 3d point cloud classification. In Proceedings of the 28th ACM International Conference on Multimedia, pages 1819-1827, 2020. 1, 2, 3, 6, 7 +[32] Daniel Maturana and Sebastian Scherer. Voxnet: A 3d convolutional neural network for real-time object recognition. In 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 922-928. IEEE, 2015. 2 +[33] Xi Mo, Usman Sajid, and Guanghui Wang. Stereo frustums: a siamese pipeline for 3d object detection. Journal of Intelligent & Robotic Systems, 101(1):1-15, 2021. 2 +[34] Mesut Ozdag. Adversarial attacks and defenses against deep neural networks: a survey. Procedia Computer Science, 140:152-161, 2018. 2, 3 +[35] Songyou Peng, Michael Niemeyer, Lars Mescheder, Marc Pollefeys, and Andreas Geiger. Convolutional occupancy networks. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part III 16, pages 523-540. Springer, 2020. 5 +[36] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 652-660, 2017. 1, 2, 5, 6, 7 +[37] Charles R Qi, Hao Su, Matthias Nießner, Angela Dai, Mengyuan Yan, and Leonidas J Guibas. Volumetric and multi-view cnns for object classification on 3d data. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5648-5656, 2016. 2 +[38] 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. 2 +[39] Guocheng Qian, Abdulellah Abualshour, Guohao Li, Ali Thabet, and Bernard Ghanem. Pu-gcn: Point cloud upsampling using graph convolutional networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11683-11692, 2021. 2 +[40] Aravind Rajeswaran, Chelsea Finn, Sham M Kakade, and Sergey Levine. Meta-learning with implicit gradients. In Advances in Neural Information Processing Systems, volume 32, pages 113-124, 2019. 1, 2 +[41] Gernot Riegler, Ali Osman Ulusoy, and Andreas Geiger. Octnet: Learning deep 3d representations at high resolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3577-3586, 2017. 2 +[42] Radu Alexandru Rosu, Peer Schütt, Jan Quenzel, and Sven Behnke. Latticenet: fast spatio-temporal point cloud segmentation using permutohedral lattices. Autonomous Robots, pages 1-16, 2021. 3 +[43] Radu Bogdan Rusu, Zoltan Csaba Marton, Nico Blodow, Mihai Dolha, and Michael Beetz. Towards 3d point cloud based object maps for household environments. Robotics and + +Autonomous Systems, 56(11):927-941, 2008. 3 +[44] Weijing Shi and Raj Rajkumar. Point-gnn: Graph neural network for 3d object detection in a point cloud. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 1711-1719, 2020. 2 +[45] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 5 +[46] 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. 5 +[47] Hang Su, Varun Jampani, Deqing Sun, Subhransu Maji, Evangelos Kalogerakis, Ming-Hsuan Yang, and Jan Kautz. Splatnet: Sparse lattice networks for point cloud processing. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2530-2539, 2018. 2, 3 +[48] Hang Su, Subhransu Maji, Evangelos Kalogerakis, and Erik Learned-Miller. Multi-view convolutional neural networks for 3d shape recognition. In Proceedings of the IEEE international conference on computer vision, pages 945-953, 2015. 2 +[49] Arthur Szlam, Karol Gregor, and Yann LeCun. Fast approximations to structured sparse coding and applications to object classification. In European Conference on Computer Vision, pages 200-213. Springer, 2012. 2 +[50] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning, pages 6105-6114. PMLR, 2019. 5 +[51] Florian Tramer, Alexey Kurakin, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick McDaniel. Ensemble adversarial training: Attacks and defenses. arXiv preprint arXiv:1705.07204, 2017. 3 +[52] Tzungyu Tsai, Kaichen Yang, Tsung-Yi Ho, and Yier Jin. Robust adversarial objects against deep learning models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 954–962, 2020. 3 +[53] James Tu, Mengye Ren, Sivabalan Manivasagam, Ming Liang, Bin Yang, Richard Du, Frank Cheng, and Raquel Urtasun. Physically realizable adversarial examples for lidar object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13716-13725, 2020. 3 +[54] Chengyu Wang, Jia Wang, and Qiuzhen Lin. Adversarial attacks and defenses in deep learning: A survey. In International Conference on Intelligent Computing, pages 450-461. Springer, 2021. 2, 3 +[55] Peng-Shuai Wang, Yang Liu, Yu-Xiao Guo, Chun-Yu Sun, and Xin Tong. O-cnn: Octree-based convolutional neural networks for 3d shape analysis. ACM Transactions On Graphics (TOG), 36(4):1-11, 2017. 2 +[56] 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. 1, 2 +[57] Wei Wei, Lei Zhang, Chunna Tian, Antonio Plaza, and Yanning Zhang. Structured sparse coding-based hyperspectral imagery denoising with intracluster filtering. IEEE Transac- + +tions on Geoscience and Remote Sensing, 55(12):6860-6876, 2017. 2 +[58] Matthew Wicker and Marta Kwiatkowska. Robustness of 3d deep learning in an adversarial setting. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11767-11775, 2019. 1, 2, 3 +[59] Yuanwei Wu, Tim Marks, Anoop Cherian, Siheng Chen, Chen Feng, Guanghui Wang, and Alan Sullivan. Unsupervised joint 3d object model learning and 6d pose estimation for depth-based instance segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops, pages 1-10, 2019. 2 +[60] Ziyi Wu, Yueqi Duan, He Wang, Qingnan Fan, and Leonidas J Guibas. If-defense: 3d adversarial point cloud defense via implicit function based restoration. arXiv preprint arXiv:2010.05272, 2020. 1, 3, 5, 6, 7 +[61] Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguuang Zhang, Xiaou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1912-1920, 2015. 1, 2, 5 +[62] Chong Xiang, Charles R Qi, and Bo Li. Generating 3d adversarial point clouds. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9136-9144, 2019. 1, 2, 5, 6, 7, 8 +[63] Zhen Xiang, David J. Miller, Siheng Chen, Xi Li, and George Kesidis. A backdoor attack against 3d point cloud classifiers. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 7597-7607, October 2021. 1, 3 +[64] Xu Yan. Pointnet/pointnet++ pytorch. https://github.com/yanx27/Pointnet_Pointnet2Pytorch, 2019.5 +[65] Xu Yan, Chaoda Zheng, Zhen Li, Sheng Wang, and Shuguang Cui. Pointasnl: Robust point clouds processing using nonlocal neural networks with adaptive sampling. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5589-5598, 2020. 2 +[66] Jiancheng Yang, Qiang Zhang, Rongyao Fang, Bingbing Ni, Jinxian Liu, and Qi Tian. Adversarial attack and defense on point sets. arXiv preprint arXiv:1902.10899, 2019. 2, 3 + +[67] Ze Yang and Liwei Wang. Learning relationships for multi-view 3d object recognition. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7505-7514, 2019. 2 +[68] Tan Yu, Jingjing Meng, and Junsong Yuan. Multi-view harmonized bilinear network for 3d object recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 186-194, 2018. 2 +[69] Jinlai Zhang, Lyujie Chen, Bo Ouyang, Binbin Liu, Jihong Zhu, Yujing Chen, Yanmei Meng, and Danfeng Wu. Pointcutmix: Regularization strategy for point cloud classification. arXiv preprint arXiv:2101.01461, 2021. 3 +[70] Jinlai Zhang, Binbin Liu, Lyvjie Chen, Bo Ouyang, Jihong Zhu, Minchi Kuang, Houqing Wang, and Yanmei Meng. The art of defense: letting networks fool the attacker. arXiv preprint arXiv:2104.02963, 2021. 3 +[71] Zheng Zhang, Yong Xu, Jian Yang, Xuelong Li, and David Zhang. A survey of sparse representation: algorithms and applications. IEEE access, 3:490-530, 2015. 3 +[72] Yue Zhao, Yuwei Wu, Caihua Chen, and Andrew Lim. On isometry robustness of deep 3d point cloud models under adversarial attacks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1201-1210, 2020. 3, 6, 8 +[73] Tianhang Zheng, Changyou Chen, Junsong Yuan, Bo Li, and Kui Ren. Pointcloud saliency maps. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1598-1606, 2019. 3 +[74] Hang Zhou, Dongdong Chen, Jing Liao, Kejiang Chen, Xiaoyi Dong, Kunlin Liu, Weiming Zhang, Gang Hua, and Nenghai Yu. Lg-gan: Label guided adversarial network for flexible targeted attack of point cloud based deep networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10356-10365, 2020. 1, 3, 6, 7 +[75] Hang Zhou, Kejiang Chen, Weiming Zhang, Han Fang, Wenbo Zhou, and Nenghai Yu. Dup-net: Denoiser and upsampler network for 3d adversarial point clouds defense. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1961-1970, 2019. 1, 3, 5, 6, 7 \ No newline at end of file diff --git a/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/images.zip b/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..02f3b152610ed2f915955f48921d8f18e53ebe83 --- /dev/null +++ b/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f68536b8b62d54b9bf69a98dfd08d068ad340c1de476241d2b6a1eab7c71274c +size 406994 diff --git a/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/layout.json b/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e53641f5a4b5f28fd8c060082f4deab7c876d0e2 --- /dev/null +++ b/robuststructureddeclarativeclassifiersfor3dpointcloudsdefendingadversarialattackswithimplicitgradients/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1d675ab086135f1b0ce285820dbf394776f45b976318980287066f5f1cb6dae +size 484792 diff --git a/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/3edb53d7-9c2a-4970-991c-06f715e310de_content_list.json b/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/3edb53d7-9c2a-4970-991c-06f715e310de_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..51e4a54ee3036dea368132c0cbfe13e784c1552d --- /dev/null +++ b/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/3edb53d7-9c2a-4970-991c-06f715e310de_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9eb1d27ddb2f3eade10c173c8073e3c1d388e28c4473729211e227270794ba99 +size 80999 diff --git a/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/3edb53d7-9c2a-4970-991c-06f715e310de_model.json b/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/3edb53d7-9c2a-4970-991c-06f715e310de_model.json new file mode 100644 index 0000000000000000000000000000000000000000..aada12d12a6b9472588f7b182220e5b074b5c75d --- /dev/null +++ b/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/3edb53d7-9c2a-4970-991c-06f715e310de_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f32b1a92b7bfb8454163bb1046f75e77b31c3fc6da8b726dc153ea1d136a2ae +size 99977 diff --git a/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/3edb53d7-9c2a-4970-991c-06f715e310de_origin.pdf b/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/3edb53d7-9c2a-4970-991c-06f715e310de_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b4eb6856dc2b1f6eee22dfd1675489e1254ee54b --- /dev/null +++ b/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/3edb53d7-9c2a-4970-991c-06f715e310de_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd91ef21c5a371bf68910c311293650a2fa0ffe8b7d5cf410d8cbaafcd2845a2 +size 8540083 diff --git a/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/full.md b/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e2689add3e2956e11cd39779ffd9760a585e3afd --- /dev/null +++ b/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/full.md @@ -0,0 +1,303 @@ +# Rope3D: The Roadside Perception Dataset for Autonomous Driving and Monocular 3D Object Detection Task + +Xiaoqing Ye $^{1*}$ Mao Shu $^{1*}$ Hanyu Li $^{1}$ Yifeng Shi $^{1}$ Yingying Li $^{1}$ Guangjie Wang $^{2}$ Xiao Tan $^{1\dagger}$ Errui Ding $^{1}$ + +$^{1}$ Baidu Inc. $^{2}$ China University of Mining and Technology + +# Abstract + +Concurrent perception datasets for autonomous driving are mainly limited to frontal view with sensors mounted on the vehicle. None of them is designed for the overlooked roadside perception tasks. On the other hand, the data captured from roadside cameras have strengths over frontal-view data, which is believed to facilitate a safer and more intelligent autonomous driving system. To accelerate the progress of roadside perception, we present the first high-diversity challenging Roadside Perception 3D dataset- Rope3D from a novel view. The dataset consists of 50k images and over 1.5M 3D objects in various scenes, which are captured under different settings including various cameras with ambiguous mounting positions, camera specifications, viewpoints, and different environmental conditions. We conduct strict 2D-3D joint annotation and comprehensive data analysis, as well as set up a new 3D roadside perception benchmark with metrics and evaluation devkit. Furthermore, we tailor the existing frontal-view monocular 3D object detection approaches and propose to leverage the geometry constraint to solve the inherent ambiguities caused by various sensors, viewpoints. Our dataset is available on https://thudair.baai.ac.cn/rope. + +# 1. Introduction + +Autonomous driving plays a crucial role in helping reduce traffic accidents and improve transportation efficiency. Current perceptual systems mainly equip the moving vehicle with LiDAR or camera sensors. Owing to the movement, the vehicle perceptual system can not observe surroundings for a long period. In addition, since the mounted sensor is relatively low (usually on the top of a vehicle), the perceptual range is comparatively limited and is vulnerable to occlusion. On the contrary, the data captured from road- + +![](images/b9426535abcbf819595b8bd63cd0aec3ddeb4a1cabc1e23979205c4c36a28fed.jpg) + +![](images/b273d719a21aa2ede17d159ad6248e6d812f3650419d1b53ec5e5a78b0c0bb45.jpg) + +![](images/315b6cb5bd89b268d5dd0eb694d0a4762293e35bada69165eca3f56b08dd912f.jpg) +Figure 1. The comparison of (a) frontal view and (b) roadside camera view with a pitch angle. The car view focuses more on the frontal area whereas the roadside camera observes the scene in a long-term and large-range manner. Vehicles can be easily occluded by closer objects in frontal view but the roadside view alleviates the risk. For example, for car-view (a), the white van is occluded by the black jeep whereas in roadside view (b) they are both visible, corresponding to the white and pink 3D boxes in (c). The triangle mark denotes the same LiDAR-mounted vehicle. + +side cameras has its inherent strengths in terms of robustness to occlusion and long-time event prediction, since they are collected from cameras mounted on poles a few meters above the ground. The comparisons between two different views of data are depicted in Fig. 1. + +The importance of roadside perception is listed as follows: (1) Cooperative to Autonomous driving (AD). AD still faces safety challenges and uncontrolled threats due to blind spots. Instead, the roadside view can cover the blind spots for two extra advantages over car views: a long-range global perspective to extend vehicles' perception field spatially and temporally and global trajectory prediction for + +safety. For example, a pedestrian walking behind a parked vehicle might suddenly crash into a moving vehicle since vehicle sensors fail to detect abrupt changes in the environment owing to the limited perceptual range or heavy occlusion. On the contrary, the roadside view is capable of behavior prediction timely. (2) Global perception. Further objects are occluded (even with $360^{\circ}$ sensors) by closer objects in existing car-view datasets, causing blind spots. Thanks to roadside cameras mounted overhead, the invisible region is now visible. Besides, Autonomous vehicles (AV) can be informed to choose a faster lane when having a dead car in the queue since the roadside view perceives globally. (3) Cost-efficient. In terms of cost, it is worthy for ensuring safety by cooperative perception and cost-efficient since information from roadside cameras can broadcast to all surrounding AVs. (4) Intelligent traffic control. The roadside perception also facilitates smart traffic control and flow management. The critical contribution of roadside perceptual systems in facilitating a safer and more intelligent autonomous driving system has been acknowledged in many works [8, 34, 41]. + +However, existing researches on the roadside perceptual ability focus only on 2D tasks such as 2D detection and tracking, the ability of 3D localization is still underexplored [29, 30, 39]. In this work, we focus on monocular 3D detection that localizes objects in 3D space from a single image. Although abundant perception datasets have been published to fuel the development in autonomous driving from vehicle view, such as KITTI [12], nuScenes [5], A*3D [32] and Waymo [38], none of them is designed particularly for the overlooked roadside 3D perception task. We hence release the first large-scale high-diversity Roadside Perception Dataset (Rope3D), with the hope of bridging this gap. Compared with the existing vehicle view datasets, the roadside perceptual data can be different in three ways. First, the ambiguity lies everywhere due to various cameras specifications such as distinct pitch angles of the viewpoint, mounting heights as well as various roadside environments, which increases the difficulty of monocular 3D detection tasks to a great extent. Second, since the roadside cameras are mounted on the poles instead of on top of the vehicle in frontal view, thus the assumption of the camera's optical axis being parallel to the ground is no more valid, leading to the incompatibility of directly applying the existing monocular 3D detection approaches using this prior. Third, due to a much larger sensible range of the roadside perceptual system, a larger number of objects are expected to observe in roadside view, increasing the density and difficulty of a perceptual system. All these differences prevent directly applying most existing 3D detection methods. We hence tailor existing monocular 3D object detection methods to the roadside application. + +To summarize, our contributions are as follows: + +- We present the first challenging high-diversity road + +side dataset termed "Rope3D", consisting of 50k images and over 1.5M 3D objects collected across a variety of lighting conditions (daytime / night / dusk), different weather conditions (rainy / sunny / cloudy), and distinct road scenes with different camera specifications like focal length and viewpoints. + +- We specially tailor current frontal-view monocular 3D detection methods to deal with the roadside view data and conduct a comprehensive study with the new 3D detection metrics particularly designed for roadside 3D detection tasks, hoping to facilitate the development of monocular 3D perception tasks in roadside scenarios. + +# 2. Related work + +# 2.1. Frontal-view Autonomous Driving Datasets + +Recent years have witnessed great progress in autonomous driving, thanks to a great number of large-scale traffic scene datasets. [2, 10, 11, 17, 26, 32, 44] As a pioneer work, KITTI [12] provides multimodal data and opens a leader board for a variety of tasks. Although the raw point clouds from LiDAR is $360^{\circ}$ around the collecting vehicle, the annotation is only conducted within the overlapping frontal view of the camera. To tackle the limitation, the Honda Research Institute 3D Dataset (H3D) [31] supplies a total of 1.1M 3D boxes in full 360 view, which accelerates full-surround multi-object detection and tracking. Another $360^{\circ}$ view multimodal 3D detection dataset is introduced in nuScenes [5], providing over 1.4M annotated 3D boxes in 1000 scenes, including nighttime and rainy conditions. The ApolloScape and ApolloCar3D [16, 37] focus on the pixelwise semantic segmentation task, including scene parsing, 3D car instance, lane segmentation tasks. The Argoverse dataset [7] designs for vehicle perception tasks such as 3D tracking and motion forecasting. The Waymo Open Dataset [38] consists of over 1000 scenes and 12M 3D boxes in urban and suburban scenarios, under various weather and lighting conditions. Although the above-mentioned datasets have fueled the innovation on autonomous driving, they are all designed for vehicle view perception. However, there is a lack of a dataset helping us to effectively carry out research on 3D localization under roadside surveillance cameras. A related work is from BoxCars [36], which performs fine-grained vehicle recognition by estimating the projected vertices of 3D bounding box on the image rather than real-world location, size, and orientation. Another contemporary work [49] focuses on the LiDAR-based 3D detection task. The comparisons between our roadside 3D dataset and the previous AD datasets are listed in Table 1. + +# 2.2. Monocular 3D Object Detection + +Though challenging, monocular-based 3D detection is still an attractive solution especially in autonomous driving + +![](images/f5ffc6dcd609028eb51840f57e78ac4f2dd5250a06aeb2bdc2265386e77aca34.jpg) +Figure 2. The examples of collected samples under different weather and conditions. From left to right, each column corresponds to clear/sunny, rainy, night and dawn/dusk. More samples can be found in supplementary material. + +
ViewDatasetRGB framesScenesLiDAR channel3D Boxes2D BoxesRGB resolutionClsYearRainDiversityRange (m)
NightDawn
FrontalKITTI [12]15k226480k80k1392×5128201370
Apollo Scape [16]144k/6470k03384×27108-352019✓420
AS lidar [26]90k/64475k01920×10808201970
Lyft Level 5 [17]46k366401.3M01920×108092019/
A2D2 [13]12k/169k01928×1208382019100
Argoverse [7]22k11332993k01920×1200152019✓✓200
H3D [31]27.7k160641M01920×120082019100
A*3D [32]39k/64230k02048×153672020✓✓100
CityScapes 3D [11]5k1150no†27k02048×102482020150
nuScenes [5]1.4M1000321.4M01600×900232020✓✓75
Waymo Open [38]230k11506412M9.9M1920×108042020✓✓✓75
ONCE [27]7M1M40417k01920×102052021✓✓200
RoadsideBoxCars116k [36]116k137no116k‡0~128×12862018/
Ours50k2640/3001.5M670k1920×108012/✓✓✓200
+ +Table 1. The comparison of 3D AD datasets. The top and bottom parts indicate the front view and roadside view datasets, respectively. LiDAR channel means the beam number of the LiDAR laser. The 2D boxes number denotes those who only have 2D box annotations. ${}^{\prime }/{}^{\prime \prime }$ denotes unknown information. $\left( {}^{ \dagger }\right)$ : No lidar sensors to obtain ground truth,use stereo instead. $\left( {}^{ \ddagger }\right)$ : For BoxCars116k dataset,only the projected eight corner points instead of the 3D bounding boxes are provided. In other words, the location, dimension, and orientation of 3D bounding boxes are unknown. Besides, only cropped images around ${128} \times {128}$ rather than the full images are provided. + +systems, where the method predicts the 3D bounding boxes from a single image [1,9,18-20,22,24,28,45]. Monocular 3D detection methods can be divided into three categories. (1) Anchor-based. Methods in this category exploit a series of predefined 3D bounding box with a location called "anchor" and estimate the offset w.r.t the anchor. M3D-RPN [3] leverages a 3D region proposal network and the geometric constrains of 2D and 3D perspectives to directly regress the 3D location and size. Kinematic3D [4] further extends M3D-RPN by leveraging 3D kinematics from monocular videos to improve the overall localization. (2) Keypoint-based. Many attempts [23,25,33,40,50] have been made to directly regress the keypoints, and then estimate 3D bounding box size and location from the image position of keypoints by optimization e.g., RTM-3D [21] and MonoGR-Net [33]. (3) Pseudo-Lidar / depth based. Extra depth estimation modules and/or point cloud guidance are employed to alleviate the lack of accurate depth information. The pioneering work pseudo-LiDAR [42, 43, 47] imitates the + +LiDAR-based methods by utilizing off-the-shelf depth estimators to convert image pixels into pseudo-LiDAR point clouds, and employs LiDAR-based approaches for further detection. DA-3Ddet [46] adapts the features from unsound image-based pseudo-LiDAR domain to reliable LiDAR domain for guidance to boost the monocular performance. UrbanNet [6] utilizes the urban 3D map, including driving lanes, elevation, and slope as prior for assisting the 3D detection task. The existing monocular 3D detection methods are mainly designed for processing vehicle view data. Due to the domain gap and the distribution shift, a question raise naturally is whether these methods still applicable for roadside applications and if not how can we tailor these methods to the new scenario. + +# 3. The Roadside Perception Dataset + +# 3.1. Specifications + +Sensors Setup. The roadside data collection is conducted by two sets of sensors, one is the roadside cameras mounted + +on the pole or beside the traffic light; the other is the LiDAR equipped on a parked/driving vehicle to obtain the 3D point clouds of the same scene. For sensor synchronization, we adopt the nearest time matching strategy to find the pairs of image and point clouds within 5 milliseconds error. + +- Roadside cameras: RGB with $1920 \times 1080$ resolution, $30 - 60\mathrm{Hz}$ capture frequency and $1 / 1.8$ CMOS sensor. +- LiDAR: (1) HESAI Pandar 40P, 40 laser beams, $10/20\mathrm{Hz}$ capture frequency, $\pm 2cm$ accuracy, $360^{\circ}$ horizontal FOV, $-25^{\circ} \sim +15^{\circ}$ vertical FOV, $\leq 200m$ range. (2) Jaguar Prime from Innovusion: 300 beams, 6-20 FPS with $\pm 3cm$ accuracy, $100^{\circ}$ horizontal FOV, $40^{\circ}$ vertical FOV, $\leq 280m$ range. + +Coordinate Systems and Calibration. There are three coordinate systems used in the dataset: the World Coordinate (i.e., the Universal Transverse Mercator coordinate system (UTM Coord.), the Camera Coordinate, as well as the Li-DAR Coordinate. + +To obtain the reliable ground truth 2D-3D joint annotation, the calibration between different sensors is required. First, the camera is calibrated to obtain the intrinsics by detecting the chessboard patterns. Then the Lidar-to-World calibration is conducted by the vehicle localization module to obtain the high definition (HD) map in UTM Coord. For World-to-Camera calibration, we first project the HD map which contains lane and crosswalk endpoints onto the 2D image to obtain the raw transformation. A bundle adjustment refinement is followed to derive the final transformation. Then Lidar-to-Camera transformation can be obtained by simply multiplying Lidar-to-World and World-to-Camera transformations. + +After obtaining the transformation between the three coordinate systems, we can easily compute the ground equation $G(\alpha, \beta, \gamma, d)$ by fitting the ground points $[x, y, z]$ to the ground plane in the camera coordinate, with $\alpha x + \beta y + \gamma z + d = 0$ . + +# 3.2. Data Collection and Annotation + +After obtaining the intrinsic as well as the LiDAR-to-Camera transformation, we can collect the 2D-3D data. We choose various roadside cameras and let a LiDAR-equipped vehicle park or drive around. To keep the high diversity and complexity of the real environment, we collect more than $50\mathrm{k}$ image frames at different times (daytime, night, dawn/dusk), different weather conditions (sunny, cloudy, rainy), different densities (crowded, normal, less traffic), different distributions of traffic elements and so on. There are totally 13 object classes with their corresponding category, 2D properties (occlusion, truncation) and the 7-DOF 3D bounding box: Location $(x,y,z)$ , Size (width-W, length-L, height-H), Orientation (the heading angle- $\theta$ ). The full pipeline is illustrated in Fig. 3. (1)First after obtaining the 3D point clouds and the 2D image (they are within + +the same space but differ in the viewpoint), we first annotate the 3D bounding boxes directly on the 3D point clouds. (2) Simultaneously, the annotated 3D bounding boxes will be projected on the 2D image plane, see the top part of Fig. 3(c). We adjust the 3D parameters so that the projected points align with the 2D instance and mainly cover it. (3) For 2D box annotations, if the objects are scanned by the laser, their 2D box labels in the image are the minimum bounding box of the amodal projections of the eight 3D corners. For objects that are heavily occluded or too far to be detected by laser, 2D complementary labeling is conducted to label 2D bounding boxes directly in the image and leave its 3D annotations empty, see the bottom part of Fig. 3 (c). + +# 3.3. Statistics and Analysis + +The collected images have high diversity and inherent ambiguity due to different settings of pitch angles, height, and camera types as well as the manifold scenes. Two levels of categories are adopted in the dataset. The coarse-grained level mainly focuses on the most common traffic elements: Car, Big Vehicle, Pedestrian, and Cyclist. To be more fine-grained, Car includes car and van, Big Vehicle can be further divided into truck and bus, and meanwhile, Cyclist can be subdivided into cyclist, motorcyclist, barrow, and tricyclist, since they are driving non-motor vehicles. We have annotated 13 classes, in addition to the above-mentioned categories, there are four extra classes: 'traffic cones', 'triangle-plate', 'unknown-unmovable', 'unknown-movable'. The following statistics are mainly on the coarse and fine-grained classes. + +Quantity distribution. We first give an overview analysis of the dataset on the number of 2D and 3D objects in Fig. 4. As is stated, 2D objects are more than 3D objects since some objects are not scanned by the LiDAR laser, so they only have 2D annotations. We give the detailed number of coarse level and fine-grained levels of the categories, corresponding to (a) and (b) in Fig. 4. + +Depth distribution. Besides, we analyze the depth distribution of coarse-categories in Fig. 5. The depth of the captured 3D objects can range from within $10\mathrm{m}$ to over $140\mathrm{m}$ . Most objects lie between 60 and 80 meters. + +Density. The density can be a key factor that affects the capability of 3D perception. Thus, we analyze the density of the dataset from two aspects in Fig. 6. From the global level, we show the 2D and 3D annotated number of each image in (a). The samples can be up to more than one hundred. Compared to other datasets whose densities are KITTI [12]: 5.3, nuScenes [5]: 9.7 and A*3D [32]: 5.9, our dataset has a much higher density (34 and 24 for 2D/3D per image). From the view of coarse categories, the numbers of 3D samples per frame are shown in Fig. 6 (b). The 'Car' category is relatively evenly distributed in densities whereas there are less than 10 big vehicles in each image. + +![](images/83dfff800dbf5b2e909b4bc62e55884780b1c4b10aa913b1e6375c3ae302a32b.jpg) +(a) Data acquisition +(b) Alignment and Calibration + +![](images/1d003d30db3a357d8654291028d0af1de13700cb9239b93a7c0cf03f445c2e85.jpg) +(c) 2D-3D joint Annotation +(d) Visualization + +![](images/aad1c86b78a90ddd98d39e9fe802f7f433c3db1f13a82827ed4ba1aad699cba3.jpg) +Figure 3. The data acquisition and labeling pipeline. Our platform takes the captured roadside images and the point clouds scanned by the LiDAR mounted on a parked/driving vehicle as input. After calibration and alignment between various sensors, the transformations between LiDAR, the world, and the camera are obtained, as well as the ground plane equation and intrinsics. The 2D-3D joint annotation is carried out by projecting the point clouds onto the images and adjusting the 3D bounding boxes manually to fit the 2D instance. For objects that are not scanned by the laser, the 2D complementary labeling is performed on the images only. For example in (d), some objects only have white 2D bounding boxes and no 3D colored annotations due to a lack of 3D points. + +![](images/d9a47748d5cb23126c11d7b21ff7c558b0c82350f4d67929aa2374e5782c33e9.jpg) +(a) The annotation number of total and per coarse category +(b) The annotation number of fine-grained categories + +![](images/d158054ca5afd546364234791a5d875b847c3a0187cdcd5b33c0937774fdcae9.jpg) +Figure 4. The quantities of: (a) coarse level, (b) fine-grained level. +Figure 5. The depth distribution of coarse categories. + +Occlusion and truncation Analysis. Next, we annotate three levels for occlusion and truncation attributes. For occlusion, Level 0 denotes no occlusion, 1 and 2 means less / more than $50\%$ occlusion. For truncation attribute, Level 0 means no truncation, 1 and 2 denote the horizontal and vertical truncation in the image border. The statistics are shown in Fig. 7. More than half of the objects are partially or heavily occluded while the occlusion percentage of KITTI is be + +![](images/5fd9544222c9303bbfb1bf60bd6605eb13f7b2c39ca946b54b3bb3208cf5c952.jpg) +(a) Annotation number per image (Density) + +![](images/7a2110864c83bf86701b6bf19ba91dd93bc8564a2c6e6e2085381293298c6581.jpg) +(b) 3D object number per category + +![](images/68448b63f32b3e098ee53c47f81d915e6e77b62f972cd1c288bc871b5fe003b3.jpg) +Figure 6. Top: The number of total annotated objects per image. Bottom: The number of coarse-category 3D objects per image. +Figure 7. The occlusion and truncation distribution of coarse categories. Over half of the objects are partially or heavily occluded. + +tween $5\%$ to $30\%$ , which reflects the difficulty of our 3D perception dataset and task. + +The ambiguity analysis. The roadside dataset has inherent ambiguity due to the adopted various cameras with different settings of camera specifications, mounting heights, the + +![](images/f47f98df5df7c906814d6524e9f25fba926f630c6e2cf38aa66f18d42779d2d2.jpg) + +![](images/1c5807cfdd34f7d398d60b031cf9bc57e0b9561cf22951343836bcb759bcd0e9.jpg) + +![](images/025ef700f97edb1fde3430fd77649c5da7964a629a42f1ce64331c34ae1dd8a1.jpg) +Figure 8. The diversity of roadside cameras. From top to bottom are the distribution of mounting heights, pitch angles of the cameras and the focal lengths over the dataset, respectively. + +pitch angles of viewpoint, so on. Thus we analyze the diversity distribution of settings in Fig. 8. + +# 4. Task and Metrics + +# 4.1. The task overview and metrics. + +Task Overview. The monocular 3D perception task is to localize the objects given ambiguous images captured under various settings and scenes, including different camera specifications, viewpoints, and mounting positions. + +Evaluation Metrics. There are multiple evaluation metrics for AD datasets. In KITTI [12], the 11-point Interpolated Average Precision metric $(\mathrm{AP}|_{R_{11}})$ and the average orientation similarity (AOS) are proposed to assess the localization and orientation performance. [35] suggests 40 recall positions instead of 11 positions for a more fair comparison. The nuScenes [5] consolidates the mean AP and five True Positive (TP) error types into the nuScenes detection score (NDS), including translation, scale, orientation, velocity and attribute error types. Inspired by the AP metric, we adopt $\mathrm{AP}|_{R_{40}}$ [35], i.e., + +$$ +A P \mid_ {R} = \frac {1}{| R |} \sum_ {r \in R} \max _ {\tilde {r}: \tilde {r} \geq r} \rho (\tilde {r}) \tag {1} +$$ + +where $\rho (\tilde{r})$ is the precision at a certain recall threshold $r\in \{1 / 40,2 / 40,\dots ,1\}$ . To facilitate a comprehensive evaluation w.r.t. a certain factor such as orientation, we decouple the consolidated metric into several sub-metrics. + +Average Ground Center Similarity. The distance between objects on the ground plane indicates the risk of collision, we hence compute the ground Euclidean distance by pro + +jecting the object center points onto the ground plane: + +$$ +A C S = \frac {1}{| D |} \sum_ {s \in D} \left(1 - \min \left(1, \frac {\Delta_ {s} ^ {c}}{C _ {s}}\right)\right) \tag {2} +$$ + +where $D$ is set of true positive samples, $C_s$ is the norm of the GT ground center, $\Delta_s^c$ is the Euclidean distance between predicted ground center and GT ground center of sample $s$ . $|D|$ is the total number of true positive objects. + +Average Orientation Similarity. The Average Orientation Similarity (AOS) is introduced to measure how well the orientation is estimated, which is defined similarly as [38] by, + +$$ +A O S = \frac {1}{| D |} \sum_ {s \in D} \frac {1 + \cos (2 * \Delta_ {s} ^ {\theta})}{2} \tag {3} +$$ + +where $\Delta_s^\theta$ is the angle difference of sample $s$ , and $\cos(2*\Delta_s^\theta)$ means that during evaluation, we don't distinguish whether the head or tail of the object is facing the camera. + +Average Area Similarity. We measure the ground occupancy of the prediction w.r.t the GT in term of area, where $\Delta_{s}^{A}$ is the absolute area difference and $A_{s}$ is the ground truth area. + +$$ +A A S = \frac {1}{| D |} \sum_ {s \in D} \left(1 - \min \left(1, \frac {\Delta_ {s} ^ {A}}{A _ {s}}\right)\right) \tag {4} +$$ + +Average Four Ground Points Distance and Similarity. We also compute the average distance of four ground vertices of the 3D bounding box (AGD), since it consolidates the location, orientation, and width/length together. + +$$ +A G D = \frac {1}{| D |} \sum_ {s \in D} \left(\frac {1}{K} \sum_ {g = 0} ^ {K - 1} \left| s _ {g} - \widehat {s _ {g}} \right|\right) \tag {5} +$$ + +where $\widehat{s_g}$ and $s_g$ are the $g$ th predicted and GT ground points of smaple $s$ , respectively. $K = 4$ is the total number of ground points. To be consistent with other similarity metrics, we define the AGS (ground points similarity) as: + +$$ +A G S = \frac {1}{| D |} \sum_ {s \in D} \left(1 - \min \left(1, \frac {1}{K} \sum_ {g = 0} ^ {K - 1} \frac {\left| s _ {g} - \widehat {s _ {g}} \right|}{| \hat {c} |}\right)\right) \tag {6} +$$ + +Assume $S = (ACS + AOS + AAS + AGS) / 4$ , we consolidate into $\mathrm{Rope}_{\mathrm{score}}$ by reweighting the 3D AP and the proposed similarities metrics with $\omega_{1} = 8$ and $\omega_{2} = 2$ . + +$$ +\text {R o p e} _ {\text {s c o r e}} = \left(\omega_ {1} * A P + \omega_ {2} * S\right) / \left(\omega_ {1} + \omega_ {2}\right) \tag {7} +$$ + +# 4.2. 3D Roadside Perception Task + +As is illustrated in Sec. 1, due to the inherent ambiguity of roadside data caused by diverse camera specifications (various intrinsics and mounting positions, et.al.), the existing frontal-view monocular 3D object detection approaches can not be directly applied to the Rope3D Dataset.Hence + +we make simple-and-effective attempts to alleviate the ambiguity problem by utilizing camera specifications and encoding the ground knowledge. Two modifications (early-fusion and deep-fusion) to incorporate the depth map of the ground plane with RGB image and two kinds (integrate and multi-gridded) of ground planes are made to alleviate the multi-focal ambiguity. + +Adaptations by leveraging ground planes. We adopt the ground plane equation $G(\alpha, \beta, \gamma, d)$ and camera intrinsic $K^{3 \times 3}$ to generate the depth map $D_G$ of the ground plane with the same size as the image. + +$$ +\left\{ \begin{array}{c} Z [ x, y, 1 ] ^ {T} = K ^ {3 \times 3} [ X, Y, Z ] ^ {T} \\ G ^ {1 \times 4} [ X, Y, Z, 1 ] ^ {T} = 0 \end{array} \right. \tag {8} +$$ + +where $[x, y]$ is the pixel in the image coordinates, $[X, Y, Z]$ is the corresponding 3d point in camera coordinate that lies on the ground plane. Thus the depth $Z$ can be derived with the known 2d image points and the ground plane equation $G$ . We incorporate the ground depth map with the RGB appearance feature by early fusion and deep fusion. The first one is directly concatenating the depth map with the original RGB channels as input, and the second is adopting another siamese network for depth feature extraction and further weighted fusion of the two depth predictions. The performances of these two methods are similar and we hence only report the results by concatenation on the anchor-based M3D-RPN and the keypoint-based MonoDLE and MonoFlex approaches. We believe more sophisticated approaches might further improve the performance, which is out of the scope of this paper. In addition, two different formats of ground planes are attempted. One is to fit the entire ground within the visual field to a single plane, which is represented by the ground plane equation. Another is to divide the entire ground into multiple small grids, and each grid is represented by a ground equation. + +# 5. Experiments + +# 5.1. Experimental Setup + +Our roadside 3D perception dataset contains 50k images, with the training and validation ratio set to 8:2. We offer two kinds of splitting the training and validation set, II: Homologous, for each scene we select $70\%$ images and combine them for training, and leave all the rest images for validation. III: Heterologous, we select $80\%$ of the cameras with the collected images for training and leave the remaining unseen $20\%$ (different camera specifications) for validation, which can be used for validating the generalization ability of the monocular 3D object detection approaches. + +Implementation Detail. (1) For M3D-RPN [3], we experiment on vanilla and improved approaches with ResNet34 [14] backbone, (2) Kinematic3D [4] is a monocular video-based 3D object detector with DenseNet121 [15] backbone, + +we only implement the first phase without video knowledge. (3) MonoDLE [25] is based on the anchor-free one stage detector CenterNet [51] with backbone DLA34 [48]. (4) MonoFlex [50] is a keypoint based method with modified DLA34 [48] backbone. The training image resolutions are adjusted to fit our dataset. + +For objects that contain only 2D annotations without 3D annotations, we compute only losses on 2D attributes. For those objects having 3D labeling, the training loss weights of the 2D and 3D are both set to 1. + +# 5.2. Main Results and Analysis + +Performance of vanilla and improved approaches. The performances of monocular 3D detection approaches on the Rope3D Dataset are depicted in Table 2. Approaches with suffix $(G)$ denote that we customize the corresponding approach with ground plane function to reconnect the 3D locations and 2D projected points even when the optical axis of cameras is not parallel to the ground plane because of the pitch angle. The improved approach is noted with suffix $(D)$ . We adopt the $3\mathrm{D}AP|_{R40}$ as well as the proposed metrics for evaluation. We find that most approaches have an obvious performance decline from homologous to the heterologous validation set. However, the performance drop is insignificant when applying a 3D detection model trained on the vehicle-view ONCE dataset to nuScenes dataset [27]. This phenomenon indicates the domain gap caused by various camera specifications and setting positions can not be ignored, which might be a distinguishable difference between vehicle-view and roadside view applications and should be taken carefully. By leveraging the depth map of ground planes, we observe an obvious improvement in most methods, even on the heterologous set where training and validating sets have different camera specifications. + +Performance of different ground plane formats. We further analyze the performance by adopting two different formats of ground planes, i.e., by fitting the entire ground within the visual field to a single plane or by dividing the entire ground into multiple $5\mathrm{m} \times 5\mathrm{m}$ grids piecewisely. We carry out the experiment on KM3D [20], a method that predicts 2D keypoints and solves 3D position by minimizing the re-projection error. In other words, it relies on the differentiable geometric constraint to recover 3D location rather than direct prediction, which heavily depends on the accuracy of ground plane. As is shown in Table 3, KM3D-(GG), which takes advantage of gridded ground planes, shows better performance on most fine-grained categories. The main reason might be that the piecewisely-gridded planes better fit the actual the ground plane. + +Performance of different ranges. We further analyze the performance of the models within different ranges from 0 to $120\mathrm{m}$ . As is shown in Table 4, with the depth range increases, most of the performances decrease, especially for + +
SettingMethodBackboneBranchIoU = 0.5IoU = 0.7
CarBig VehicleCarBig Vehicle
AP3D|R40RopescoreAP3D|R40RopescoreAP3D|R40RopescoreAP3D|R40Ropescore
IM3D-RPN-(G) [3]ResNet34A54.1962.6533.0544.9416.7532.906.8624.19
M3D-RPN-(D) [3]ResNet34A67.1773.1439.0649.9533.9446.4511.2828.12
Kinematic3D-(G) [4]DenseNet121A50.5758.8637.6048.0817.7432.996.1022.88
MonoDLE-(G) [25]DLA-34K51.7060.3640.3450.0713.5829.469.6325.80
MonoDLE-(D) [25]DLA-34K77.5080.8449.0757.2254.5362.4817.2532.00
MonoFlex-(G) [50]DLA-34K60.3366.8637.3347.9633.7846.1210.0826.16
MonoFlex-(D) [50]DLA-34K59.7866.6659.8166.0735.6447.4324.6138.01
IIM3D-RPN-(G) [3]ResNet34A21.7536.4021.4935.496.0523.842.7820.82
M3D-RPN-(D) [3]ResNet34A36.3348.1624.3937.8111.0928.173.3921.01
Kinematic3D-(G) [4]DenseNet121A23.5637.0513.8528.585.8223.061.2718.92
MonoDLE-(G) [25]DLA-34K19.0833.7219.7633.073.7721.422.3119.55
MonoDLE-(D) [25]DLA-34K31.3343.6823.8136.2112.1628.393.0219.96
MonoFlex-(G) [50]DLA-34K32.0144.3713.8628.4710.8627.390.9718.18
MonoFlex-(D) [50]DLA-34K37.2748.5847.5255.8611.2427.7913.1028.22
+ +Table 2. Overall performance of the monocular 3D object detection approaches on the Rope3D Dataset with IoU = 0.5 and 0.7 under two train-val splitting settings: the homologous (I) and the heterologous (III). - $(G)$ denotes adapting the ground plane, - $(D)$ means using the depth map of ground. The abbr. in the branch column denotes: A: anchor-based, K: keypoint-based. + +
SettingMethodBackbonecarvanbus\(AP_{3D|R40} [Mod] / Rope_{score}\)
truckcyclistmotorcyclisttricyclistpedestrian
IKM3D [20]ResNet348.97 / 25.097.77 / 23.798.07 / 23.894.94 / 20.591.81 / 17.343.61 / 19.3414.39 / 27.850.37 / 17.93
KM3D-(G) [20]ResNet349.83 / 26.6013.16 / 29.264.19 / 22.0518.42 / 32.4011.35 / 27.2411.45 / 27.2419.13 / 33.509.90 / 26.28
KM3D-(GG) [20]ResNet349.86 / 26.6415.71 / 31.307.66 / 24.4812.67 / 27.7113.23 / 28.9415.08 / 30.1419.97 / 34.1311.92 / 27.90
IIIKM3D [20]ResNet345.89 / 22.912.91 / 20.2621.20 / 34.3025.86 / 37.461.36 / 17.144.67 / 20.032.40 / 19.480.29 / 17.93
KM3D-(G) [20]ResNet3417.39 / 32.7130.48 / 43.2221.25 / 35.2034.93 / 45.8424.98 / 38.3014.49 / 29.4747.47 / 56.7912.61 / 28.44
KM3D-(GG) [20]ResNet3423.70 / 37.9031.37 / 44.0419.99 / 34.6137.65 / 48.3426.38 / 39.5816.58 / 30.8254.03 / 62.4612.81 / 28.46
+ +Table 3. Performance of KM3D with different ground plane formats on the Rope3D Dataset under two train-val splitting settings: the homologous (II) and the heterologous (III). - $(G)$ denotes adapting the ground plane equation, - $(GG)$ means using the gridded ground planes. IoU = 0.25 for non-motor vehicles and pedestrian, IoU = 0.5 for motor vehicles. + +
MethodRange (m)\(AP_{3D|R40}/Rope_{score}\)
CarBig VehicleCyclistPedestrian
MonoDLE-(G)all19.08 / 33.7219.76 / 33.0710.93 / 26.443.72 / 21.42
0-3031.43 / 43.1237.36 / 46.6919.83 / 33.2810.26 / 26.61
30-6010.42 / 26.688.68 / 24.028.11 / 24.233.90 / 21.66
60-9018.60 / 33.4232.46 / 44.159.29 / 25.232.37 / 20.28
90-12011.84 / 28.0510.29 / 26.099.84 / 25.112.88 / 20.58
MonoFlex-(G)all32.01 / 44.3713.86 / 28.4744.27 / 53.5825.48 / 39.04
0-3015.49 / 30.4927.68 / 39.1661.94 / 67.3737.25 / 48.50
30-6045.69 / 55.3312.18 / 27.4850.70 / 58.7835.74 / 47.37
60-9046.72 / 56.4119.34 / 33.4530.65 / 42.828.94 / 25.65
90-12014.19 / 30.151.30 / 18.829.43 / 25.204.79 / 22.35
M3D-RPN-(D)all36.33 / 48.1624.39 / 37.8111.22 / 27.543.93 / 21.54
0-3052.07 / 60.6024.07 / 37.1816.77 / 31.805.19 / 22.53
30-6033.57 / 46.3025.22 / 38.8414.38 / 30.368.09 / 24.99
60-9024.07 / 38.6039.17 / 50.425.80 / 23.021.10 / 19.16
90-12011.19 / 28.236.55 / 24.064.23 / 21.480.13 / 18.02
+ +Table 4. The performance within different ranges on the heterologous (III) set. We set IoU = 0.5 for Car / Big Vehicle and IoU = 0.25 for Cyclist and Pedestrian, following KITTI's hard-modality. + +90-120 meters. The reason is owing to two aspects: too small area in the image to extract strong features for learning and much less 3D annotations in far-away regions due to occlusion. MonoFlex- $(G)$ shows better performance on cyclists and pedestrians whereas inferior in motor vehicles. + +# 6. Conclusion + +We propose the first high-diversity challenging roadside monocular 3D perception dataset - Rope3D. Rope3D is collected from the roadside view with joint 2D-3D annotations, making it unique from any previously released datasets and is particularly designed for the roadside 3D perception. Furthermore, we specially tailor the existing monocular 3D object detection approaches to the novel dataset, due to its unique viewpoint and inherent ambiguity lying in the various camera specifications and diverse road scenes. We hope to raise the attention to the special view - roadside view, so as to facilitate a safer and more intelligent autonomous driving system. + +Ethical concerns and Limitation. To prevent from being utilized for illegal surveillance, all the images in the dataset are time-discrete and not allowed for tracking tasks. Note that all the sensitive information including license plates, human faces, names of bus stops, roads, and buildings are totally masked. The attempts for adapting the concurrent vehicle-view 3D detection approaches need further study. + +# References + +[1] Yousef Atoum, Joseph Roth, Michael Bliss, Wende Zhang, and Xiaoming Liu. Monocular video-based trailer coupler detection using multiplexer convolutional neural network. In ICCV, 2017. 3 +[2] Apratim Bhattacharyya, Daniel Olmeda Reino, Mario Fritz, and Bernt Schiele. Euro-pvi: Pedestrian vehicle interactions in dense urban centers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6408-6417, 2021. 2 +[3] Garrick Brazil and Xiaoming Liu. M3d-rpn: Monocular 3d region proposal network for object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 9287-9296, 2019. 3, 7, 8 +[4] Garrick Brazil, Gerard Pons-Moll, Xiaoming Liu, and Bernt Schiele. Kinematic 3d object detection in monocular video. In European Conference on Computer Vision, pages 135-152. Springer, 2020. 3, 7, 8 +[5] 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 Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 11621-11631, 2020. 2, 3, 4, 6 +[6] Juan Carrillo and Steven Waslander. Urbannet: Leveraging urban maps for long range 3d object detection. In 2021 IEEE International Intelligent Transportation Systems Conference (ITSC), pages 3799-3806. IEEE, 2021. 3 +[7] Ming-Fang Chang, John W Lambert, Patsorn Sangkloy, Jagjeet Singh, Slawomir Bak, Andrew Hartnett, De Wang, Peter Carr, Simon Lucey, Deva Ramanan, and James Hays. Argov-verse: 3d tracking and forecasting with rich maps. In CVPR, 2019. 2, 3 +[8] Qi Chen, Sihai Tang, Qing Yang, and Song Fu. Cooper: Cooperative perception for connected autonomous vehicles based on 3d point clouds. In 2019 IEEE 39th International Conference on Distributed Computing Systems (ICDCS), pages 514-524. IEEE, 2019. 2 +[9] Xiaozhi Chen, Kaustav Kundu, Ziyu Zhang, Huimin Ma, Sanja Fidler, and Raquel Urtasun. Monocular 3d object detection for autonomous driving. In CVPR, 2016. 3 +[10] Yukyung Choi, Namil Kim, Soonmin Hwang, Kibaek Park, Jae Shin Yoon, Kyounghwan An, and In So Kweon. Kaist multi-spectral day/night data set for autonomous and assisted driving. IEEE Transactions on Intelligent Transportation Systems, 19(3):934-948, 2018. 2 +[11] Nils Gählert, Nicolas Jourdan, Marius Cordts, Uwe Franke, and Joachim Denzler. Cityscapes 3d: Dataset and benchmark for 9 dof vehicle detection. arXiv preprint arXiv:2006.07864, 2020. 2, 3 +[12] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In 2012 IEEE conference on computer vision and pattern recognition, pages 3354-3361. IEEE, 2012. 2, 3, 4, 6 +[13] Jakob Geyer, Yohannes Kassahun, Mentar Mahmudi, Xavier Ricou, Rupesh Durgesh, Andrew S Chung, Lorenz + +Hauswald, Viet Hoang Pham, Maximilian Muhlegg, Sebastian Dorn, et al. A2d2: Audi autonomous driving dataset. arXiv preprint arXiv:2004.06320, 2020. 3 +[14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 7 +[15] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4700-4708, 2017. 7 +[16] Xinyu Huang, Peng Wang, Xinjing Cheng, Dingfu Zhou, Qichuan Geng, and Ruigang Yang. The apolloscope open dataset for autonomous driving and its application. IEEE transactions on pattern analysis and machine intelligence, 42(10):2702-2719, 2019. 2, 3 +[17] R. Kesten, M. Usman, J. Houston, T. Pandya, K. Nadhamuni, A. Ferreira, M. Yuan, B. Low, A. Jain, P. Ondruska, S. Omari, S. Shah, A. Kulkarni, A. Kazakova, C. Tao, L. Platinsky, W. Jiang, and V. Shet. Lyft level 5 av dataset 2019. 2019. 2, 3 +[18] Jason Ku, Alex D Pon, and Steven L Waslander. Monocular 3d object detection leveraging accurate proposals and shape reconstruction. In CVPR, 2019. 3 +[19] Buyu Li, Wanli Ouyang, Lu Sheng, Xingyu Zeng, and Xiaogang Wang. Gs3d: An efficient 3d object detection framework for autonomous driving. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1019-1028, 2019. 3 +[20] Peixuan Li and Huaici Zhao. Monocular 3d detection with geometric constraint embedding and semi-supervised training. IEEE Robotics and Automation Letters, 6(3):5565-5572, 2021. 3, 7, 8 +[21] Peixuan Li, Huaici Zhao, Pengfei Liu, and Feidao Cao. Rtm3d: Real-time monocular 3d detection from object keypoints for autonomous driving. arXiv preprint arXiv:2001.03343, 2020. 3 +[22] Lijie Liu, Jiwen Lu, Chunjing Xu, Qi Tian, and Jie Zhou. Deep fitting degree scoring network for monocular 3d object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1057-1066, 2019. 3 +[23] Zechen Liu, Zizhang Wu, and Roland Toth. Smoke: Single-stage monocular 3d object detection via keypoint estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 996–997, 2020. 3 +[24] Xinzhu Ma, Zhihui Wang, Haojie Li, Pengbo Zhang, Wanli Ouyang, and Xin Fan. Accurate monocular 3d object detection via color-embedded 3d reconstruction for autonomous driving. In Proceedings of the IEEE International Conference on Computer Vision, pages 6851–6860, 2019. 3 +[25] Xinzhu Ma, Yinmin Zhang, Dan Xu, Dongzhan Zhou, Shuai Yi, Haojie Li, and Wanli Ouyang. Delving into localization errors for monocular 3d object detection. In CVPR, pages 4721-4730, 2021. 3, 7, 8 +[26] Yuexin Ma, Xinge Zhu, Sibo Zhang, Ruigang Yang, Wenping Wang, and Dinesh Manocha. Trafficpredict: Trajectory + +prediction for heterogeneous traffic-agents. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 6120-6127, 2019. 2, 3 +[27] Jiageng Mao, Minzhe Niu, Chenhan Jiang, Xiaodan Liang, Yamin Li, Chaoqiang Ye, Wei Zhang, Zhenguo Li, Jie Yu, Chunjing Xu, et al. One million scenes for autonomous driving: Once dataset. 2021. 3, 7 +[28] Arsalan Mousavian, Dragomir Anguelov, John Flynn, and Jana Kosecka. 3d bounding box estimation using deep learning and geometry. In CVPR, pages 7074-7082, 2017. 3 +[29] Milind Naphade, Zheng Tang, Ming-Ching Chang, David C Anastasiu, Anuj Sharma, Rama Chellappa, Shuo Wang, Pranamesh Chakraborty, Tingting Huang, Jenq-Neng Hwang, et al. The 2019 ai city challenge. In CVPR Workshops, volume 8, 2019. 2 +[30] Milind Naphade, Shuo Wang, David C Anastasiu, Zheng Tang, Ming-Ching Chang, Xiaodong Yang, Yue Yao, Liang Zheng, Pranamesh Chakraborty, Christian E Lopez, et al. The 5th ai city challenge. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4263-4273, 2021. 2 +[31] Abhishek Patil, Srikanth Malla, Haiming Gang, and Yi-Ting Chen. The h3d dataset for full-surround 3d multi-object detection and tracking in crowded urban scenes. In ICRA, pages 9552-9557. IEEE, 2019. 2, 3 +[32] Quang-Hieu Pham, Pierre Sevestre, Ramanpreet Singh Pahwa, Huijing Zhan, Chun Ho Pang, Yuda Chen, Armin Mustafa, Vijay Chandrasekhar, and Jie Lin. A* 3d dataset: Towards autonomous driving in challenging environments. In ICRA, pages 2267-2273. IEEE, 2020. 2, 3, 4 +[33] Zengyi Qin, Jinglu Wang, and Yan Lu. Monogrnet: A geometric reasoning network for monocular 3d object localization. In AAAI, 2019. 3 +[34] Andreas Rauch, Felix Klanner, Ralph Rasshofer, and Klaus Dietmayer. Car2x-based perception in a high-level fusion architecture for cooperative perception systems. In 2012 IEEE Intelligent Vehicles Symposium, pages 270-275. IEEE, 2012. 2 +[35] Andrea Simonelli, Samuel Rota Bulo, Lorenzo Porzi, Manuel López-Antequera, and Peter Kontschieder. Disentangling monocular 3d object detection. In ICCV, pages 1991-1999, 2019. 6 +[36] Jakub Sochor, Jakub Špânhel, and Adam Herout. Boxcars: Improving fine-grained recognition of vehicles using 3-d bounding boxes in traffic surveillance. IEEE transactions on intelligent transportation systems, 20(1):97-108, 2018. 2, 3 +[37] Xibin Song, Peng Wang, Dingfu Zhou, Rui Zhu, Chenye Guan, Yuchao Dai, Hao Su, Hongdong Li, and Ruigang Yang. Apollocar3d: A large 3d car instance understanding benchmark for autonomous driving. In CVPR, pages 5452-5462, 2019. 2 +[38] 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. 2, 3, 6 + +[39] Xiao Tan, Zhigang Wang, Minyue Jiang, Xipeng Yang, Jian Wang, Yuan Gao, Xiangbo Su, Xiaqing Ye, Yuchen Yuan, Dongliang He, et al. Multi-camera vehicle tracking and re-identification based on visual and spatial-temporal features. In CVPR Workshops, pages 275–284, 2019. 2 +[40] Tai Wang, Xinge Zhu, Jiangmiao Pang, and Dahua Lin. Fcos3d: Fully convolutional one-stage monocular 3d object detection. arXiv preprint arXiv:2104.10956, 2021. 3 +[41] Tsun-Hsuan Wang, Sivabalan Manivasagam, Ming Liang, Bin Yang, Wenyuan Zeng, and Raquel Urtasun. V2vnet: Vehicle-to-vehicle communication for joint perception and prediction. In European Conference on Computer Vision, pages 605–621. Springer, 2020. 2 +[42] Yan Wang, Wei-Lun Chao, Divyansh Garg, Bharath Hariharan, Mark Campbell, and Kilian Q Weinberger. Pseudo-lidar from visual depth estimation: Bridging the gap in 3d object detection for autonomous driving. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8445-8453, 2019. 3 +[43] Xinshuo Weng and Kris Kitani. Monocular 3d object detection with pseudo-lidar point cloud. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 0–0, 2019. 3 +[44] Yu Xiang, Roozbeh Mottaghi, and Silvio Savarese. Beyond Pascal: A benchmark for 3d object detection in the wild. In IEEE winter conference on applications of computer vision, pages 75-82. IEEE, 2014. 2 +[45] Bin Xu and Zhenzhong Chen. Multi-level fusion based 3d object detection from monocular images. In CVPR, 2018. 3 +[46] Xiaoqing Ye, Liang Du, Yifeng Shi, Yingying Li, Xiao Tan, Jianfeng Feng, Errui Ding, and Shilei Wen. Monocular 3d object detection via feature domain adaptation. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part IX 16, pages 17-34. Springer, 2020. 3 +[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. arXiv preprint arXiv:1906.06310, 2019. 3 +[48] Fisher Yu, Dequan Wang, Evan Shelhamer, and Trevor Darrell. Deep layer aggregation. In CVPR, pages 2403-2412, 2018. 7 +[49] Haibao Yu, Yizhen Luo, Mao Shu, Yiyi Huo, Zebang Yang, Yifeng Shi, Zhenglong Guo, Hanyu Li, Xing Hu, Jirui Yuan, and Zaiqing Nie. Dair-v2x: A large-scale dataset for vehicle-infrastructure cooperative 3d object detection. In IEEE/CVF Conf. on Computer Vision and Pattern Recognition (CVPR), June 2022. 2 +[50] Yunpeng Zhang, Jiwen Lu, and Jie Zhou. Objects are different: Flexible monocular 3d object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3289-3298, 2021. 3, 7, 8 +[51] Xingyi Zhou, Dequan Wang, and Philipp Krahenbuhl. Objects as points. arXiv preprint arXiv:1904.07850, 2019. 7 \ No newline at end of file diff --git a/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/images.zip b/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6eff5617bb1d0a30571d3ca5b392f8672e3f2762 --- /dev/null +++ b/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef1eca67e6fab4cde68fad76a9d2ec6b6afc27f7151b1d9de46f669ef587b944 +size 805072 diff --git a/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/layout.json b/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ab2cb6542911075b3c0e45cddff54afd1659065f --- /dev/null +++ b/rope3dtheroadsideperceptiondatasetforautonomousdrivingandmonocular3dobjectdetectiontask/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce7d058bcbc08bd05984b7cabf42bc810ffe3431d3a60a1dcd4681901ddec7e2 +size 382785 diff --git a/rotationallyequivariant3dobjectdetection/539f2a4a-88a8-4a12-ae26-f39b6dae3964_content_list.json b/rotationallyequivariant3dobjectdetection/539f2a4a-88a8-4a12-ae26-f39b6dae3964_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b6a6409c94ca54c0f2cbac69fdf311ea412f8adc --- /dev/null +++ b/rotationallyequivariant3dobjectdetection/539f2a4a-88a8-4a12-ae26-f39b6dae3964_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e2ca2ec574686b98067faabb60b50acf1d4fac80588bd8a57316a951ed85d30 +size 67456 diff --git a/rotationallyequivariant3dobjectdetection/539f2a4a-88a8-4a12-ae26-f39b6dae3964_model.json b/rotationallyequivariant3dobjectdetection/539f2a4a-88a8-4a12-ae26-f39b6dae3964_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c5cab9b635530236ba4184b474b20ce7140eb183 --- /dev/null +++ b/rotationallyequivariant3dobjectdetection/539f2a4a-88a8-4a12-ae26-f39b6dae3964_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f85c5b374ea99a4ee0711f0c66c8b9ee61eb98318b501d95990a0ac09d1073b5 +size 80400 diff --git a/rotationallyequivariant3dobjectdetection/539f2a4a-88a8-4a12-ae26-f39b6dae3964_origin.pdf b/rotationallyequivariant3dobjectdetection/539f2a4a-88a8-4a12-ae26-f39b6dae3964_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b341943e561f423ea0852d08e43fdbc0c84a0515 --- /dev/null +++ b/rotationallyequivariant3dobjectdetection/539f2a4a-88a8-4a12-ae26-f39b6dae3964_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e86e9c11140afb29f1a589d9f88e8fe516ec2a26b197d12c48f8a99264b09408 +size 2592201 diff --git a/rotationallyequivariant3dobjectdetection/full.md b/rotationallyequivariant3dobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b674017b99122a5853b1116f9d0c7ea5da3825d5 --- /dev/null +++ b/rotationallyequivariant3dobjectdetection/full.md @@ -0,0 +1,250 @@ +# Rotationally Equivariant 3D Object Detection + +Hong-Xing Yu +Stanford University + +Jiajun Wu +Stanford University + +Li Yi Tsinghua University, Shanghai Qi Zhi Institute + +# Abstract + +Rotation equivariance has recently become a strongly desired property in the 3D deep learning community. Yet most existing methods focus on equivariance regarding a global input rotation while ignoring the fact that rotation symmetry has its own spatial support. Specifically, we consider the object detection problem in 3D scenes, where an object bounding box should be equivariant regarding the object pose, independent of the scene motion. This suggests a new desired property we call object-level rotation equivariance. To incorporate object-level rotation equivariance into 3D object detectors, we need a mechanism to extract equivariant features with local object-level spatial support while being able to model cross-object context information. To this end, we propose Equivariant Object detection Network (EON) with a rotation equivariance suspension design to achieve object-level equivariance. EON can be applied to modern point cloud object detectors, such as VoteNet and PointR-CNN, enabling them to exploit object rotation symmetry in scene-scale inputs. Our experiments on both indoor scene and autonomous driving datasets show that significant improvements are obtained by plugging our EON design into existing state-of-the-art 3D object detectors. Project website: https://kovenyu.com/EON/. + +# 1. Introduction + +3D object detection is a fundamental problem in various downstream applications including augmented reality, robotics, and autonomous driving. Research efforts in designing 3D object detection networks have shown great effectiveness for both indoor [17, 27] and outdoor scenes [21, 29]. However, existing 3D object detectors cannot explicitly treat object rotation equivariance in their designs. Object rotation equivariance in 3D detection is well-reflected in the rotation invariance of shape and equivariance of orientation. For example, no matter how an object is oriented in an input scene, the detection result (typically represented as an oriented bounding box) associated with the object should orient in the same way while retaining the same shape. Explicit + +![](images/e7c3b09269d23eed7c38faaadfdbbcc53ff235e781de28cac0a84a61902f43d9.jpg) +Figure 1. Rotation symmetry in object detection includes the equivariant orientation and invariant shape of the bounding box. The object-level rotation equivariant detector explicitly models these strong priors and intrinsically generates oriented bounding box to rotate following the object, while maintaining the same box shape. Non-equivariant detectors, however, may suffer from box shape changes and unaligned variations in box orientation. + +![](images/18fadadbcbce7bf581cfb4873e64493b360c29e5ad4c2eba8c4847b8a97e9011.jpg) + +![](images/6a21d50ad4fcb34797d9a1fe812cc6966c805f08e8f471cf412b6219b8336e39.jpg) + +modeling of these strong priors save the needs for expensive data augmentations, and can increase the expressivity and discriminative power of detection models without heavily increasing the number of parameters and introducing additional optimization challenges. + +A recent trend to explicitly exploit rotation equivariance is through equivariant networks [4, 25, 26] (EN). The main idea is that the equivariant geometric features carry both shape information and orientation information separately by design. Rotation equivariant networks have been explored for object classification and pose estimation [2, 7, 13], but not yet for 3D object detection. A main challenge is that existing EN mostly explores rotation equivariance regarding the full visual input, while equivariance to rotations of a whole scene is not ideal for object detection, because individual object orientation can be independent of the scene. Thus, it is unclear how to achieve object-level rotation equivariance and how to benefit 3D object detection in cluttered scenes. + +We identify two key technical challenges toward object-level equivariant model design: how to determine the object-level spatial support to extract locally equivariant features, and how to aggregate context information. The greater con + +text (such as nearby objects) is helpful to recognize objects especially in noisy or incomplete raw point clouds. However, the context information could easily break object-level rotation equivariance if not handled properly. For example, when detecting a chair, the presence of a nearby desk can provide useful context due to high co-occurrence probability. However, in case that the chair remains static while the desk changes its orientation, the chair features could also be affected unexpectedly. + +We propose Equivariant Object detection Network (EON) to exploit object-level equivariance for 3D detection. Our core design is called rotation equivariance suspension. To properly determine the object-level spatial support, we let our model extract equivariant features only up to an intermediate stage. This is based upon the observation that most 3D detection networks extract features in a hierarchical manner [14, 17, 21] where early stages focus on local features while later stages cover more context-level information. Computing equivariant features only up to an intermediate stage produces local spatial support to rotation equivariance, and the model can adaptively learn to adjust its effective spatial support [15]. To allow aggregating context information, we suspend equivariant feature computation at the previous intermediate stage by decomposing each equivariant feature into an object orientation hypothesis (orientation information) and an invariant object-frame feature (shape information). Our model keeps aggregating object-frame features in the latter stages, and finally resumes the orientation information for object proposals. Since only object-frame features (i.e., without object orientation information) are aggregated after the intermediate stage, the greater contexts can be modeled without breaking object-level equivariance. + +Our approach follows the modular design adopted by most bottom-up detectors, so that it can be easily plugged into state-of-the-art 3D object detectors. We have tested our method using various backbones and models on both indoor and outdoor 3D object detection benchmarks. We find that EON significantly boosts the performance of previous state-of-the-art 3D object detectors $(+9.0\mathrm{mAP}$ on ScanNetV2, $+3.1\mathrm{mAP}$ on SUN RGB-D, and $+1.4\mathrm{mAP}$ on KITTI Dataset). In summary, our contributions are threefold: + +- To our best knowledge, this is the first work to explore rotation equivariance for 3D object detection. +- We propose Equivariant Object detection Network (EON), incorporating a novel design dubbed rotation equivariance suspension to exploit object-level equivariance in 3D detection. Our EON can be easily plugged into state-of-the-art bottom-up 3D object detectors. +- On both indoor and outdoor datasets, we demonstrate the benefits of object-level equivariance by boosting performances of previous state-of-the-art 3D detectors. + +# 2. Related Work + +3D object detection. Most current state-of-the-art approaches to 3D object detection directly takes 3D data (such as point cloud, Lidar, and voxelized grids from them) as input and generates 3D oriented bounding boxes (OBBs) to represent the objects [11, 16, 17, 20-22, 29-32]. Most of them follow a bottom-up design, where a backbone network extracts a sparse set of regional features from the dense input data, and a detection head proposes candidate OBBs (one-stage) or regions of interests (two-stage) for further refinement. Seminal works include VoteNet [17] and its follow-ups. VoteNet's backbone design includes two PointNet++, with a voting in between to help the aggregation of object surface points. H3DNet [30] improves VoteNet predictions using 3D primitives and a geometric loss. MLCVNet [27] further allows VoteNet to aggregate global contextual information via self-attention. Another line of methods is directly inspired from 2D bottom-up detectors, such as PointRCNN [21], VoxelNet [31], PointPillar [11] and CenterPoint [29]. However, these existing methods do not explicitly exploit object rotation equivariance in their models. Our method is grounded on this popular bottom-up modular design, and we focus on equipping these state-of-the-art detection models with object-level equivariance. + +Rotation equivariance networks. From the seminal work of Group Equivariant Convolutional Network [4], leveraging group equivariance for deep networks becomes increasingly popular. Existing approaches toward rotation equivariance can be roughly divided into two categories: filter orbit-based and filter design-based. Deriving from the group equivariant convolution [3,4], filter orbit-based methods discretize the rotation group and construct a set of group-transformed kernels (an "orbit") for the group equivariant computation [2, 12, 13]. Filter design-based methods design intrinsically rotation-equivariant basis functions (e.g., generalized Fourier basis functions [5, 25]) and compose their networks with these basis functions [5, 7, 8, 25]. Our method is inspired from the filter orbit-based Equivariant Point Network [2] (EPN) which introduces a tractable approximation to SE(3) group equivariant convolution on point clouds. However, EPN focuses on single object tasks and achieves equivariance regarding the full visual content. We target object-level equivariance for 3D detection in scenes. Recently, there are a few works attempting to leverage rotation equivariance for aerial image detection [10, 28]. While they focus on 2D images, we aim at 3D object-level equivariant detection. + +# 3. Preliminary + +To compute rotation equivariant features, our approach finds inspiration from a recent state-of-the-art equivariant network, Equivariant Point Network (EPN) [2], that is designed for single objects. We briefly review EPN and provide + +an intuitive explanation for the equivariance property. + +The key idea of EPN to achieve rotation equivariance is to augment each point feature vector $\mathbf{f} \in \mathbb{R}^C$ to an equivariant feature $\mathbf{f}_{\mathrm{eqv}} \in \mathbb{R}^{C \times |G|}$ w.r.t. a discretized SO(3) subgroup $G$ . Each vector element in the equivariant feature, $\mathbf{f}_{\mathrm{eqv}}(g) \in \mathbb{R}^C$ , is computed via rotating $\mathbf{f}$ by $g^{-1} \in G$ before passing it into a computational layer. One can verify that this rotate-and-compute operation indeed generates $\mathbf{f}_{\mathrm{eqv}}$ that is equivariant to any $g \in G$ . Intuitively this means that, if an input is rotated by some $g_0 \in G$ , its equivariant feature $\mathbf{f}_{\mathrm{eqv}}$ will undergo a circular shift without changing any values, becoming $\mathbf{f}_{\mathrm{eqv}}'$ such that $\mathbf{f}_{\mathrm{eqv}}'(g') = \mathbf{f}_{\mathrm{eqv}}(g)$ , where $g'$ and $g$ satisfy $g' = g_0 \circ g$ . In other words, rotating the input $x \in \mathbb{R}^3$ by $g_0$ leads to a "rotation" by $g_0$ defined on the equivariant feature (in this case, the "rotation" is defined as shifting). For formal expressions and rigorous derivations, we refer readers to Chen et al. [2].* + +Such equivariance network extracts very expressive equivariant features regarding input rotations. However, since the equivariance design is regarding the entire input point cloud without spatial scale concepts, EPN is not able to handle object-level equivariance when consuming a 3D scene. + +Inspired by EPN, we achieve rotation equivariance via this feature augmenting strategy (sometimes referred to as feature orbits or filter orbits). Yet in contrast to EPN, our method allows learning object-level equivariant features in full scene-scale inputs for detection. + +# 4. Equivariant Object detection Network + +Our goal is to explicitly leverage object rotation equivariance in 3D detectors, to increase the network expressivity and discriminative power. We target at a modular design that allows us to directly equip state-of-the-art 3D detection models with object-level rotation equivariance. + +We ground our method on popular bottom-up detector designs, which have been adopted by many state-of-the-art point cloud object detectors, such as VoteNet [17], PointPillar [11], PointRCNN [21] and CenterPoint [29]. These methods generally include three modules: seed feature extraction in which a backbone processes point clouds into a dense set of features, region context aggregation that summarizes spatial regions (such as vote clustering [17], map-view convolution [11, 29], and RoI pooling [21]) to produce a sparse set of features, and OBB (oriented bounding box) generation that proposes candidates from each regional feature. We show an illustration on the top of Figure 2. We adapt these modules for object-level equivariance. + +There are two key challenges in our designs. The first is how to determine a proper local spatial support for equivariant feature computation so that the rotation equivariance is restricted to the object level. The second is how to aggregate contexts without breaking object-level equivariance. We propose Equivariant Object detection Network (EON), which incorporates our rotation equivariance suspension mechanism to address both challenges. We show an illustration of EON in the bottom of Figure 2. + +# 4.1. Overview + +Our main idea is that we let our model compute equivariant features up to an intermediate stage that is expected to be associated with object-level features. After this intermediate stage, we aggregate context geometric information only, as context orientations can break object-level rotation equivariance. To do this, we decompose an equivariant feature into an orientation hypothesis and an invariant feature in the object frame. The following context aggregation will only happen on the invariant geometric features (i.e., equivariance "suspension"). Then, we generate OBB proposals from the aggregated invariant features, so the OBB proposals are also represented in the local object frame instead of the global scene frame. Finally, we rotate the object-frame proposals back to scene-frame OBBs using the object feature orientation (i.e., "resuming" the object orientation). See the bottom of Figure 2 for illustration. + +One can conceptually verify the object-level equivariance in an ideal case. When an object rotates in a static scene, the associated object-level feature orientation changes in the same way, while the object-frame feature remains unchanged. Therefore, the object-frame OBB proposals are invariant to the rotation, and hence the scene-frame OBBs do not change their shapes while rotating equivariantly with the objects. Notice that such equivariant design not only facilitates the equivariant detection outcomes, but more importantly allows learning better geometric object features [2, 4, 7]. We ground our idea onto the bottom-up detector design (Figure 2). + +Seed feature extraction. EON extracts equivariant seed features and suspends equivariance before the region aggregation stage where large-scale context information gets exchanged. Since this suspension happens in an intermediate stage, the deep detection network can adaptively adjust the effective spatial support [15]. + +Region context aggregation. To model contexts, EON decomposes each equivariant seed feature by predicting an orientation and extracting an object-frame seed feature. Ideally, object-frame seed features should be invariant to object poses and provide only geometric information for context aggregation. Therefore, only object-frame seed features are fed into the region aggregation module to capture useful context information such as co-occurrences of objects. + +OBB generation. Finally, the object-level equivariant OBB + +![](images/2a69b7cb6970e49764a4c480a2d7ae1730fdcbe7288d4bd3b28af848c15168ca.jpg) +Figure 2. Overview of our technical approach. Top: We ground our method on popular bottom-up detector designs, including three modules (i.e., seed feature extraction, region aggregation, and OBB generation). Bottom: (Equivariant seed feature extraction) In our modular design, we maintain equivariance computation up to seed features which are expected to capture object-level information. (Decomposed region context aggregation) To maintain object-level equivariance, we decompose equivariant seed features into orientation hypotheses and object-frame invariant features. We aggregate the invariant geometric features, but not orientations (they are "suspended"). (Equivariant OBB generation) We generate object-frame OBBs from the region features and resume their orientation hypotheses to rotate them back to the scene frame. + +generation module resumes the orientation information. It generates proposals in the object frame and transforms the proposals back to the scene frame using the predicted orientations. In the following, we describe EON's three modules in detail and how to plug them into modern 3D detectors. + +# 4.2. Equivariant seed feature extraction + +EON extracts equivariant seed features and expects them to capture object-level information. In the following we focus on a single point output of a single layer, in order to make the symbols concise. Extending them to full point clouds and to entire networks is straightforward. + +Given a layer $\psi : \mathbb{R}^{N \times C'} \to \mathbb{R}^C$ that maps some input point features $X \in \mathbb{R}^{N \times C'}$ to a point feature $\mathbf{f} \in \mathbb{R}^C$ (such as a KPCov [24] or a PointNet [18]), its equivariant computation to map $X_{\mathrm{eqv}} \in \mathbb{R}^{N \times C' \times |G|}$ to $\mathbf{f}_{\mathrm{eqv}} = \psi(X_{\mathrm{eqv}}) \in \mathbb{R}^{C \times |G|}$ is defined by: + +$$ +\mathbf {f} _ {\mathrm {e q v}} (g) = \psi \left(X _ {\mathrm {e q v}} (g)\right) \in \mathbb {R} ^ {C}, g \in G, \tag {1} +$$ + +where $G$ is a discrete subgroup of $\mathrm{SO}(3)$ . For example, if one only considers rotation along a single axis, i.e., $\mathrm{SO}(2)$ , a discretization can be $\{0,\pi /2,\pi ,3\pi /2\}$ . And $X_{\mathrm{eqv}}\in \mathbb{R}^{N\times C^{\prime}\times |G|}$ denotes the input equivariant features + +and the number of input points $N$ can vary. For the first layer where the input $X \in \mathbb{R}^{N \times C'}$ is non-equivariant points, we pre-augment it to $X_{\mathrm{eqv}}$ such that $X_{\mathrm{eqv}}(g) = T_g^{-1}[X]$ , with $T_g^{-1}$ denoting the inverse rotation of $g$ . We follow EPN [2] to attach a 1D convolution over the $|G|$ channel for each layer $\psi$ to further increase expressivity. Our formulation allows a drop-in replacement for most detection backbones. This equivariant computation is performed for the backbone seed feature extraction network. + +Objectness-aware equivariant feature decomposition. We expect the equivariant seed feature extraction module to capture object-level geometric features. Thus, we suspend equivariant feature computation after this module and let the deep network to adaptively learn a proper effective receptive field [15]. To suspend equivariance, we decompose each equivariant feature $\mathbf{f}_{\mathrm{eqv}}$ into an invariant feature represented in an object frame $\mathbf{f}_{\mathrm{inv}}$ , as well as the orientation $\tilde{g}$ of the object frame w.r.t. the scene frame. However, although object frame and orientation are well defined for foreground objects, these concepts do not hold for background stuff such as wall and road. Thus, we propose objectness-aware feature orbit decomposition which distinguishes between foreground and background points. + +Specifically, we define foreground points as those inside + +an OBB, and all other points as background points. To predict the objectness for a seed point, we may jointly train a segmentation head attached to the seed features. Then, our objectness-aware feature decomposition produces object-frame features as: + +$$ +\mathbf {f} _ {\mathrm {i n v}} = \left\{ \begin{array}{l l} \mathbf {f} _ {\mathrm {e q v}} (\tilde {g}) \in \mathbb {R} ^ {C}, & \text {i f i t i s f o r g r o u n d} \\ \operatorname {m a x p o o l} \left(\left\{\mathbf {f} _ {\mathrm {e q v}} (g) \right\} _ {g \in G}\right) \in \mathbb {R} ^ {C}, & \text {o t h e r w i s e} \end{array} \right. \tag {2} +$$ + +where $\tilde{g}$ denotes a predicted orientation given by an orientation classification head $H$ , $\tilde{g} = \arg \max_{g} H(\mathbf{f}_{\mathrm{eq}}(g))$ , and maxpool denotes max pooling over all $g \in G$ . Notice we abuse the term "object-frame seed feature" to also cover background points. The prediction head $H$ is jointly trained using a softmax classification loss. We generate the ground-truth orientation label by discretizing the orientation angle of each ground-truth OBB into $|G|$ bins, and then assigning the bin labels to all points inside the OBB. For background points, the orientations are undefined, and we ignore them in the rest of a forward pass. + +# 4.3. Decomposed region context aggregation + +In state-of-the-art 3D detectors, the context aggregation module summarizes features within a large spatial volume, allowing the following OBB generation to extract useful contextual information. Examples include the vote clustering in VoteNet [17], RoI pooling in PointRCNN [21], and Mapview convolution in CenterPoint [29] and PointPillar [11]. + +In our region context aggregation module, we aim to not only aggregate contextual geometric information, but also maintain object-level equivariance. Thus, we have two technical goals. The first goal is to aggregate invariant seed features for a sparse set of regions. We use the original region aggregation module from the detector. For every region, it takes as input the seed features inside the region, and outputs an object-frame invariant region feature. + +The second goal is to retain the orientation of an object-of-interest for the region, and filter out context orientations. Ideally, the object-of-interest in a region is defined according to the proposal label assigned to the central point of the region, such as the target assignment methods used in PointRCNN [21] and CenterPoint [29]. In this case, the output object-of-interest orientation $\tilde{h}$ is simply the prediction $\tilde{g}$ at the central point of the region. + +However, for detectors that use IoU threshold-based target assignment, the object-of-interest for a region is not naturally defined, because the proposals from a region are dynamically associated with nearby ground-truth OBBs. In this case, we take the mode orientation in the region. The idea is that if most foreground points in the region are from the same object, it is likely that the proposals are also mostly for that object. Thus we can capture its orientation by a mode + +selection. For regions that do not have a significant mode, the proposals are likely to be low-quality and get filtered out, or simply not be associated to any targets. Thus, they would yield little negative effects on the outcomes. + +# 4.4. Equivariant OBB generation + +Given an object-frame region feature and its orientation, our object-level equivariant OBB generation module yields OBBs in the scene frame. This is divided into two steps. First, we generate OBBs in the object frame by using the original module. Then, we transform the OBBs back to the scene frame using the region orientation. Specifically, given the center (or corner points) $c_{\mathrm{inv}} \in \mathbb{R}^3$ and the orientation $\theta_{\mathrm{inv}}$ of an object-frame OBB, we transform the box to scene frame by replacing the orientation with $\theta = \theta_{\mathrm{inv}} - \tilde{h}$ and replacing the center with $c = R^{-1}c_{\mathrm{inv}}$ where $R$ is the rotation matrix for $\tilde{h}$ . + +# 5. Experiments + +In this section we apply our EON design to modern detection models with various backbones and we show experimental results on several indoor and outdoor benchmarks. + +# 5.1. Experiment setup + +Datasets. We adopt ScanNetV2 dataset [6] and SUN RGB-D dataset [23] for indoor 3D detection. ScanNetV2 provides 1513 indoor scans with semantic segmentation labels. For benchmarking oriented object detection, we use the detection labels from Scan2CAD [1] which provides CAD models with oriented bounding boxes aligned with common objects in the scans. We report performances on 9 categories which have more than 200 instances and put all others into the "Others" class. SUN RGB-D dataset has around 5K RGB-D images annotated with amodal oriented boxes for 37 object classes. We follow the same setup as VoteNet [17] and report performances on 10 classes for SUN RGB-D. For outdoor 3D detection, we use KITTI [9] for evaluation, which contains 7481 training samples and 7518 testing samples. We follow the original evaluation protocol in KITTI. + +Implementation details. We implement our EON design for three 3D detectors including VoteNet [17] and a transformer-based state-of-the-art method from Liu et.al. [14] for indoor scenes, and PointRCNN [21] for outdoor scenes. We plug in our proposed modules to replace their original modules, and denote the resultant models as EON-VoteNet, EON-Liu et.al., and EON-PointRCNN. As for the seed feature extraction module, all three methods originally use PointNet++ [19] as their backbones. To demonstrate the applicability of our EON to different backbones, we use KPConv [24] as the backbone for VoteNet. We show the KPConv backbone architecture in the supplement. Then we replace the original seed feature extraction modules as described in Sec. 4.2. To + +predict orientation for each equivariant seed feature, we use a two-layer MLP for the head $H_{o}$ . Since most objects are subject to gravity constraints, we only consider one degree of freedom (i.e., yaw) in the rotation group. We discretize it into 4 bins for classification. To predict the foreground segmentation, we use another two-layer MLP head for binary classification. + +The region aggregation module of VoteNet consists of a voting stage which generates a spatial translation ("vote") for each seed point, a grouping stage using the updated spatial coordinates, and a summarization stage to generate region features. Since the grouping happens in the scene frame, we inversely rotate the vote to the scene frame for the grouping. The region orientation $\tilde{h}$ is determined by mode selection. PointRCNN's region aggregation module is an RoI pooling where the object-of-interest is well defined. Its orientation $\tilde{h}$ uses the seed point that generates the RoI. + +For all other settings such as the detection heads, input resolution, preprocessing, hyper-parameters and training configurations, we follow the implementations provided by the authors†. We also use the same settings for our EON for fair comparisons. + +# 5.2. Indoor datasets + +For 3D detection on indoor scenes, we compare our EONVoteNet to VoteNet on the ScanNetV2 and the SUN RGB-D datasets. + +ScanNetV2. For ScanNetV2 dataset, we show comparison results on validation set in Table 1. As we can see, EON outperforms the vanilla methods significantly, with a boost in mAP by $6.3\%$ for VoteNet and $9.0\%$ for the transformer-based Liu et.al. [14]. Notably, the performance gains are particularly significant for objects that are "thin" from the top view, such as display $(+13.0\% / +37.0\%)$ AP for VoteNet/Liu et.al.). We suppose a major reason be that for these objects, the accurate orientation prediction is crucial, and thus object-level equivariance design kicks in to help. Significant boost is also obtained for small objects like trash-bin $(+17.9\% / 7.4\%)$ AP), which might be due to more accurate vote orientations brought by object-level equivariance, leading to better pinning-down of small objects' center positions. + +SUN RGB-D. We also validate the effectiveness of our EON on SUN RGB-D dataset, in which the single-view derived point clouds are highly incomplete compared to the scans in ScanNetV2. SUN RGB-D is more difficult as the partial point clouds pose challenges not only on detection itself, but also on orientation estimation. We show comparison results on SUN RGB-D dataset in Table 2. We draw the same observation as on ScanNetV2 that our EON-VoteNet + +outperforms VoteNet on all categories, leading to a boost in mAP by $3.1\%$ , despite the difficulty in orientation prediction. Similarly, the performance gain is more significant for thin object categories such as bookshelf $(+8.9\%)$ AP and bathtub $(+10.2\%)$ AP). + +# 5.3. Outdoor dataset + +For outdoor scenes, we evaluate our EON on KITTI 3D object detection dataset by equipping PointRCNN with our module designs, denoted as EON-PointRCNN. We show the comparison on the KITTI validation set in Table 3. We observe that our EON-PointRCNN outperforms the vanilla model at all difficulty levels for Car and Pedestrian. The performance boost is most significant on the pedestrian category, where the AP gains are $3.02\%$ , $5.15\%$ , $2.90\%$ for Easy, Moderate, and Hard subsets, respectively. We conjecture that this might be because the object-level rotation equivariance is more useful when object orientations have a large variation, which is the case for indoor objects and pedestrians in outdoor scenes. Thus, our EON design has significant performance gains on indoor scenes and pedestrians on KITTI. As for cars and cyclists, they are mostly axis-aligned with less orientation variations. Thus, the performance gains are less significant. + +Notice that EON-PoinRCNN and EON-VoteNet adopt different backbone networks (PointNet++ and KPCov, respectively). The consistent improvements across indoor/outdoor scenes and different models validate the wide applicability of our EON as a modular design. + +# 5.4. Analysis + +To provide some insights on how our EON helps in 3D detection, we conduct several analysis experiments on ScanNetV2 dataset. We show further analysis on using category-level pose estimation, orientation discretization, suspension versus pooling, object rotation augmentation, and time and numbers of parameters in the supplementary material. + +Where to suspend equivariance suspension. Our core design in EON is suspending equivariance at the region aggregation stage to extract object-level equivariant features. We evaluate our design on VoteNet by suspending equivariance at earlier or latter stages, including suspending at the second last backbone layer (denoted as "PreEON") and at the proposal generation stage ("FullEON"). "FullEON" keeps equivariant computation across the whole feature extraction, thus it is using full scene-level equivariance. We show the results in Table 4. + +We draw two major observations. First, our EON compares much favorably with using full scene-level equivariance. This shows the rotation equivariance to full visual content does not help much in object detection, as the target object can rotate arbitrarily when the rest of the scene context remains unchanged. Second, our design to suspend equiv + +![](images/c0a77965eb0ab1b0d88500728e547d035feacf03ff96c4ba682c6dbfd075d5ee.jpg) +Figure 3. Qualitative results on ScanNetV2 dataset. Each row depicts a typical case where the object-level equivariance design shows promising improvements. Color information is not used for models, but only for visualization. + +
MethodTrash-binDisplayOthersBathtubChairCabinetBookshelfTableSofaBedmAP
VoteNet [17]27.422.811.640.184.147.545.372.367.485.450.4
EON-VoteNet (ours)45.335.816.449.186.351.951.075.068.787.256.7
Liu et.al. [14]51.116.524.238.888.049.233.169.763.789.752.4
EON-Liu et.al. (ours)58.553.327.645.884.957.168.382.845.889.461.4
+ +Table 1. Performance $\left( {\mathrm{{AP}}}_{25}\right)$ comparison on ScanNet V2 validation set using Scan2CAD detection labels. + +variant computation at region aggregation yields best results, supporting our assumption that input to region aggregation roughly corresponds to an object level. + +Qualitative comparisons. We show qualitative examples in Figure 3 to depict several typical cases where our EON + +shows great effectiveness. + +In the first column, first row of Figure 3, we show that our EON-VoteNet is able to detect objects with unusual orientations. In the shown example, the black chairs are facing the wall, which is rare. Without having object-level equivari + +
MethodNightstandToiletChairBathtubDresserDeskTableBookshelfSofaBedmAP
VoteNet [17]58.489.974.568.834.626.148.522.365.984.957.4
EON-VoteNet (ours)60.091.675.979.035.427.249.631.268.186.760.5
+ +Table 2. Comparison of VoteNet with and without our EON design on SUN RGB-D dataset. Performances are measure by ${\mathrm{{AP}}}_{25}$ . + +
MethodCar (IoU=0.7)Pedestrian (IoU=0.5)Cyclist (IoU=0.5)
EasyModerateHardEasyModerateHardEasyModerateHard
PointRCNN [21]88.3978.2977.4764.1255.9351.3587.8172.7167.25
EON-PointRCNN (ours)89.1178.6177.5567.1461.0854.2587.3373.3667.41
+ +Table 3. Results on KITTI 3D detection validation set. IoU threshold for AP is 0.7 for Car and 0.5 for Pedestrian/Cyclist, respectively. + +
MethodmAP@0.25mAP@0.5
PreEON-VoteNet54.534.1
FullEON-VoteNet52.726.9
EON-VoteNet (ours)56.736.5
+ +ance by design, VoteNet misses these chairs. Nevertheless, equipped with EON, it successfully detects a chair with a very unusual facing. Notice that EON-VoteNet is able to detect a bookshelf that is also in a less common orientation. + +In the second columns we show results on a cluttered scene where many similar chairs are packed together with minor orientation differences among them. While the baseline VoteNet can detect most of the chairs, their shapes are distorted. This might be partially due to the different orientations among the chair instances. In contrast, our EONVoteNet produces a nearly identical shape across the oriented chairs, showing the promise to explicitly handle object rotation symmetry. In the third column, we show another cluttered scene with 6 similar desks next to each other. Again, our EON-VoteNet is able to detect nearly equal-shaped desks, while VoteNet yields shape-varying boxes. + +In the fourth column and the first two columns in the second row, we show the detection of thin objects (including displays and bookshelves) where EON-VoteNet improves VoteNet most significantly. This aligns with our quantitative observations in Tables 1 and 2. In the last two columns in the second row, we show that our EON-VoteNet is robust to detect small objects such as trash-bins. + +Oracle case exploration. To explore the extent to which our EON can potentially bring improvements to the baseline methods, we show an oracle case exploration in Table 5. In the oracle models, we use the ground-truth orientation labels (discretized into 4 bins) and foreground segmentation in both training and testing. This oracle model shows a strong improvement of $+19.4\% / +18.7\%$ for $\mathrm{AP}_{25}$ and $\mathrm{AP}_{50}$ over the baseline VoteNet. When using only ground-truth orientation labels or segmentation, the performance boosts are also promising. Thus, we might expect further improvements + +Table 4. Evaluation on where to suspend equivariance on ScanNetV2 dataset with Scan2CAD detection labels. + +
MethodmAP@0.25mAP@0.5
VoteNet [17]50.428.3
EON-VoteNet (ours)56.736.5
Oracle (ori.)64.042.9
Oracle (seg.)65.340.6
Oracle (ori. and seg.)69.847.0
+ +Table 5. Comparison to oracle model on ScanNetV2 dataset with Scan2CAD detection labels. + +along with better orientation prediction and segmentation prediction, possibly from external domain-tailored models. + +# 6. Conclusion + +In this work we explore how to leverage object-level rotation equivariance for 3D object detection. To this end, we propose Equivariant Object detection Network (EON) with our core design to suspend rotation equivariance at an intermediate stage in the feature learning backbone. We apply our design to various backbones and models for both indoor and outdoor scenes. Our experiments show that EON can consistently improve the state-of-the-art detectors, indicating the effectiveness of explicitly modeling object-level equivariance in detection models. + +Limitations. One major limitation is the jointly learned orientation/segmentation predictions which might be less accurate than being treated separately. As suggested by the oracle experiments, while our current implementation can already benefit from the object-level equivariance, it is far from reaching the potential maximum gains. Nevertheless, our results suggest the promise of leveraging object-level equivariance for 3D detection. Another limitation is that we assume 1D rotation along the gravity axis. While extending to 3D rotation is straightforward, further exploring it might be beneficial for scenarios such as robotic manipulation. + +Acknowledgements. This work is in part supported by the Qualcomm Innovation Fellowship, the Stanford HAI, Center for Integrated Facility Engineering, Toyota Research Institute (TRI), Samsung, Autodesk, Amazon, and Meta. This work was partly done when Yu was visiting Shanghai Qi Zhi Institute. + +# References + +[1] Armen Avetisyan, Manuel Dahnert, Angela Dai, Manolis Savva, Angel X Chang, and Matthias Nießner. Scan2cad: Learning cad model alignment in rgb-d scans. In CVPR, 2019. 5 +[2] Haiwei Chen, Shichen Liu, Weikai Chen, Hao Li, and Randall Hill. Equivariant point network for 3d point cloud analysis. In CVPR, 2021. 1, 2, 3, 4 +[3] Taco Cohen, Maurice Weiler, Berkay Kicanaoglu, and Max Welling. Gauge equivariant convolutional networks and the icosahedral cnn. In ICML, 2019. 2 +[4] Taco Cohen and Max Welling. Group equivariant convolutional networks. In ICML, 2016. 1, 2, 3 +[5] Taco S Cohen, Mario Geiger, Jonas Kohler, and Max Welling. Spherical cnns. arXiv:1801.10130, 2018. 2 +[6] Angela Dai, Angel X Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In CVPR, 2017. 5 +[7] Congyue Deng, Or Litany, Yueqi Duan, Adrien Poulenard, Andrea Tagliasacchi, and Leonidas Guibas. Vector neurons: A general framework for so(3)-equivariant networks. ICCV, 2021. 1, 2, 3 +[8] Carlos Esteves, Christine Allen-Blanchette, Ameesh Makadia, and Kostas Daniilidis. Learning so(3) equivariant representations with spherical cnns. In ECCV, 2018. 2 +[9] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In CVPR, 2012. 5 +[10] Jiaming Han, Jian Ding, Nan Xue, and Gui-Song Xia. Redet: a rotation-equivariant detector for aerial object detection. In CVPR, 2021. 2 +[11] 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. 2, 3, 5 +[12] Jiaxin Li, Yingcai Bi, and Gim Hee Lee. Discrete rotation equivariance for point cloud recognition. In ICRA, 2019. 2 +[13] Xiaolong Li, Yijia Weng, Li Yi, Leonidas Guibas, A Lynn Abbott, Shuran Song, and He Wang. Leveraging se(3) equivariance for self-supervised category-level object pose estimation. arXiv:2111.00190, 2021. 1, 2 +[14] Ze Liu, Zheng Zhang, Yue Cao, Han Hu, and Xin Tong. Group-free 3d object detection via transformers. In ICCV, 2021. 2, 5, 6, 7 +[15] Wenjie Luo, Yujia Li, Raquel Urtasun, and Richard Zemel. Understanding the effective receptive field in deep convolutional neural networks. In NeurIPS, 2016. 2, 3, 4 +[16] Xuran Pan, Zhuofan Xia, Shiji Song, Li Erran Li, and Gao Huang. 3d object detection with pointformer. In CVPR, 2021. 2 +[17] Charles R Qi, Or Litany, Kaiming He, and Leonidas J Guibas. Deep hough voting for 3d object detection in point clouds. In ICCV, 2019. 1, 2, 3, 5, 7, 8 +[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, 2017. 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. arXiv:1706.02413, 2017. 3, 5 +[20] 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. 2 +[21] Shaoshuai Shi, Xiaogang Wang, and Hongsheng Li. Pointr-cnn: 3d object proposal generation and detection from point cloud. In CVPR, 2019. 1, 2, 3, 5, 8 +[22] Weijing Shi and Raj Rajkumar. Point-gnn: Graph neural network for 3d object detection in a point cloud. In CVPR, 2020. 2 +[23] Shuran Song, Samuel P Lichtenberg, and Jianxiong Xiao. Sun rgb-d: A rgb-d scene understanding benchmark suite. In CVPR, 2015. 5 +[24] 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. In CVPR, 2019. 3, 4, 5 +[25] 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, 2018. 1, 2 +[26] Daniel E Worrall, Stephan J Garbin, Daniyar Turmukhambetov, and Gabriel J Brostow. Harmonic networks: Deep translation and rotation equivariance. In CVPR, 2017. 1 +[27] 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 CVPR, 2020. 1, 2 +[28] Guo-Ye Yang, Xiang-Li Li, Ralph R Martin, and Shi-Min Hu. Sampling equivariant self-attention networks for object detection in aerial images. arXiv:2111.03420, 2021. 2 +[29] Tianwei Yin, Xingyi Zhou, and Philipp Krahenbuhl. Center-based 3d object detection and tracking. In CVPR, 2021. 1, 2, 3, 5 +[30] Zaiwei Zhang, Bo Sun, Haitao Yang, and Qixing Huang. H3dnet: 3d object detection using hybrid geometric primitives. In ECCV, 2020. 2 +[31] Yin Zhou and Oncel Tuzel. Voxelnet: End-to-end learning for point cloud based 3d object detection. In CVPR, 2018. 2 +[32] 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. 2 \ No newline at end of file diff --git a/rotationallyequivariant3dobjectdetection/images.zip b/rotationallyequivariant3dobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..81ad1e3bf4049439e5f7979ec283dcb0928bfe68 --- /dev/null +++ b/rotationallyequivariant3dobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa023f04b12364506d06646dd7dfc72c7cbb34a205cd678d6c81fde6a702448f +size 730558 diff --git a/rotationallyequivariant3dobjectdetection/layout.json b/rotationallyequivariant3dobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c84a6076c0a71847c1ed1b026c89afcfa43e6111 --- /dev/null +++ b/rotationallyequivariant3dobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c19f51ed474baf46f7781290f6a4d3cc2b72176df26ce6c7d150c1a98e3d2dc5 +size 303924 diff --git a/safeselfrefinementfortransformerbaseddomainadaptation/2d0eb983-3fc4-49ec-874e-a9152f1bae9e_content_list.json b/safeselfrefinementfortransformerbaseddomainadaptation/2d0eb983-3fc4-49ec-874e-a9152f1bae9e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9d10bf3c7df35b1082dae07c8602bbc35a73e5e8 --- /dev/null +++ b/safeselfrefinementfortransformerbaseddomainadaptation/2d0eb983-3fc4-49ec-874e-a9152f1bae9e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec543fe3e416e04d446b0f90fa9d720c702b4b88d8757412b68dd5ada534c5d7 +size 84949 diff --git a/safeselfrefinementfortransformerbaseddomainadaptation/2d0eb983-3fc4-49ec-874e-a9152f1bae9e_model.json b/safeselfrefinementfortransformerbaseddomainadaptation/2d0eb983-3fc4-49ec-874e-a9152f1bae9e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e536f417949ace2786038354568a3c11afc01d8e --- /dev/null +++ b/safeselfrefinementfortransformerbaseddomainadaptation/2d0eb983-3fc4-49ec-874e-a9152f1bae9e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a851e93b3d9cd02cd0d57d973a4d01f04771fc6fb64b64c07ffc59dbf6f35368 +size 101959 diff --git a/safeselfrefinementfortransformerbaseddomainadaptation/2d0eb983-3fc4-49ec-874e-a9152f1bae9e_origin.pdf b/safeselfrefinementfortransformerbaseddomainadaptation/2d0eb983-3fc4-49ec-874e-a9152f1bae9e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..22eec5bd6b18f97b5617e9fb478e7da1b085232c --- /dev/null +++ b/safeselfrefinementfortransformerbaseddomainadaptation/2d0eb983-3fc4-49ec-874e-a9152f1bae9e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ba02c161d6930c7f684d19da3ecfff608734e16dec04f7af34f2f0b0ea7e5a3 +size 776380 diff --git a/safeselfrefinementfortransformerbaseddomainadaptation/full.md b/safeselfrefinementfortransformerbaseddomainadaptation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..074d6bc3e68bf1f5a2103e61437dbbf5f566bebe --- /dev/null +++ b/safeselfrefinementfortransformerbaseddomainadaptation/full.md @@ -0,0 +1,332 @@ +# Safe Self-Refinement for Transformer-based Domain Adaptation + +Tao Sun $^{1}$ , Cheng Lu $^{2}$ , Tianshuo Zhang $^{2}$ , Haibin Ling $^{1}$ $^{1}$ Stony Brook University, $^{2}$ XPeng Motors + +{tao,hling}@cs.stonybrook.edu, luc@xiaopeng.com, tonyzhang2035@gmail.com + +# Abstract + +Unsupervised Domain Adaptation (UDA) aims to leverage a label-rich source domain to solve tasks on a related unlabeled target domain. It is a challenging problem especially when a large domain gap lies between the source and target domains. In this paper we propose a novel solution named SSRT (Safe Self-Refinement for Transformer-based domain adaptation), which brings improvement from two aspects. First, encouraged by the success of vision transformers in various vision tasks, we arm SSRT with a transformer backbone. We find that the combination of vision transformer with simple adversarial adaptation surpasses best reported Convolutional Neural Network (CNN)-based results on the challenging DomainNet benchmark, showing its strong transferable feature representation. Second, to reduce the risk of model collapse and improve the effectiveness of knowledge transfer between domains with large gaps, we propose a Safe Self-Refinement strategy. Specifically, SSRT utilizes predictions of perturbed target domain data to refine the model. Since the model capacity of vision transformer is large and predictions in such challenging tasks can be noisy, a safe training mechanism is designed to adaptively adjust learning configuration. Extensive evaluations are conducted on several widely tested UDA benchmarks and SSRT achieves consistently the best performances, including $85.43\%$ on Office-Home, $88.76\%$ on VisDA-2017 and $45.2\%$ on DomainNet. + +# 1. Introduction + +Deep neural networks have achieved impressive performance in a variety of machine learning tasks. However, the success often relies on a large amount of labeled training data, which can be costly or impractical to obtain. Unsupervised Domain Adaptation (UDA) [36] handles this issue by transferring knowledge from a label-rich source domain to a different unlabeled target domain. Over the past years, many UDA methods have been proposed [4, 12, 14, 24, 44]. Among them, adversarial adaptation [4, 14, 44] that learns domain-invariant feature repre + +sensation using the idea of adversarial learning has been a prevailing paradigm. Deep UDA methods are usually applied in conjunction with a pretrained Convolutional Neural Network (CNN, e.g., ResNet [8]) backbone in vision tasks. On medium-sized classification benchmarks such as Office-Home [33] and VisDA [20], the reported state-of-the-arts are very impressive [12]. However, on large-scale datasets like DomainNet [19], the most recent results in the literature by our submission report a best average accuracy of $33.3\%$ [10], which is far from satisfactory. + +With the above observations, we focus our investigation on challenging cases from two aspects: + +- First, from the representation aspect, it is desirable to use a more powerful backbone network. This directs our attention to the recently popularized vision transformers, which have been successfully applied to various vision tasks [2, 3, 42]. Vision transformer processes an image as a sequence of tokens, and uses global self-attention to refine this representation. With its long-range dependencies and large-scale pre-training, vision transformer obtains strong feature representation that is ready for downstream tasks. Despite this, its application in UDA is still under-explored. Hence we propose to integrate vision transformer to UDA. We find that by simply combining ViT-B/16 [3] with adversarial adaptation, it can achieve $38.5\%$ average accuracy on DomainNet, better than the current arts using ResNet-101 [8, 10]. This shows that the feature representation of vision transformer is discriminative as well as transferable across domains. + +- Second, from the domain adaptation aspect, a more reliable strategy is needed to protect the learning process from collapse due to large domain gaps. As strong backbones with large capacity like vision transformer increase the chance of overfitting to source domain data, a regularization from target domain data is desired. A common practice in UDA is to utilize model predictions for self-training or enforce clustering structure on target domain data [12, 24, 43]. While this helps generally, the supervisions can be noisy when the domain gap is large. Therefore, an adaptation method is expected to be Safe [11] enough to avoid model collapse. + +Motivated by the above discussions, in this paper, we propose a novel UDA solution named SSRT (Safe SelfRefinement for Transformer-based domain adaptation). SSRT takes a vision transformer as the backbone network and utilizes predictions on perturbed target domain data to refine the adapted model. Specifically, we add random offsets to the latent token sequences of target domain data, and minimize the discrepancy of model's predicted probabilities between the original and perturbed versions using the Kullback Leibler (KL) divergence. This imposes a regularization on the corresponding transformer layers in effect. Moreover, SSRT has several important components that contribute to its excellent performance, including multi-layer perturbation and bi-directional supervision. + +To protect the learning process from collapse, we propose a novel Safe Training mechanism. As UDA tasks vary widely even when they are drawn from the same dataset, a specific learning configuration (e.g., hyper-parameters) that works on most tasks may fail on some particular ones. The learning configuration is thus desired to be automatically adjustable. For example, for perturbation-based methods [17, 25], a small perturbation may under-exploit their benefits while a large one may result in collapse. Recent works [1, 29] apply a manually defined ramp-up period at the beginning of training. However, this cannot solve the issue when its maximum value is improper for the current task. In contrast, we propose to monitor the whole training process and adjust learning configuration adaptively. We use a diversity measure of model predictions on the target domain data to detect model collapse. Once it occurs, the model is restored to a previously achieved state and the configuration is reset. With this safe training strategy, our SSRT avoids significant performance deterioration on adaptation tasks with large domain gaps. The code is available at https://github.com/tsun/SSRT. + +In summary, we make the following contributions: + +- We develop a novel UDA solution SSRT, which adopts a vision transformer backbone for its strong transferable feature representation, and utilizes the predictions on perturbed target domain data for model refinement. +- We propose a safe training strategy to protect the learning process from collapse due to large domain gaps. It adaptively adjusts learning configuration during the training process with a diversity measure of model predictions on target domain data. +- SSRT is among the first to explore vision transformer for domain adaptation. Vision transformer-based UDA has shown promising results, especially on large-scale datasets like DomainNet. +- Extensive experiments are conducted on widely tested benchmarks. Our SSRT achieves the best performances, including $85.43\%$ on Office-Home, $88.76\%$ on VisDA-2017 and $45.2\%$ on DomainNet. + +# 2. Related Work + +Unsupervised Domain Adaptation. There are several prevailing categories of UDA methods. Discrepancy-based methods minimize the distribution divergence between source and target domains with discrepancy measures [15, 28, 32]. Adversarial adaptation methods learn domain-invariant representations by playing a two-player min-max game between the feature extractor and a domain discriminator [4, 28, 31, 32]. Recently, many works exploit self-training for domain adaptation [16, 45, 46]. They generate pseudo labels for target domain data and take them as labeled data to refine the model. + +Transformer in Vision. Vision Transformer (ViT) [3] is a pioneering work that applies a convolution-free transformer structure for image classification. Following that, many ViT variants have been proposed [7, 13, 30, 41]. Transformer has been applied successfully to various vision tasks including image classification [3, 30], object detection [2], semantic segmentation [27], etc. + +The application of vision transformer in domain adaptation, however, is still very scarce. Notably, two concurrent explorations [39, 40] have been recently reported on arXiv. Specifically, CDTrans [39] is a pure transformer solution for UDA, and it applies cross attention on source-target image pairs. TVT [40] proposes a transferable multi-head self-attention module and combines it with adversarial adaptation. Our method is different in that it uses pairs of target domain data and their perturbed version to refine the model. This guarantees the same semantic class. Besides, we delicately design the components of our model and the training strategy to avoid collapse on challenging tasks. + +Consistency Regularization. Consistency regularization is an important technique in semi-supervised learning that achieves state-of-the-art results [25]. It leverages the idea that model predictions should be similar for semantically identical data. Some methods create perturbed inputs with adversarial training [17], while others use standard data augmentations [1, 25, 37]. These works mostly manipulate raw input images. In contrast, our study focuses on the latent token sequence representation of vision transformer. + +# 3. Proposed Method + +# 3.1. Problem Formulation + +In Unsupervised Domain Adaptation, there is a source domain with labeled data $\mathcal{D}_s = \{(x_i^s,y_i^s)\}_{i = 1}^{n_s}$ from $\mathcal{X}\times \mathcal{Y}$ and a target domain with unlabeled data $\mathcal{D}_t = \{(x_i^t)\}_{i = 1}^{n_t}$ from $\mathcal{X}$ , where $\mathcal{X}$ is the input space and $\mathcal{Y}$ is the label space. UDA aims to learn a classifier $h = g\circ f$ where $f(\cdot ;\theta_{f}):\\ \mathcal{X}\to \mathcal{Z}$ denotes the feature extractor, $g(\cdot ;\theta_g): \mathcal{Z}\rightarrow \mathcal{Y}$ denotes the class predictor, and $\mathcal{Z}$ is the latent space. Adversarial adaptation learns domain-invariant feature via a bi + +![](images/66d54a6f60e798290c50966731ce204eed630348ca3065cd44f2a3ca67613788.jpg) +Figure 1. Overview of SSRT. (Left) Illustration of Self-Refinement for our transformer-based model. The two branches share parameters. Random offsets are added to the input token sequences of transformer (TF) blocks. The model is refined using its predictions of the original and perturbed versions supervised by KL divergence. (Right) Illustration of Safe Training mechanism. See text for details. + +![](images/d1e03ccf50761a11d740e14bf0662eb11f16b61497a4cc38b0a9f314c8c7fb54.jpg) + +nary domain discrimination $d(\cdot ;\theta_d):\mathcal{Z}\to [0,1]$ that maps features to domain labels. + +The objective is formulated as + +$$ +\min _ {f, g} \max _ {d} \mathcal {L} = \mathcal {L} _ {\mathrm {C E}} - \mathcal {L} _ {\mathrm {d}} + \beta \mathcal {L} _ {\mathrm {t g t}}, \tag {1} +$$ + +where $\mathcal{L}_{\mathrm{CE}}$ is the standard cross-entropy loss on source domain data, $\mathcal{L}_{\mathrm{d}}$ is domain adversarial loss, defined as + +$$ +\mathcal {L} _ {\mathrm {d}} = - \mathbb {E} _ {\boldsymbol {x} \sim \mathcal {D} _ {s}} \big [ \log d (\boldsymbol {f} (\boldsymbol {x})) \big ] - \mathbb {E} _ {\boldsymbol {x} \sim \mathcal {D} _ {t}} \big [ \log (1 - d (\boldsymbol {f} (\boldsymbol {x}))) \big ], +$$ + +$\beta$ is a trade-off parameter, and $\mathcal{L}_{\mathrm{tgt}}$ is a loss on target domain data. A common choice of $\mathcal{L}_{\mathrm{tgt}}$ is the Mutual Information Maximization loss [6, 23]. In our method, we instantiate it as the self-refinement loss $\mathcal{L}_{\mathrm{SR}}$ , introduced in Sec. 3.4. + +# 3.2. Method Framework + +We aim to regularize the latent feature spaces of transformer backbone by refining the model with perturbed target domain data. Figure 1 illustrates the framework of our proposed SSRT. Only target domain data are shown here. The network consists of a vision transformer backbone and a classifier head. Domain discriminator is not plotted. For each target domain image, the Patch Embedding layer transforms it into a token sequence including a special class token and image tokens. Then the sequence is refined with a series of Transformer Blocks. The classifier head takes the class token and outputs label prediction. We randomly choose one transformer block and add a random offset to its input token sequence. Then the corresponding predicted class probabilities of original and perturbed versions are used for bi-directional self-refinement. To avoid noisy supervision, only reliable predictions are used via a Confidence Filter. To reduce the risk of model collapse, we use a safe training mechanism to learn the model. + +# 3.3. Multi-layer Perturbation for Transformer + +While many works manipulate the raw input images [1, 17, 25], it may be better to do that at hidden layers [34]. Vision transformer has some particular properties due to its special architecture. Since the Patch Embedding layer is merely a convolutional layer plus the position embedding, a linear operation on raw input can be shifted equivalently to the first transformer block. Besides, due to residual connections within transformer blocks, the token sequences at adjacent blocks are highly correlated. The best layer to add perturbation, however, varies across tasks. Empirically, perturbing relatively deep layers performs better but at a higher risk of model collapse. Therefore, we randomly choose one from multiple layers, which proves to be more robust than perturbing any single layer from them. In fact, it imposes a regularization on multiple layers simultaneously, making the learning process safer. + +Given a target domain image $\pmb{x}$ , let $b_{x}^{l}$ be its input token sequence of the $l$ -th transformer block. $b_{x}^{l}$ can be viewed as a latent representation of $\pmb{x}$ in a hidden space. Since its dimension is high while the support of target domain data is limited in the space, it is inefficient to perturb $b_{x}^{l}$ arbitrarily. Instead, we utilize the token sequence $b_{xr}^{l}$ of another randomly chosen target domain image $\pmb{x}_{r}$ to add an offset. The perturbed token sequence of $b_{x}^{l}$ is obtained as + +$$ +\tilde {b} _ {x} ^ {l} = b _ {x} ^ {l} + \alpha \left[ b _ {x r} ^ {l} - b _ {x} ^ {l} \right] _ {\times}, \tag {2} +$$ + +where $\alpha$ is a scalar and $[\cdot ]_{\times}$ means no gradient backpropagation. Note that although gradients cannot backpropagate through the offset, they can pass through $b_{x}^{l}$ . The importance of this is elaborated in the following section. + +In addition to the manually injected perturbation, the Dropout layer in the classifier head also works randomly for the two branches. This creates another source of discrepancy for the self-refinement loss. + +# 3.4. Bi-directional Self-Refinement + +Now we are ready to define the loss function used for self-refinement. Let $\pmb{p}_x$ and $\tilde{\pmb{p}}_x$ be the predicted probability vectors corresponding to $b_x^l$ and $\tilde{b}_x^l$ , respectively. To measure their distance, KL divergence is commonly used. + +$$ +D _ {\mathrm {K L}} \left(\boldsymbol {p} _ {t} \| \boldsymbol {p} _ {s}\right) = \sum_ {i} \boldsymbol {p} _ {t} [ i ] \log \frac {\boldsymbol {p} _ {t} [ i ]}{\boldsymbol {p} _ {s} [ i ]}, \tag {3} +$$ + +where $\pmb{p}_t$ is the teacher probability (a.k.a. target probability) and $\pmb{p}_s$ is the student probability. Note that KL divergence is asymmetric in $\pmb{p}_t$ and $\pmb{p}_s$ . While it is natural to take $\pmb{p}_x$ as the teacher probability since it corresponds to the original data, we find the reverse also works. Moreover, as shown in Sec. 4.3, it is more robust to combine them together. Our bi-directional self-refinement loss is defined as + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {S R}} = \mathbb {E} _ {\mathcal {B} _ {t} \sim \mathcal {D} _ {t}} \left\{\omega \mathbb {E} _ {\boldsymbol {x} \sim F [ \mathcal {B} _ {t}; \boldsymbol {p} ]} D _ {\mathrm {K L}} \left(\boldsymbol {p} _ {x} \| \tilde {\boldsymbol {p}} _ {x}\right) \right. \tag {4} \\ \left. + (1 - \omega) \mathbb {E} _ {\boldsymbol {x} \sim F \left[ \mathcal {B} _ {t}; \tilde {\boldsymbol {p}} \right]} D _ {\mathrm {K L}} \left(\tilde {\boldsymbol {p}} _ {x} \| \boldsymbol {p} _ {x}\right) \right\}, \\ \end{array} +$$ + +where $\omega$ is a random variable drawn from a Bernoulli distribution $\mathcal{B}(0.5)$ , $F$ is a Confidence Filter defined as + +$$ +F [ \mathcal {D}; \boldsymbol {p} ] = \left\{\boldsymbol {x} \in \mathcal {D} \mid \max \left(\boldsymbol {p} _ {x}\right) > \epsilon \right\}, \tag {5} +$$ + +and $\epsilon$ is a predefined threshold. $\mathcal{L}_{\mathrm{SR}}$ refines the model with confident predictions and regularizes it to predict smoothly in the latent feature spaces. + +Typically, the loss gradient is only back-propagated through the student probability (i.e., $p_s$ in Eq. 3) [1, 17, 18]. We find, however, it is better to back-propagate gradient through both teacher and student probabilities in our framework. Recall that $\partial \mathcal{L}_{\mathrm{SR}} / \partial \tilde{b}_x^l$ is propagated to $b_x^l$ identically in Eq. 2. Each model parameter is therefore updated based on the joint effects from $p_x$ and $\tilde{p}_x$ . This avoids excessively large gradients from any single probability. We observe degraded performance when either the gradients of teacher probabilities in KL divergence or that of $b_x^l$ are blocked. + +# 3.5. Safe Training via Adaptive Adjustment + +In the proposed self-refinement strategy, setting a proper value of the perturbation scalar $\alpha$ and the self-refinement loss weight $\beta$ is critical. Excessively large perturbations lead to a collapse of the predicted class distribution, while a small one may under-exploit its benefit. Since the target domain is fully unlabeled and domain adaptation tasks vary widely even for the same dataset, it is desired to adjust these values adaptively. Some works [1, 29] apply a ramp-up period at the beginning of training. While this alleviates the tendency to collapse during this period, it cannot solve the issue when the maximum value is improper for current adaptation tasks. + +Algorithm 1 Safe Training Mechanism. +Initialization: last.Restore = 0, save snapshot of $\mathcal{M}$ +1: procedure CHECKDIVDROP(div, L, T, iter) +2: for l = 1 to L do ▷ check at multi-scales +3: divs = div(iterator - T, ..., iter) ▷ get diversity +4: divs = split(divs, 2l) ▷ to even sub-intervals +5: for i = 0 to len(divs) - 1 do +6: if avg(divs[i + 1]) < avg(divs[i]) - 1 then +7: return True ▷ significant dropping +8: end if +9: end for +10: end for +11: return False +12: end procedure +13: +14: procedure SAFETRAINING(M, div, T, L, iter) +15: if iter % T == 0 and iter >= T then +16: if CHECKDIVDROP(div, L, T, iter) then +17: Restore M to last snapshot, $t_r$ = iter +18: if iter - last.Restore ≤ $T_r$ then +19: $T_r = T_r \times 2$ ▷ avoid oscillation +20: end if +21: last/restore = iter +22: end if +23: Save snapshot of $\mathcal{M}$ +24: end if +25: return M, $T_r$ , $t_r$ +26: end procedure + +Algorithm 2 SSRT algorithm. +Input: Model $\mathcal{M}$ source data $D_{s}$ target data $D_{t}$ confidence threshold $\epsilon$ self-refinement loss weight $\beta$ perturbation scalar $\alpha$ Safe Training parameters $T$ and $L$ diversity measure $\mathrm{div}(\cdot)$ +Initialization: $T_{r} = T,t_{r} = 0$ +1: for iter $= 0$ to max_Iter do +2: Sample a batch from source data and target data +3: Obtain $r$ via Eq.6, $\alpha_{r} = r\alpha ,\beta_{r} = r\beta$ +4: Randomly choose $l\in \{0,4,8\}$ , add perturbation via Eq. 2 using $\alpha_{r}$ , obtain $\mathcal{L}_{\mathrm{SR}}$ via Eq. 4 +5: Update model parameters via Eq. 1 using $\beta_{r}$ +6: $\mathcal{M},T_r,t_r\gets \mathsf{SAFETRAINING}(\mathcal{M},\mathrm{div},T,L,\mathrm{iter})$ +7: end for + +We propose a Safe Training mechanism. The observation is that whenever the model begins to collapse, the diversity of model predictions will decrease simultaneously. Our goal is to detect such events while monitoring the training process. Once it occurs, the learning configuration is reset and meanwhile the model is restored to a previously achieved state. Specifically, an adaptive scalar $r \in [0,1]$ is + +Table 1. Accuracies (%) on Office-Home. *CDTrans uses DeiT-base backbone. °TVT uses ViT-base backbone. “-S/B” indicates ViT-small/base backbones, respectively. + +
MethodAr→ClAr→PrAr→RwCl→ArCl→PrCl→RwPr→ArPr→ClPr→RwRw→ArRw→ClRw→PrAvg.
ResNet-50 [8]34.950.058.037.441.946.238.531.260.453.941.259.946.1
CDAN+E [14]50.770.676.057.670.070.057.450.977.370.956.781.665.8
SAFN [38]52.071.776.364.269.971.963.751.477.170.957.181.567.3
CDAN+TN [35]50.271.477.459.372.773.161.053.179.571.959.082.967.6
SHOT [12]57.178.181.568.078.278.167.454.982.273.358.884.371.8
DCAN+SCDA [10]60.776.482.869.877.578.468.959.082.774.961.884.573.1
CDTrans* [39]68.885.086.981.587.187.379.663.388.282.066.090.680.5
TVT° [40]74.8986.8289.4782.7887.9588.2779.8171.9490.1385.4674.6290.5683.56
ViT-S [3]47.0176.9883.5469.8477.1180.4268.1544.0882.8674.7847.9784.6669.78
Baseline-S59.5980.1184.6773.8478.4981.3674.4159.8286.2780.1062.5987.2375.71
SSRT-S (ours)67.0384.2188.3279.8584.2887.5880.7266.0388.2782.0469.4489.8680.64
ViT-B [3]54.6883.0487.1577.3083.4285.5474.4150.9087.2279.5653.7988.8075.48
Baseline-B66.9685.7488.0780.0684.1286.6779.5267.0389.4483.6470.1591.1781.05
Baseline-B+MI70.6388.6289.9982.0887.8489.2881.0168.8291.2685.1771.6692.4583.23
SSRT-B (ours)75.1788.9891.0985.1388.2989.9585.0474.2391.2685.7078.5891.7885.43
+ +![](images/072e6bfae8556d4ed187436c87bf79a30b15f281d9eac50b9ea17c4fa6174005.jpg) + +![](images/c33afd133c6cf045f473faf5aa419dc40f76a3781ea757caa5ca5a7a7305b461.jpg) +Figure 2. Representative training histories using Safe Training (ST) on DomainNet $\mathrm{clp} \rightarrow \mathrm{qdr}$ and $\mathrm{qdr} \rightarrow \mathrm{clp}$ . (Left) Plots of the diversity of model predictions on target domain data and the adaptive scalar $r$ . For better visualization, both original values (light color) and smoothed values (dark color) of diversity are shown. (Right) Plots of comparison test accuracies on target domain data. + +![](images/60630e47eeffb4e6b56fb28775f8aa5e3f54eddc62cff03ce30655827d76c104.jpg) + +![](images/fc640bba0d525d3877cc03d297069173c63dfa4c67bfa3f61ae03fe88477f480.jpg) + +adopted to modulate $\alpha$ and $\beta$ , i.e., $\alpha_{r} = r\alpha$ and $\beta_{r} = r\beta$ . We define a fixed period $T$ and divide the training process into consecutive intervals. A model snapshot is saved at the end of each interval. Then $r$ is defined as + +$$ +r (t) = \left\{ \begin{array}{l l} \sin \left(\frac {\pi}{2 T _ {r}} (t - t _ {r})\right) & \text {i f} t - t _ {r} < T _ {r} \\ 1. 0 & \text {o t h e r w i s e} \end{array} , \right. \tag {6} +$$ + +where $t$ is the current training step. Initially, $T_r = T$ and $t_r = 0$ . It hence takes $T$ steps for $r$ to ramp up to 1.0. At the end of each interval, the diversity of model predictions within this interval is checked to find abrupt dropping. If not existed, the formulation of $r$ remains unchanged. Otherwise, $t_r$ is reset to current training step $t$ , and the model is restored to last snapshot. To avoid oscillation between collapse and restoration, $T_r$ is doubled if the last restoration occurs within $T_r$ steps. Figure 1 illustrates the training + +process with adaptive adjustment. Two events of diversity dropping are identified (marked with pink areas), leading to two model restorations and reset of $r$ . + +The remaining issue is which diversity measure to use and how to detect diversity dropping. We find that the number of unique model predicted labels on each target training batch $\mathcal{B}_t$ works well. We hence define the following diversity measure: + +$$ +\operatorname {d i v} (t; \mathcal {B} _ {t}) = \text {u n i q u e l a b e l s} (h (\mathcal {B} _ {t})). \tag {7} +$$ + +To detect diversity dropping, we split the interval into sub-intervals and check whether the average diversity value drops across each sub-interval. We implement this at multiscales to improve the sensitivity of detection. Every consecutive sub-intervals of $T / 2^{1}, \dots, T / 2^{L}$ steps are checked for a given integer $L$ . Details are listed in Alg. 1 and Alg. 2. + +Table 2. Accuracies (%) on DomainNet. In each sub-table, the column-wise means source domain and the row-wise means target domain. + +
ResNet-101 [8]clpinfpptqdrrelsktAvg.MIMTFL [5]clpinfpptqdrrelsktAvg.CDAN [14]clpinfpptqdrrelsktAvg.
clp-19.337.511.152.241.032.2clp-15.135.610.751.543.131.2clp-20.436.69.050.742.331.8
inf30.2-31.23.644.027.927.4inf32.1-31.02.948.531.029.1inf27.5-25.71.834.720.122.0
ppt39.618.7-4.954.536.330.8ppt40.114.7-4.255.436.830.2ppt42.620.0-2.555.638.531.8
qdr7.00.91.4-4.18.34.3qdr18.83.15.0-16.013.811.3qdr21.04.58.1-14.315.712.7
rel48.422.249.46.4-38.833.0rel48.519.047.65.8-39.432.1rel51.923.350.45.4-41.434.5
skt46.915.437.010.947.0-31.4skt51.716.540.312.353.5-34.9skt50.820.343.02.950.8-33.6
Avg.34.415.331.37.440.430.526.6Avg.38.213.731.97.245.032.828.1Avg.38.817.732.84.341.231.627.7
MDD+SCDA [10]clpinfpptqdrrelsktAvg.CD*Trans*[39]clpinfpptqdrrelsktAvg.ViT-B [3]clpinfpptqdrrelsktAvg.
clp-20.443.315.259.346.536.9clp-27.957.627.973.058.849.0clp-27.253.113.271.253.343.6
inf32.7-34.56.347.629.230.1inf58.6-53.49.671.147.648.1inf51.4-49.34.066.341.142.4
ppt46.419.9-8.158.842.935.2ppt60.724.0-13.069.849.643.4ppt53.125.6-4.870.041.839.1
qdr31.16.618.0-28.822.021.3qdr2.90.40.3-0.74.71.8qdr30.54.516.0-27.019.319.5
rel55.523.752.99.5-45.237.4rel49.318.747.89.4-33.531.7rel58.429.060.06.0-45.839.9
skt55.820.146.515.056.7-38.8skt66.823.754.627.568.0-48.1skt63.923.852.314.467.4-44.4
Avg.44.318.139.010.850.237.233.3Avg.47.718.942.717.556.538.837.0Avg.51.522.046.18.560.440.338.1
Baseline-BclpinfpptqdrrelsktAvg.Baseline-B+MIclpinfpptqdrrelsktAvg.SSRT-B(ours)clpinfpptqdrrelsktAvg.
clp-30.953.316.372.755.445.7clp-30.555.818.174.757.547.3clp-33.860.219.475.859.849.8
inf43.0-40.87.856.435.936.8inf53.2-52.89.268.345.345.8inf55.5-54.09.068.244.746.3
ppt55.728.6-7.470.548.342.1ppt56.827.6-7.370.849.342.4ppt61.728.5-8.471.455.245.0
qdr25.55.29.7-15.517.114.6qdr31.65.113.3-25.323.019.6qdr42.58.824.2-37.633.629.3
rel62.332.562.58.2-50.743.2rel65.732.463.96.9-51.744.1rel69.937.166.010.1-58.948.4
skt66.430.658.018.170.1-48.6skt68.930.661.019.372.9-50.5skt70.632.862.221.773.2-52.1
Avg.50.625.644.911.657.041.538.5Avg.55.225.249.412.262.445.341.6Avg.60.028.253.313.765.350.445.2
+ +Table 3. Accuracies $(\%)$ on VisDA-2017. + +
MethodplanebcyclbuscarhorseknifemcyclpersonplantsktbrdtraintruckAvg.
ResNet-101 [8]55.153.361.959.180.617.979.731.281.026.573.58.552.4
DANN [4]81.977.782.844.381.229.565.128.651.954.682.87.857.4
CDAN [14]85.266.983.050.884.274.988.174.583.476.081.938.073.9
SAFN [38]93.661.384.170.694.179.091.879.689.955.689.024.476.1
SWD [9]90.882.581.770.591.769.586.377.587.463.685.629.276.4
SHOT [12]94.388.580.157.393.194.980.780.391.589.186.358.282.9
CDTrans* [39]97.190.582.477.596.696.193.688.697.986.990.362.888.4
TVT° [40]92.9285.5877.5160.4893.6098.1789.3576.4093.5692.0291.6955.7383.92
ViT-B [3]99.0960.6670.5582.6696.5073.0697.1419.7364.4894.7497.2115.3672.60
Baseline-B98.5582.5985.9757.0794.9397.2094.5876.6892.1196.5494.3152.2485.23
Baseline-B+MI98.6390.7981.8347.2896.2998.3684.6870.7093.3097.5494.5555.0384.08
SSRT-B (ours)98.9387.6089.1084.7798.3498.7096.2781.0894.8697.9094.5043.1388.76
+ +# 4. Experiments + +We evaluate our method on four popular UDA benchmarks. Office-31 [22] contains 4,652 images of 31 classes from three domains: Amazon (A), DSLR (D) and Webcam (W). Office-Home [33] consists of 15,500 images of 65 classes from four domains: Artistic (Ar), Clip Art (Cl), Product (Pr), and Real-world (Rw) images. VisDA-2017 [20] is a Synthetic-to-Real dataset, with about 0.2 million images in 12 classes. DomainNet [19] is the largest DA dataset containing about 0.6 million images of 345 classes in 6 domains: Clipart (clp), Infograph (inf), Painting (ppt), Quickdraw (qdr), Real (rel), Sketch (skt). + +We use the ViT-base and ViT-small with $16 \times 16$ patch size [3, 26], pre-trained on ImageNet [21], as the vision transformer backbones. For all tasks, we use an identical set of hyper-parameters ( $\alpha = 0.3$ , $\beta = 0.2$ , $\epsilon = 0.4$ , $T = 1000$ , $L = 4$ ). Ablation studies on them are provided in Sec. 4.6. More details can be found in the supplementary material. + +Our comparison methods include DANN [4], CDAN [14], CDAN+E [14], SAFN [38], SAFN+ENT [38], CDAN+TN [35], SHOT [12], DCAN+SCDA [10], MDD+SCDA [10], SWD [9], MIMTFEL [5], TVT [40] and CDTrans [39]. "Baseline" is ViT with adversarial adaptation (see Sec. 3.1). We also include its combination with Mutual Information (MI) loss [6, 23] in comparison. + +# 4.1. Results on Benchmarks + +Tables 1-4 present evaluation results on four benchmarks. We use “-S/B” to indicate results using ViT-small/base backbones, respectively. For Office-Home and Office-31, CNN-based methods use ResNet-50 as their backbones; whereas for DomainNet and VisDA they use ResNet-101. Generally, the transformer-based results are much better. This is attributed to its strong transferable feature representations. ViT-base is better than ViT-small, due to higher model complexity. Apparently, Baselines improve over source-only training. Integrating Mutual Information + +Table 4. Accuracies $(\%)$ on Office-31. + +
MethodA→WD→WW→DA→DD→AW→AAvg.
ResNet-50 [8]68.496.799.368.962.560.776.1
DANN [4]82.096.999.179.768.267.482.2
SAFN+ENT [38]90.198.699.890.773.070.287.1
CDAN+TN [35]95.798.7100.94.073.474.289.3
SHOT [12]90.198.499.994.074.774.388.6
MDD+SCDA [10]95.399.0100.95.477.275.990.5
CDTrans* [39]96.799.0100.97.081.181.992.6
TVT° [40]96.499.4100.96.484.986.193.8
ViT-S [3]86.998.6100.88.676.075.987.7
Baseline-S91.999.1100.89.278.477.989.4
SSRT-S (ours)95.799.2100.95.879.279.991.6
ViT-B [3]91.299.2100.90.481.180.690.4
Baseline-B92.599.2100.93.680.780.791.1
SSRT-B (ours)97.799.2100.98.683.582.293.5
+ +Table 5. Accuracies $(\%)$ compared with perturbing raw inputs. $X^{\dagger}$ means averaged over all 5 tasks with $X$ being the target domain. + +
OHDNclp†inf†pnt†qdr†rel†skt†
Baseline-B81.138.550.625.644.911.657.041.5
SSRT-B (raw)85.044.258.626.751.713.763.950.8
SSRT-B85.445.260.028.253.313.765.350.4
+ +(MI) loss further improves. Compared with other methods, SSRT-B performs the best on Office-Home, DomainNet and VisDA. It improves $4.38\%$ on Office-Home, $3.53\%$ on VisDA-2017 and $6.7\%$ on DomainNet over Baseline-B despite that Baseline-B is already very strong. In particular, on the challenging DomainNet dataset, SSRT-B achieves an impressive $45.2\%$ average accuracy. It is worth mentioning that in DomainNet some domains have large gaps from the others, such as inf and qdr. Transferring among these domains and others is very difficult. It is thus desired to transfer safely and not deteriorate the performance significantly. Looking at tasks with qdr being target domain, SSRT-B obtains $29.3\%$ average accuracy, while many other methods perform poorly. We illustrate the effects of some important components that contribute to our excellent performance in the following sections. + +# 4.2. Effects of Multi-layer Perturbation + +Table 5 verifies that applying perturbation to the latent token sequences performs better than to the raw input images on Office-Home (OH) and DomainNet (DN). Fig. 5a compares performances when adding the same amount of perturbation to each layer while not using safe training. As can be seen, the best layer to apply perturbation varies across tasks. Besides, a layer that works for one task may fail on others. In our experiments, we uniformly choose one layer from $\{0,4,8\}$ . As a comparison, perturbing any single layer from it decreases the average accuracy on DomainNet by $-1.0\%$ , $-1.5\%$ and $-1.5\%$ , respectively. + +![](images/f00ad507510765491cdf47ff4598bde6ed019842397f92b834c519186625b5c4.jpg) + +![](images/da0bff110c4ac299befc8a442aa69712fd894eea779ffdc849b0cc4c36178860.jpg) + +![](images/f5104e3c1e9ec089ffed93aaf2ca26f792af83e7c542d963204615bec793e27a.jpg) +Figure 3. Comparison of self-refinement losses. (Upper) Varying confidence threshold $\epsilon$ . (Lower) Test accuracies on target domain data. (Safe Training not applied) + +![](images/af950536c5a1344df51a3ba2c5009eb36e8e9b2d8ea3171977c005601efa9257.jpg) + +Table 6. Accuracies (%) using comparison losses. All results are reported at training step of ${20}\mathrm{k}.{X}^{ \dagger }$ means averaged over all 5 tasks with $X$ being target domain. ${}^{ \ddagger }$ Using Safe Training. + +
OHDNclp†inf†pnt†qdr†rel†skt†
Baseline-B81.138.950.725.546.111.957.442.0
ω = 085.541.157.322.052.21.863.449.9
ω = 185.740.156.623.448.10.363.349.0
ω ~ B(0.5)85.441.857.026.653.01.863.249.5
ω ~ B(0.5)‡85.443.457.028.251.813.062.947.4
+ +# 4.3. Effects of Bi-directional Self-Refinement + +Our method adopts bi-directional supervision for self-refinement in Eq. 4. The main consideration is to improve method's safeness. Figure 3 compares with uni-directional self-refinement by fixing $\omega$ to be 0 or 1. In the upper two figures, their performance drops for relatively large confidence threshold $\epsilon$ . In the lower two figures, model collapse occurs after training for some steps. In contrast, bi-directional self-refinement is more robust as it combines the two losses, thus reduces the negative effect of either one. Table 6 presents some quantitative results. On Office-Home, all losses perform similarly well. On DomainNet, bi-directional self-refinement works better. However, they all fail on challenging tasks when target domain is $qdr$ . This is solved with Safe Training. + +Another important issue is when to back-propagate gradients. Table 7 shows that the performance degrades when either the gradient for $b_{x}^{l}$ in Eq. 2 or the teacher probability of KL divergence in Eq. 4 are blocked. An interesting finding is that the bi-directional self-refinement appears to be more robust even when the gradients are blocked. We believe this is because the two losses are complementary. + +Table 7. Blocking gradient back-propagation for different variables. Note that $\pmb{p}_x$ and $\tilde{p}_x$ in the table only refer to the teacher probability in KL divergence. (Safe Training not applied) + +
bxlpxtilxPr→ArPr→ClPr→Rw
ω = 0×4.702.6616.39
ω = 1×79.1544.3889.14
ω ~ B(0.5)××84.1071.3290.75
ω ~ B(0.5)×84.3872.6090.87
ω ~ B(0.5)85.7474.9891.16
+ +![](images/6bb5782413ffc7b62e7bc1863e61bf1971ebf61db6e9647ffd195b4921d67202.jpg) +Figure 4. Visualization of perturbation at different layers. + +# 4.4. Effects of Safe Training + +As observed previously, the vanilla training strategy may fail on some tasks. The reason is that the predicted class distribution on target domain data collapses due to excessive perturbation or too large loss weight, even if they work well on other tasks. Safe Training adjusts their values adaptively to avoid such situation. Figure 2 presents detailed training histories on two representative tasks to show how it works. For $qdr \rightarrow clp$ , the adaptive scalar $r$ quickly converges to 1.0 and the diversity stabilizes to a relatively high value. Training model with or without Safe Training performs similarly. For $clp \rightarrow qdr$ , diversity drops after some steps, and $r$ resets to smaller values. A clear correlation between diversity and accuracy can be observed. For example, at step of 10k, the accuracy drops abruptly and diversity drops concurrently. Without Safe Training, model collapses after about 10k iterations. With Safe Training, the model trains normally and surpasses the baseline finally. It should be noted that model collapse mainly affects target domain data. For $clp \rightarrow qdr$ without safe training, the final accuracy on source domain is $96.9\%$ while that on target domain is only $0.3\%$ . + +# 4.5. Visualization of Perturbation + +To visualize the perturbed version of a target domain image $\pmb{x}$ , we initialize a trainable variable $\pmb{x}_{vis}$ as $\pmb{x}$ , and optimize $\pmb{x}_{vis}$ to minimize $\| \tilde{b}_x^l - b_{xvis}^l\|^2$ , where $\tilde{b}_x^l$ is the perturbed token sequence of $\pmb{x}$ and $b_{xvis}^l$ is the corresponding token sequence of $\pmb{x}_{vis}$ . Then $\pmb{x}_{vis}$ gives us an idea on how the perturbation in the latent space reflects on the raw input images. Figure 4 visualizes perturbed version of two images when adding perturbation to different transformer blocks. For shallow layers, an effect of blending with the + +![](images/167f2a70ee47018aafad1134d14d4d4cd7e62f6abd5e724f1edb5a8ba1a5c895.jpg) +(a) Perturbation at different layer + +![](images/08927e9573ff1821e9b3dca5c67fa1e72702625ef07f0f73f8f7dd623b18f212.jpg) +(b) Safe Training parameters + +![](images/3f0c5fb831f777af4054ff28e428c75dd54f9224c343bf4cb45cec94aa06407c.jpg) +(c) Perturbation scalar + +![](images/72f7ff759e83d98273869affe1c0e22844b317b599dc7111205ba1d5bbcc0829.jpg) +(d) Self-Refinement loss weight +Figure 5. Plots of ablation studies. Horizontal dash lines indicate baseline accuracies. ( $\dagger$ Safe Training not applied) + +other image can be observed. However, for deep layers, this effect is less noticeable due to highly non-linear transformation of the network. This also indicates the complementary in using multi-layer perturbation. + +# 4.6. Ablation Studies + +Figure 5 presents ablation studies on hyper-parameters. Figure 5a plots results of perturbing different layers. Figure 5b plots Safe Training with different parameters. $T$ and $L$ affects its granularity. A smaller $T$ implies more quick response. A larger $L$ increases sensitivity but at the risk of more false-positive detections. Many combinations of $T$ and $L$ work well in our method. Figure 5c and 5d plots accuracy curves vs. the perturbation scalar $\alpha$ and the self-refinement loss weight $\beta$ . Even for obviously unreasonable values like $\alpha = 0.5$ , Safe Training can still adjust them adaptively to avoid model collapse. When $\alpha = 0$ , our method still has some gain over baseline. This is due to random dropout operations in the classifier head. + +# 5. Conclusion + +In this paper, we propose a novel UDA method named SSRT. It leverages a vision transformer backbone, and uses perturbed target domain data to refine the model. A safe training strategy is developed to avoid model collapse. Experiments on benchmarks show its best performance. + +Limitation. Although we advance the average accuracy on DomainNet to $45.2\%$ , it is far from saturated. One way is to combine multiple source domains. Another way is to incorporate some meta knowledge about target domains. We plan to extend our study in these directions in the future. + +# References + +[1] David Berthelot, Nicholas Carlini, Ian Goodfellow, Nicolas Papernot, Avital Oliver, and Colin Raffel. Mixmatch: A holistic approach to semi-supervised learning. In NeurIPS, 2019. 2, 3, 4 +[2] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, pages 213-229, 2020. 1, 2 +[3] 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. 1, 2, 5, 6, 7 +[4] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In ICML, pages 1180-1189, 2015. 1, 2, 6, 7 +[5] Jian Gao, Yang Hua, Guosheng Hu, Chi Wang, and Neil M Robertson. Reducing distributional uncertainty by mutual information maximisation and transferable feature learning. In ECCV, pages 587-605. Springer, 2020. 6 +[6] Ryan Gomes, Andreas Krause, and Pietro Perona. Discriminative clustering by regularized information maximization. In NeurIPS, 2010. 3, 6 +[7] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. arXiv preprint arXiv:2103.00112, 2021. 2 +[8] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 1, 5, 6, 7 +[9] Chen-Yu Lee, Tanmay Batra, Mohammad Haris Baig, and Daniel Ulbricht. Sliced Wasserstein discrepancy for unsupervised domain adaptation. In CVPR, pages 10285-10295, 2019. 6 +[10] Shuang Li, Mixue Xie, Fangrui Lv, Chi Harold Liu, Jian Liang, Chen Qin, and Wei Li. Semantic concentration for domain adaptation. In ICCV, pages 9102-9111, 2021. 1, 5, 6, 7 +[11] Yu-Feng Li and Zhi-Hua Zhou. Towards making unlabeled data never hurt. In TPAMI, pages 175-188. IEEE, 2014. 1 +[12] Jian Liang, Dapeng Hu, and Jiashi Feng. Do we really need to access the source data? source hypothesis transfer for unsupervised domain adaptation. In ICML, pages 6028-6039, 2020. 1, 5, 6, 7 +[13] 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 ICCV, 2021. 2 +[14] Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I Jordan. Conditional adversarial domain adaptation. In NeurIPS, pages 1645-1655, 2018. 1, 5, 6 +[15] Mingsheng Long, Han Zhu, Jianmin Wang, and Michael I Jordan. Deep transfer learning with joint adaptation networks. In ICML, pages 2208-2217, 2017. 2 + +[16] Ke Mei, Chuang Zhu, Jiaqi Zou, and Shanghang Zhang. Instance adaptive self-training for unsupervised domain adaptation. In ECCV, pages 415-430, 2020. 2 +[17] Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. TPAMI, 41(8):1979-1993, 2018. 2, 3, 4 +[18] Avital Oliver, Augustus Odena, Colin Raffel, Ekin D Cubuk, and Ian J Goodfellow. Realistic evaluation of deep semi-supervised learning algorithms. NeurIPS, 2018. 4 +[19] Xingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang, Kate Saenko, and Bo Wang. Moment matching for multi-source domain adaptation. In ICCV, pages 1406-1415, 2019. 1, 6 +[20] Xingchao Peng, Ben Usman, Neela Kaushik, Judy Hoffman, Dequan Wang, and Kate Saenko. Visda: The visual domain adaptation challenge. arXiv preprint arXiv:1710.06924, 2017. 1, 6 +[21] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet large scale visual recognition challenge. IJCV, 115(3):211-252, 2015. 6 +[22] Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting visual category models to new domains. In ECCV, pages 213-226, 2010. 6 +[23] Yuan Shi and Fei Sha. Information-theoretical learning of discriminative clusters for unsupervised domain adaptation. In ICML, 2012. 3, 6 +[24] Rui Shu, Hung H Bui, Hirokazu Narui, and Stefano Ermon. A dirt-t approach to unsupervised domain adaptation. In ICLR, 2018. 1 +[25] 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 NeurIPS, 2020. 2, 3 +[26] Andreas Steiner, Alexander Kolesnikov, , Xiaohua Zhai, Ross Wightman, Jakob Uszkoreit, and Lucas Beyer. How to train your vit? data, augmentation, and regularization in vision transformers. arXiv preprint arXiv:2106.10270, 2021. 6 +[27] Robin Strudel, Ricardo Garcia, Ivan Laptev, and Cordelia Schmid. Segmenter: Transformer for semantic segmentation. In ICCV, 2021. 2 +[28] Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In ECCV, pages 443-450, 2016. 2 +[29] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In NeurIPS, 2017. 2, 4 +[30] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. In ICML, pages 10347-10357, 2021. 2 +[31] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In CVPR, pages 7167-7176, 2017. 2 + +[32] Eric Tzeng, Judy Hoffman, Ning Zhang, Kate Saenko, and Trevor Darrell. Deep domain confusion: Maximizing for domain invariance. arXiv preprint arXiv:1412.3474, 2014. 2 +[33] Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, and Sethuraman Panchanathan. Deep hashing network for unsupervised domain adaptation. In CVPR, pages 5018-5027, 2017. 1, 6 +[34] Vikas Verma, Alex Lamb, Christopher Beckham, Amir Najafi, Ioannis Mitlagkas, David Lopez-Paz, and Yoshua Bengio. Manifold mixup: Better representations by interpolating hidden states. In ICML, pages 6438-6447, 2019. 3 +[35] Ximei Wang, Ying Jin, Mingsheng Long, Jianmin Wang, and Michael Jordan. Transferable normalization: Towards improving transferability of deep neural networks. In NeurIPS, 2019. 5, 6, 7 +[36] Garrett Wilson and Diane J Cook. A survey of unsupervised deep domain adaptation. ACM TIST, 11(5):1-46, 2020. 1 +[37] Qizhe Xie, Zihang Dai, Eduard Hovy, Minh-Thang Luong, and Quoc V Le. Unsupervised data augmentation for consistency training. In NeurIPS, 2020. 2 +[38] Ruijia Xu, Guanbin Li, Jihan Yang, and Liang Lin. Larger norm more transferable: An adaptive feature norm approach for unsupervised domain adaptation. In ICCV, pages 1426-1435, 2019. 5, 6, 7 +[39] Tongkun Xu, Weihua Chen, Pichao Wang, Fan Wang, Hao Li, and Rong Jin. Cdtrans: Cross-domain transformer for unsupervised domain adaptation. arXiv preprint arXiv:2109.06165v1, 2021. 2, 5, 6, 7 +[40] Jinyu Yang, Jingjing Liu, Ning Xu, and Junzhou Huang. Tvt: Transferable vision transformer for unsupervised domain adaptation. arXiv preprint arXiv:2108.05988, 2021. 2, 5, 6, 7 +[41] Minghao Yin, Zhuliang Yao, Yue Cao, Xiu Li, Zheng Zhang, Stephen Lin, and Han Hu. Disentangled non-local neural networks. In ECCV, pages 191-207, 2020. 2 +[42] Pengchuan Zhang, Xiyang Dai, Jianwei Yang, Bin Xiao, Lu Yuan, Lei Zhang, and Jianfeng Gao. Multi-scale vision longformer: A new vision transformer for high-resolution image encoding. In ICCV, 2021. 1 +[43] Yabin Zhang, Bin Deng, Kui Jia, and Lei Zhang. Label propagation with augmented anchors: a simple semi-supervised learning baseline for unsupervised domain adaptation. In ECCV, pages 781-797, 2020. 1 +[44] Yuchen Zhang, Tianle Liu, Mingsheng Long, and Michael I Jordan. Bridging theory and algorithm for domain adaptation. In ICML, pages 7404-7413, 2019. 1 +[45] Yang Zou, Zhiding Yu, BVK Kumar, and Jinsong Wang. Unsupervised domain adaptation for semantic segmentation via class-balanced self-training. In ECCV, pages 289-305, 2018. 2 +[46] Yang Zou, Zhiding Yu, Xiaofeng Liu, BVK Kumar, and Jinsong Wang. Confidence regularized self-training. In ICCV, pages 5982-5991, 2019. 2 \ No newline at end of file diff --git a/safeselfrefinementfortransformerbaseddomainadaptation/images.zip b/safeselfrefinementfortransformerbaseddomainadaptation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..780b446451707fef75f6c3adcf5574b3a9f66d6f --- /dev/null +++ b/safeselfrefinementfortransformerbaseddomainadaptation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f05878ac056784ef51e65b6554582a1c2642e315dff96e224f86cca186e4d558 +size 823827 diff --git a/safeselfrefinementfortransformerbaseddomainadaptation/layout.json b/safeselfrefinementfortransformerbaseddomainadaptation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2697b8bd6a09b56516e3174ded7e2091d8079e23 --- /dev/null +++ b/safeselfrefinementfortransformerbaseddomainadaptation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5695b76eecbb7d870fd826696c0714d699f1b968e7518d6ebcd7fdb7f19d14b +size 461200 diff --git a/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/3f90a2f2-1924-4c7f-867b-feed0ec5e9a5_content_list.json b/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/3f90a2f2-1924-4c7f-867b-feed0ec5e9a5_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e1abaf9b22847c985869a585e12d557f100c3447 --- /dev/null +++ b/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/3f90a2f2-1924-4c7f-867b-feed0ec5e9a5_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13e92f9abf7eb9a8ff140d89a8af64291efd848aec98cdd3701de3cbe1396ba0 +size 80960 diff --git a/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/3f90a2f2-1924-4c7f-867b-feed0ec5e9a5_model.json b/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/3f90a2f2-1924-4c7f-867b-feed0ec5e9a5_model.json new file mode 100644 index 0000000000000000000000000000000000000000..32e55f2aed73d4f137174524126b8eb57cc24a80 --- /dev/null +++ b/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/3f90a2f2-1924-4c7f-867b-feed0ec5e9a5_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:496786939e8c404bd6e1edbdd383d0c1cc631e5ee6974b09a18253a90b30b07a +size 97693 diff --git a/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/3f90a2f2-1924-4c7f-867b-feed0ec5e9a5_origin.pdf b/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/3f90a2f2-1924-4c7f-867b-feed0ec5e9a5_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c9cda504f2a961cc38dda6734c91959ba97b2952 --- /dev/null +++ b/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/3f90a2f2-1924-4c7f-867b-feed0ec5e9a5_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:338b45ef150d36a725f3cb48fc5a8f29afeeecc719d66fd213d89e8f0ea14fbc +size 1105436 diff --git a/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/full.md b/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/full.md new file mode 100644 index 0000000000000000000000000000000000000000..550f1d0937322a123b553ff13acc16b4c1ee80e4 --- /dev/null +++ b/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/full.md @@ -0,0 +1,350 @@ +# Safe-Student for Safe Deep Semi-Supervised Learning with Unseen-Class Unlabeled Data + +Rundong He* + +Shandong University + +rundong.he@mail.sdu.edu.cn + +Zhongyi Han* + +Shandong University + +hanzhongyicn@gmail.com + +Xiankai Lu + +Shandong University + +carrierlxxk@gmail.com + +Yilong Yin† + +Shandong University + +ylyin@sdu.edu.cn + +# Abstract + +Deep semi-supervised learning (SSL) methods aim to take advantage of abundant unlabeled data to improve the algorithm performance. In this paper, we consider the problem of safe SSL scenario where unseen-class instances appear in the unlabeled data. This setting is essential and commonly appears in a variety of real applications. One intuitive solution is removing these unseen-class instances after detecting them during the SSL process. Nevertheless, the performance of unseen-class identification is limited by the small number of labeled data and ignoring the availability of unlabeled data. To take advantage of these unseen-class data and ensure performance, we propose a safe SSL method called SAFE-STUDENT from the teacher-student view. Firstly, a new scoring function called energy-discrepancy (ED) is proposed to help the teacher model improve the security of instances selection. Then, a novel unseen-class label distribution learning mechanism mitigates the unseen-class perturbation by calibrating the unseen-class label distribution. Finally, we propose an iterative optimization strategy to facilitate teacher-student network learning. Extensive studies on several representative datasets show that SAFE-STUDENT remarkably outperforms the state-of-the-art, verifying the feasibility and robustness of our method in the under-explored problem. + +# 1. Introduction + +The recent remarkable success of deep learning methods attributes to the advancements of learning algorithms and the availability of large-scale labeled data [17, 30]. However, large-scale annotated data is scarce and costly to col + +lect for various real-world applications, such as medical image analysis [12, 29] and image classification [14, 27]. In contrast, unlabeled data is plentiful and cheap to collect, stimulating the great research interest of SSL. Currently, the research of deep SSL methods can be categorized into three main branches: consistency regularization [18,31,33], pseudo-labeling [3,30,36], and hybrid methods [1,2,32]. + +Although current deep SSL methods can enhance the performance of learning models, the prerequisite is that the unlabeled set derives from the identical distribution with the labeled set. Once this condition is not satisfied in real scenarios, the performance of SSL models degenerates significantly [4, 9, 27]. Many real-world tasks involve the situation where unlabeled data contains some unseen-class instances. For example, at the beginning stage of the outbreak of COVID-19, the unlabeled data inevitably contains some imperceptible COVID-19 instances in the deep SSL pneumonia classification [11]. These unseen-class instances heavily hinder the safety of the pneumonia classification model. We define this case as the problem of Safe Deep semi-supervised learning with Unseen-class unlabeled data (SDU), which accommodates a variety of real-world applications but is rarely considered in the literature. + +Considering the unseen-class instances contained in unlabeled data hurt the performance of seen-class classification easily, one intuitive way is to detect these unseen-class instances by unseen-class identification methods, remove them, and then use any existing SSL method to obtain promising performance. Nevertheless, the performance of unseen-class identification is limited by the small number of labeled data. Several deep safe SSL methods are proposed to alleviate the limitations [3,4,9,37]. These deep safe SSL methods select reliable seen-class instances from unlabeled data to increase the number of labeled seen-class instances. However, the selected seen-class instances are inaccurate due to limited identification ability and the lack of suit- + +![](images/27f8e91546f7176d85f9fc987e2a0e6bd34fe9475e49bec55dc29864d23bcb9a.jpg) +Figure 1. With the increase of training iterations of $\mathrm{DS}^3\mathrm{L}$ , the learned weights of seen-class and unseen-class instances tend to be consistent and negligible. Shaded regions indicate the range of the weights over unlabeled instances. The orange denotes the AUC of unseen-class identification. + +![](images/91f9762dd09d23b59fd3de9ff261619053b5699a73cbba11cf16aecdd97897d2.jpg) + +able scoring function. For example, in the pioneering work $\mathrm{DS}^3\mathrm{L}$ [9], as training progresses (see Fig. 1), the learned weights of seen-class and unseen-class instances tend to be consistent and small, which causes the poor performance of unseen-class identification. Moreover, the valuable unseen-class data in unlabeled data set are not used effectively, which indeed contribute to unseen-class identification. + +To improve unseen-class identification, we propose a novel SAFE-STUDENT from the teacher-student view. Specifically, we propose a novel scoring function called energy-discrepancy (ED) that addresses the maximum-logit dominance problem of the existing energy function. This new scoring function provides a better indication for the teacher model to capture unseen-class data in the unlabeled set. Then, we propose the unseen-class label distribution learning module to help the student model calibrate the unseen-class label distribution. Therefore, the overconfidence problem of the student model to unseen-class data is mitigated. Finally, we further propose an iterative optimization strategy to boost the performance of the whole teacher-student models. + +We summarize our contributions as follows: + +- We investigate a limited-explored problem, safe deep SSL learning with unseen-class unlabeled data, and propose a novel safe deep SSL framework called SAFE-STUDENT. +- We raise a new scoring function called ED to help the teacher model improve the performance of unseen-class identification, and verify the consistency between the optimization objective and ED. +- We propose an unseen-class label distribution learning module that adequately calibrates the unseen-class probability distribution into a uniform distribution. +- We carry out extensive experiments on four benchmark datasets. Extensive results verify the learnability of this new problem and the robustness of SAFE-STUDENT. + +# 2. Related Work + +Deep Semi-Supervised Learning. Deep SSL has made revolutionary advances to diverse machine learning problems. The remarkable success attributes to the advancements of learning algorithms and the utilization of abundant unlabeled data. Deep SSL methods mainly contain three categories: consistency regularization methods, pseudolabeling methods, and hybrid methods. Consistency regularization methods [18, 31, 33] take advantage of unlabeled data by assuming that the model should output similar predictions for any image and its perturbed version. Pseudolabeling methods [3, 21, 28, 30, 36] use the model itself to obtain artificial labels of unlabeled data. Hybrid methods [1, 2, 32] combine both consistency regularization and pseudo-labeling, and use data augmentation [5, 7, 35]. However, the effectiveness of these methods is based on that all labeled and unlabeled data come from the same distribution. Once the assumption is broken, the performance of seen-class classification would degrade and even fall below the performance of supervised learning methods [4, 9, 27]. + +Safe Semi-Supervised Learning. Safe SSL ensures the performance of SSL methods is no worse than a simple supervised learning model. The study about safe SSL problem mainly refers to three aspects [22]: data quality [9, 10, 39], model uncertainty [23], and measure diversity [22]. In this paper, we focus on the data quality that the unlabeled data contains some unseen-class instances. One intuitive solution is removing these unseen-class instances after detecting them during the SSL process. Thus, the performance of unseen-class identification is the key to mitigating the side effects of unseen-class unlabeled data. + +Guo et al. [9] assigned soft weights to each unlabeled instance by a weighting function, which can be viewed as an unseen-class detector. Then, Chen et al. [4] used the model to identify unseen-class instances at the beginning of the training time but which is unstable. Yu et al. [37] identified unseen-class by considering labeled data as in-distribution data and unlabeled data as out-of-distribution data. However, the performance of unseen-class identification is limited by the small number of in-distribution data and noisy out-of-distribution data. In [3], labeled data is used to train a supervised model and then identify unseen classes based on the model confidence. However, as the training process progresses, all unlabeled instances are absorbed into the seen-class set. The above representative works suffer from the poor performance due to the inaccurate unseen-class identification and the lack of suitable scoring function. Moreover, the valuable unseen-class data in unlabeled data set are not used effectively, which indeed contribute to unseen-class identification. Different from these works, this paper provides a novel and elegant approach by improving the unseen-class identification so as to reduce the perturbation on the seen-classifier. + +# 3. SAFE-STUDENT + +# 3.1. Learning Set-up + +Definition 1 (Distribution for Safe SSL Scenario.) Given a feature space $\mathcal{X} \subset \mathbb{R}^d$ and the label space $\mathcal{Y}$ , the labeled and unlabeled data have different joint distributions $P(X^l, Y^l)$ and $P(X^u, Y^u)$ , where the feature space $X^l, X^u \subset \mathcal{X}$ and the label space $Y^l, Y^u \subset \mathcal{Y}$ . + +Definition 2 (Safe Deep semi-supervised learning with Unseen-class unlabeled data (SDU).) Let $D_{L} = \{(\pmb{x}_{i}^{l},y_{i}^{l})\}_{i = 1}^{m}$ denote the labeled data set, where $m$ denotes the number of labeled data, $\pmb{x}_i^l\in X^l,y_i^l\in Y^l$ . Let $D_U = \{\pmb{x}_i^u\}_{i = 1}^n$ denote the unlabeled data set, where $n$ denotes the number of unlabeled data, $\pmb{x}_i^u\in X^u$ , and $m\ll n$ . $Y^{l}\subset Y^{u}$ and $Y^{new} = Y^{u}\backslash Y^{l}$ , where $Y^{new}$ denotes unseen classes that only emerge in the unlabeled set $D_U$ . Let $K = |Y^{l}|$ denote the number of seen classes. + +When $Y^{new} \neq \emptyset$ , unseen classes lead to class distribution mismatch, which damages the performance of seen-class classification. SAFE-STUDENT is to keep the seen-class classification model safe. + +As shown in Fig. 2, SAFE-STUDENT mainly contains four modules: teacher pre-training module (Sec. 3.2) to obtain a teacher model that serves as a mentor for the student model, seen and unseen classes identification module (Sec. 3.3) to select reliable seen-class and unseen-class instances, seen-class learning module (Sec. 3.4) to achieve the seen-class classification, unseen-class label distribution learning module (Sec. 3.5) to mitigate the adverse effects of unseen classes. Moreover, iterative optimization strategy (Sec. 3.6) helps the teacher model improve the identification of unseen classes and helps the student model improve the performance of seen-class classification. + +# 3.2. Teacher Pre-Training + +A good teacher model lays solid foundations for assigning accurate pseudo-labels to seen-class unlabeled data, estimating the uncertainties of unseen-class unlabeled data, and initializing the student model. Accordingly, we use the data augmentation (aug) strategy to pre-train a reliable teacher model. For any image $\pmb{x}_i^l$ with label $y_i^l$ from $D_L$ , we perform the augmentation strategy on $\pmb{x}_i^l$ denoted by $\mathrm{aug}(\pmb{x}_i^l)$ . The augmentation strategy combines several carefully selected data augmentation manners to prevent the semantic information change of labeled data. The teacher model is optimized by the cross-entropy loss as follows: + +$$ +\mathcal {L} _ {C E} = - \frac {1}{m} \sum_ {i = 1} ^ {m} \sum_ {j = 1} ^ {K} y _ {i j} ^ {l} \log \left(\frac {e ^ {f _ {j} (\operatorname {a u g} \left(\boldsymbol {x} _ {i} ^ {l}\right))}}{\sum_ {j = 1} ^ {K} e ^ {f _ {j} (\operatorname {a u g} \left(\boldsymbol {x} _ {i} ^ {l}\right))}}\right), \tag {1} +$$ + +where $f_{j}(\mathrm{aug}(\pmb{x}_{i}^{l})) = [\eta \circ \Phi (\mathrm{aug}(\pmb{x}_{i}^{l}))]_{j}$ denotes the $j^{th}$ index of logits passed through a classifier head $\eta$ connected to a feature extractor $\Phi$ , $K$ denotes the number of seen classes, and $y_{ij}^{l}$ corresponds to the $j^{th}$ element of one-hot encoded ground-truth label of the instance $\pmb{x}_{i}^{l}$ . + +# 3.3. Seen and Unseen Classes Identification + +Unlike previous works that only select reliable seen-class instances [3,4,37], we believe that reliable unseen-class instances also contribute to solving the SDU problem. We propose to utilize reliable unseen-class instances for the unseen-class label distribution learning such that we can easily detect them (elaborated in Sec. 3.5). Accordingly, the objective of this seen and unseen classes identification (SUCI) module is to select out reliable seen-class instances and unseen-class instances simultaneously. + +We propose a novel scoring function called energy-discrepancy (ED) to measure the teacher model outputs. Denote by $D_{sc}$ and $D_{uc}$ the reliable seen-class set and unseen-class set, respectively. Both sets are selected by: + +$$ +\begin{array}{l} D _ {s c} = \left\{\boldsymbol {x} _ {i} ^ {u} \mid (\operatorname {E D} \left(\boldsymbol {x} _ {i} ^ {u}\right) > \tau_ {1}), i = 1, \dots , n \right\}, \\ D _ {u c} = \left\{\boldsymbol {x} _ {i} ^ {u} \mid (\operatorname {E D} \left(\boldsymbol {x} _ {i} ^ {u}\right) < \tau_ {2}), i = 1, \dots , n \right\}, \end{array} \tag {2} +$$ + +where $\tau_{1} > \tau_{2}$ are thresholds, $\tau_{1}$ is set according to the mismatch ratio in $D_U$ , and $\tau_{2} = \max \{\tau_{1} - 0.1, 0\}$ . If the mismatch ratio is not known in advance, we can consider the unseen-class instances in $D_U$ as open set noises and then easily infer it by [24]. + +Energy-Discrepancy. In the previous study of out-of-distribution (OOD) detection [25], energy is used to measure the physical properties and the outlier degrees of OOD data. Unlike confidence, energy is theoretically aligned with the probability density of the inputs and is less susceptible to the overconfidence issue [25]: + +$$ +\mathrm {E} \left(\boldsymbol {x} _ {i} ^ {u}\right) = - T ^ {\prime} \cdot \log \sum_ {j = 1} ^ {K} e ^ {f _ {j} \left(\boldsymbol {x} _ {i} ^ {u}\right) / T ^ {\prime}}, \tag {3} +$$ + +where $T'$ denotes the temperature parameter, $\operatorname{E}(\cdot)$ represents energy. The higher negative energy of $\boldsymbol{x}_i^u$ means the $\boldsymbol{x}_i^u$ more likely belongs to the seen classes [25]. Energy is effective to detect unseen classes in many open tasks, like open world object detection [15]. + +However, we find that the energy cannot accurately identify seen and unseen classes instances because the energy is always dominated by the maximum logit. For example, Fig. 3 illustrates four instances' logit distributions and corresponding negative energy values. The third instance (c) intuitively belongs to the unseen class according to the logit distribution; however, it has the largest negative energy value, which breaks our intuition. In contrast, compared to the first and fourth instances, the second instance is more likely to belong to the seen class; however, it has a lower negative energy value, which again breaks the agreement on the energy function. Therefore, it is not accurate to identify seen and unseen classes by energy. + +We propose a novel scoring function called energy-discrepancy to give full play to the role of non-maximum logits such that we can mitigate the dominance problem of + +![](images/fcfd28b7eed8f257c17335ac3f4372ce6d878dbb785a4cb7b63e7fd6005a0ed6.jpg) +Figure 2. The overview of SAFE-STUDENT for deep safe SSL with unseen-class unlabeled data. It mainly consists of four modules. Especially, SAFE-STUDENT uses a new scoring function to achieve seen-class and unseen-class identification, and uses an unseen-class label distribution learning module to improve unseen-class identification. + +![](images/3c724c15a2ea2e166a2b29e2d66b442a23e7828665536dc9f3efc90139213418.jpg) +Figure 3. Logit distributions of four instances with negative Energy (-E) and Energy-Discrepancy (ED). + +![](images/231d1453bb8f200f0da6b0673927d005c14d3861f6e90ea994bb8977ceb31a1e.jpg) + +![](images/223bd17554b9f63be442306cee32fb06f25b40452ca1c49d38790e4db8e62199.jpg) + +![](images/ff89c5bb52f09f52bfdd9db248d4f93407ff9e969ede6a30f650f95433ac76d9.jpg) + +maximum logit. The key novelty of ED lies in the measurement of the negative energy discrepancy between the original negative energy and the updated negative energy after removing the maximum logit. Specificity, we define ED by: + +$$ +\begin{array}{l} \operatorname {E D} \left(\boldsymbol {x} _ {i} ^ {u}\right) = T ^ {\prime} \cdot \log \sum_ {j = 1} ^ {K} e ^ {f _ {j} \left(\boldsymbol {x} _ {i} ^ {u}\right) / T ^ {\prime}} \tag {4} \\ - T ^ {'} \cdot \log \left[ \sum_ {j = 1} ^ {K} e ^ {f _ {j} (\pmb {x} _ {i} ^ {u}) / T ^ {\prime}} - \max \{e ^ {f _ {j} (\pmb {x} _ {i} ^ {u}) / T ^ {\prime}} \} _ {j = 1} ^ {K} \right]. \\ \end{array} +$$ + +The first item in Eq. (4) denotes the original negative energy of instance $\boldsymbol{x}_i^u$ . Since the energy is dominated by the maximum logit, it is not accurate enough to select reliable seen-class instances and unseen-class instances by using negative energy directly. Accordingly, we recalculate the negative energy of instance $\boldsymbol{x}_i^u$ after removing the maximum logit. The updated negative energy is denoted by the second item in Eq. (4). Then, we utilize the discrepancy between the original negative energy and the updated negative energy to select reliable samples, renamed energy-discrepancy (ED). + +Compared to Energy, ED improves the selection accuracy from the perspective of discrepancy and gives full play + +to the role of non-maximum logits. It considers the whole distribution of logits and can reflect the uncertainty change brought by each logit (see Figs. 3(a) and (d)). Meanwhile, ED retains the essential characteristics of energy, which is less susceptible to the overconfidence issue. The higher ED of $\boldsymbol{x}_i^u$ means the lower the uncertainty of $\tilde{y}_i^u$ . Correspondingly, $\boldsymbol{x}_i^u$ more likely belongs to the seen classes. The ED values of the four instances in Fig. 3 accurately represent their uncertainties, which demonstrates that ED contributes to selecting more reliable instances. ED is a very general method and can be flexibly embedded into other frameworks, such as adversarial defense frameworks, etc. + +Energy-Discrepancy vs Energy. Then, we perform an in-depth analysis of energy and ED. Let $T'$ equal 1 in Eq. (3). Suppose the ground truth label of sample $x$ is $y$ . Then we can get + +$$ +\begin{array}{l} \operatorname {E} (\boldsymbol {x}) = - \log \left[ e ^ {f _ {y} (\boldsymbol {x})} \cdot \left(e ^ {f _ {1} (\boldsymbol {x}) - f _ {y} (\boldsymbol {x})} + \dots + e ^ {f _ {K} (\boldsymbol {x}) - f _ {y} (\boldsymbol {x})}\right) \right] \\ = - \log e ^ {f _ {y} (\boldsymbol {x})} - \log \left(e ^ {f _ {1} (\boldsymbol {x}) - f _ {y} (\boldsymbol {x})} + \dots + e ^ {f _ {K} (\boldsymbol {x}) - f _ {y} (\boldsymbol {x})}\right) \\ \approx - f _ {y} (\boldsymbol {x}). \tag {5} \\ \end{array} +$$ + +Formally speaking, for each $\pmb{x}$ , we define the sub-optimal + +label by $y' = \arg \max_{\bar{y} \in \mathcal{Y} \setminus \{y\}} f_{\bar{y}}(\boldsymbol{x})$ . After removing the logit corresponding to the optimal label, the new energy score is $\mathrm{E}'(\boldsymbol{x})$ , which is + +$$ +\begin{array}{l} E ^ {\prime} (\boldsymbol {x}) = - f _ {y ^ {\prime}} (\boldsymbol {x}) - \log \left(e ^ {f _ {1} (\boldsymbol {x}) - f _ {y ^ {\prime}} (\boldsymbol {x})} + \dots + e ^ {f _ {K} (\boldsymbol {x}) - f _ {y ^ {\prime}} (\boldsymbol {x})}\right) \\ \geq - f _ {y ^ {\prime}} (\boldsymbol {x}) - \log (K - 1). \tag {6} \\ \end{array} +$$ + +And due to $\log \left(e^{f_1(\pmb{x}) - f_{y'}(\pmb{x})} + \dots + e^{f_K(\pmb{x}) - f_{y'}(\pmb{x})}\right) \geq 0$ , we can know that $\mathrm{E}'(\pmb{x}) \leq -f_{y'}(\pmb{x})$ . So we can know $-f_{y'}(\pmb{x}) - \log(K - 1) \leq \mathrm{E}'(\pmb{x}) \leq -f_{y'}(\pmb{x})$ . Let $\mathrm{E}'(\pmb{x}) = -f_{y'}(\pmb{x})$ , and the bias is less than $\log(K - 1)$ . Then, we can get $\mathrm{ED}(\pmb{x})$ as follows, + +$$ +\operatorname {E D} (\boldsymbol {x}) = \left| \operatorname {E} (\boldsymbol {x}) - \operatorname {E} ^ {\prime} (\boldsymbol {x}) \right| \approx f _ {y} (\boldsymbol {x}) - f _ {y ^ {\prime}} (\boldsymbol {x}). \tag {7} +$$ + +According to Eq. (7), we can know ED is approximately the discrepancy between the logit of the optimal label and the logit of the sub-optimal label. Moreover, the final loss function Eq. (11) is aimed at enlarging ED of seen classes by the first two items and minimizing ED of unseen classes by the last item, which verifies the consistency between the optimization objective and our proposed scoring function ED. On the contrary, energy is inconsistent with optimization objective, which causes inaccurate unseen-class identification. Please see Appendix for specific analysis. + +In summary, SUCI uses the newly proposed ED that contributes to the accurate selection of seen-class and unseen-class data from the view of discrepancy property. To ensure the safe SUCI, we design the following learning paradigm. + +# 3.4. Seen-Class Learning + +In practice, the student's performance on seen-class classification is restricted when learning from inaccurate pseudo-labels due to confirmation bias of the teacher model. When only using the vanilla cross-entropy loss function, the student model will be easily confused by false pseudolabels. The reason is that the cross-entropy loss function focuses on learning a hyperplane for discriminating each class from the other classes, causing unsatisfactory performance on the test set. Therefore, vanilla cross-entropy loss is not a suitable optimization objective when confirmation bias exists. To overcome the confirmation bias, a new and effective loss function is designed, which considers both probability distribution and pseudo label. + +Specifically, we propose a confirmation bias elimination (CBE) loss function to mitigate the reliance on pseudolabels and boost the tolerance to inaccurate pseudo-labels. Different from the vanilla cross-entropy loss function, the CBE loss function attempts to measure the probability distributions between an original instance $\pmb{x}_i^u$ and its augmented version $\mathrm{aug}(\pmb{x}_i^u)$ . Note that the probability distribution of $\pmb{x}_i^u$ is taken from the output of the teacher model. In contrast, the probability distribution of $\mathrm{aug}(\pmb{x}_i^u)$ is taken + +from the student model. Such a way mitigates the local optima in which the network might get stuck due to weak guidance. Formally, we define the confirmation bias elimination (CBE) loss function to optimize the student model by + +$$ +\begin{array}{l} \mathcal {L} _ {C B E} = \frac {1}{| D _ {s c} |} \sum_ {\boldsymbol {x} _ {i} ^ {u} \in D _ {s c}} \left[ - \tilde {y} _ {i} ^ {u} \log \left(\tilde {\eta} \circ \Phi (\operatorname {a u g} \left(\boldsymbol {x} _ {i} ^ {u}\right))\right) \right. \tag {8} \\ \left. + \tilde {p} _ {i} ^ {u} \log \frac {\tilde {p} _ {i} ^ {u}}{\tilde {\eta} \circ \Phi (\operatorname {a u g} (\boldsymbol {x} _ {i} ^ {u}))} \right], \\ \end{array} +$$ + +where $|D_{sc}|$ denotes the number of instances in $D_{sc}$ , $\tilde{y}_i^u$ denotes hard pseudo label of instance $x_i^u$ from $D_{sc}$ by teacher model, $\tilde{p}_i^u$ denotes the probability distribution of instance $x_i^u$ by teacher model, and $\tilde{\eta}$ denotes the classifier head $\eta$ followed by softmax function. + +To further mitigate the confirmation bias, we also incorporate Eq. (1) to use the labeled set $D_{L}$ that includes a small amount of valuable seen-class data with ground-truth labels. + +# 3.5. Unseen-Class Label Distribution Learning + +To some degree, the seen and unseen classes identification module mitigates the overconfidence problem on unseen classes by using ED. The strategy is based on the predictions of the network, but the overconfidence problem of the network itself still exists. Accordingly, there is still a part of hard unseen-class instances that make the teacher model overconfidence, which confuses the seen and unseen classes identification module. Overconfident predictions with low uncertainties cause the seen-class set to contain dangerous unseen-class instances. These dangerous instances disrupt the seen-class distribution, resulting in degradation of seen-class classification performance [19]. + +Inspired by label distribution learning [8, 34], we propose the unseen-class label distribution learning module to increase the unseen-class uncertainty by calibrating the unseen-class probability distribution. Based on the unseen instances set $D_{uc}$ selected by the SUCI module, the unseen-class label distribution learning module attempts to make the probability distribution of $D_{uc}$ converge to the uniform distribution $\mathcal{U}$ . In practice, we optimize the Kullback-Leibler (KL) divergence to minimize the difference between the probability distribution of $D_{uc}$ and $\mathcal{U}$ by + +$$ +\mathcal {L} _ {U C D} = \frac {1}{| D _ {u c} |} \sum_ {\boldsymbol {x} _ {i} ^ {u} \in D _ {u c}} \omega \left(\boldsymbol {x} _ {i} ^ {u}\right) \mathrm {K L} (\mathcal {U} (y) \| \tilde {\eta} \circ \Phi ((\operatorname {a u g} \left(\boldsymbol {x} _ {i} ^ {u}\right))), \tag {9} +$$ + +where $|D_{uc}|$ denotes the number of instances in $D_{uc}$ , $\omega(\boldsymbol{x}_i^u)$ denotes the weight of sample $\boldsymbol{x}_i^u$ , + +$$ +\omega \left(\boldsymbol {x} _ {i} ^ {u}\right) = \exp \left(\frac {\max _ {\boldsymbol {x} _ {j} ^ {u} \in D _ {u c}} \mathrm {E D} \left(\boldsymbol {x} _ {j} ^ {u}\right) - \mathrm {E D} \left(\boldsymbol {x} _ {i} ^ {u}\right)}{\max _ {\boldsymbol {x} _ {j} ^ {u} \in D _ {u c}} \mathrm {E D} \left(\boldsymbol {x} _ {j} ^ {u}\right)}\right). \tag {10} +$$ + +The mined unseen-class data have different reliability levels, so we perform exponential weighting on these data according to Eq. (10), and $1 \leq \omega(\boldsymbol{x}_i^u) \leq e$ . The exponential + +weighting can amplify the role of reliable unseen-class data. Since KL divergence measures the distribution discrepancy, its optimization can adequately calibrate the unseen-class probability distribution. The calibration strategy mitigates the overconfidence of the student model to unseen-class instances. The teacher model, after iterative optimization, achieves more accurate predictions, which help the SUCI module identify seen-class and unseen-class instances more easily. Therefore, we could mitigate the perturbation of unseen-class instances to the seen-class distribution. + +# 3.6. Iterative Optimization + +Considering Eqs. (1), (8), and (9), we state the overall loss as: + +$$ +\mathcal {L} = \mathcal {L} _ {C E} + \lambda_ {1} \mathcal {L} _ {C B E} + \lambda_ {2} \mathcal {L} _ {U C D}, \tag {11} +$$ + +where $\lambda_{1}$ and $\lambda_{2}$ are coefficients. We adopt an iterative training way to optimize SAFE-STUDENT as follows. We first fully pre-train the teacher model by Eq. (1), then share its parameters to a new student model. After that, we fix the teacher model to select reliable seen-class and unseen-class sets used to train the student model. Once this round of training is completed, the student model performs better than the teacher model. Then, to improve the teacher model's ability to guide the next round of student training, we update the teacher model with the technology of exponential moving average (EMA) [33] and the student model's parameters at the current round. Next, with the guidance of the updated teacher model, SAFE-STUDENT trains the student model with a large learning rate and keeps decreasing the learning rate until the end of the current training round. Utilizing a large learning rate aims to prevent the model from falling into local optimal points. By using the iterative strategy, the seen-class classification performance of the student model can be continuously improved. The iterative training of these modules provides a guarantee for the student model. Algorithm 1 summarizes the detailed optimization procedure, which can be seen in Appendix. + +# 3.7. Convergence Analysis + +We further analyze the convergence of optimization process in SAFE-STUDENT. Proof can be seen in Appendix. + +Theorem 1 (Convergence.) Suppose the final loss function $\mathcal{L}$ is Lipschitz-smooth with constant $L \leq 2$ and $\rho$ -bounded gradients, then by following our optimization algorithm, the loss $\mathcal{L}$ always decreases along with the iteration $t$ , and step size $\eta_{\theta_s} \leq 1$ , $\mathcal{L}(\theta_s^{t+1}) \leq \mathcal{L}(\theta_s^t)$ . + +# 4. Experiments + +# 4.1. Experimental Setup + +Datasets. We evaluate SAFE-STUDENT on image classification datasets: MNIST [20], CIFAR-10 [16], CIFAR-100 [16], and TinyImageNet (a subset of ImageNet [6]). + +![](images/63734c49bd520d914768272b1169afc9486476984550d4e6186a2a0d84ecf577.jpg) +(a) MNIST + +![](images/11510c38fa32438a4a049ab5ba7551d4f3d44e478a94109b475499fafc329653.jpg) +(b) CIFAR-10 +Figure 4. Seen-class classification accuracy (\%) of SAFE-STUDENT and compared deep SSL methods on MNIST and CIFAR-10 with different class mismatch ratios between labeled and unlabeled data. Shaded regions indicate standard deviation over five runs. + +Baselines. We compare SAFE-STUDENT on test data that only contain seen-class instances with SSL baselines: Pseudo-Labeling [21], Pi-Model [31], Temporal Ensembling [18], Mean Teacher [33], Virtual Adversarial Training (VAT) [26], FixMatch [32], UASD [4], $\mathbf{DS}^3\mathbf{L}$ [9], Multi-Task Curriculum (MTC) [37], and Curriculum Labeling (CL) [3]. Moreover, we make the supervised method trained on $D_{L}$ as another baseline. + +# 4.2. Results + +# 4.2.1 MNIST + +Due to the small size of images, we adopt a simple two-layer CNN model as a backbone network [9]. The network is trained using stochastic gradient descent (SGD) with a learning rate of $1e^{-3}$ . We train the model for 500 epochs with a batch size of 100. Half of the batch size comes from labeled data, and the other half comes from unlabeled data. By optimizing Eq. (11), we obtain a safe student model. + +Fig. 4(a) reports the average accuracy of different deep SSL methods over five runs with different class mismatch ratios. From Fig. 4(a), we can find that the performance of all the deep SSL methods, including our proposal, is better than the supervised learning method when the extent of labeled/unlabeled class mismatch ratio is $0\%$ . However, as the class distribution mismatch increases, the performance of the existing deep SSL method drops rapidly. Many deep SSL methods even under-perform the supervised learning method when the extent of labeled/unlabeled class mismatch ratio is $40\%$ . Although these safe SSL methods still exceed the supervised learning method when the mismatch ratio is $60\%$ , our proposed SAFE-STUDENT is significantly better and can reach $96.5\%$ averaged accuracy, which is about $3.3\%$ higher than the supervised method. + +# 4.2.2 CIFAR-10 + +As for CIFAR-10, we use the standard Wide ResNet [38], i.e., WRN-28-2, as the base network for training. Both the teacher model and the student model are based on the same + +Table 1. Seen-class classification accuracy (%) of different methods on the four datasets. + +
MethodMNISTCIFAR-10CIFAR-100TinyImagenet
ratio=0.3ratio=0.6ratio=0.3ratio=0.6ratio=0.3ratio=0.6ratio=0.3ratio=0.6
Supervised93.2±0.393.2±0.376.3±0.476.3±0.458.6±0.558.6±0.536.5±0.536.5±0.5
Pi-Model [31]92.4±0.686.6±0.575.7±0.774.5±1.059.4±0.357.9±0.336.9±0.436.4±0.5
PL [21]90.0±0.786.0±0.675.8±0.874.6±0.760.2±0.357.5±0.636.6±0.635.8±0.4
VAT [26]94.5±0.390.4±0.376.9±0.675.0±0.561.8±0.459.6±0.636.7±0.536.3±0.6
FixMatch [32]--81.5±0.280.9±0.365.9±0.365.2±0.3--
DS3L [9]96.8±0.394.5±0.478.1±0.476.9±0.5----
UASD [4]96.2±0.694.3±0.877.6±0.476.0±0.461.8±0.458.4±0.537.1±0.736.9±0.6
MTC [37]93.7±0.588.5±0.385.5±0.681.7±0.563.1±0.661.1±0.337.0±0.536.6±0.4
CL [3]96.9±0.195.6±0.483.2±0.482.1±0.463.6±0.461.5±0.537.3±0.736.7±0.8
SAFE-STUDENT98.3±0.396.5±0.185.7±0.383.8±0.168.4±0.268.2±0.137.7±0.337.1±0.3
+ +Table 2. Seen-class classification accuracy (\%) of ablation studies on CIFAR-10 with the $60\%$ ratio of class distribution mismatch under the different numbers of labeled data. + +
Methodm=100×6m=200×6m=400×6
SAFE-STUDENT w/o ED67.0±0.575.1±0.282.0±0.2
SAFE-STUDENT w/o AUG67.2±0.376.2±0.282.3±0.2
SAFE-STUDENT w/o CBE66.9±0.875.3±0.482.6±0.2
SAFE-STUDENT w/o UCDL65.4±1.175.1±0.781.5±0.3
SAFE-STUDENT w/o IO67.5±0.975.8±0.681.8±0.4
SAFE-STUDENT w/o EW69.5±0.776.9±0.582.9±0.3
SAFE-STUDENT69.9±0.378.3±0.483.8±0.1
+ +network. The network is trained using SGD with a learning rate of 0.128 like [36], a momentum of 0.9, and a weight decay of $5e^{-4}$ . We train the model for 400 epochs with a batch size of 512, where half of the batch comes from labeled data, and the other half comes from unlabeled data. The number of iterative optimization rounds is 3. + +Fig. 4(b) reports the averaged accuracy on CIFAR-10 over five runs with the different class mismatches. Firstly, our proposed SAFE-STUDENT significantly outperforms existing deep SSL methods. For example, when the mismatch ratio is $60\%$ , our method achieves $83.8\%$ averaged accuracy, about $7.5\%$ higher than the supervised learning method, about $6.9\%$ higher than $\mathrm{DS}^3\mathrm{L}$ . These results verify that our method achieves the best performance compared with the safe deep SSL methods on the SDU problem. Note that our method still outperforms all the compared methods when the class mismatch ratio is $0\%$ . + +# 4.2.3 CIFAR-100 and TinyImageNet + +Similar to CIFAR-10, we use WRN-28-2 as the base network for training on CIFAR-100 and TinyImageNet. The rest experimental setups are the same as CIFAR-10. The third and fourth columns of Table 1 show the results on CIFAR-100 and TinyImageNet with the $30\%$ and $60\%$ of unseen-class instances in unlabeled data. SAFE-STUDENT outperforms the compared methods. For example, when the class distribution mismatch is $60\%$ on CIFAR-100, SAFE + +Table 3. AUC(%) for unseen-class identification on MNIST with $40\%$ of unseen-class data in the test data. + +
Methodratio=0ratio=0.1ratio=0.2ratio=0.3ratio=0.4ratio=0.5ratio=0.6Avg
Probabilities [13]84.3±0.984.3±0.984.3±0.984.3±0.984.3±0.984.3±0.984.3±0.984.3
DS3L [9]95.9±0.893.1±0.491.7±0.290.6±0.190.5±0.589.1±0.285.1±0.890.9
SAFE-STUDENT98.1±0.197.3±0.296.5±0.196.0±0.994.6±0.993.5±0.391.4±0.295.3†
+ +STUDENT achieve $68.2\%$ averaged accuracy, about $6.7\%$ higher than CL, and $9.6\%$ higher than the supervised learning method. These results indicate the effectiveness and robustness of SAFE-STUDENT. + +# 4.3. Ablation Analysis + +We validate the effectiveness of the components in SAFE-STUDENT by ablating them and measuring the performance on CIFAR-10 with 100 labeled instances per class, 200 labeled instances per class, and 400 labeled instances per class. Table 2 reports the results of ablation studies that contain SAFE-STUDENT without energy-discrepancy (ED), without augment (AUG), without confirmation bias elimination (CBE) loss, without unseen-class label distribution learning (UCDL), without iterative optimization (IO), and without exponential weighting (EW). We can see that all components have a significant effect as removing any of them causes a decline in performance. + +# 4.4. Sensitivity of Hyperparameters + +$\tau_{1}, \tau_{2}$ are two important hyperparameters that work as thresholds to select seen-class data and unseen-class data from unlabeled data in the SUCI module. Fig. 5 shows the results on CIFAR-10 with the $40\%$ ratio of class distribution mismatch under the wider values of $\tau_{1}, \tau_{2}$ , which verifies seen-class classification is not sensitive to $\tau_{1}, \tau_{2}$ . + +# 4.5. Unseen-Class Identification + +To further measure the potential to identify unseen classes, we compare SAFE-STUDENT with probability estimation method [13] and $\mathrm{DS}^3\mathrm{L}$ [9] on MNIST. AUC can measure the identification ability by treating the unseen-class data as a negative class and the others as a positive + +![](images/cf6abed989c57cff2acfebbf71aa0c68ff5986cc1f2896098a2ccb9e4c594f4c.jpg) +Figure 5. An analysis of $\tau_{1},\tau_{2}$ under different values. + +![](images/6fdb44f46f86a8035aa3b4b50edba45629954fc7ab317a02f166f6e01e60db7f.jpg) +Figure 6. The distribution of the ED and negative energy under the $60\%$ ratio of class mismatch in $D_U$ by $\mathrm{DS}^3\mathrm{L}$ + +Table 4. AUC(%) for unseen-class identification on MNIST with ${40}\%$ of unseen-class instances in the test data by different scores. + +
MethodRatioconfidenceentropyenergyED
Probabilities [13]-84.3±0.985.1±0.786.3±0.788.9±0.6
DS3L [9]095.9±0.896.1±0.797.4±0.897.5±0.7
0.193.1±0.493.4±0.590.5±0.594.3±0.4
0.291.7±0.292.1±0.392.6±0.293.1±0.1
0.390.6±0.191.4±0.288.3±0.192.9±0.1
0.490.5±0.591.0±0.589.9±0.492.7±0.3
0.589.1±0.290.0±0.292.8±0.293.2±0.2
0.685.1±0.886.7±0.688.6±0.589.7±0.5
SAFE-STUDENT098.1±0.198.2±0.197.8±0.199.0±0.1
0.197.3±0.297.4±0.296.9±0.297.9±0.1
0.296.5±0.196.6±0.296.1±0.197.3±0.1
0.396.0±0.996.2±0.895.7±0.797.0±0.6
0.494.6±0.994.8±0.694.7±0.695.1±0.4
0.593.5±0.393.6±0.493.4±0.494.3±0.3
0.691.4±0.291.7±0.392.6±0.293.8±0.2
+ +one. Table 3 shows the results on MNIST with $40\%$ of unseen-class data in the test data under different mismatch ratios in unlabeled data, respectively. By these results, we can discover that SAFE-STUDENT outperforms probability estimation method [13] and $\mathrm{DS}^3\mathrm{L}$ [9] by a large margin. + +To further verify the newly proposed ED for unseen-class identification, we compare ED with confidence, entropy, and energy. We apply the four different scoring functions for probability estimation, $\mathrm{DS}^3\mathrm{L}$ , and SAFE-STUDENT. As shown in Table 4, ED comprehensively outperforms confidence, entropy, and energy [25], which can prove the universality and effectiveness of ED for various out-of-distribution detection methods. We can find that the performance of unseen-class identification shows an upward trend as the ratios of class mismatch in $D_U$ decreases. Under the same ratio of class mismatch and the same scoring function, SAFE-STUDENT performs better than $\mathrm{DS}^3\mathrm{L}$ . Fig. 6 exhibits the distributions of ED and energy on the MNIST under the $60\%$ ratio of class mismatch in $D_U$ by $\mathrm{DS}^3\mathrm{L}$ , which proves that ED outperforms energy and owns the greater ability to identify unseen classes. + +# 5. Conclusion + +We presented a new analysis of safe deep SSL with unseen-class unlabeled data, a limited-explored but more realistic scenario. We also proposed a practical framework + +![](images/29b93a305d21cbe101b6db747b66bd9770f9f796cb8b07fa4a40a1ab37dec213.jpg) + +![](images/14451b76483b6d60fe1814523d0273cb176ee183ef2b1f313c6bc447a9486164.jpg) + +called SAFE-STUDENT guaranteed by the new ED scoring function, the unseen-class label distribution learning module, and the iterative optimization strategy. Empirical studies show that, unlike the compared deep SSL methods, SAFE-STUDENT still achieves stable performance gain when the class distribution mismatch proportion exceeds $60\%$ and outperforms the existing safe SSL methods with a large margin. This work also provides a unified analysis work for this new problem. One can also extend our work into other safe SSL environments. + +# Broader Impact + +In this work, we study the problem of safe deep semi-supervised learning with unseen-class unlabeled data, a less explored task in the literature. Our project aims to improve the safeness and robustness of deep SSL models. We are aware that numerous uses of the technique can pose ethical issues and that best practice. Our approach should not be used in mission-critical applications or to make essential decisions without human oversight. + +# Limitations + +While we successfully identify seen classes and unseen classes and perform safe semi-supervised learning, the thresholds to select seen-class data and unseen-class data from unlabeled data in the SUCI module require manual setting, but we have proved its insensitivity. Furthermore, since our method is based on deep neural networks, it is susceptible to adversarial attacks, lack of interpretability. + +# Acknowledgment + +This work is supported by the National Natural Science Foundation of China (62176139, 61876098, 62106128), the Major Basic Research Project of Natural Science Foundation of Shandong Province (ZR2021ZD15), the Natural Science Foundation of Shandong Province (ZR202102240155), the Young Elite Scientists Sponsorship Program by CAST. + +# References + +[1] David Berthelot, Nicholas Carlini, Ekin D. Cubuk, Alex Kurakin, Kihyuk Sohn, Han Zhang, and Colin Raffel. Remix-match: Semi-supervised learning with distribution matching and augmentation anchoring. In ICLR, 2020. 1, 2 +[2] David Berthelot, Nicholas Carlini, Ian J. Goodfellow, Nicolas Papernot, Avital Oliver, and Colin Raffel. Mixmatch: A holistic approach to semi-supervised learning. In NeurIPS, 2019. 1, 2 +[3] Paola Cascante-Bonilla, Fuwen Tan, Yanjun Qi, and Vicente Ordonez. Curriculum labeling: Revisiting pseudo-labeling for semi-supervised learning. In AAAI, 2021. 1, 2, 3, 6, 7 +[4] Yanbei Chen, Xiatian Zhu, Wei Li, and Shaogang Gong. Semi-supervised learning under class distribution mismatch. In AAAI, 2020. 1, 2, 3, 6, 7 +[5] Ekin D. Cubuk, Barret Zoph, Dandelion Mané, Vijay Vasudevan, and Quoc V. Le. Autoaugment: Learning augmentation strategies from data. In CVPR, 2019. 2 +[6] 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. 6 +[7] Terrance Devries and Graham W. Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552, 2017. 2 +[8] Xin Geng. Label distribution learning. IEEE Transactions on Knowledge and Data Engineering, 2016. 5 +[9] Lan-Zhe Guo, Zhenyu Zhang, Yuan Jiang, Yu-Feng Li, and Zhi-Hua Zhou. Safe deep semi-supervised learning for unseen-class unlabeled data. In ICML, 2020. 1, 2, 6, 7, 8 +[10] Zhongyi Han, Xian-Jin Gui, Chaoran Cui, and Yilong Yin. Towards accurate and robust domain adaptation under noisy environments. In IJCAI, 2020. 2 +[11] Zhongyi Han, Benzheng Wei, Yanfei Hong, Tianyang Li, Jinyu Cong, Xue Zhu, Haifeng Wei, and Wei Zhang. Accurate screening of COVID-19 using attention-based deep 3d multiple instance learning. TMI, 2020. 1 +[12] Zhongyi Han, Benzheng Wei, Xiaoming Xi, Bo Chen, Yi long Yin, and Shuo Li. Unifying neural learning and symbolic reasoning for spinal medical report generation. Medical Image Anal., 2021. 1 +[13] Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. In ICLR, 2017. 7, 8 +[14] Ahmet Iscen, Giorgos Tolias, Yannis Avrithis, and Ondrej Chum. Label propagation for deep semi-supervised learning. In CVPR, 2019. 1 +[15] K. J. Joseph, Salman Khan, Fahad Shahbaz Khan, and Vineeth N. Balasubramanian. Towards open world object detection. In CVPR, 2021. 3 +[16] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009. 6 +[17] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In NeurIPS, 2012. 1 +[18] Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. In ICLR, 2017. 1, 2, 6 + +[19] Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. In NeurIPS, 2017. 5 +[20] Yann LeCun. The mnist database of handwritten digits. 1998. 6 +[21] Dong-Hyun Lee et al. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In ICML Workshop, 2013. 2, 6, 7 +[22] Yu-Feng Li and De-Ming Liang. Safe semi-supervised learning: a brief introduction. FCS, 2019. 2 +[23] Yu-Feng Li and Zhi-Hua Zhou. Towards making unlabeled data never hurt. TPAMI, 2015. 2 +[24] Tongliang Liu and Dacheng Tao. Classification with noisy labels by importance reweighting. TPAMI, 2015. 3 +[25] Weitang Liu, Xiaoyun Wang, John D. Owens, and Yixuan Li. Energy-based out-of-distribution detection. In NeurIPS, 2020. 3, 8 +[26] Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: A regularization method for supervised and semi-supervised learning. TPAMI, 2019. 6, 7 +[27] Avital Oliver, Augustus Odena, Colin Raffel, Ekin Dogus Cubuk, and Ian J. Goodfellow. Realistic evaluation of deep semi-supervised learning algorithms. In NeurIPS, 2018. 1, 2 +[28] Hieu Pham, Qizhe Xie, Zihang Dai, and Quoc V. Le. Meta pseudo labels. In CVPR, 2020. 2 +[29] Zhongzheng Ren, Raymond A. Yeh, and Alexander G. Schwing. Not all unlabeled data are equal: Learning to weight data in semi-supervised learning. In NeurIPS, 2020. 1 +[30] Mamshad Nayeem Rizve, Kevin Duarte, Yogesh Singh Rawat, and Mubarak Shah. In defense of pseudo-labeling: An uncertainty-aware pseudo-label selection framework for semi-supervised learning. In ICLR, 2021. 1, 2 +[31] Mehdi Sajjadi, Mehran Javanmardi, and Tolga Tasdizen. Regularization with stochastic transformations and perturbations for deep semi-supervised learning. In NeurIPS, 2016. 1, 2, 6, 7 +[32] Kihyuk Sohn, David Berthelot, Nicholas Carlini, Zizhao Zhang, Han Zhang, Colin Raffel, Ekin Dogus Cubuk, Alexey Kurakin, and Chun-Liang Li. Fixmatch: Simplifying semi-supervised learning with consistency and confidence. In NeurIPS, 2020. 1, 2, 6, 7 +[33] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In NeurIPS, 2017. 1, 2, 6 +[34] Jing Wang and Xin Geng. Label distribution learning by exploiting label distribution manifold. IEEE Transactions on Neural Networks and Learning Systems, 2021. 5 +[35] Qizhe Xie, Zihang Dai, Eduard H. Hovy, Thang Luong, and Quoc Le. Unsupervised data augmentation for consistency training. In NeurIPS, 2020. 2 +[36] Qizhe Xie, Minh-Thang Luong, Eduard H. Hovy, and Quoc V. Le. Self-training with noisy student improves image-net classification. In CVPR, 2020. 1, 2, 7 + +[37] Qing Yu, Daiki Ikami, Go Irie, and Kiyoharu Aizawa. Multitask curriculum framework for open-set semi-supervised learning. In ECCV, 2020. 1, 2, 3, 6, 7 +[38] Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016. 6 +[39] Dengyong Zhou, Olivier Bousquet, Thomas Navin Lal, Jason Weston, and Bernhard Scholkopf. Learning with local and global consistency. In NeurIPS, 2003. 2 \ No newline at end of file diff --git a/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/images.zip b/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9df94f2cdbbbbd46bfe1b05fe389951ec0aa0447 --- /dev/null +++ b/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b9bab0edc91d01d5e85cb2b958a9883408370856336d84450fc093c1c935823 +size 464110 diff --git a/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/layout.json b/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4cc58a065a8bf0cbb0f1a6311592a9210c372290 --- /dev/null +++ b/safestudentforsafedeepsemisupervisedlearningwithunseenclassunlabeleddata/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e070e433eb550e4b8368d86756b8dade831d09cae5d0836fb471bfe9390b0da4 +size 429871 diff --git a/salienttobroadtransitionforvideopersonreidentification/82c67e4c-c520-41fb-9502-cb48796669af_content_list.json b/salienttobroadtransitionforvideopersonreidentification/82c67e4c-c520-41fb-9502-cb48796669af_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8828890afdaf07479634a24c8e1ee65298ccf104 --- /dev/null +++ b/salienttobroadtransitionforvideopersonreidentification/82c67e4c-c520-41fb-9502-cb48796669af_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61a1669ebf157426a0eb915c53140c1df7b59a4e57a46fe6ff093b4e706b46ba +size 79292 diff --git a/salienttobroadtransitionforvideopersonreidentification/82c67e4c-c520-41fb-9502-cb48796669af_model.json b/salienttobroadtransitionforvideopersonreidentification/82c67e4c-c520-41fb-9502-cb48796669af_model.json new file mode 100644 index 0000000000000000000000000000000000000000..770e82d03f9c1d787263e02380cb5b6bc3cdd81e --- /dev/null +++ b/salienttobroadtransitionforvideopersonreidentification/82c67e4c-c520-41fb-9502-cb48796669af_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62aabd3d9eb153d6574b59bdfc7cf48b06aff9cb5c844e18839051659891be08 +size 97855 diff --git a/salienttobroadtransitionforvideopersonreidentification/82c67e4c-c520-41fb-9502-cb48796669af_origin.pdf b/salienttobroadtransitionforvideopersonreidentification/82c67e4c-c520-41fb-9502-cb48796669af_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..817ab159434ca88759de4681910bae3286b40fae --- /dev/null +++ b/salienttobroadtransitionforvideopersonreidentification/82c67e4c-c520-41fb-9502-cb48796669af_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97891922bc76ca3ce367d775f3f830b6777233ebfa9611ab19a5142fd530fa23 +size 1106842 diff --git a/salienttobroadtransitionforvideopersonreidentification/full.md b/salienttobroadtransitionforvideopersonreidentification/full.md new file mode 100644 index 0000000000000000000000000000000000000000..db77d8db867158d1265cc4bfc6c56868ee19023e --- /dev/null +++ b/salienttobroadtransitionforvideopersonreidentification/full.md @@ -0,0 +1,339 @@ +# Salient-to-Broad Transition for Video Person Re-identification + +Shutao Bai $^{1,2}$ , Bingpeng Ma $^{2}$ , Hong Chang $^{1,2}$ , Rui Huang $^{3}$ , Xilin Chen $^{1,2}$ $^{1}$ Key Laboratory of Intelligent Information Processing of Chinese Academy of Sciences (CAS), Institute of Computing Technology, CAS, Beijing, 100190, China + $^{2}$ University of Chinese Academy of Sciences, Beijing, 100049, China + $^{3}$ The Chinese University of Hong Kong, Shenzhen, Guangdong, 518172, China + +shutao.bai@vip1.ict.ac.cn,bpma@ucas.ac.cn,ruihuang@cuhk.edu.cn,{changhong,xlchen}@ict.ac.cn + +# Abstract + +Due to the limited utilization of temporal relations in video re-id, the frame-level attention regions of mainstream methods are partial and highly similar. To address this problem, we propose a Salient-to-Broad Module (SBM) to enlarge the attention regions gradually. Specifically, in SBM, while the previous frames have focused on the most salient regions, the later frames tend to focus on broader regions. In this way, the additional information in broad regions can supplement salient regions, incurring more powerful video-level representations. To further improve SBM, an Integration-and-Distribution Module (IDM) is introduced to enhance frame-level representations. IDM first integrates features from the entire feature space and then distributes the integrated features to each spatial location. SBM and IDM are mutually beneficial since they enhance the representations from video-level and frame-level, respectively. Extensive experiments on four prevalent benchmarks demonstrate the effectiveness and superiority of our method. The source code is available at https://github.com/baist/SINet. + +# 1. Introduction + +In the past few years, video person re-identification (reid) has achieved favorable progress [33, 39] with the help of CNNs [11, 19]. However, further development of video reid remains hindered because it is challenging to effectively utilize the rich temporal information among video frames, as pointed out in [26]. + +Recently, some approaches [41, 42, 44] try to exploit the temporal relations for a mutual enhancement between frames. To realize such enhancement, these methods mainly adopt self-attention mechanism [38] or Graph Convolution Networks (GCNs) [5, 8] to encourage the information flow among video frames. In this way, the final frame-level fea + +![](images/d82e8410f669b0ba831929972c332941e08aa8193334fd4d33fd92e62b2ad710.jpg) +Figure 1. Comparison of existing methods and our method (SBM) with respect to Class Activation Maps (CAM) [32]. There is a clear salient-to-broad transition of activation maps (attention regions) in our method. Warmer color represents a higher value. + +tures will be more rich and recognizable. Although these methods have achieved encouraging performances in video re-id, they still have several intrinsic drawbacks. + +First, for each frame, the concentration of these methods is usually confined in a salient but partial region. In fact, when a model has focused on a partial region that can recognize a pedestrian, it will not pay attention to other regions, which results in representations with limited power. Obviously, this property should be avoided for a robust real model since it is desirable to use the complete characteristics of a given pedestrian. As shown in Figure 1(b), these methods pay almost all the attention to the upper clothes while ignoring the A-line skirt and other human parts. Maybe the black skirt is not as discriminative as the upper clothes in this particular example, but it is still a vital clue, especially when other pedestrians, if any, wear similar upper clothes. Therefore, enlarging the attention regions is of central importance to further enhance the robustness and discriminative ability of video embeddings. + +Second, the utilization of temporal relations, i.e., mutual enhancement between frames, is limited. Specifically, these methods regard the temporal relations as mutual enhancement or homogeneous information flow across all + +frames. In this way, the frame-level embeddings will be richer since they contain mutually enhanced information from other frames. However, such enhancement will also mix the frame-level embeddings, making them more similar to each other, even redundant. As illustrated in Figure 1(b), all four frames focus on nearly identical regions, indicating that their embeddings are highly similar. The similarity or redundancy sacrifices the differences across frames, which limits further improvement in the final temporal fusion stage. Therefore, to make better use of temporal relations, it is desirable to leverage temporal cues from another perspective and encourage the differences between frames. + +In this paper, we propose a Salient-to-Broad Module (SBM), which achieves the above two goals in a unified framework. SBM innovatively leverages the temporal relations to amplify the differences of frames, i.e., gradually enlarges the attention regions of consecutive frames. Specifically, we expect the pedestrians' representations to be more informative and powerful, so they should contain as much foreground information as possible. While the previous frames have focused on a salient but partial region, we require SBM to pay attention to a broader region for the later frame. In practice, SBM leverages temporal relations via difference amplification, which is implemented by properly broadening regions to be attended in later frames. In summary, SBM realizes the salient-to-broad transition as shown in Figure 1(c). As a result, SBM makes frame-level features more complete and diverse, thus produces more informative video-level features after temporal fusion. + +Moreover, we introduce an Integration-and-Distribution Module (IDM) to assist our SBM. SBM increases the representation capability of video-level features by enhancing differences across frames. But the performance of SBM also depends on the richness of frame-level information. To this end, IDM will integrate and distribute the informative global features, enabling message passing across all frames. The propagation is input-agnostic and is constructed with all information from input data. By doing this, IDM is reciprocal to SBM: IDM consolidates the frame-level representations, and SBM will enrich the video-level representations. Thus, the combination of SBM and IDM will incur more powerful representations for video re-id. + +SBM and IDM can be inserted into the backbone network together to form SINet. We carry out extensive experiments on four benchmarks to demonstrate the effectiveness of our method. Notably, SINet achieves $91.0\%$ and $87.4\%$ rank-1 accuracy on MARS and LS-VID, respectively, surpassing the existing state-of-the-art models. + +# 2. Related Work + +Recently, video re-id has drawn more and more attention from both academic and industrial researchers. Compared with image data, the additional temporal relations in video + +effectively alleviate many issues such as occlusion and motion blurs. There are tremendous methods that are designed to capture such temporal relations in different ways. + +Temporal Weighted. One major stream [9, 34, 46, 49] adopts temporal attention to determine the importance of each frame, aiming to drop the low-quality frames. But these methods ignore the dependencies between frames, which hinders their further improvements. + +Mutual Enhancement. Mainstream state-of-the-arts [23, 41, 42] adopt self-attention or GCNs to model temporal relations. For example, Liu et al. [26] use non-local block [38] to capture long-range dependencies and make each feature perceive the entire spatial-temporal space. All these methods use temporal relations for mutual enhancement. Different form these methods, we leverage the temporal relations from the perspective of difference amplification, and thus our method obtains more comprehensive and informative representations. + +Others. Other methods exploit the temporal relations in many aspects including optical flow [3, 27], RNNs [30, 43], 3D CNNs [10, 24], recovery [18], and coherence constrain [4]. However, they all suffer different drawbacks such as non-global temporal modeling [10, 24], high computational cost [3, 18, 27], high-level modeling [4, 30, 43] + +The recent work that is most similar to ours is TSE [17], which erases the salient features in later frames, albeit with several key fundamental differences. First, transition of attention regions in our method is salient-to-broad implemented by suppression, while TSE is one-to-another by erasing. So TSE drops the salient features in the later frames and may deteriorate the representation capability of the final embeddings. Second, the erasing region of TSE is fixed and partial, while our method can flexibly determine the suppressed region. + +Moreover, capturing complete and richer visual patterns with image erasing is widely explored, especially in weakly supervised object localization [29, 40]. For example, besides the traditional localization branch, EIL [29] uses another branch that inputs the erased feature maps, and captures less discriminative regions. However, these methods are all erasing-based rather than suppression-based, i.e., one-to-another, and cannot model the interactions of the entire object. Moreover, compared with video data, these methods need to maintain another stream as EIL and thus incur more memory requirement. + +# 3. Methodology + +In this section, we will first describe SBM that makes the attention regions transit from salient towards broader ones. Then, we will elaborate IDM, which encourages information flow between consecutive frames. Finally, we will give an overview of our SINet, which is the hierarchical architecture of SBM and IDM. + +![](images/259da5dbf753e6c87e73b21b6440a403f3b22d964de3d6147ed7de2389055f7f.jpg) +Figure 2. The detailed architecture of the Salient-to-Broad Module. For better visualization, we only describe the case when the video contains three frames. In this case, SBM takes middle-level feature maps $\mathbf{X}_{0,1,2}$ as input. + +# 3.1. Salient-to-Broad Module + +In this paper, we propose SBM to realize the salient-to-broad transition of attention regions for consecutive frames. The transition is achieved with the difference amplification in the temporal dimension, i.e., suppressing the salient features that have been activated before. As illustrated in Figure 2, when passing through SBM, the later frames concentrate on broader regions. As a result, their frame-level embeddings will be more complete and informative, leading to powerful characteristics of pedestrians. + +Notably, the additional information in the broad regions can supplement the salient ones. We argue that the salient features contain the most discriminative and unusual characteristics of pedestrians, which are useful to distinguish from most other identities. However, for pedestrians who also have such characteristics, the broad features are more helpful as they cover the entire foreground information. Besides, since the salient features will be activated in all frames, they still dominate discriminations while the broad features assist. Examples are illustrated in Figure 6 and 7. + +The details of our SBM are elaborated as follows. + +Input. The input of SBM has two terms: feature maps and split position. For feature maps, SBM adopts middle-level feature maps that have both semantic and detailed information. Specifically, given a clip $\mathbf{I} = \{I_i\}_{i=0}^{t-1}$ containing $t$ frames, we use a backbone model to obtain the middle-lever feature maps $\{\mathbf{X}_i\}_{i=0}^{t-1}$ . Here $\mathbf{X}_i \in \mathbb{R}^{c \times h \times w}$ , and $c, h, w$ are the channel size, height, and width, respectively. + +As for split position $s$ , it determines the split of former frames and latter frames, i.e., which frames need to be suppressed. In detail, SBM will suppress the salient features in later frames $\mathbf{X}_{s,\dots,t-1}$ , which have been captured in earlier frames $\mathbf{X}_{0,\dots,s-1}$ . Figure 2 shows the pipeline of SBM, where $t = 3$ and $s = 1$ for conciseness. + +Channel Attention Layer (CAL). The first procedure of SBM is CAL, which aims to filter out misguided and meaningless channels. Due to the zero-padding of models, some channels may focus on the periphery and tend to select the background as salient features. This may misguide the later suppression since the salient pedestrians are usually in the center of the input frames. To this end, we generate the channel weights as: + +$$ +\mathbf {w} _ {c t r} = \left\{ \begin{array}{l l} 1, & \operatorname {G A P} (\mathbf {X}) < \operatorname {G A P} \left(\mathbf {X} _ {n o. p a d}\right) \\ 0, & \text {o t h e r w i s e} \end{array} \right. \tag {1} +$$ + +where $\mathbf{X} \in \mathbb{R}^{c \times t \times h \times w}$ is the concatenation of $\{\mathbf{X}_i\}_{i=0}^{t-1}$ , and $\mathbf{X}_{no\_pad} \in \mathbb{R}^{c \times t \times (h-2) \times (w-2)}$ is the subarea of $\mathbf{X}$ without the first and last rows/columns. GAP is global average pooling. Here, $\mathbf{w}_{ctr} \in \mathbb{R}^c$ is an estimation of the centrality of each channel, i.e., it will give 1 to channels that concern on the central foreground and 0 to others. + +CAL also adopts a standard Squeeze-and-Eccitation (SE) block [19] to selectively emphasize informative channels. The result is a $c$ dimension vector $\mathbf{w}_{se} \in (0,1)$ , indicating the weight of each channel. + +By applying $\mathbf{w}_{ctr}$ and $\mathbf{w}_{se}$ to the input feature maps, CAL will return more centralized and meaningful feature maps. For clearness, we rename the returned feature maps as $\{\mathbf{P}_i\}_{i=0}^{s-1}$ and $\{\mathbf{Q}_i\}_{i=s}^{t-1}$ based on the split position $s$ . + +$$ +\begin{array}{l} \mathbf {P} _ {i} = \mathbf {w} _ {c t r} \cdot \mathbf {w} _ {s e} \cdot \mathbf {X} _ {i}, \quad i = 0, \dots , s - 1 \\ \mathbf {Q} _ {i} = \mathbf {w} _ {c t r} \cdot \mathbf {w} _ {s e} \cdot \mathbf {X} _ {i}, \quad i = s, \dots , t - 1. \end{array} \tag {2} +$$ + +Kernel Generation Module (KGM). After CAL, we need to extract the salient features of the former frames $\{\mathbf{P}_i\}_{i=0}^{s-1}$ . The extracted features will be used to suppress the salient features in the subsequent suppression procedure. Inspired by [31], SBM leverages KGM to generate + +a $k \times k$ ( $k$ : kernel size) convolution kernel in order to include as many salient features of $\{\mathbf{P}_i\}_{i=0}^{s-1}$ as possible. + +The overall architecture of KGM is shown in Figure 2. Specifically, the input tensor $\mathbf{P} \in \mathbb{R}^{c \times s \times h \times w}$ of KGM is the concatenation of $\{\mathbf{P}_i\}_{i=0}^{s-1}$ . Then KGM adopts a multi-head spatial attention mechanism to weigh the importance of each position, and returns $k^2$ attention maps $\mathbf{A}_p \in \mathbb{R}^{k^2 \times s \times h \times w}$ . + +To further increase the diversity and information richness of attention maps, KGM needs to avoid the collapse [25] of $\mathbf{A}_p$ and make these $k^2$ maps concentrate on different regions. To this end, we adopt L1-Normalization sequentially on the $k^2$ dimension and the $s\times h\times w$ dimension. After that, KGM will produce the $k\times k$ kernels $\mathbf{K}\in \mathbb{R}^{c\times k^2}$ by matrix multiplication of the feature maps and attention maps: $\mathbf{K} = \mathbf{P}\mathbf{A}_p^T$ . Here, $\mathbf{P}$ and $\mathbf{A}_p$ are temporarily reshaped to $\mathbb{R}^{c\times u}$ and $\mathbb{R}^{k^2\times u}$ ( $u = s\times h\times w$ ) for conciseness. + +Suppress Operation (SO). In this step, SBM leverages the above generated kernel to suppress the salient regions in $\{\mathbf{Q}_i\}_{i=s}^{t-1}$ which have been activated in $\mathbf{P}$ . Then the later frames can pay attention to broader regions and obtain more complete representations. + +In particular, a convolution operation is performed on the input feature map $\mathbf{Q}_i$ and the reshaped kernel $\mathbf{K}$ with size $c \times k \times k$ : + +$$ +\mathbf {R} _ {i} = \operatorname {s o f t m a x} \left(\mathbf {Q} _ {i} \star \mathbf {K}\right), \quad i = s, \dots , t - 1. \tag {3} +$$ + +Here, $\star$ is convolution operation. Softmax operation is conducted on $h \times w$ dimension for normalization. The output $\{\mathbf{R}_i\}_{i=s}^{t-1} \in \mathbb{R}^{h \times w}$ is an affinity matrix, which presents high values for features captured in previous frames $\mathbf{P}$ . Furthermore, to suppress the salient features with high similarities in $\mathbf{R}_i$ , we inverse the affinity matrix. SO achieves this by a dedicated transformation, which transforms the affinity map $\mathbf{R}_i$ to the suppression matrix $\mathbf{S}_i$ : + +$$ +\mathbf {S} _ {i} = \mathrm {e} ^ {\beta \left[ \frac {1}{h w \mathbf {R} _ {i}} - 1 \right] _ {-}}, \quad i = s, \dots , t - 1. \tag {4} +$$ + +Here, $[a]_{-} = \min \{a,0\}$ . The output matrix $\mathbf{S}_i \in \mathbb{R}^{h \times w}$ lies between 0 and 1. $\beta$ is a hyperparameter to control the variance of the transformed distribution. A higher $\beta$ represents heavier suppression, i.e., giving lower weights to the salient features. + +Then, SO multiplies $\mathbf{S}_i$ with $\mathbf{X}_i$ to generate the final suppressed feature maps: $\mathbf{Y}_i = \mathbf{S}_i \cdot \mathbf{X}_i$ . In this process, the salient region will be suppressed by the multiplication with low weights in $\mathbf{S}_i$ . Notably, convolution in Equation 3 actually measures the patch-wise affinities instead of point-wise ones. So the results $\mathbf{S}_i$ and $\mathbf{R}_i$ will be more continuous and smooth. Therefore, the multiplication will not incur the discontinuities in $\mathbf{Y}_i$ , which may complicate the local relation modeling for later convolutions. + +Overall, for the later frames, SBM decreases the saliency/attention of the salient region, and thus focuses on a broader region. Therefore, the attention regions of consecutive frames transit from salient to broader ones. + +Cross Propagation Module (CPM). Salient features that are suppressed (or dropped) in SO are harmful for the later frames because they hinder the mining of less salient regions. However, for the entire video, the lost salient information is still ID-related and thus helpful. So, we use CPM to preserve them by transiting them to the unsuppressed frames $\{\mathbf{X}_i\}_{i=0}^{s-1}$ (i.e., the red dashed lines in Figure 2). Hyperparameter $\alpha$ (0.1 by default) will control the transition's degree. The procedure is formulated as: + +$$ +\mathbf {Z} _ {i} = \mathbf {X} _ {i} + \alpha \sum_ {j = s} ^ {t - 1} \operatorname {G A P} \left(\mathbf {X} _ {j} - \mathbf {Y} _ {j}\right), i = 0, \dots , s - 1. \tag {5} +$$ + +Meanwhile, the information loss may also deteriorate the representations of frames $\{\mathbf{X}_i\}_{i = s}^{t - 1}$ since the most salient features are suppressed. To increase representation capability, we also encourage the information flow from $\{\mathbf{X}_i\}_{i = 0}^{s - 1}$ to $\{\mathbf{Y}_i\}_{i = s}^{t - 1}$ (the green dashed lines in Figure 2) as: + +$$ +\mathbf {Z} _ {i} = \mathbf {Y} _ {i} + \alpha \sum_ {j = 0} ^ {s - 1} \operatorname {G A P} \left(\mathbf {X} _ {j}\right), \quad i = s, \dots , t - 1. \tag {6} +$$ + +# 3.2. Integration and Distribution Module (IDM) + +We also propose IDM to assist SBM. SBM is dedicated to enhancing the representational ability of video-level features. But the performance of SBM also depends heavily on the information richness of each frame's attention region. To be specific, the more informative these regions of every frame are, the more powerful the final video-level representations in SBM will be. + +To enrich frame-level representations, recent methods [26, 41, 44] mainly adopt self-attention mechanisms, which enrich a position as a similarity-based aggregation with features of all positions. However, as pointed out in [38], the non-local behavior is much more crucial than the similarity-based aggregation strategy. + +Inspired by this, IDM adopts an integration and distribution structure to approximate input-agnostic affinity maps and thus maintains the non-local behavior. In this way, IDM enables the message to pass across all frames and thus enriches the representations of frames. + +Figure 3 gives an overview of our IDM. In detail, IDM will integrate key features/channels and then distribute them via a fixed mode. We firstly reshape the middle-level feature maps $\mathbf{X} \in \mathbb{R}^{c \times t \times h \times w}$ to $\mathbf{F} \in \mathbb{R}^{c \times m}$ ( $m = t \times h \times w$ ). Then a series of linear transformations will be applied on $\mathbf{F}$ to enable the information flow between positions. Formally, + +$$ +\mathbf {F} ^ {\prime} = \mathbf {G} ^ {\mathbb {D}} \mathbf {G} ^ {\mathbb {I}} \mathbf {F} (\mathbf {L} ^ {\mathbb {I}} \mathbf {L} ^ {\mathbb {D}} + \mathbf {I}) \tag {7} +$$ + +![](images/65cb0155ef662c66f903369bd5edfc57d64bde253ac61ed8d9f0c9b66191f48b.jpg) +Figure 3. The framework of IDM. Matrix multiplication in thick arrow transforms the feature maps. The width of thin arrow indicates the aggregation weight. + +where $\mathbf{G}$ and $\mathbf{L}$ represent the linear transformation performed on the $c$ (channel) and $m$ (spatial-temporal) dimensions, respectively. Superscripts $\mathbb{I}$ and $\mathbb{D}$ denote the integration and distribution, respectively. In detail, $\mathbf{G}^{\mathbb{D}}\in \mathbb{R}^{c\times c'}$ , $\mathbf{G}^{\mathbb{I}}\in \mathbb{R}^{c'\times c}$ , $\mathbf{L}^{\mathbb{I}}\in \mathbb{R}^{m\times m'}$ , $\mathbf{L}^{\mathbb{D}}\in \mathbb{R}^{m'\times m}$ , and $m' \leq m$ , $c' \leq c$ in general. Identity matrix $\mathbf{I}\in \mathbb{R}^{m\times m}$ denotes residual connection. The calculation order is shown in Figure 3, i.e., the integration and distribution on $m$ dimension are in the middle of the $c$ dimension. The overall procedure of IDM is like an encoder-decoder, where integration operation extracts the key features, and distribution operation tries to recover the original feature maps with these key features. For easy combination with the backbone, the output of IDM has a residual connection [11]: $\mathbf{F}_{output} = \mathbf{F}' + \mathbf{F}$ . + +IDM can also be reviewed from the perspective of "affinity map". In fact, the matrix $\mathbf{L}^{\mathbb{I}}\mathbf{L}^{\mathbb{D}}$ in Equation 7 is a low-rank decomposition of $\mathbf{L}\in \mathbb{R}^{m\times m}$ , an affinity map measuring the similarities of any two positions. Thus, $\mathbf{L}$ realizes the message passing between any two positions in the spatial-temporal dimension, so dose $\mathbf{G}$ for the channel dimension. In this way, IDM establishes the connections of arbitrary two positions in different frames or even different channels, and incurs powerful mutual enhancement between frames. + +Our IDM shares several desirable advantages compared with previous self-attention methods [26, 38, 44]. First, the affinity map $\mathbf{L}$ (or $\mathbf{G}$ ) is learnable. Therefore, IDM can automatically discover useful patterns from the training distribution, such as the foreground and silhouette. Second, $\mathbf{L}$ (or $\mathbf{G}$ ) endows our IDM with the ability to subtract features (not only weighted addition) and increases the flexibility in composing features [35]. Third, IDM is more efficient as it optimizes the order of matrix chain multiplication compared with [38]. To be specific, the complexity reduces from $\mathcal{O}(m^2 c')$ to $\mathcal{O}(mm'c')$ . + +IDM is reciprocal to SBM as they enhance the information richness of frames and diversities between frames, respectively. Notably, the salient-to-broad transition of SBM also enriches the information for later frames by broadening attention regions. However, the information gains are caused by the enlargement of the attention region, while the gains of IDM are incurred by the homogeneous message + +![](images/bdd62d9b64d7481db520087da896dc1ac89528846485f0597db16f692fc327e1.jpg) +Figure 4. The architecture of our SINet. TAP denotes temporal average pooling. In SBM, the green and yellow blocks indicate the front and later frames. The later (yellow) frames will be suppressed with the guidance of the front (green) frames. + +passing across frames without size variation. + +Relations to GCNet. GCNet [2] with avg-pooling can be regarded as a special case of our IDM. Formally, GCNet replaces the $\left(\mathbf{L}^{\mathbb{I}}\mathbf{L}^{\mathbb{D}} + \mathbf{I}\right)$ in Equation 7 with all 1's matrix. Therefore, IDM has more complex modeling ability and better generality. + +# 3.3. SINet for Video Person Re-ID + +Network. Figure 4 shows the overview of our proposed SINet, which is a hierarchical combination of SBM and IDM. The backbone of SINet is ResNet-50 [11] pre-trained on ImageNet [6]. ResNet-50 has four layers and each layer is composed of several residual blocks. We insert two IDMs into the second layer after the middle and last residual blocks, respectively. Three SBMs are plugged evenly into the third layer and form a hierarchical structure to realize the salient-to-broad transition. In detail, the first SBM uses the first frame to suppress the remaining frames, while the second (third) SBM uses the first two (three) frames to extract salient features and performs suppression. + +Finally, a temporal average pooling is used to generate the final video-level embeddings, which will be used in training or retrieval. We also adopt a batch normalization [20] to refine the embeddings as in [17]. + +Objective Function. Same as [47], we employ Cross-Entropy Loss $\mathcal{L}_{cent}$ and Batch Hard Triplet Loss [13] $\mathcal{L}_{tri}$ to jointly guide the training procedure. Moreover, to maintain the diversities between frames, inspired by the [15,21], we leverage mutual information loss $\mathcal{L}_{mi}$ to minimize the mutual information of different frames' embeddings. More details about $\mathcal{L}_{mi}$ are in Supplementary Material. + +The overall objective function of our SINet is a combination of the above three terms: + +$$ +\mathcal {L} _ {\text {a l l}} = \mathcal {L} _ {\text {c e n t}} + \lambda_ {1} \mathcal {L} _ {\text {t r i}} + \lambda_ {2} \mathcal {L} _ {\text {m i}} \tag {8} +$$ + +where $\lambda_{1}$ and $\lambda_{2}$ are hyperparameters to control the influence of each loss function. + +# 4. Experiments + +# 4.1. Datasets and Evaluation Metrics + +We perform comprehensive empirical studies on multiple video re-id datasets, i.e., MARS [48], LS-VID [23], + +Table 1. Performance (%) comparison with state-of-the-arts on MARS, LS-VID, iLiDS-VID, and PRID-2011 datasets. We separate these methods into several categories based on their utilizations of temporal relation. TW means Temporal Weighting, 3D means 3D CNNs, ME means Mutual Enhancement, and DA means Difference Amplification. + +
MethodsMARSLS-VIDiLiDS-VIDPRID-2011
mAPrank-1mAPrank-1rank-1rank-1
TWSeeForest [49]CVPR 1750.770.6--55.279.4
Snippet [3]CVPR 1876.186.3--85.493.0
STA [9]AAAI 1980.886.3----
3DM3D [24]AAAI 1974.184.440.157.774.094.4
AP3D [10]ECCV 2085.190.173.284.588.7-
STRF [1]ICCV 2186.190.3--89.3-
MEGLTR [23]ICCV 1978.587.044.363.186.095.5
STGCN [42]CVPR 2083.790.0----
MGH [41]CVPR 2085.890.0--85.694.8
MG-RAFA [44]CVPR 2085.988.8--88.695.9
GRL [28]CVPR 2184.891.0--90.496.2
DenseIL [12]ICCV 2187.090.8--92.0-
OthersVRSTC [18]CVPR 1982.388.5--83.4-
AFA [4]ECCV 2082.990.2--88.5-
TCLNet [17]ECCV 2085.189.870.381.586.6-
BiCnet-TKS [16]CVPR 2186.090.275.184.6--
STMN [7]ICCV 2184.590.569.282.191.5-
DASINet(ours)-86.291.079.687.492.596.5
+ +iLiDS-VID [37], and PRID-2011 [14]. Similar to existing works [44, 45], we adopt the Cumulated Matching Characteristics (CMC) curve and mean Average Precision (mAP) as evaluation metrics. + +# 4.2. Implementation Details + +Sparse temporal sampling strategy [36] is used to generate a clip containing 4 frames. Frames are resized to $256 \times 128$ . Every mini-batch has 32 clips corresponding to 8 identities (each identity has 4 clips). We use the Adam optimizer [22] with weight decay 0.0005. The initial learning rate is set to 0.0003 and decays by 0.1 at every 40 epochs. The training stage ends at the 160-th epoch. We also use random flipping and random erasing with a probability 0.5 for data augmentation. In SBM, kernel size $k$ is set to 3, and $\beta$ is set to 5 in default. $\lambda_{1}$ and $\lambda_{2}$ in Equation 8 are set to 1 and 0.01, respectively. In the test stage, we use all frames in units of 4-frame clips and obtain the final video feature by averaging all those clip-level representations. Cosine similarity is used for retrieval. + +# 4.3. Comparison with State-of-the-art Methods + +Table 1 shows comparison results of our method and state-of-the-art methods on four prevalent datasets. Results demonstrate the superiority of our method over existing methods. Furthermore, we make a detailed comparing analysis and draw several conclusions. + +First, our method is obviously stronger than TW-based methods [9, 34]: $4.7\%$ rank-1 and $5.4\%$ mAP improvement + +on MARS. This proves the superiority of mutual enhancement and difference amplification over temporal weighting in the utilization of temporal relations. In other words, merely using temporal cues to re-weight each frame or region does not make full use of rich temporal information. + +Second, our SINet also suppresses 3D-based methods [1, 10, 24]. The superiority may be caused by the fact that both SBM and IDM in SINet can utilize the rich temporal relations between any two frames' feature maps. However, AP3D can only model local temporal relations and M3D performs enrichment in the final frame-level embeddings. + +Third, SINet achieves superior or comparable performance with those methods based on ME [12, 23, 28, 41, 42, 44]. In fact, our SINet can enhance both video-level and frame-level representations with SBM and IDM, respectively. This complementarity incurs more powerful and informative video features. Our SINet performs slightly worse than DenseIL [12] on mAP. We attribute the inferiority to that DenseIL selects 8 frames for each video sequence in training, while we use only 4 frames due to the limitation of GPU memory. + +Fourth, SINet also exceeds other methods, including recover-based [18], coherent-based [4] and erase-based [17]. Notably, TCLNet [17] can also be categorized in DA, as it aims to focus on the divergent attention regions in the later frames. However, TCLNet is inferior to our SINet since it erases the salient features in the later frames. This erasing operation deteriorates the representation capability of the final frames' embeddings. Conversely, our + +Table 2. Performance (%) comparison for whether SBM or IDM is added to the baseline on MARS and LS-VID. + +
MethodsMARSLS-VID
mAPrank-1mAPrank-1
base.83.288.673.382.8
+SBM85.790.277.185.1
+IDM85.990.578.086.2
SINet86.291.079.687.4
+ +SINet merely suppresses the salient features and maintains the completeness of representations. + +In summary, SINet outperforms or is on a par with all those methods on four video re-id datasets, showing the generalization capability of our SINet on different scenes in terms of dataset scale, tracklet length, and resolution. + +# 4.4. Ablation Study + +For fair comparison, we build the baseline as the degraded SINet without SBM and IDM. We denote baseline as 'base.' for simplification. + +Effectiveness of SBM and IDM. Table 2 illustrates the effectiveness of SBM and IDM. SBM brings $1.6\%$ rank-1 and $2.5\%$ mAP gains over the strong baseline on MARS. This shows the effectiveness of the salient-to-broad transition. IDM achieves comparable or even better improvement than SBM. The improvement proves that it is helpful to encourage message passing across arbitrary two positions. Our SINet, the combination of SBM and IDM, can further boost the rank-1 from $90.5\%$ to $91.0\%$ on MARS. The result validates the complementarity between SBM and IDM. + +Component Analysis of SBM. Table 3 shows the effectiveness of the components in SBM. Specifically, both CAL and CPM have indispensable importance for the overall performance. This demonstrates the usefulness of channel selection in CAL and information propagation in CPM. + +To evaluate the organization of SBMs, we insert three SBMs into the same position. As shown in Table 3, the result of 'Same Pos.' is clearly inferior to our SBM. We attribute the inferiority to that the hierarchical organization can leverage the semantic information at different levels. + +We also evaluate the influence of kernel size $k$ in KGM. As shown in Figure 5(a), in the beginning, the performance increased as the kernel size becomes larger, and reaches the peak when $k = 3$ . We argue that a large kernel is more robust to filter the striking background. However, the performance decreases when $k > 3$ . Actually, too large $k$ may degrade performance because the corresponding kernel tends to smooth the response of salient and non-salient features, thus misguiding the selection of salient regions. + +Component Analysis of IDM. Here we validate the influence of different numbers of IDMs. As shown in Table 3, adding more IDMs can improve performance from $89.8\%$ to + +![](images/f3518955dcb258f6bf3fd20b19bcbc3d39c9f7e92edaf2aa01660a0d21b97b12.jpg) +Figure 5. Results $(\%)$ on MARS illustrating the influences of different hyperparameters. (a) influence of kernel size $k$ in SBM; (b) influence of reduction in IDM. + +![](images/9869a5cc1f7a4d516cb8c95f8789aed1a40ff731c216ebd32f5dde536ec0e3f9.jpg) + +Table 3. Component analysis (%) of our SINet on MARS. + +
MethodsmAPrank-1
base.83.288.6
base. + Non-local [38]85.189.7
base. + Non-local (1)85.190.0
base. + Non-local (inverse)85.089.7
base. + GC block [2]85.089.8
base. + SBM w/o CAL85.189.9
base. + SBM w/o CPM85.490.0
base. + SBM (Same Pos.)85.389.5
base. + SBM85.790.2
base. + 1 IDM85.789.8
base. + 2 IDM (Default)85.890.5
base. + 3 IDM85.890.5
SINet (base. + SBM + IDM)86.291.0
+ +$90.5\%$ in rank-1 accuracy. We believe that multiple IDMs can also conduct multi-hop communication as in [38]. + +The relation between $c(m)$ and $c'(m')$ is a vital factor to influence the performance of IDM. Figure 5(b) gives several comparisons, where numbers in x-axis denote the reduction $c / c'$ and $m / m'$ . We can observe that '4' achieves the best accuracy on both rank-1 and mAP. In fact, a large reduction will decrease the information richness after the integration operation, and a small reduction tends to overfit the training set as it has more parameters. + +# 4.5. Comparison with Related Methods + +In this section, we will compare our method with Non-Local(NL) block [38] and GC block [2]. We use the same configurations and compare them in three aspects: + +Performance. Table 3 gives the performance comparisons of the above three methods. As we can see, SBM outperforms the NL block, validating the superiority of difference amplification over traditional mutual enhancement in utilizing temporal relations. + +Table 3 also shows the performance of NL with several similarity-based aggregation strategies. Whether we inverse the affine matrix or fill the matrix with 1, the performances are similar, i.e., the aggregation strategies are useless and dispensable. This further shows the superiority and ratio- + +![](images/796bd3d332da7936ff724bef50beeebaf116266421f658814a3f49323135e79e.jpg) +Video Tracklet + +![](images/3465b51edb45128ac6c037f884653ddb45bc78e3b28d5325c13bd46f183b1ef3.jpg) +Non-Local Block + +![](images/4b99d282a3bcdd1981effb69f16b42626d64001690a1f4905a9f2c063cc52a18.jpg) +Our SBM + +nality of our input-agnostic IDM. + +GC block also achieves a favorable result without similarity calculation but is still inferior to our IDM. This verifies the effectiveness of IDM in using a more sophisticated and learnable matrix to model spatial-temporal relations. + +Computational Complexity. Our IDM increases 1.081 GFlops computation cost over baseline, while NL incurs 2.216 GFlops. The cost is reduced by half due to the optimization of matrix chain multiplication. Notably, SBM increases negligible cost, i.e., 0.014 GFlops, that mainly caused by the convolution and SE block. + +Visualization. In Figure 6, we use CAM to visualize the attention regions of NL and SBM. Clearly, NL is prone to focus on some partial and identical regions across different frames, such as the upper clothes. Although these local features are usually salient, the overlook of other potential cues leads to limited and one-sided representations of pedestrians. Conversely, the attention regions of our SBM transit from salient towards broader ones. While the front frames have activated some salient regions as in NL, SBM will encourage the later frames to capture broader areas and mine other helpful cues. Overall, our SBM covers nearly the entire foreground, resulting in more complete and distinguishable embeddings. Notably, with our delicate SBM, the later frames always activate the foreground and will not introduce background noise. Meanwhile, the salient features are still salient as they are captured in all frames. + +# 4.6. Visualization for Retrieval Results + +To better understand the necessity of broad attention regions, Figure 7 shows some retrieval results on MARS. As can be observed, it is hard for the baseline to distinguish pedestrians that share similar salient regions, e.g., the red shirt of the first person and the white shirt of the other two. In these cases, overdependence of salient regions may misguide the retrieval procedure. + +Conversely, the salient-to-broad transition of SINet en + +![](images/31a0f5c7931dc072f089ad88275b648736baf4a40910d64568978df4045d92ed.jpg) +Figure 6. Attention regions of Non-Local and our SBM. +Figure 7. Visualization of retrieval results for the baseline and our SINet on MARS. The green and red backgrounds represent the correct and incorrect matches, respectively. + +larges the attention regions. So, our SINet can successfully identify these pedestrians via other lesser salient but broader cues, e.g., the existence of black socks, the difference between backpacks/upper clothes for three pedestrians, respectively. The incorporation of both salient and broad cues leads to diverse and integral characteristics of the given pedestrian and can rectify the false decisions made by only salient regions. + +# 5. Conclusion + +This paper aims to pursue a better representational capability for video person re-id. We present SBM to enlarge the attention regions for consecutive frames gradually. To further improve our SBM, we introduce IDM to consolidate frame-level representations. IDM and SBM are complementary and can be combined to form SINet. Extensive experiments show the effectiveness of our method. + +Broader impacts. The proposed method boosts the performance of video re-id, making it more practicable in security, autonomous driving, and other security issues. Meanwhile, the higher accuracy and more used security cameras may raise the risk of privacy leaking and other security issues, which may put everyone under monitoring. + +Acknowledgement This work is partially supported by Natural Science Foundation of China (NSFC): 61876171 and 61976203. + +# References + +[1] Abhishek Aich, Meng Zheng, Srikrishna Karanam, Terrence Chen, Amit K. Roy-Chowdhury, and Ziyan Wu. Spatiotemporal representation factorization for video-based person re-identification. In ICCV, pages 152–162, 2021. 6 +[2] Yue Cao, Jiarui Xu, Stephen Lin, Fangyun Wei, and Han Hu. Gcnet: Non-local networks meet squeeze-excitation networks and beyond. In ICCV Workshops, pages 0–0, 2019. 5, 7 +[3] Dapeng Chen, Hongsheng Li, Tong Xiao, Shuai Yi, and Xiaogang Wang. Video person re-identification with competitive snippet-similarity aggregation and co-attentive snippet embedding. In CVPR, pages 1169-1178, 2018. 2, 6 +[4] Guangyi Chen, Yongming Rao, Jiwen Lu, and Jie Zhou. Temporal coherence or temporal motion: Which is more critical for video-based person re-identification? In ECCV, pages 660–676, 2020. 2, 6 +[5] Michael Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In NeurIPS, pages 3844-3852, 2016. 1 +[6] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248-255, 2009. 5 +[7] Chanho Eom, Geon Lee, Junghyup Lee, and Bumsub Ham. Video-based person re-identification with spatial and temporal memory networks. In ICCV, pages 12036–12045, 2021. 6 +[8] Yifan Feng, Haoxuan You, Zizhao Zhang, Rongrong Ji, and Yue Gao. Hypergraph neural networks. In AAAI, pages 3558-3565, 2019. 1 +[9] Yang Fu, Xiaoyang Wang, Yunchao Wei, and Thomas Huang. Sta: Spatial-temporal attention for large-scale video-based person re-identification. In AAAI, volume 33, pages 8287–8294, 2019. 2, 6 +[10] Xinqian Gu, Hong Chang, Bingpeng Ma, Hongkai Zhang, and Xilin Chen. Appearance-preserving 3d convolution for video-based person re-identification. In ECCV, pages 228–243, 2020. 2, 6 +[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 1, 5 +[12] Tianyu He, Xin Jin, Xu Shen, Jianqiang Huang, Zhibo Chen, and Xian-Sheng Hua. Dense interaction learning for video-based person re-identification. In ICCV, pages 1490–1501, 2021. 6 +[13] Alexander Hermans, Lucas Beyer, and Bastian Leibe. In defense of the triplet loss for person re-identification. arXiv preprint arXiv:1703.07737, 2017. 5 +[14] Martin Hirzer, Csaba Beleznai, Peter M Roth, and Horst Bischof. Person re-identification by descriptive and discriminative classification. In SCIA, pages 91–102, 2011. 6 +[15] R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Phil Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. In ICLR, 2019. 5 + +[16] Ruibing Hou, Hong Chang, Bingpeng Ma, Rui Huang, and Shiguang Shan. Bicnet-tks: Learning efficient spatial-temporal representation for video person re-identification. In CVPR, pages 2014–2023, 2021. 6 +[17] Ruibing Hou, Hong Chang, Bingpeng Ma, Shiguang Shan, and Xilin Chen. Temporal complementary learning for video person re-identification. In ECCV, pages 388–405, 2020. 2, 5, 6 +[18] Ruibing Hou, Bingpeng Ma, Hong Chang, Xinqian Gu, Shiguang Shan, and Xilin Chen. Vrstc: Occlusion-free video person re-identification. In CVPR, pages 7183-7192, 2019. 2, 6 +[19] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In CVPR, pages 7132-7141, 2018. 1, 3 +[20] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, pages 448-456, 2015. 5 +[21] Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. arXiv preprint arXiv:2004.11362, 2020. 5 +[22] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[23] Jianing Li, Jingdong Wang, Qi Tian, Wen Gao, and Shiliang Zhang. Global-local temporal representations for video person re-identification. In ICCV, pages 3958–3967, 2019. 2, 5, 6 +[24] Jianing Li, Shiliang Zhang, and Tiejun Huang. Multiscale 3d convolution network for video based person re-identification. In AAAI, volume 33, pages 8618–8625, 2019. 2, 6 +[25] Shuang Li, Slawomir Bak, Peter Carr, and Xiaogang Wang. Diversity regularized spatiotemporal attention for video-based person re-identification. In CVPR, pages 369–378, 2018. 4 +[26] Chih-Ting Liu, Chih-Wei Wu, Yu-Chiang Frank Wang, and Shao-Yi Chien. Spatially and temporally efficient non-local attention network for video-based person re-identification. BMVC, 2019. 1, 2, 4, 5 +[27] Hao Liu, Zequn Jie, Karlekar Jayashree, Meibin Qi, Jianguo Jiang, Shuicheng Yan, and Jiashi Feng. Video-based person re-identification with accumulative motion context. TCVT, 28(10):2788-2802, 2018. 2 +[28] Xuehu Liu, Pingping Zhang, Chenyang Yu, Huchuan Lu, and Xiaoyun Yang. Watching you: Global-guided reciprocal learning for video-based person re-identification. In CVPR, pages 13334–13343, 2021. 6 +[29] Jinjie Mai, Meng Yang, and Wenfeng Luo. Erasing integrated learning: A simple yet effective approach for weakly supervised object localization. In CVPR, pages 8766-8775, 2020. 2 +[30] Niall McLaughlin, Jesus Martinez del Rincon, and Paul Miller. Recurrent convolutional network for video-based person re-identification. In CVPR, pages 1325–1334, 2016. 2 +[31] Xuecheng Nie, Yuncheng Li, Linjie Luo, Ning Zhang, and Jiashi Feng. Dynamic kernel distillation for efficient pose estimation in videos. In ICCV, pages 6942-6950, 2019. 3 + +[32] Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In ICCV, pages 618-626, 2017. 1 +[33] Guanglu Song, Biao Leng, Yu Liu, Congrui Hetang, and Shaofan Cai. Region-based quality estimation network for large-scale person re-identification. In AAAI, 2018. 1 +[34] Arulkumar Subramaniam, Athira Nambiar, and Anurag Mittal. Co-segmentation inspired attention networks for video-based person re-identification. In ICCV, pages 562–572, 2019. 2, 6 +[35] Yi Tay, Anh Tuan Luu, Aston Zhang, Shuohang Wang, and Siu Cheung Hui. Compositional de-attention networks. In NeurIPS, pages 6135–6145, 2019. 5 +[36] Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao, Dahua Lin, Xiaou Tang, and Luc Van Gool. Temporal segment networks: Towards good practices for deep action recognition. In ECCV, pages 20-36, 2016. 6 +[37] Taiqing Wang, Shaogang Gong, Xiatian Zhu, and Shengjin Wang. Person re-identification by video ranking. In ECCV, pages 688–703, 2014. 6 +[38] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, pages 7794-7803, 2018. 1, 2, 4, 5, 7 +[39] Yu Wu, Yutian Lin, Xuanyi Dong, Yan Yan, Wanli Ouyang, and Yi Yang. Exploit the unknown gradually: One-shot video-based person re-identification by stepwise learning. In CVPR, pages 5177–5186, 2018. 1 +[40] Haolan Xue, Chang Liu, Fang Wan, Jianbin Jiao, Xiangyang Ji, and Qixiang Ye. Danet: Divergent activation for weakly supervised object localization. In ICCV, pages 6589-6598, 2019. 2 +[41] Yichao Yan, Jie Qin, Jiaxin Chen, Li Liu, Fan Zhu, Ying Tai, and Ling Shao. Learning multi-granular hypergraphs for video-based person re-identification. In CVPR, pages 2899–2908, 2020. 1, 2, 4, 6 +[42] Jinrui Yang, Wei-Shi Zheng, Qize Yang, Ying-Cong Chen, and Qi Tian. Spatial-temporal graph convolutional network for video-based person re-identification. In CVPR, pages 3289–3299, 2020. 1, 2, 6 +[43] Wei Zhang, Xiaodong Yu, and Xuanyu He. Learning bidirectional temporal cues for video-based person re-identification. TCSVT, 28(10):2768-2776, 2017. 2 +[44] Zhizheng Zhang, Cuiling Lan, Wenjun Zeng, and Zhibo Chen. Multi-granularity reference-aided attentive feature aggregation for video-based person re-identification. In CVPR, pages 10407–10416, 2020. 1, 4, 5, 6 +[45] Zhizheng Zhang, Cuiling Lan, Wenjun Zeng, Xin Jin, and Zhibo Chen. Relation-aware global attention for person re-identification. In CVPR, pages 3186–3195, 2020. 6 +[46] Yiru Zhao, Xu Shen, Zhongming Jin, Hongtao Lu, and Xian-sheng Hua. Attribute-driven feature disentangling and temporal aggregation for video person re-identification. In CVPR, pages 4913–4922, 2019. 2 +[47] Feng Zheng, Cheng Deng, Xing Sun, Xinyang Jiang, Xiaowei Guo, Zongqiao Yu, Feiyue Huang, and Rongrong Ji. + +Pyramidal person re-identification via multi-loss dynamic training. In CVPR, pages 8514-8522, 2019. 5 +[48] Liang Zheng, Zhi Bie, Yifan Sun, Jingdong Wang, Chi Su, Shengjin Wang, and Qi Tian. Mars: A video benchmark for large-scale person re-identification. In ECCV, pages 868–884, 2016. 5 +[49] Zhen Zhou, Yan Huang, Wei Wang, Liang Wang, and Ti-niu Tan. See the forest for the trees: Joint spatial and temporal recurrent neural networks for video-based person re-identification. In CVPR, pages 4747–4756, 2017. 2, 6 \ No newline at end of file diff --git a/salienttobroadtransitionforvideopersonreidentification/images.zip b/salienttobroadtransitionforvideopersonreidentification/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..316927f71df11ff53a6418354ec0790f5f84da15 --- /dev/null +++ b/salienttobroadtransitionforvideopersonreidentification/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81200a2b62d92b62ca76c0d17f2eaa6d892025f5d638525f5d6c4006843865d8 +size 536268 diff --git a/salienttobroadtransitionforvideopersonreidentification/layout.json b/salienttobroadtransitionforvideopersonreidentification/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..b7d4362e2eabf36842e5da79f53d87dcf8bf3bd1 --- /dev/null +++ b/salienttobroadtransitionforvideopersonreidentification/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffd2eb331f59489d8f719f616d2c18181bba8cd2dae375dad7b131f306f2b743 +size 431135 diff --git a/salvageofsupervisioninweaklysupervisedobjectdetection/d4a71621-8c34-4709-ae1c-f4a5dfb5d949_content_list.json b/salvageofsupervisioninweaklysupervisedobjectdetection/d4a71621-8c34-4709-ae1c-f4a5dfb5d949_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..392341873ca13e562c4863d9b6d1755777bad985 --- /dev/null +++ b/salvageofsupervisioninweaklysupervisedobjectdetection/d4a71621-8c34-4709-ae1c-f4a5dfb5d949_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8bf9f0535fc98f1bb0adc0df65cf3093151e31cfe328658e03879d37f1c3fb2d +size 82459 diff --git a/salvageofsupervisioninweaklysupervisedobjectdetection/d4a71621-8c34-4709-ae1c-f4a5dfb5d949_model.json b/salvageofsupervisioninweaklysupervisedobjectdetection/d4a71621-8c34-4709-ae1c-f4a5dfb5d949_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d9fc1979302e4b5c95a612628f3db8bb6ab132be --- /dev/null +++ b/salvageofsupervisioninweaklysupervisedobjectdetection/d4a71621-8c34-4709-ae1c-f4a5dfb5d949_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a95696c96126e44e1c752b5e43bca9a5ffb941bcc95694fa9c2ae92f7b5131d9 +size 98664 diff --git a/salvageofsupervisioninweaklysupervisedobjectdetection/d4a71621-8c34-4709-ae1c-f4a5dfb5d949_origin.pdf b/salvageofsupervisioninweaklysupervisedobjectdetection/d4a71621-8c34-4709-ae1c-f4a5dfb5d949_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bfcf1ff06b540de84c83737394dbb5cae3a99d9e --- /dev/null +++ b/salvageofsupervisioninweaklysupervisedobjectdetection/d4a71621-8c34-4709-ae1c-f4a5dfb5d949_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a143a943bd38974da6d838d6ee50d3b5bdd594e4d554fc4d009b90307669ad3f +size 2219044 diff --git a/salvageofsupervisioninweaklysupervisedobjectdetection/full.md b/salvageofsupervisioninweaklysupervisedobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..bb988794e95f778837b0f060fe7374dd923620ac --- /dev/null +++ b/salvageofsupervisioninweaklysupervisedobjectdetection/full.md @@ -0,0 +1,367 @@ +# Salvage of Supervision in Weakly Supervised Object Detection + +Lin Sui $^{1}$ Chen-Lin Zhang $^{1,2}$ Jianxin Wu $^{1*}$ + +$^{1}$ State Key Laboratory for Novel Software Technology, Nanjing University, China $^{2}$ 4Paradigm Inc., Beijing, China + +{suilin0432, zclnjucs, wujx2001}@gmail.com + +# Abstract + +Weakly supervised object detection (WSOD) has recently attracted much attention. However, the lack of bounding-box supervision makes its accuracy much lower than fully supervised object detection (FSOD), and currently modern FSOD techniques cannot be applied to WSOD. To bridge the performance and technical gaps between WSOD and FSOD, this paper proposes a new framework, Salvage of Supervision (SoS), with the key idea being to harness every potentially useful supervisory signal in WSOD: the weak image-level labels, the pseudo-labels, and the power of semi-supervised object detection. This paper proposes new approaches to utilize these weak and noisy signals effectively, and shows that each type of supervisory signal brings in notable improvements, outperforms existing WSOD methods (which mainly use only the weak labels) by large margins. The proposed SoS-WSOD method also has the ability to freely use modern FSOD techniques. SoSWSOD achieves $64.4\mathrm{mAP}_{50}$ on VOC2007, $61.9\mathrm{mAP}_{50}$ on VOC2012 and $16.6\mathrm{mAP}_{50:95}$ on MS-COCO, and also has fast inference speed. Ablations and visualization further verify the effectiveness of SoS. + +# 1. Introduction + +Large-scale datasets with precise annotations are critical in developing detection algorithms, but are expensive to obtain. Thus, weakly supervised object detection (WSOD), which only needs image-level labels on training images, is popular these days. WSOD has borrowed ideas from fully supervised object detection (FSOD), such as object proposals [2, 33] and the Fast-RCNN framework [10]. But modern FSOD has discarded external object proposals and has developed better techniques like Faster-RCNN [24] and FPN [20]. Furthermore, current WSOD methods mostly use VGG16 [28] as the backbone and Fast-RCNN [10] as the + +*J. Wu is the corresponding author. This research was partly supported by the National Natural Science Foundation of China under Grant 61772256 and Grant 61921006. + +detector, which confines both accuracy and speed. That is, due to the lack of detailed box-level annotations, WSOD cannot enjoy the progress from FSOD. In fact, it has been shown that modern FSOD techniques such as ResNet backbones and RoIAlign will even deteriorate WSOD detectors [27]. The weak image-level label is often the only supervisory signal utilized for object detection in WSOD, by resorting to a multi-instance recognition setup [4]. + +In this paper, we argue that WSOD must fight hard to harness every potential source of supervisory signal, and should find a way to utilize the progress in FSOD. The proposed Salvage of Supervision (SoS) framework (SoWSOD) is illustrated in Fig. 1, which has 3 stages. Stage 1 trains a detector with any WSOD method, and we propose an improved OICR [32] as our stage 1. Stage 2 is pseudoFSOD, where the difficulty is to generate good pseudo box-level annotations in order to boost performance and adopt newer FSOD techniques (e.g., ResNet [13], RoIAlign [12], and FPN [20]), i.e., to salvage the supervision. This problem has been largely ignored in WSOD, for which we propose a simple but effective solution. Stage 3 is proposed by us, named as SSOD, in which we split the whole dataset into a "clean" and a "noisy" part, then treat the noisy part as unlabeled. That is, we salvage additional useful supervisory signals by creating a semi-supervised object detection (SSOD) problem. Hence, we have salvaged supervisory signals out of weak labels by designing novel algorithms to generate high-quality pseudo box-level labels and by creating a semi-supervised learning problem, respectively. + +Compared to existing WSOD methods, our SoS-WSOD not only harnesses every potentially useful supervisory signal, but also enables WSOD to fully enjoy both accuracy and speed benefits of modern FSOD methods. Although pseudo FSOD has been tried [6,9,32,41], we will show that SoS-WSOD salvages pseudo-supervision of much higher quality. Hence, our contributions are: + +- We propose SoS-WSOD, a new WSOD framework, showing that we must harness all potential supervisory signals in WSOD: generate high-quality pseudoannotations for FSOD, and treat the generated pseudo + +![](images/99ef4cc2575a895a24b7d5398ec51c01fdb723982bf6517cd4775aeff66f3ccf.jpg) +Figure 1. The SoS-WSOD pipeline. Stage 1 trains a weakly supervised detector with only image-level labels. We design PGF to filter its detection results and to generate high-quality pseudo box-level annotations in stage 2, which enables us to train a fully supervised detector. Stage 3 splits the training set into "clean" and unlabeled "noisy" parts, and trains a detector in a semi-supervised manner. + +label dataset as a noisy dataset to utilize SSOD. + +- We show that although existing WSOD methods lag far behind FSOD in terms of both accuracy and technique, it is very beneficial and feasible to fill this gap. Our pseudo-FSOD enjoys the benefits of all modern FSOD techniques in WSOD, and achieves both higher accuracy and faster speed. +- We improve WSOD accuracy by large margins, with 64.4 $mAP_{50}$ on VOC2007, 61.9 $mAP_{50}$ on VOC2012, and 16.6 $mAP_{50:95}$ on MS-COCO. Besides, SoS-WSOD also has fast detection speed. + +# 2. Related Work + +Weakly supervised object detection (WSOD). Weakly supervised object detection (WSOD) seeks to detect the location and type of multiple objects given only image-level labels during training. WSOD methods often utilize object proposals and the multi-instance learning (MIL) framework. WSDDN [4] was the first to integrate MIL into end-to-end WSOD. OICR [32] proposed pseudo groundtruth mining and an online instance refinement branch. PCL [31] clustered proposals to improve pseudo groundtruth mining, and C-MIL [34] improved the MIL loss. Recently, MIST [25] changed the pseudo groundtruth mining rule of OICR, and proposed a Concrete DropBlock module. Zeng et al. [27] made the ResNet [13] backbones working in WSOD. CASD [14] proposed self-distillation along with attention to improve WSOD. Some methods [5, 7, 42] proposed to boost WSOD detector performance with the help of fully annotated COCO-60 dataset. + +Some methods tried to adopt modern FSOD techniques into WSOD [26, 27]. Some methods have used the output of WSOD methods (pseudo box annotations) to retrain WSOD models with FSOD. W2F [41] proposed a pseudo groundtruth excavation and a pseudo groundtruth adaptation module to mine large and complete objects for retraining. However, they directly retrain WSOD models without considering any noise in the generated pseudo-labeled + +dataset which is bound to be very noisy. In contrast, we propose to reconsider the pseudo-labeled dataset with noisy label training perspective and harness the semi-supervised learning paradigm to squeeze better pseudo-labels. + +Semi-supervised object detection (SSOD). SSOD trains a detector with a small set of images with box-level annotations plus many images without any labels. Compared to WSOD, fewer methods have been proposed for SSOD. SSM [35] stitched high-confidence patches from unlabeled to labeled data. CSD [15] used consistency and background elimination. Recently, STAC [29] used strong data augmentation for unlabeled data. Liu et al. [22] used a teacher-student framework, and ISMT [37] used mean teacher. However, these methods need an exact split of labeled and unlabeled data, and noisy-free box-level annotations for labeled images, but all these are not available in WSOD. We will generate them from the noisy output of the previous stage in SoS-WSOD. + +Learning with noisy labels. As deep neural networks are annotation-hungry, training DNN with noisy labels also attracts much attention, especially in image classification. Some [30, 38] proposed iterative methods to relabel noisy samples by using network predictions. [1, 23] focused on reweighting. Besides, considering samples with smaller losses as clean ones is also commonly used in many works, such as in [11, 18]. In SoS-WSOD, we adopt the small loss idea to split the noisy output of stage 2 to split the data into "clean" and "noisy" parts. + +# 3. Salvage of Supervision + +Notation. We first define our notation. A training set $\mathcal{D}_w$ consists of training images $I_{tr}$ and image-level annotations $L_{tr}$ . Specifically, each image $\pmb{x} \in \mathbb{R}^{h \times w \times 3}$ in $I_{tr}$ has a corresponding label $\pmb{y} = [y_1, y_2, \dots, y_C] \in [0,1]^C$ , where $C$ is the total number of object categories. We will train a detector $W_{final}$ without using any additional annotations. + +Overview. Algorithm 1 is the pipeline of the proposed SoS-WSOD. We first train a WSOD detector $W_{wsod}$ , which generates pseudo bounding boxes $b_{tr}$ . These pseudo su + +# Algorithm 1 Salvage of Supervision + +Input: Training images $I_{tr}$ and image-level class labels $L_{tr}$ , test images $I_{te}$ + +1: Train a WSOD model $W_{wsod}$ , and generate pseudo groundtruth bounding boxes $b_{tr}$ for training images +2: Use $I_{tr}$ and $b_{tr}$ to train a fully supervised object detector $W_{full}$ +3: Divide $I_{tr}$ into a labeled subset $I_{tr}^{*}$ with pseudo boxes $b_{tr}^{*}$ and an unlabeled subset $I_{tr}'$ +4: Use $W_{full}$ to initialize, and learn a semi-supervised $W_{final}$ on $L_{tr}$ , $I_{tr}^{*}$ (with $b_{tr}^{*}$ ) and $I_{tr}'$ +5: Return: Use $W_{final}$ to predict the bounding boxes and their class labels for test images + +pervision signals are used to train an FSOD model $W_{full}$ , which can use modern FSOD techniques. Then, we treat the generated pseudo-labeled dataset as a noisy one. With our proposed splitting rule, it is split into an unlabeled subset with $I_{tr}^{\prime}$ and a "clean" labeled subset (those images with confident pseudo boxes) which consists of $I_{tr}^{*}$ and $b_{tr}^{*}$ . Finally, we adopt an SSOD method to train the final detector $W_{final}$ on the pseudo labeled dataset. + +# 3.1. Stage 1: Improved WSOD + +A traditional WSOD detector starts the process. Besides the given image-level annotations $I_{tr}$ , most WSOD methods use external object proposals $R$ as extra inputs. Among them, the pipeline of OICR [32] is widely used, which first selects a small number of most confident object proposals $\hat{R}$ as foreground proposals and then refines them by filtering and adding bounding box regression branches. + +We propose to improve OICR with two simple changes as our stage 1. First, recent works [19, 25, 31, 39] demonstrate that better proposal mining rules are critical in obtaining higher recall of objects, which are essential for WSOD detectors. For example, MIST [25] proposed to mine more proposals with low overlap between each other. We find that MIST can catch more objects but will also mine a large number of wrong proposals, while OICR is able to mine accurate proposals but ignores many groundtruth instances. Hence, we introduce a mining rule which strikes a balance between recall and precision. In addition, inspired by CASD [14], we find the multi-input technique is also helpful even without using inverted attention and CASD's self-attention transfer. More details are in the appendix. + +Our proposed WSOD (stage 1) is a strong baseline (cf. Sec. 4). However, we will also show that SoS-WSOD can achieve excellent performance by adopting a weaker WSOD baseline in stage 1, too. + +# 3.2. Stage 2: High-quality pseudo boxes for FSOD + +If we are able to output pseudo bounding boxes $b_{tr}$ from stage 1's detector $W_{wsod}$ that are accurate to some extent, a subsequent FSOD using these boxes can further improve detection. [32] was the first to re-train a WSOD detector by selecting the top-one detection result per class as pseudo groundtruth label, but it will miss a large amount of objects, especially for complicated datasets such as MS-COCO. As + +![](images/5051708ac42255b1cd60b2690571d67a5dd4194cdd5d8a74dffb6181ac990cdd.jpg) + +![](images/32f8d717f9ac0de640e8ed7d087fe74e677a982b136675742e592f23713600f9.jpg) + +![](images/9d44a13e8afa701559e35db0ed6cdc187d2c5ac50c10cea2a87a9c1c49f923ae.jpg) +Figure 2. Comparison of W2F [41] (top) and PGF (bottom). W2F tends to generate clustered objects in complicated scenarios. + +![](images/b2612f213165e66efbc029caf867788d771c9d65b8aa8f3db310f54b60c442f7.jpg) + +will be shown in the ablations in Sec. 4, missed objects will be treated as backgrounds and will even deteriorate the detection accuracy. W2F [41] proposed pseudo groundtruth excavation (PGE) and pseudo groundtruth adaption (PGA) to generate pseudo groundtruth from WSOD output. However, W2F only dealt with the VOC datasets, which have a small number of objects per image and the objects are often large in size. Both modules in W2F are designed to mine large complete objects, and are not suitable for general detection. Figure 2 shows that W2F tends to cluster multiple objects into one pseudo-box. Instead, we propose a simple but effective algorithm called pseudo groundtruth filtering (PGF) to generate high-quality pseudo-boxes from stage 1's WSOD model, whose pipeline is shown in Algorithm 2. + +For each groundtruth class, we only keep the top-scored predictions and those with high confidence ( $\geq t_{\text{keep}}$ , line 6). Then, we remove tiny proposals which are mostly contained inside other proposals in the same category (lines 8-10). After PGF generates pseudo groundtruth $\hat{P}$ , in SoS-WSOD, we are able to use $\hat{P}$ to supervise and train an FSOD detector $W_{\text{full}}$ using modern FSOD methods (e.g., FasterRCNN [24] + FPN [20]). Please note that the impact of our pseudo-FSOD phase is two-fold. First, the retrained WSOD detector gets accuracy and speed gains from these salvaged supervisory signals. Besides, now we are able to use almost all modern FSOD techniques which are previously not applicable in WSOD. In other words, a WSOD detector now has the flexibility to select most backbones and architecture as needed in WSOD, without resorting to extensive efforts (e.g., as in [27]). + +Algorithm 2 Pseudo Groundtruth Filtering (PGF) +Input: boxes $P$ with scores $S$ for an input image (out- +put of stage 1) and its active labels $y_{1},\ldots ,y_{m}$ ,keep +threshold $t_\mathrm{keep}$ , containment threshold $t_\mathrm{con}$ +Output: Pseudo groundtruth boxes $\hat{P}$ +1: $\hat{P} = \emptyset$ +2: for $i = 1,\dots ,m$ do +3: $S_{i} = S[i,:]\quad //$ get scores for the $i$ -th active class +4: $ind_{max},S_i^{max} = \max (S_i)\quad //$ get index and +score of the top proposal +5: $P_{i}^{max} = P[ind_{max},:]\quad //$ get bounding box for +the top proposal +6: Remove all proposals whose scores $< t_{\mathrm{keep}}$ ,and +the remaining boxes form a set $P_{i}$ +7: $P_{i} = P_{i}\bigcup P_{i}^{max}$ +8: for any two different bounding boxes $u,v$ remain +ing in $P_{i}$ do +9: if $\frac{|u\cap v|}{|v|}\geq t_{con}$ then $P_{i} = P_{i}\backslash v$ +10: end for +11: $\hat{P} = \hat{P}\bigcup P_{i}$ +12: end for + +We intentionally designed PGF to be very simple in order to achieve both generality and simplicity. In practice, it is also possible to tailor the pseudo groundtruth mining algorithm to the characteristics of the dataset (e.g., as in [41].) + +# 3.3. Stage 3: Split noisy data for SSOD + +FSOD detectors can bring performance gains to WSOD detectors if a high percentage of the generated pseudo groundtruth are correct. However, noisy or wrong pseudo groundtruth (e.g., missing instances, wrong classification results or inaccurate bounding boxes) are inevitable in WSOD. To deal with this issue, we propose to further salvage supervision by treating the generated pseudo-labeled dataset from the perspective of noisy label learning. After splitting the dataset into "clean" labeled part and unlabeled "noisy" part, the semi-supervised learning paradigm can be used. + +Data split. Many works [11, 16] have shown that noisy annotations will deteriorate the performance. The pseudo groundtruth boxes $\hat{P}$ generated by PGF will inevitably have many noisy ones. As shown in [11, 17, 18], a deep network tends to fit clean data first, then gradually memorize noisy ones. Thus, we use the FSOD detector $W_{full}^{\prime}$ (the detector before performing learning rate decay in the pseudo-FSOD stage) to divide training images $I_{tr}$ into labeled $I_{tr}^{*}$ (with relatively clean pseudo groundtruth boxes $b_{tr}^{*}$ ) and unlabeled ones $I_{tr}^{\prime}$ (whose pseudo groundtruth boxes are more noisy). In a classification problem, the split is simple [11]: calculate the loss of each training image, and those with smaller loss values are "clean" ones. But, in object detec + +tion, it is hard to decide whether an image is clean simply based on the sum of all losses of all proposals. We follow the small loss idea but revise it for object detection. + +Surely we want to focus on foreground objects, hence we propose the following simple splitting process. In Faster-RCNN, regions of interest (RoIs, denoted as $R$ ) are divided into foreground and background RoIs according to the IoU between RoIs and pseudo groundtruth boxes. Then, we do not calculate losses for background RoIs, and accumulate the RPN losses and RoI losses (both classification and regression branches) of different foreground RoIs. The aggregated loss is the split loss for an input image: + +$$ +\mathcal {L} _ {s p l i t} (I) = \frac {1}{N _ {p o s}} \sum_ {i} \mathbb {1} _ {f o r e} ^ {R _ {i}} \mathcal {L} _ {s p l i t} \left(R _ {i}\right), \tag {1} +$$ + +$$ +\begin{array}{l} \mathcal {L} _ {s p l i t} \left(R _ {i}\right) = \mathcal {L} _ {R P N _ {C l s}} \left(R _ {i}\right) + \mathcal {L} _ {R P N _ {R e g}} \left(R _ {i}\right) \\ + \mathcal {L} _ {R o I _ {C l s}} (R _ {i}) + \mathcal {L} _ {R o I _ {R e g}} (R _ {i}), \tag {2} \\ \end{array} +$$ + +where $N_{pos}$ is the number of foreground RoIs, $\mathbb{1}_{\text {fore }}^{R_i}$ is the indicator function for whether a proposal $R_i$ belongs to foreground RoIs or not, $\mathcal{L}_{RPN}$ and $\mathcal{L}_{RoI}$ are RPN and RoI head losses, respectively, and $Cls$ and Reg stand for classification and regression, respectively. We then rank all training images by $\mathcal{L}_{split}$ and choose images with small loss values as "clean" labeled data. For simplicity, we use a hard threshold $K$ to decide sizes of each part. We believe there exist better but more complicated choices such as dynamically using GMM to fit the loss distribution to divide pseudo-labeled dataset. Fig. 3 shows our labeled "clean" part are indeed cleaner than the "noisy" unlabeled part. + +The optimal choice of $K$ varies depends on the size and difficulty of datasets, and we provide a rule-of-thumb for it. We find that traditional WSOD performs well for easy images which will be split as "clean". Thus, we set $K$ around the number of images which has a single class label (or few for datasets with many object categories). Ablation studies in Sec. 4 verify the effectiveness of such a rule-of-thumb. + +Semi-supervised detection. Now we can perform semi-supervised detection. Unbiased Teacher [22] is an effective semi-supervised detector, whose key idea is a teacher-student pair updated by mutual learning. It first trains a detector using only labeled data (i.e., burn-in) and then uses it to initialize both the student and the teacher detectors. In the mutual learning phase, the teacher will dynamically generate pseudo labels for unlabeled data with weak data augmentation. The student will learn from both well-annotated labeled data and strong augmented unlabeled data with the generated pseudo labels. The teacher will receive updates from the student via exponential moving average. + +But, clean data is not available in WSOD. We use the Unbiased Teacher pipeline with a few changes and improvements. First, the pseudo-FSOD training is actually a burn-in process, and we do not need an additional burn-in stage. + +![](images/d5f35a180d1c24a0694cf86ba9ddbad7b25b04f4e6065f87c53b8b67aaed7d33.jpg) +(a) IoU@50 + +![](images/2d3b87c1de4f00164a933241e0cd9e893bba74570e33487b6bea065449d4d7f9.jpg) +(b) IoU@75 +Figure 3. Per-class accuracy of pseudo groundtruth bounding boxes of the labeled and unlabeled subsets on VOC2007 when $K = 2000$ . + +Then, the student learns by minimizing + +$$ +\mathcal {L} = \mathcal {L} _ {\sup } + \lambda_ {u} \mathcal {L} _ {\text {u n s u p}}, \tag {3} +$$ + +where the student will learn from both labeled $(\mathcal{L}_{sup})$ and unlabeled $(\mathcal{L}_{unsup})$ data, and $\lambda_{u}$ is the weight to balance the unsupervised and supervised loss terms. Specifically, $\mathcal{L}_{sup}$ and $\mathcal{L}_{unsup}$ are defined as follows: + +$$ +\begin{array}{l} \mathcal {L} _ {s u p} = \sum_ {i} \mathcal {L} _ {R P N _ {C l s}} \left(\boldsymbol {x} _ {i} ^ {s}, \boldsymbol {b} _ {i} ^ {s}\right) + \mathcal {L} _ {R P N _ {R e g}} \left(\boldsymbol {x} _ {i} ^ {s}, \boldsymbol {b} _ {i} ^ {s}\right) \\ + \mathcal {L} _ {R o I _ {C l s}} \left(\boldsymbol {x} _ {i} ^ {s}, \boldsymbol {b} _ {i} ^ {s}\right) + \mathcal {L} _ {R o I _ {R e g}} \left(\boldsymbol {x} _ {i} ^ {s}, \boldsymbol {b} _ {i} ^ {s}\right), \tag {4} \\ \end{array} +$$ + +$$ +\mathcal {L} _ {u n s u p} = \sum_ {i} \mathcal {L} _ {R P N _ {C l s}} \left(\boldsymbol {x} _ {i} ^ {u}, \boldsymbol {b} _ {i} ^ {\prime}\right) + \mathcal {L} _ {R o I _ {C l s}} \left(\boldsymbol {x} _ {i} ^ {u}, \boldsymbol {b} _ {i} ^ {\prime}\right), \tag {5} +$$ + +where $\boldsymbol{x}_i^s$ and $\boldsymbol{b}_i^s$ are images and pseudo groundtruth boxes in the "clean" subset $I_{tr}^*$ . $\boldsymbol{x}_i^u$ and $\boldsymbol{b}_i'$ are images in the unlabeled subset $I_{tr}'$ and pseudo groundtruth dynamically generated by the teacher. $\mathcal{L}_{sup}$ is for labeled data only. For $\mathcal{L}_{unsup}$ , the teacher generates pseudo labels for the student with weak data augmentations, then the student uses strong data augmentations along with pseudo labels to calculate it. We believe the predictions of the teacher are less accurate than annotations for the "clean" data, so $\mathcal{L}_{unsup}$ only contains the classification loss. In other words, all the regression branches are only learned with "clean" labeled data. + +Pseudo boxes generated by the teacher for unlabeled images are not always accurate. Hence, different from regular SSOD, we utilize the image-level labels (i.e., another salvage of supervision) by filtering out false positive pseudo labels, which brings additional benefits to WSOD. Finally, the student detector updates its weights according to Eq. 3, and the teacher receives its update from the student through exponential moving average (EMA). + +# 4. Experiments + +We evaluated our SoS-WSOD on three standard WSOD benchmark datasets: VOC2007 [8], VOC2012 [8] and MS-COCO [21]. VOC2007 has 2501 training, 2510 validation and 4952 test images. VOC2012 contains 5717 training, 5823 validation, and 10991 test images. MS-COCO + +contains around 110,000 training and 5000 validation images. Following the common WSOD evaluation protocol, we use training and evaluation images to train our model on VOC2007 and VOC2012, and evaluate on the test images. For MS-COCO, we train our model on the training images and evaluate on the validation images. We use $mAP_{50:95}$ , $mAP_{50}$ and $mAP_{75}$ as evaluation metrics for both MS-COCO and VOC2007. For VOC2012, since labels for test images are not released, we report $mAP_{50}$ results returned by the official evaluation server. + +# 4.1. Implementation details + +We use PyTorch on RTX3090 GPUs, and our code will be released soon. Backbone models are pretrained on ImageNet. It is worth noting that WSOD methods lag behind FSOD in terms of backbone and other techniques. For example, state-of-the-art WSOD methods still use VGG16 as the backbone, while FSOD methods use better architectures. Extra efforts are needed in order to adapt modern backbones to WSOD [27]. Instead, in stage 2 and 3 our SoS-WSOD has the freedom to choose backbones and detection architectures. For simplicity and efficiency, we use FPN with ResNet50 backbone as the FSOD detector in our main experiments without any extra handling. We also use VGG16 as backbone and remove FPN for fair comparisons. + +Details of our improved OICR for the WSOD training stage (stage 1) are available in the appendix. In PGF (Algorithm 2), we set $t_{\text{keep}} = 0.2$ and $t_{\text{con}} = 0.85$ for all datasets. Although generating pseudo groundtruth labels with TTA (Test Time Augmentation) leads to higher accuracy, the high computational cost (1.5/3/33 hours on VOC2007/2012/MS-COCO) makes it hard to use in large-scale datasets. To keep the same setting in all experiments, we do not use TTA in Algorithm 2. + +In both stages 2 and 3, we keep all hyperparameters except $K$ the same as the default hyperparameters in [36] and [22], respectively. We reduce the total training iterations to reduce the training cost. As for $K$ in the data splitting process, we use our rule-of-thumb to set it as 2000 and 30000 for VOC2007 and MS-COCO, respectively. More details can be found in the appendix. + +
MethodBackboneVOC07 \( mAP_{50} \)VOC12 \( mAP_{50} \)
Pure WSOD
PCL [31]VGG1643.540.6
W2F [41]VGG1652.447.8
Pred Net [3]VGG1652.948.4
C-MIDM + FR [9]VGG1653.650.3
SLV + FR [6]VGG1653.9-
WSOD2 [40]VGG1653.647.2
IM-CFB [39]VGG1654.349.4
MIST [25]VGG1654.952.1
CASD [14]VGG1656.853.6
SoS-WSOD (stage 1)VGG1655.052.5
SoS-WSOD (stage 1+2+3)VGG1660.357.7
SoS-WSOD (stage 1+2+3)ResNet5064.461.9
WSOD with transfer (using fully annotated COCO-60)
OCUD + FR [42]ResNet5060.2-
LBBA [7]VGG1656.655.4
CaT [5]VGG1659.2-
+ +Table 1. Comparison on PASCAL VOC. + +
MethodBackboneMS-COCO
\( {mAP}_{50:95} \)\( {mAP}_{50} \)\( {mAP}_{75} \)
PCL [31]VGG168.519.4-
C-MIDN [9]VGG169.621.4-
WSOD2 [40]VGG1610.822.7-
MIST [25]VGG1612.425.810.5
CASD [14]VGG1612.826.4-
SoS-WSOD (stage 1)VGG1611.924.210.7
SoS-WSOD (stage 1+2+3)VGG1615.530.514.3
SoS-WSOD (stage 1+2+3)ResNet5016.632.815.2
+ +# 4.2. Comparison with state-of-the-art methods + +We compare our method with state-of-the-art WSOD methods, with the results reported in Tables 1 and 2. All results are reported with TTA. Our improved WSOD baseline (stage 1 of SoS-WSOD) reaches $55.0\% \mathrm{MAP}_{50}$ , $52.5\% \mathrm{MAP}_{50}$ and $11.9\% \mathrm{MAP}_{50:95}$ on VOC2007, VOC2012 and MS-COCO, respectively, which is already pretty strong. + +For a fair comparison, we used VGG16 as backbone and did not use modern FPN architecture in stages 2 and 3. By harnessing all possible supervision signals, SoS-WSOD finally reaches $60.3\%$ and $57.7\%$ $\mathrm{mAP}_{50}$ on VOC2007 and VOC2012, which outperforms previous methods by large margins. On MS-COCO, SoS-WSOD reaches $15.5\%$ $\mathrm{mAP}_{50:95}$ , $30.5\%$ $\mathrm{mAP}_{50}$ and $14.3\%$ $\mathrm{mAP}_{75}$ , which outperforms previous methods significantly, too. + +When further adopting modern techniques in FSOD, with the help of ResNet50 backbone and FPN architecture, SoS-WSOD further reaches $64.4\%$ and $61.9\%$ $\mathrm{mAP}_{50}$ on VOC2007 and VOC2012, respectively. On MS-COCO, accuracy is boosted to $16.6\%$ $\mathrm{mAP}_{50:95}$ , $32.8\%$ $\mathrm{mAP}_{50}$ and $15.2\%$ $\mathrm{mAP}_{75}$ . + +Recently, some methods [5, 7, 42] leverage the well-annotated MS-COCO-60 dataset (removing the 20 cate + +Table 2. Comparison on MS-COCO. + +
WSODPGFSSOD\( {mAP}_{50:95} \)\( {mAP}_{50} \)\( {mAP}_{75} \)
✓26.254.122.8
✓✓27.357.622.5
✓✓✓31.662.728.1
+ +Table 3. Ablations of SoS-WSOD stages on VOC2007. + +
WSODPGFSSOD\( {mAP}_{50} \)
✓51.8
✓✓53.9
✓✓✓59.6
+ +Table 4. Ablations of SoS-WSOD stages on VOC2012. + +gories in VOC). As shown in Table 1, they have higher accuracy than pure WSOD methods because of the additional cross-domain data. However, SoS-WSOD achieves higher accuracy than them without resorting to these additional data. + +# 4.3. Ablation studies and visualization + +Are salvaged supervision signals useful? Tables 1 and 2 already show that both pseudo boxes (stage 2) and semi-supervised detection (stage 3) notably improve detection accuracy on all 3 datasets. Furthermore, Tables 3 to 5 show results on VOC2007, VOC2012 and MS-COCO, respectively. Our improved WSOD (stage 1 of SoS-WSOD) reaches $54.1\%$ , $51.8\%$ and $23.6\%$ $\mathrm{mAP}_{50}$ on VOC2007, VOC2012 and MS-COCO, respectively. After pseudo-FSOD (stage 2), $\mathrm{mAP}_{50}$ is improved by $3.5\%$ , $2.1\%$ and $3.9\%$ , respectively. Finally, another $5.1\%$ , $5.7\%$ and $3.1\%$ higher $\mathrm{mAP}_{50}$ are boosted by stage 3, respectively. For the stricter $\mathrm{mAP}_{50:95}$ metric on MS-COCO, stage 2 and 3 bring $18.1\%$ and $15.5\%$ relative improvements, respectively. + +Compatibility with other WSOD methods. SoS-WSOD is compatible with various WSOD methods in stage 1 and can also improve a weaker WSOD method. We tested the original OICR method in stage 1, and results with TTA are in Table 6. The basic OICR model gets $50.2 \, \text{mAP}_{50}$ on VOC2007. With SoS-WSOD, such a model finally reaches $59.9 \, \text{mAP}_{50}$ . These results demonstrate the flexibility and effectiveness of our SoS-WSOD. + +Details about accuracy gains in stage 3. As stated in [22, 29], a mixture of weak and strong data augmentation and EMA updating are essential for SSOD methods. As shown in Table 7, in addition to gains from strong augmentation and EMA updating, our method always brings significant gains. As for models use EMA and strong data augmentation but do not adopt the splitting rule (i.e., the third stage), we use the same (mix weak and strong) data augmentation used in the student branch of stage 3 and maintain another model by EMA in stage 2. SoS-WSOD works well for VGG16 w/o FPN, even when strong augmentation and EMA updating have minor improvements. + +Effectiveness of PGF. As shown in Table 1, some + +
WSODPGFSSOD\( mAP_{50:95} \)\( mAP_{50} \)\( mAP_{75} \)\( mAP_S \)\( mAP_M \)\( mAP_L \)
✓11.623.610.42.311.920.2
✓✓13.727.512.23.815.122.0
✓✓✓15.530.614.45.416.824.6
+ +Table 5. Ablations of SoS-WSOD stages on MS-COCO. + +
Method\( {mAP}_{50:95} \)\( {mAP}_{50} \)\( {mAP}_{75} \)
baseline (OICR)24.150.219.5
baseline (OICR+)27.155.024.8
SoS-WSOD (OICR)28.559.923.8
SoS-WSOD (OICR+)32.664.429.6
+ +Table 6. Ablations of adopting different WSOD model in stage 1. OICR+ is our improved OICR. + +
BackboneFPNEMA & AugSplit Rule\( {mAP}_{50:95} \)\( {mAP}_{50} \)\( {mAP}_{75} \)
VGG16×××26.856.222.3
VGG16×✓×27.356.622.8
VGG16×✓✓28.859.024.3
ResNet50✓××27.357.622.5
ResNet50✓✓×29.659.625.7
ResNet50✓✓✓31.662.728.1
+ +Table 7. Detailed accuracy gains in stage 3. The columns mean whether FPN, strong data augmentation, EMA, and the proposed data splitting rule are used or not. + +
MethodDataset\( mAP_{50:95} \)\( mAP_{50} \)\( mAP_{75} \)
Top-One [32]VOC0725.853.422.2
W2F* [41]VOC0727.257.022.4
PGF (Ours)VOC0727.357.622.5
W2F*MS-COCO12.624.111.7
PGF (Ours)MS-COCO13.727.512.2
+ +WSOD methods tried to add a re-train stage. Most of them follow [32] to re-train a WSOD detector by selecting the top-one detection result per class as pseudo groundtruth labels. However, the performance of the retrained detector model starts to saturate with the increasing performance of the WSOD model, and pseudo-label generation method is one of the most important reasons. Experimental results in Table 8 show the effectiveness of the proposed PGF. Besides, the widely adopted method (Top-One in Table 8) failed to get benefits from modern techniques. When training with RPN and FPN, missed objects will be treated as backgrounds, which will deteriorate localization. Besides, conspicuous objects also have more chance to become the top score proposal which would cause imbalanced anchor allocation and inadequate training in FPN. As for W2F [41], we have slightly better results on VOC07, and are far superior than it on the more complicated MS-COCO, as W2F is designed for large complete objects in VOC. + +Splitting rule vs. random splitting. To demonstrate the effectiveness of the proposed splitting rule in stage 3, we + +Table 8. Results of different pseudo groundtruth mining algorithms. * means that we implemented W2F because its code is not available. + +
Method\( {mAP}_{50:95} \)\( {mAP}_{50} \)\( {mAP}_{75} \)
Stage 2 w/ EMA & Aug29.659.625.7
Stage 3 w/ random splitting30.261.126.3
Stage 3 w/ ours31.662.728.1
+ +Table 9. Comparison of our splitting rule and random splitting + +
K\( mAP_{50:95} \)\( mAP_{50} \)\( mAP_{75} \)
100031.263.226.8
200031.662.728.1
300031.062.327.2
+ +Table 10. Effects of $K$ in stage 3 on VOC2007. + +compare it with the random splitting strategy. As shown in Table 9, adopting random splitting is notably worse than our proposed method. However, random splitting can still surpass simply adopting EMA update and strong data augmentations in stage 2 by a clear margin, which demonstrates the importance of salvaging useful supervisory signals. + +Longer training schedule for WSOD. Counting all 3 stages in, SoS-WSOD does require more training iterations. Hence, we double the training iteration of the WSOD stage for a further fair comparison. However, we find that $m\mathrm{AP}_{50}$ will drop from $54.1\%$ to $52.7\%$ due to overfitting. + +Size of the labeled subset in SSOD. In the SSOD stage (stage 3), we split a dataset into labeled and unlabeled subsets. The number of pseudo labeled images, $K$ , is a hyperparameter. When we treat a small number of images as "clean" labeled ones, severe class imbalance will deteriorate the performance. However, when splitting most images as labeled, the performance will collapse using fully pseudo annotated labels. As shown in Table 10, $K = 2000$ is a suitable choice for VOC2007. These results also demonstrate the effectiveness of the rule-of-thumb we proposed. We use $K = 2000$ in all our experiments on VOC2007, and double the size to 4000 on VOC2012. Following the proposed rule-of-thumb, for MS-COCO, we use $K = 30000$ . + +Hyperparameters in PGF. Figure 5 shows the effects of hyperparameters $t_{\text{keep}}$ and $t_{\text{con}}$ introduced in PGF (Algorithm 2). These two hyperparameters are robust and $t_{\text{keep}} = 0.2$ , $t_{\text{con}} = 0.85$ works best for $mAP_{50}$ on VOC2007. We tune these two hyperparameters on the smallest VOC2007 dataset and keep them fixed on all other datasets following previous works [14, 31, 34]. + +Inference speed. SoS-WSOD also enjoys speed benefits from modern FSOD methods. We compare the inference speed in Table 11 (on single RTX3090 GPU). Please note + +![](images/81b1ec751a3f99cf59f54ccb893975b4b29bca28207ecfa497b5eec2e87e4bf3.jpg) + +![](images/4836f60dd89a6d17aa5715b9ff876501670b8466905700f4c9926ae606753742.jpg) + +![](images/eca8cea81658a816dbe55546a6f153480cd5ef83e8e0f56577e627594fd58bb5.jpg) + +![](images/138490532c9d0ec502b5c01fa2ac70be2eeaa774475810b1ac2ad60d04844495.jpg) + +![](images/162a457ad03934f0b7035debc107cb0442433bb62f78891ad45d856004a4a673.jpg) + +![](images/c69f36a00d7dd99f246bf929c0303557ad337d908a3dd1e2058faa2e659d5514.jpg) + +![](images/cdd51a6558ee7be79d0eb19cc8053a9ab72a29b77b7291840f7162762a6aa33d.jpg) + +![](images/e00b7c53a66ff276d945cb046e61fad3b2b6307293e7e9ee9da2d4757e5552be.jpg) + +![](images/6716bae2d2f24bc136c51534fded276437f899a17f933cd78fe4fdafc4a71dc3.jpg) + +![](images/f658486a5ba70024ea47142bb64d14b64aa54695a0e6b7699f0eed4f2f0ec996.jpg) + +![](images/fd2fe8b594ae15c025e6601c837ed5e3789227a492768b07e2442f30d3d4b30e.jpg) + +![](images/2eac9f810413f3acf8156fbcbb14077227c8231d98bb4864d4f4903e63cb65ee.jpg) + +![](images/73b171b03deec99d02416635c44f9ce768d4bb57d1b5f8f2423564cab16e07ad.jpg) + +![](images/3f1b80c357bc7afd9fe1e1b84e8bbe613dcbeb7a73370702699965165bd0cfd7.jpg) + +![](images/57bc16e409f71b69a35d4fc8155175568333896dbaa3316d486cdc8ef55c4bbf.jpg) + +![](images/461a5dd8a51e8bf9d78b4e9d96620dc650d24306c79f40fc71017827ee9e5058.jpg) +Figure 4. Visualization of SoS-WSOD results on MS-COCO. Top row: groundtruth annotations. 2nd to 4th rows: detection results from stages 1, 2 and 3, respectively. Last column: a failure case. + +![](images/3a003e6f7ed03c9e6563323d8723a65ca7614dc6af36b95f8552964e0bffd909.jpg) + +![](images/8e2ab997192dacb4e137ce635cdcf8e513a8606cf97ea823ce5b5c682f1e8e24.jpg) + +![](images/142b651687d074badf1c8d3300c9a10b13349ba107013c9faed2de81f816d807.jpg) + +![](images/a7a4553668fd85e8f22ef9571c60269a400928ed50ad47d300c42bed9c7f5429.jpg) + +![](images/a9f0dc72679c60e04db1ea25875c1495511b79826bbe32506d7f11d403c9f2cb.jpg) +(a) accuracy with various $t_{con}$ . +Figure 5. Effect of hyperparameters in PGF. +Table 11. Inference speed comparison. "Reg" means the bounding box regression branch. + +![](images/bc053473af6448e62462794c76801e2992c9f9b97944a3e41a1b5e711f539c80.jpg) +(b) accuracy with various $t_{keep}$ . + +
MethodPro. Time (s / img)Inf. Time (s / img)
OICR (+Reg.) [32]>0.20.101
SoS-WSOD00.031
+ +that the time for generating proposals is always far longer than 0.2 seconds per image, e.g., 8.3 s/img for Selective Search [33], while our SoS-WSOD does not need to generate external proposals. Hence, SoS-WSOD not only is significantly faster than baseline WSOD methods, but also eliminates the time to generate external proposals. + +Finally, we provide visualization of detection results on MS-COCO in Fig. 4. These results show that SoS-WSOD can mine more correct objects even in complicated environments. Additional visualization results on VOC2007 and MS-COCO are shown in the appendix. + +# 5. Conclusions and Remarks + +In this paper, we proposed a new three-stage framework called Salvage of Supervision for the weakly supervised ob + +ject detection task (SoS-WSOD). SoS-WSOD tackles the WSOD problem from a new perspective, which advocates harnessing all potentially useful supervisory signals (i.e., salvage of supervision) and successfully adopted modern fully supervised detection techniques in WSOD. + +The first stage is a WSOD training stage, in which we train a detector with any WSOD method. Pseudo-FSOD, the second stage, improves the WSOD detector by harnessing the pseudo groundtruth generated by PGF and then freely using techniques from modern FSOD. Finally, stage 3 treats the generated pseudo-labeled dataset as a dataset with noisy labels and proposes a novel criterion to split images into labeled and unlabeled subsets, so semi-supervised detection can be used to squeeze useful supervisory signals to further improve the detection performance. Extensive experiments and visualization on VOC2007, VOC2012 and MS-COCO proved both the effectiveness of our SoSWSOD and extra supervision signals. By successfully utilizing modern FSOD methods, SoS-WSOD can also have faster detection speed than previous WSOD methods. + +As for the limitation, SoS-WSOD still suffers from a large performance gap compared to FSOD, especially on COCO. Due to the lack of fully annotated box-level annotations, we need to salvage more supervisory signals in the future. And, SOS-WSOD still suffers problems like part domination, missing instances and clustered instances, which are widely occurred in WSOD. In the future, we will continue to explore to solve the common WSOD problem and develop better rules to split datasets and stronger SSOD methods for the WSOD task. + +# References + +[1] Eric Arazo, Diego Ortego, Paul Albert, Noel O'Connor, and Kevin McGuinness. Unsupervised label noise modeling and loss correction. In ICML, pages 312-321. PMLR, 2019. 2 +[2] Pablo Arbeláez, Jordi Pont-Tuset, Jonathan T Barron, Ferran Marques, and Jitendra Malik. Multiscale combinatorial grouping. In CVPR, pages 328-335, 2014. 1 +[3] Aditya Arun, CV Jawahar, and M Pawan Kumar. Dissimilarity coefficient based weakly supervised object detection. In CVPR, pages 9432-9441, 2019. 6 +[4] Hakan Bilen and Andrea Vedaldi. Weakly supervised deep detection networks. In CVPR, pages 2846-2854, 2016. 1, 2 +[5] Tianyue Cao, Lianyu Du, Xiaoyun Zhang, Siheng Chen, Ya Zhang, and Yan-Feng Wang. CaT: Weakly supervised object detection with category transfer. In ICCV, page in press, 2021. 2, 6 +[6] Ze Chen, Zhihang Fu, Rongxin Jiang, Yaowu Chen, and Xian-Sheng Hua. SLV: Spatial likelihood voting for weakly supervised object detection. In CVPR, pages 12995-13004, 2020. 1, 6 +[7] Bowen Dong, Zitong Huang, Yuelin Guo, Qilong Wang, Zhenxing Niu, and Wangmeng Zuo. Boosting weakly supervised object detection via learning bounding box adjusters. In ICCV, page in press, 2021. 2, 6 +[8] Mark Everingham, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The PASCAL visual object classes (VOC) challenge. IJCV, 88(2):303-338, 2010. 5 +[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 ICCV, pages 9834-9843, 2019. 1, 6 +[10] Ross Girshick. Fast R-CNN. In ICCV, pages 1440-1448, 2015. 1 +[11] Bo Han, Quanming Yao, Xingrui Yu, Gang Niu, Miao Xu, Weihua Hu, Ivor Tsang, and Masashi Sugiyama. Co-teaching: Robust training of deep neural networks with extremely noisy labels. arXiv preprint arXiv:1804.06872, 2018.2.4 +[12] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask R-CNN. In ICCV, pages 2961-2969, 2017. 1 +[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 1, 2 +[14] Zeyi Huang, Yang Zou, B. V. K. Vijaya Kumar, and Dong Huang. Comprehensive attention self-distillation for weakly-supervised object detection. In NeurIPS, pages 16797-16807, 2020. 2, 3, 6, 7 +[15] Jisoo Jeong, Seungeui Lee, Jeesoo Kim, and Nojun Kwak. Consistency-based semi-supervised learning for object detection. In NeurIPS, pages 1-9, 2019. 2 +[16] Lu Jiang, Zhengyuan Zhou, Thomas Leung, Li-Jia Li, and Li Fei-Fei. MentorNet: Learning data-driven curriculum for very deep neural networks on corrupted labels. In ICML, pages 2304–2313, 2018. 4 + +[17] Hengduo Li, Zuxuan Wu, Chen Zhu, Caiming Xiong, Richard Socher, and Larry S Davis. Learning from noisy anchors for one-stage object detection. In CVPR, pages 10588-10597, 2020. 4 +[18] Junnan Li, Richard Socher, and Steven CH Hoi. DivideMix: Learning with noisy labels as semi-supervised learning. In ICLR, pages 1-13, 2020. 2, 4 +[19] Chenhao Lin, Siwen Wang, Dongqi Xu, Yu Lu, and Wayne Zhang. Object instance mining for weakly supervised object detection. In AAAI, volume 34, pages 11482-11489, 2020. 3 +[20] Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, pages 2117-2125, 2017. 1, 3 +[21] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft COCO: Common objects in context. In ECCV, volume 8693 of LNCS, pages 740-755, 2014. 5 +[22] Yen-Cheng Liu, Chih-Yao Ma, Zijian He, Chia-Wen Kuo, Kan Chen, Peizhao Zhang, Bichen Wu, Zsolt Kira, and Peter Vajda. Unbiased teacher for semi-supervised object detection. In ICLR, pages 1-13, 2021. 2, 4, 5, 6 +[23] Mengye Ren, Wenyuan Zeng, Bin Yang, and Raquel Urtasun. Learning to reweight examples for robust deep learning. In ICML, pages 4334-4343. PMLR, 2018. 2 +[24] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In NeurIPS, pages 91-99, 2015. 1, 3 +[25] Zhongzheng Ren, Zhiding Yu, Xiaodong Yang, MingYu Liu, Yong Jae Lee, Alexander G Schwing, and Jan Kautz. Instance-aware, context-focused, and memory-efficient weakly supervised object detection. In CVPR, pages 10598-10607, 2020. 2, 3, 6 +[26] Yunhang Shen, Rongrong Ji, Zhiwei Chen, Yongjian Wu, and Feiyue Huang. UWSOD: Toward fully-supervised-level capacity weakly supervised object detection. In NeurIPS, volume 33, 2020. 2 +[27] Yunhang Shen, Rongrong Ji, Yan Wang, Zhiwei Chen, Feng Zheng, Feiyue Huang, and Yunsheng Wu. Enabling deep residual networks for weakly supervised object detection. In ECCV, volume 12353 of LNCS, pages 118-136, 2020. 1, 2, 3, 5 +[28] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, pages 1-14, 2015. 1 +[29] Kihyuk Sohn, Zizhao Zhang, Chun-Liang Li, Han Zhang, Chen-Yu Lee, and Tomas Pfister. A simple semi-supervised learning framework for object detection. arXiv preprint arXiv:2005.04757, 2020. 2, 6 +[30] Daiki Tanaka, Daiki Ikami, Toshihiko Yamasaki, and Kiyoharu Aizawa. Joint optimization framework for learning with noisy labels. In CVPR, pages 5552-5560, 2018. 2 +[31] 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 TPAMI, 42(1):176-191, 2018. 2, 3, 6, 7 + +[32] Peng Tang, Xinggang Wang, Xiang Bai, and Wenyu Liu. Multiple instance detection network with online instance classifier refinement. In CVPR, pages 2843-2851, 2017. 1, 2, 3, 7, 8 +[33] Jasper RR Uijlings, Koen EA Van De Sande, Theo Gevers, and Arnold WM Smeulders. Selective search for object recognition. IJCV, 104(2):154-171, 2013. 1, 8 +[34] 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 CVPR, pages 2199-2208, 2019. 2, 7 +[35] Keze Wang, Xiaopeng Yan, Dongyu Zhang, Lei Zhang, and Liang Lin. Towards human-machine cooperation: Self-supervised sample mining for object detection. In CVPR, pages 1605-1613, 2018. 2 +[36] Yuxin Wu, Alexander Kirillov, Francisco Massa, Wan-Yen Lo, and Ross Girshick. Detector2. https://github.com/facebookresearch/detectron2, 2019.5 +[37] Qize Yang, Xihan Wei, Biao Wang, Xian-Sheng Hua, and Lei Zhang. Interactive self-training with mean teachers for semi-supervised object detection. In CVPR, pages 5941-5950, 2021. 2 +[38] Kun Yi and Jianxin Wu. Probabilistic end-to-end noise correction for learning with noisy labels. In CVPR, pages 7017-7025, 2019. 2 +[39] Yufei Yin, Jiajun Deng, Wengang Zhou, and Houqiang Li. Instance mining with class feature banks for weakly supervised object detection. In AAAI, pages 3190-3198, 2021. 3, 6 +[40] Zhaoyang Zeng, Bei Liu, Jianlong Fu, Hongyang Chao, and Lei Zhang. $\mathrm{WSOD}^2$ : Learning bottom-up and top-down objectness distillation for weakly-supervised object detection. In ICCV, pages 8292-8300, 2019. 6 +[41] Yongqiang Zhang, Yancheng Bai, Mingli Ding, Yongqiang Li, and Bernard Ghanem. W2F: A weakly-supervised to fully-supervised framework for object detection. In CVPR, pages 928-936, 2018. 1, 2, 3, 4, 6, 7 +[42] Yuanyi Zhong, Jianfeng Wang, Jian Peng, and Lei Zhang. Boosting weakly supervised object detection with progressive knowledge transfer. In ECCV, volume 11216 of LNCS, pages 615-631, 2020. 2, 6 \ No newline at end of file diff --git a/salvageofsupervisioninweaklysupervisedobjectdetection/images.zip b/salvageofsupervisioninweaklysupervisedobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ceaec8ed6f3dca1dad504636f253f1e5bb9e5e1d --- /dev/null +++ b/salvageofsupervisioninweaklysupervisedobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:acc62f768b219f78f17e18a7acb14fa309999ada2ed6bd8a8951193f7ea98557 +size 596748 diff --git a/salvageofsupervisioninweaklysupervisedobjectdetection/layout.json b/salvageofsupervisioninweaklysupervisedobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..fc6242a02a7b6ca7e52ef8f7d72f001de9ef1b89 --- /dev/null +++ b/salvageofsupervisioninweaklysupervisedobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72dc10b9231257b59227dc57bc23e5b2b2c0a472efc9b6b64bc696807d2afbba +size 483274 diff --git a/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/a899a91b-010c-43be-9e86-bd41dff09177_content_list.json b/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/a899a91b-010c-43be-9e86-bd41dff09177_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..09cdb18ff1474471cae92b134929fe5d8e80d544 --- /dev/null +++ b/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/a899a91b-010c-43be-9e86-bd41dff09177_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:170f7c176fb30f5bec7688e840944ccfda6d495e1932bdda369fa3104585c7bc +size 86755 diff --git a/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/a899a91b-010c-43be-9e86-bd41dff09177_model.json b/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/a899a91b-010c-43be-9e86-bd41dff09177_model.json new file mode 100644 index 0000000000000000000000000000000000000000..5ebfad7179b1f18b687c4bfe3fd07efd787c7b18 --- /dev/null +++ b/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/a899a91b-010c-43be-9e86-bd41dff09177_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc6a9d0a17413a81ca7ade182799511418ab8ab47d224f6e29438b2de34c269e +size 109279 diff --git a/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/a899a91b-010c-43be-9e86-bd41dff09177_origin.pdf b/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/a899a91b-010c-43be-9e86-bd41dff09177_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7fcf2b936995cfcc70acebfcf85c2c9fca577bfc --- /dev/null +++ b/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/a899a91b-010c-43be-9e86-bd41dff09177_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c80e7f8ecd84d598f92f5850813d6cd9615394f94d1676733773736c6d454fa +size 9501743 diff --git a/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/full.md b/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..9fab9697501b8887bde8f41b65c37e2713ff7565 --- /dev/null +++ b/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/full.md @@ -0,0 +1,301 @@ +# SAR-Net: Shape Alignment and Recovery Network for Category-level 6D Object Pose and Size Estimation + +Haitao Lin $^{1§}$ Zichang Liu $^{1}$ Chilam Cheang $^{1}$ Yanwei Fu $^{1\dagger‡}$ Guodong Guo $^{2}$ Xiangyang Xue $^{1†}$ + +$^{1}$ Fudan University $^{2}$ IDL, Baidu Research + +# Abstract + +Given a single scene image, this paper proposes a method of Category-level 6D Object Pose and Size Estimation (COPSE) from the point cloud of the target object, without external real pose-annotated training data. Specifically, beyond the visual cues in RGB images, we rely on the shape information predominately from the depth $(D)$ channel. The key idea is to explore the shape alignment of each instance against its corresponding category-level template shape, and the symmetric correspondence of each object category for estimating a coarse 3D object shape. Our framework deforms the point cloud of the category-level template shape to align the observed instance point cloud for implicitly representing its 3D rotation. Then we model the symmetric correspondence by predicting symmetric point cloud from the partially observed point cloud. The concatenation of the observed point cloud and symmetric one reconstructs a coarse object shape, thus facilitating object center (3D translation) and 3D size estimation. Extensive experiments on the category-level NOCS benchmark demonstrate that our lightweight model still competes with state-of-the-art approaches that require labeled real-world images. We also deploy our approach to a physical Baxter robot to perform grasping tasks on unseen but category-known instances, and the results further validate the efficacy of our proposed model. Code and pre-trained models are available on the project webpage1. + +# 1. Introduction + +Estimating accurate 6D poses of objects plays a pivotal role in the tasks of augmented reality [34], scene under + +![](images/93bdfff4b47038874f2efc9853b47ad35df2d697d4c1a33b6794290ebe8a0cc6.jpg) +Figure 1. (a) The visual difference between synthetic and real images. They may have different textures and colors, but the shape and geometry maintain the same. (b) Illustration of shape alignment. Objects within a category have consistent 3D rotation if their shapes are visually aligned. (c) Illustration of symmetric correspondence. Most objects are manufactured with (near) symmetric shapes with reflectional symmetry or rotational symmetry. + +standing [49], and robotic manipulation [7, 9, 33, 51, 53]. However, most 6D pose estimation works [8, 9, 15, 19, 28, 37, 39, 55, 57] assume exact 3D CAD object models at instance-level, which unfortunately greatly limits their practical applicability in real-world applications. To this end, this paper studies the task of Category-level 6D Object Pose and Size Estimation (COPSE). Thus the model is trained only by category-level supervision, reducing reliance on the exact CAD model for each instance. + +Generally, the key challenge of COPSE task lies in the huge color and shape variations of instances from the same category [43-45]. To handle intra-class variations, previous works [5,24,52,58] learn the RGB(-D) features of each instance to help map these instances into a unified space and minimize the intra-class variations. On the other hand, as the COPSE task relies on supervised learning from large amounts of well-labeled data, recent works [5, 30, 52, 58] utilize synthetic data to train the COPSE model. Unfortunately, as illustrated in Fig. 1(a), the domain gap between synthetic and real images potentially hinders the perfor + +mance of COPSE model in the real-world deployment. + +While most previous works exploit texture and color cues in RGB images, the shape information has been less touched, with some recent exceptions of reconstructing the observed point cloud [6], and analyzing geometric stability of object surface patches [47]. For example, cups of similar or identical shapes have very diverse colors in Fig. 1(a). This motivates us to systematically explore shape information predominately from the depth (D) channel. Thus to alleviate challenges of intra-class variation and synthetic-real image domain gap, we propose encoding the shape by shape alignment and symmetric correspondence. Particularly, our method encourages insightful shape analysis about geometrical similarity and symmetric correspondence. + +Shape alignment. Assuming the instances of the same category are well aligned by shapes, they should have the consistent 3D rotation, as cups are shown in Fig. 1(b). Thereby, the idea of shape alignment can be implemented as object 3D rotation consistency. In particular, given a category-level template shape in the form of a point cloud, it is deformed to align against the observed instance point cloud. We denote such the deformed template point cloud as an implicit representation for object 3D rotation, as shown in Fig. 2(a). Mathematically, the object rotation is thus recovered by solving the classical orthogonal Procrustes problem [46], which calculates the approximation of alignment matrix between point clouds of the category-level template and deformed one. The shape alignment learns to be robust to intra-class variations of instances. + +Symmetric correspondence. Given the fact that many man-made object categories have the design principle with a symmetric structure [62], symmetry is an important geometric cue to help our COPSE task. As in Fig. 1(c), the underlying symmetry allows for reasoning the reflectional and rotational symmetry of 3D shape from occluded 2D images. Note that specific object instances are practically never perfectly symmetric due to various shape variations of instances. To this end, we exploit the underlying symmetry by point clouds of objects, as our COPSE task does not demand the exact 3D shape recovery. Furthermore, we model the point cloud of symmetric objects by an encoder-decoder structure learned end-to-end with the other components of our framework. Thus, this actually facilitates the whole framework being robust to those objects which have some parts that are less symmetric as in Fig. 2(b). + +Formally, this paper proposes a novel Shape Alignment and Recovery Network (SAR-Net) to exploit the underlying object shapes for the COPSE tasks. Specifically, the RGB-D scene image is utilized as the input. We firstly employ Mask-RCNN [14] to pre-process the RGB image, and infer the segmentation mask and category label of each object instance. The points from depth channel are filtered by the predicted mask and further fed into the 3D segmentation + +![](images/3282446f71889659097638b5026ee26b6e41e21b56ed004fecde2877d02499f5.jpg) +Figure 2. (a) Illustration of implicit 3D object rotation. The deformed template point cloud possesses same 3D rotation with observed instance point cloud. (b) Illustration of weakly symmetric objects. Such objects usually have global symmetric shapes but asymmetric local parts. + +network 3D-GCN [31] to generate observed point cloud of the object. Furthermore, taking as inputs the point clouds of both observed object instance and category-level template, our SAR-Net predicts the implicit representation of deformed template point cloud, and infers symmetric point cloud. The 3D object rotation is further computed from the category-level and deformed template point clouds by Umeyama algorithm [54]. Finally, we concatenate the observed and symmetric point clouds for a coarse object shape obtainment, which reduces the estimation uncertainty of object center (3D translation) and 3D size. Extensive experiments conducted on the category-level NOCS dataset [58] demonstrate that our synthetic-only approach outperforms the state-of-the-art methods. + +Contributions. Our main contribution is to propose a novel learning paradigm that efficiently encodes the shape information by the shape alignment and symmetric correspondence for the COPSE. We present a novel framework - SAR-Net to implement this idea. In particular, + +1) Based on shape similarities, our SAR-Net has the novel sub-net component that efficiently infers the implicit rotation representation by shape alignment between point clouds of the category-level template shape and instance. +2) A novel sub-net component for symmetric correspondence is proposed in this paper. It can predict symmetric point cloud from partially observed point cloud to obtain a coarse shape. The coarse shape helps to estimate the object center and size accurately. +3) Practically, our SAR-Net is a very lightweight model with only 6.3M parameters. Such a single model is capable of doing the COPSE of multiple categories, and performs better than previous approaches of more model parameters. +4) Critically, our SAR-Net is entirely trained on synthetic data and performs very well generalization on real-world scenarios. Remarkably, our synthetic-only approach still outperforms other competitors which typically require both synthetic and real-world data. + +# 2. Related Work + +Instance-Level 6D Object Pose Estimation. Most previous works [3, 17, 27, 32] estimate object pose by matching image features. Unfortunately, these methods are less effi + +![](images/6ab7cfb691db24e842f114f43db44ceda4a4eb488818b092469780a0d827f697.jpg) +Figure 3. Architecture overview. The pre-processing stage (left) predicts the category and 2D segmentation mask of the target instance(e.g., $\text{mug}$ ). The points back-projected from depth channel are filtered by instance mask and processed by 3D-GCN to obtain object points $\mathcal{P}_o$ which are further normalized as $\mathcal{P}$ . Our SAR-Net (right) takes both normalized point cloud $\mathcal{P}$ and category-level template point cloud $\mathcal{K}_c$ as inputs to generate deformed template point cloud $\tilde{\mathcal{K}}$ and symmetric point cloud $\tilde{\mathcal{P}}'$ , implemented by network $\mathbf{E}_{SA}$ and $\mathbf{E}_{SC}$ , respectively. We get points of a coarse shape $\mathcal{G}$ by concatenating and centralizing the $\mathcal{P}$ and $\tilde{\mathcal{P}}'$ . From $\mathcal{G}$ , the network $\mathbf{E}_{OCS}$ predicts translation offsets $\tilde{\mathcal{V}}$ and normalized size $\tilde{s}$ . The final 6D object pose $\{\tilde{R}_o, \tilde{t}_o\}$ and size $\tilde{s}_o$ are recovered by the post-processing stage in Sec. 3.2 and Sec. 3.4. + +cient to infer poses of texture-less objects. Recent efforts are made on directly regressing 6D object pose from RGB images by CNN-based architectures, e.g., PoseNet [22] and PoseCNN [63]. DenseFusion [57] introduces a cross-modal feature fusion manner for better aggregating color and depth information from RGB-D images, which infers more accurate objects pose than RGB-only methods. Such a fusion manner is also used in recent COPSE tasks [5,52]. Another line of works [29,36,38,39,42,50,65] first regress object coordinates or keypoints in 2D images and then recover poses by Perspective-n-Point algorithm [25], e.g., PVNet [39]. Recent approaches like [15,16] resort to 3D keypoint voting for precise pose estimation. In contrast to these keypoint voting methods [15,16,39], our approach focuses on a more practical setting without relying on exact object 3D models. + +Category-Level 6D Object Pose Estimation. Recent COPSE approaches [5, 6, 24, 45, 47, 52, 58] vitally alleviate the limitation of previous instance-level tasks. To handle the intra-class variations, most previous RGB-D methods [5, 24, 52, 58] represent instances of a category into a unified space. Due to significant variations in object appearance, recent methods [6, 30, 47] put more focus on geometric information of the object. StablePose [47] is a depth-based method that analyzes geometric stability of object surface patches for 6D object pose inference. Lin et al. [30] skillfully enforce the predicted pose consistency between an implicit pose encoder and an explicit one to supervise the training of the pose encoders and refine the pose prediction during testing. FS-Net [6] extracts shape-based features from point cloud of the target object for pose and size recovery. FS-Net estimates two perpendicular vectors for + +rotation decoupling. Compared to FS-Net, the representation of shape alignment transfers the rotation estimation problem into a reconstruction one. This representation has a more intuitive geometric meaning than FS-Net, as it provides visualization of aligned shape. Recent 6D pose trackers [56,60,61] achieve real-time tracking for category-level or novel objects with very good performance. Crucially, these methods have to rely on the good initial object pose and temporal information for the tracking. In contrast, the COPSE task addressed in this paper does not assume such a good initialization existed, and conducts the 6D object pose and size estimation from the single scene image. + +Symmetric Correspondence. Symmetric correspondence has been widely adopted in recent works [11, 35, 59]. The reconstruction of symmetric objects has been investigated in [21, 64]. Wu et al. [62] use latent symmetric properties to disentangle components obtained from a single image. In the field of 6D pose estimation, HybridPose [48] is the first work to take the dense symmetric correspondences of an individual object as the intermediate representation to help the pose estimation. Differently, we fully utilize the symmetric correspondences in the same object category and extend 2D symmetric correspondences onto 3D ones, significantly improving COPSE inference performance. + +# 3. Methodology + +Problem Formulation. Given a depth image, segmented mask, and category of the target object, our goal is to estimate the 6D pose and 3D size of the object from its partially observed point cloud. We represent the 6D object pose as a rigid-body homogeneous transformation matrix $\{\pmb{R}_o,\pmb{t}_o\} \in$ + +SE(3), where 3D rotation $R_o \in \mathrm{SO}(3)$ and 3D translation $t_o \in \mathbb{R}^3$ . SE(3) and SO(3) indicate the Lie group of 3D rigid transformations and 3D rotation, individually. Finally, the 3D size of the object is formalized as $s_o \in \mathbb{R}^3$ . + +Overview. We give an overview of our SAR-Net, as in Fig. 3. Our method takes as input an RGB-D image. While RGB images are utilized by Mask-RCNN [14] in preprocessing stage to infer the segmentation mask and category of each instance, our SAR-Net only processes points from depth channel to address the COPSE task. Specifically, the points back-projected from depth channel are filtered by instance mask and processed by 3D segmentation network 3D-GCN [31] to obtain observed point cloud which is further normalized. (Sec. 3.1). The network $\mathbf{E}_{SA}$ is learned to deform the category-level template point cloud to align against the observed point cloud for 3D rotation representation (Sec. 3.2). The symmetric correspondence is encouraged by the network $\mathbf{E}_{SC}$ to help predict the symmetric point cloud and complete the object shape (Sec. 3.3). Finally, the object center and size are learned from the coarse shape by using the network $\mathbf{E}_{OCS}$ (Sec. 3.4). + +# 3.1. Pre-processing of Point Cloud + +Processing observed point cloud. Given predicting segmented mask, we obtain the point cloud by back-projecting the masked depth. However, such a point cloud may still contain object and background points given by the imperfect segmentation. Thus, we further send this point cloud into the 3D-GCN [31] to purify the object points $\mathcal{P}_o\in \mathbb{R}^{3\times N_o}$ , where $N_{o}$ is the number of points in $\mathcal{P}_o$ . The 3D segmentation step makes our synthetically-trained model robust against the error from the 2D segmentation pipeline. Furthermore, we have to normalize the original observed point cloud $\mathcal{P}_o$ . Particularly, we first calculate the centroid $r_o = \sum \mathcal{P}_o / N_o$ of point cloud and maximum Euclidean distance $d_o = \max \{\| \mathcal{P}_o - r_o\| _2\}$ (scalar factor) relative to its centroid. We then normalize the $\mathcal{P}_o$ to obtain the point cloud $\mathcal{P}$ by $\mathcal{P} = (\mathcal{P}_o - r_o) / d_o$ . + +Processing category-level template point cloud. Given the 3D template dataset - ShapeNetCore [4], we randomly $^2$ select one template per category as the category-level template shape, which is normalized by scale, translation, and rotation as in [58]. Intuitively, instances of the same category should, at least in principle, have similar shapes as their category-level template shapes [23]. We further sample the category-level template shape into a sparse 3D point cloud $\mathcal{K}_c \in \mathbb{R}^{3 \times N_k}$ by using Farthest Point Sampling (FPS) algorithm [39], where $N_k$ is the number of points. + +# 3.2. Shape Alignment + +Given the normalized point cloud $\mathcal{P}$ , our model learns the shape similarities among instances of the same cate + +![](images/ff528bcd6b615ea1e02ea82ed4a86bc2e4f62a3bc124832993cbe1e909ef37ff.jpg) +Figure 4. Illustration of symmetric point cloud. We generate the ground-truth symmetric point cloud from observed point cloud of objects which have reflectional symmetry or rotational symmetry. + +gory, deforming the category-level template point cloud $\mathcal{K}_c$ to align with the observed point cloud $\mathcal{P}$ visually, as demonstrated in Fig. 2 (a). This module always reconstructs the 3D points in space of template point cloud but does not generate 3D points on the surface of observed point cloud, i.e., only transferring the rotational state of the observed point cloud $\mathcal{P}$ to deform the category-level template point cloud $\mathcal{K}_c$ . Overall, it requires establishing a parametric encoder-decoder $\mathbf{E}_{SA}$ such that $\tilde{\mathcal{K}} = \mathbf{E}_{SA}(\mathcal{K}_c,\mathbf{F}_{\mathcal{P}})$ . Then the task of rotation recovery $\tilde{\pmb{R}}_o$ is formulated by the well-known orthogonal Procrustes problem [46] of alignment for two ordered sets of point clouds $\mathcal{K}_c$ and $\tilde{\mathcal{K}}$ . + +Concretely, our network uses a PointNet-like structure [20, 41] as illustrated in Fig. 3. The normalized point cloud $\mathcal{P}$ and the category-level template point cloud $\mathcal{K}_c$ are fed into $\mathbf{E}_{SA}$ to extract shape-dependent features $F_{\mathcal{P}}$ and $F_{\mathcal{K}}$ , respectively. We then concatenate $F_{\mathcal{P}}$ and $F_{\mathcal{K}}$ with each point in $\mathcal{K}_c$ to generate per-point feature embedding, thus performing shape-guided reconstruction of $\tilde{\mathcal{K}}$ under the clues of geometric properties from observed point cloud $\mathcal{P}$ . The reconstructed shape $\tilde{\mathcal{K}}$ implicitly encodes the 3D rotation of the observed point cloud $\mathcal{P}$ , as $\tilde{\mathcal{K}}$ and $\mathcal{P}$ are enforced aligned by the network. We practically obtain the ground-truth deformed template point cloud $\mathcal{K}$ by applying actual object rotation to the category-level template point cloud $\mathcal{K}_c$ . Finally, the object 3D rotation is derived from Umeyama algorithm [54] by solving registration of point clouds $\tilde{\mathcal{K}}$ and $\mathcal{K}_c$ . + +# 3.3. Symmetric Correspondence + +As most manufactured object categories have a symmetric structure, we thus employ the reflectional and rotational symmetry as an essential geometric cue for the COPSE task. Such the underlying symmetry allows for reasoning the correspondence of potential symmetric point cloud from the observed point cloud. We learn an encoder-decoder structure $\mathbf{E}_{SC}$ as the mapping function, to predict symmetric point cloud $\tilde{\mathcal{P}}' = \mathbf{E}_{SC}(\mathcal{P},\mathbf{F}_{\mathcal{K}})$ from observed point cloud $\mathcal{P}$ . $\tilde{\mathcal{P}}' \in \mathbb{R}^{3 \times N_o}$ and $\mathcal{P}$ have the same number of points. Concretely, We concatenate $F_{\mathcal{P}}$ and $F_{\mathcal{K}}$ with each point in $\mathcal{P}$ to generate point-wise feature embedding, and $\mathbf{E}_{SC}$ thus predicts corresponding symmetric point cloud $\tilde{\mathcal{P}}'$ from $\mathcal{P}$ . + +Reflectional symmetry. As for object categories of reflectional symmetry like mug and laptop, they are usually symmetric around a fixed plane as shown in Fig. 4. We treat this + +symmetry as a constraint of the prior symmetric plane to help complete object shape modeling. Thus, given observed points $\mathcal{P}$ , we generate ground-truth symmetric points $\mathcal{P}'$ by flipping $\mathcal{P}$ along the symmetric plane. Thus, we present an encoder-decoder structure $\mathbf{E}_{SC}$ and learn to infer the corresponding symmetric points $\mathcal{P}'$ to be symmetric with $\mathcal{P}$ . + +Rotational symmetry. Categories of rotational symmetry like bottle and bowl possess infinite symmetric planes around the axis of symmetry as in Fig. 4, which hinders the network to get converged. One solution is to rotate observed points $\mathcal{P}$ by $180^{\circ}$ around its axis of symmetry in the object frame for generating ground-truth symmetric points $\mathcal{P}'$ , in which case recovers the relatively complete object shape. Thus, the rotational symmetry is simplified as reflectional symmetry. It also enables our network $\mathbf{E}_{SC}$ to infer the occluded part from the observed point cloud to obtain a coarse shape for object center and size estimation. More examples of ground-truth symmetric points refer to Appendix. + +Remark. It is noteworthy that specific object instances are never fully symmetric due to shape variations. Thus, exploiting the underlying symmetry by point clouds of objects is applicable to objects which have the global symmetric shapes but asymmetric local parts, as our framework does not demand the exact 3D shape recovery. + +# 3.4. Calculation of Object Center and Size + +Furthermore, we concatenate the predicted symmetric point cloud $\tilde{\mathcal{P}}'$ and observed point cloud $\mathcal{P}$ as in Fig 3. This concatenation step generates a coarse 3D object shape $\mathcal{G}' \in \mathcal{R}^{3 \times 2N_o}$ for object center and size estimation. We then centralize points $\mathcal{G}'$ by using the calculated centroid $\boldsymbol{r}$ to get points $\mathcal{G}$ , where $\boldsymbol{r} = \sum \mathcal{G}' / 2N_o$ . We use an encoder-decoder $\mathbf{E}_{OCS}$ to infer the translation offsets $\tilde{\mathcal{V}}$ and normalized size $\tilde{s}$ from points in $\mathcal{G}$ , i.e., $(\tilde{\mathcal{V}}, \tilde{s}) = \mathbf{E}_{OCS}(\mathcal{G}, \mathbf{F}_K)$ . Notably, we incorporate ground-truth symmetric point cloud $\mathcal{P}'$ and the partial points $\mathcal{P}$ to prevent the unstable gradient propagation in the early training stage. + +Translation offset learning. Inspired by previous 2D [39, 63] and 3D [15, 16, 40] keypoint voting methods, we treat the object center as a specific keypoint. The encoder-decoder $\mathbf{E}_{OCS}$ infers 3D translation offsets $\tilde{\mathcal{V}} = \{\tilde{v}_i\}_{i=1}^{2N_o}$ , where $\tilde{v}_i$ denotes predicted translation offset from each point of $\mathcal{G}$ to the object center. The point cloud of coarse shape $\mathcal{G}$ , together with predicted translation offsets $\tilde{\mathcal{V}}$ votes for potential object center $\tilde{t}$ . Finally, the voted object center $\tilde{t}_o$ of the observed point cloud $\mathcal{P}_o$ is given as below, + +$$ +\left\{ \begin{array}{l} \tilde {\boldsymbol {t}} = \sum (\mathcal {G} + \tilde {\mathcal {V}}) / 2 N _ {o} \\ \tilde {\boldsymbol {t}} _ {o} = (\tilde {\boldsymbol {t}} + \boldsymbol {r}) \cdot d _ {o} + \boldsymbol {r} _ {o} \end{array} \right. \tag {1} +$$ + +where $d_{o}$ and $\pmb{r}_{o}$ are scalar factor and centroid of observed point cloud $\mathcal{P}_o$ as computed in Sec. 3.1. + +Size estimation. Obtained concatenated points $\mathcal{G}$ , the network $\mathbf{E}_{OCS}$ regresses the normalized size $\tilde{s}$ . Then the ac + +tual size $\tilde{s}_o$ of the original point cloud $\mathcal{P}_o$ is recovered by the calculated scalar factor $d_o$ (Sec. 3.1), i.e., $\tilde{s}_o = d_o\cdot \tilde{s}$ . Compared to regressing size from partially observed point cloud $\mathcal{P}$ , the concatenated point cloud $\mathcal{G}$ provides a coarse shape for more accurate size estimation as discussed in Sec. 4.2. + +# 3.5. Loss Function + +We define the loss function $\mathcal{L}$ as follows, + +$$ +\mathcal {L} = \mathcal {L} _ {\text {d e f}} + \mathcal {L} _ {\text {s y m}} + \mathcal {L} _ {\text {c e n}} + \mathcal {L} _ {\text {s i z e}} \tag {2} +$$ + +Deformed point reconstruction loss. Our SAR-Net performs shape-guided reconstruction from observed points. Given ground-truth deformed template points $\mathcal{K} = \{\pmb{k}_i\}_{i=1}^{N_k}$ with $N_k$ points, SAR-Net reconstructs $\tilde{\mathcal{K}} = \{\tilde{\pmb{k}}_i\}_{i=1}^{N_k}$ as: + +$$ +\mathcal {L} _ {d e f} = \frac {1}{N _ {k}} \sum_ {i = 1} ^ {N _ {k}} \left\| \boldsymbol {k} _ {i} - \tilde {\boldsymbol {k}} _ {i} \right\| _ {1} \tag {3} +$$ + +For object with rotational symmetry, we adopt the strategy as in [58]. Refer to Appendix for details. + +Symmetric point reconstruction loss. The symmetric correspondence component predicts point-wise symmetric points $\tilde{\mathcal{P}}' = \{\tilde{p}_i'\}_{i=1}^{N_o}$ based on the input observed points $\mathcal{P}$ . We optimize the objective as: + +$$ +\mathcal {L} _ {s y m} = \frac {1}{N _ {o}} \sum_ {i = 1} ^ {N _ {o}} \| \boldsymbol {p} _ {i} ^ {\prime} - \tilde {\boldsymbol {p}} _ {i} ^ {\prime} \| _ {1} \tag {4} +$$ + +where $N_{o}$ is the number of points in $\mathcal{P}$ ; $p_i'$ and $\tilde{p}_i'$ are the ground-truth and predicted symmetric points, respectively. As we simplify the rotational symmetry as a particular case of the reflectional symmetry (Sec. 3.3). Thus, this loss function is also helpful to tackle the case of rotational symmetry. Translation offset loss. The network learns translation offsets $\{\tilde{\boldsymbol{v}}_i\}_{i=1}^{2N_o}$ from concatenated points to object center. The learning of $\boldsymbol{v}_i$ is supervised by minimizing the loss as: + +$$ +\mathcal {L} _ {c e n} = \frac {1}{2 N _ {o}} \sum_ {i = 1} ^ {2 N _ {o}} \| \boldsymbol {v} _ {i} - \tilde {\boldsymbol {v}} _ {i} \| _ {1} \tag {5} +$$ + +where $2N_{o}$ is the number of concatenated points. The $\pmb{v}_{i}$ and $\tilde{\pmb{v}}_i$ are the ground-truth and predicted translation offsets. Size loss. For better size recovery, we regress the size from the point cloud of a coarse shape $\mathcal{G}$ as discussed in Sec. 3.4. We supervise the size regression as: + +$$ +\mathcal {L} _ {\text {s i z e}} = \left\| \tilde {\boldsymbol {s}} - \boldsymbol {s} \right\| _ {1} \tag {6} +$$ + +where $s$ and $\tilde{s}$ represent the ground-truth and predicted size of the normalized point cloud $\mathcal{P}$ , respectively. + +# 4. Experiments + +Datasets. (1) NOCS Dataset [58]. It contains six object categories including bottle, bowl, camera, can, laptop, and mug. The NOCS has two parts, i.e., the synthetic part and the real-world one. For the synthetic part, there + +are 300K composite images, where 25K are set aside for evaluation(CAMERA25). For the real-world part, it contains 2.75K real-scene images for evaluation(REAL275). (2) LINEMOD Dataset [17]. It is a widely used dataset for instance-level object pose estimation. It provides a scanned CAD model for each object. (3) Additional Real-world Scenes. Our model is tested on additional 6 different real scenes with 25 unseen instances from categories including bowl, mug, bottle, and laptop. The images are captured by a RealSense D435 camera and not manually pose-annotated. + +Evaluation Metrics. (1) Category-level pose and size estimation. As [52], we compute average precision of 3D Intersection-Over-Union(IoU) at threshold values of $25\%$ , $50\%$ and $75\%$ for 3D object detection. The average precision at $m^{\circ}ncm$ is calculated for evaluating 6D pose recovery, i.e., the percentage of poses where the translational error is below $ncm$ and the angular error is below $m^{\circ}$ . Here we choose threshold values of $5^{\circ}2cm$ , $5^{\circ}5cm$ , $10^{\circ}2cm$ , and $10^{\circ}5cm$ , respectively. (2) Instance-level pose estimation. We use average distance metric ADD [18] for nonsymmetric objects and ADD-S [63] for symmetric objects (e.g., eggbox and glue). The accuracy of average distance less than $10\%$ of the object diameters is reported. + +Implementation Details. The architecture of SAR-Net and training details of 3D-GCN are presented in Appendix. We pick object models of six categories from ShapNetCore [4] and utilize the Blender software [1] to render depth images to train our model, denoted as SAR-Net(small). Additionally, we use 275K images from CAMERA dataset to train our model, denoted as SAR-Net. The training data rendered by Blender ( $\sim$ 60K instances) is 10 times less than that of CAMERA dataset ( $\sim$ 600K instances). The back-projected points of instances from synthetic depth images are disorderly sampled into 1024 points. Our SAR-Net is trained for 100 epochs with a batch size of 32 on a single RTX 2080Ti GPU. We initially set the learning rate as 0.0004 and multiply it by a factor of 0.75 every four epoch. We use the segmentation results of Mask-RCNN provided by [30] for fair comparisons. In robotic experiments, our SAR-Net is implemented on the desktop with an NVIDIA RTX2070 GPU, and pose and size estimation takes about 100ms. The model will be released on the repository of Baidu PaddlePaddle. + +# 4.1. Main Results + +Category-level NOCS Dataset. We compare our SAR-Net with NOCS [58], CASS [5], SPD [52], FS-Net [6], StablePose [47] and DualPose [30] on the CAMERA25 and REAL275 datasets in Tab. 1. For the synthetic CAMERA25 dataset, our SAR-Net achieves comparable performance to the state-of-the-art method DualPose and shows better performance under the more strict metric $5^{\circ}2cm$ . For the real-world REAL275 dataset, NOCS, CASS, SPD and DualPose use both synthetic data (CAMERA) and real-world data for + +training; FS-Net and StablePose only use real-world data. In contrast, our method only uses synthetic data. Surprisingly, even in such a comparison, our SAR-Net outperforms all other baseline methods at all but IoU metric, as FS-Net uses the pre-calculated mean size per category. The results validate the good generalization of SAR-Net in real-world applications. Although SAR-Net(small) is trained by using 10 times less synthetic training data than CAMERA, and it already outperforms all other methods but the DualPose on the REAL275 dataset. It could save memory footprint and reduce the training time in practice. Moreover, for the pose and size estimation part of the model, our SAR-Net has less parameters than other methods. We also qualitatively show some results of our SAR-Net and DualPose [30] in Fig. 5. Our method generates more accurate rotation estimation than DualPose, especially for the camera category. More comparison results are shown in Appendix. + +Instance-level LINEMOD Dataset. Our COPSE model could be easily employed in the instance-level task by using the exact object model as the template shape. We then generate 30K synthetic depth images for each instance for the model training. Compared with RGB(-D) methods [15, 39] or depth-only method [12, 13], our SAR-Net achieves comparable results in terms of ADD(-S) metric as in Tab. 2. Taking weakly symmetric objects (e.g., cat) as symmetric ones, our model still gains desirable performance, which provides evidence to support the utilization of symmetric correspondence to handle those objects which have some parts that are less symmetric. + +Additional Real-world Scenarios. For additional real scenes with multiple objects, visualization results are shown in Fig. 6 (top row). Our model generates accurate estimation, as the objects are tightly located within predicted bounding boxes. The results indicate the generalization capability of our SAR-Net in real-world applications, in terms of different depth sensors (i.e., Structure Sensor [2] used by NOCS dataset, and RealSense D435 of ours) and different novel instances (18 novel instances from REAL275 and 25 novel ones of ours). See Appendix for more results. + +# 4.2. Ablation Studies + +We verify the efficacy of the key components of our SAR-Net on the REAL275 dataset in Tab. 3. + +Symmetric Correspondence. We first check the importance of utilizing symmetric correspondence. We start from a basic network, which directly outputs the deformed template point cloud from shape alignment component (SA), translation offsets, and normalized size based on the partially observed point cloud, as in row 1. The symmetric correspondence component (SC) is then added as shown in row 2. The comparison results between rows 1 and 2 illustrate that exploring underlying symmetric correspondence is a vital part of producing overall great results. With symmetry + +Table 1. Results on REAL275 and CAMERA25 [58]: comparisons with other COPSE methods.(↑): higher better, (↓): lower better. + +
DatasetMethodmAP (↑)Accuracy (↑)Parameters (↓)
IoU50IoU755°2cm5°5cm10°2cm10°5cm5°5cm(M)
REAL275NOCS [58]78.030.17.210.013.825.218.2-
CASS [5]77.7--23.5-58.0-47.2
SPD [52]77.353.219.321.443.254.130.418.3
FS-Net [6]92.263.5-28.2-60.8-41.2
StablePose [47]------38.8-
DualPose [30]79.862.229.335.950.066.850.167.9
SAR-Net(small)80.463.724.134.845.367.449.16.3
SAR-Net79.362.431.642.350.368.354.96.3
CAMERA25NOCS [58]83.969.532.340.948.264.649.4-
SPD [52]93.283.154.359.073.381.571.518.3
DualPose [30]92.486.464.770.777.284.779.967.9
SAR-Net(small)88.171.144.049.456.165.661.76.3
SAR-Net86.879.066.770.975.380.381.46.3
DualPose
SAR-Net (Ours)
+ +Figure 5. Qualitative comparisons between our SAR-Net and DualPose [30] on REAL275 dataset [58]. We visualize the estimated 6D pose and size as the tight-oriented bounding box around the target instances. +Table 2. Results on LINEMOD [17]: comparisons with other instance-level methods. 'S' is synthetic data and 'R' is real data. + +
Training dataMethodsapecancatdrillereggboxglue
RGB(S+R)PVNet [39]43.695.579.396.499.195.7
RGBD(S+R)FFB6D [15]98.499.899.9100.0100.0100.0
D(S)CP(ICP) [13]58.384.784.643.299.598.8
D(S)CAAE [12]74.590.290.797.399.793.5
D(S)SAR-Net64.583.691.484.099.4100.0
+ +inference, the network learns to captures more useful shape characteristics for symmetric points reconstruction and also enhances the performance of other components. + +Partial or coarse shape. We then study the performance difference between using point cloud of a coarse shape and the partially observed point cloud. We analyze it from two aspects: (1) We concatenate the observed point cloud and symmetric one to obtain a coarse shape (Concat) for object center and size estimation, as in row 3. Comparing results in rows 2 and 3, estimation based on a coarse shape gains overall improved performance versus that relying on partially observed point cloud. (2) We then explore the importance of centralization operation (Centralize) as in row 4, i.e., the concatenated point cloud is further centralized. The comparison results of rows 3 and 4 indicate the necessity of the centralizing operation, yielding the further improvement of $1.1\%$ at $I_oU_{75}$ and $3.6\%$ at $5^{\circ}2cm$ , respectively. + +Voting or regression for 3D center estimation. We replace the translation offset learning (Sec. 3.4) by regressing the object center (RegressT) as in row 5. The performance + +in row 5 consistently drop under all metrics, comparing the results in row 4. Therefore, the translation offset learning and voting for object center help to locate a more accurate object center than RegressT. + +Symmetry-based or direct shape completion. Also, we replace the SC component with direct object shape completion by using the same network (DSComp), supervised by the Chamfer loss [10]. Compared to results in row 4, performance of all metrics in row 6 drop consistently. This is probably because the shape completion focuses on detailed reconstruction, which relies on a more complicated network, but inferring a symmetric point cloud is easier. Poor reconstruction results from a direct object completion network further degrade the performance of the object center and size estimation. + +Point number of template point cloud. In addition, We also explore the impact of the varied number of the category-level template point cloud $\kappa_{c}$ by using the full COPSE model. It is observed from rows 4, 7, and 8 that 36 points are a good trade-off for our network to learn. The choice of 128 points degrades the performance due to the larger output space, while the 16 points are too sparse to represent the geometric structure of object, which negatively influences the final performance. + +We also conduct ablation studies of various rotation representation on the REAL275 dataset in Tab. 4. + +Shape alignment for 3D rotation. We replace the shape alignment (SA) of SAR-Net by other 3D rotation repre + +Table 3. Ablation studies of key components tested on REAL275. 'SA' means shape alignment (Sec 3.2). 'SC' means symmetric correspondence (Sec 3.3). 'Concat' indicates concatenating observed point cloud and symmetric one, and 'Centralize' is the centralization operation (Sec. 3.4). 'RegressT' means directly regressing object center versus predicting translation offsets in Sec. 3.4. 'DSComp' is direct shape completion. 'Point Number' is the number of points in category-level template point cloud. (Sec. 3.1). $(\uparrow)$ : higher better. + +
RowComponentPoint NumbermAP (↑)Accuracy (↑) 5°5cm
SASCConcatCentralizeRegressTDSCompIoU50IoU755°2cm5°5cm10°2cm10°5cm
1✓3681.155.315.923.634.959.139.4
2✓✓3681.260.117.827.738.863.344.1
3✓✓✓3680.662.620.531.739.865.346.4
4✓✓✓✓3680.463.724.134.845.367.449.1
5✓✓✓✓✓3681.063.521.130.444.967.246.7
6✓✓✓3680.659.519.228.941.665.245.0
7✓✓✓✓1679.662.922.833.046.167.647.9
8✓✓✓✓12879.559.521.532.143.766.347.5
+ +Table 4. Ablation studies of using different 3D rotation representations tested on the REAL275 dataset. $(\uparrow)$ : higher better. + +
MethodmAP (↑)Accuracy (↑)
IoU50IoU755°2cm5°5cm10°2cm10°5cm5°5cm
quaternion80.662.920.829.743.664.646.3
SVD [26]82.261.817.824.339.658.640.0
R6d [66]81.664.121.730.542.664.246.6
Vector [6]81.262.521.131.545.167.147.6
SAR-Net80.463.724.134.845.367.449.1
+ +sensation in the form of quaternion, SVD [26], continuity 6D [66] $(R_{6d})$ , and Vector [6], respectively. The comparison results are summarized in Tab. 4. Compared to quaternion, SVD, and $R_{6d}$ , enforced shape alignment enables better generalization, as the point reconstruction search space is smaller than the rotation space, which is easier for the network to learn. The representation of Vector and SA both have geometric meaning, but our SA performs better than Vector, especially under strict metrics of $5^{\circ}2cm$ and $5^{\circ}5cm$ . + +# 4.3. Robotic Experiments + +Physic Baxter Robot. The robotic experiments compare the real-world performance of deploying COPSE models on a real Baxter robot executing different tasks, including object grasping, handover, and pouring as in Fig. 6 (bottom row). Baxter is a dual-arm robot mounted with a RealSense D435 Camera on the base. More configurations of the robotic experiment are detailed in the Appendix. + +Grasping Task. Particularly, we use 12 unseen instances from 3 classes, i.e., 4 mugs, 4 bottles, and 4 bowls. Deployed the COPSE models, the robot is programmed to attempt 10 grasps for each object. In this experiment, our SAR-Net is compared against DualPose [30] and SPD [52] with success rates of $88.3\%$ , $80.8\%$ and $65.8\%$ , respectively. The baseline methods often fail due to imprecise rotation estimation or bigger estimated bounding boxes than the exact ones of target instances. See video demo for details. + +Object Handover Task. The robot interacts with the actor in this task, trying to grasp the objects in human hands. We choose the testing instance bottle. The Baxter successes on + +![](images/ea7167402d2e2a62d634a943a80b78c24979ab7d84babd4fd55ea3c890ad0f69.jpg) +Figure 6. Estimated results given by our SAR-Net in various real clutter environments (top row). We perform tasks on a physical Baxter robot integrated with our SAR-Net (bottom row). + +80% using our SAR-Net in 15 trials of the handover task, compared against that of $73.3\%$ of DualPose and $66.7\%$ of SPD, validating the accurate estimation of our SAR-Net. + +Pouring Task. Using our COPSE model, we conduct the task of actor moving the bowl, while the robot follows the actor and executes pouring action. We choose each testing instance from bowl and mug, respectively. The robot is programmed to attempt 15 trials. Our SAR-Net is compared against DualPose and SPD with success rates of $73.3\%$ , $60.0\%$ , and $53.3\%$ , respectively. The results show the efficacy of our COPSE model in robotic experiments. + +# 5. Conclusion + +We propose a lightweight geometry-based model for the COPSE task. Our network uses shape alignment to facilitate 3D rotation calculation. The symmetry correspondence of objects is utilized to complete its shape for better object center and 3D size estimation. Our method achieves state-of-the-art performance without real-world training data. Furthermore, a physical Baxter robot integrated with our framework validates the utility in practical robotic applications. However, under the inherent limitation of the depth-based method, the sensor noise and lacked discriminative details may result in ambiguities in pose recovery. Future work will consider fusing additional color information from RGB channels for more accurate pose and size recovery. + +# References + +[1] Blender software. https://www.blender.org/.6 +[2] Structure sensor. https://structure.io/. 6 +[3] Zhe Cao, Yaser Sheikh, and Natasha Kholgade Banerjee. Real-time scalable 6dof pose estimation for textureless objects. In 2016 IEEE International conference on Robotics and Automation (ICRA), pages 2441-2448. IEEE, 2016. 2 +[4] 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. 4, 6 +[5] Dengsheng Chen, Jun Li, Zheng Wang, and Kai Xu. Learning canonical shape space for category-level 6d object pose and size estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11973-11982, 2020. 1, 3, 6, 7 +[6] Wei Chen, Xi Jia, Hyung Jin Chang, Jinming Duan, Linlin Shen, and Ales Leonardis. Fs-net: Fast shape-based network for category-level 6d object pose estimation with decoupled rotation mechanism. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1581-1590, 2021. 2, 3, 6, 7, 8 +[7] Alvaro Collet, Dmitry Berenson, Siddhartha S Srinivasa, and Dave Ferguson. Object recognition and full pose registration from a single image for robotic manipulation. In 2009 IEEE International Conference on Robotics and Automation, pages 48-55. IEEE, 2009. 1 +[8] Xinke Deng, Arsalan Mousavian, Yu Xiang, Fei Xia, Timothy Bretl, and Dieter Fox. Poserbpf: A rao-blackwellized particle filter for 6-d object pose tracking. IEEE Transactions on Robotics, 2021. 1 +[9] Xinke Deng, Yu Xiang, Arsalan Mousavian, Clemens Eppner, Timothy Bretl, and Dieter Fox. Self-supervised 6d object pose estimation for robot manipulation. In 2020 IEEE International Conference on Robotics and Automation (ICRA), pages 3665-3671. IEEE, 2020. 1 +[10] Haoqiang Fan, Hao Su, and Leonidas J Guibas. A point set generation network for 3d object reconstruction from a single image. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 605-613, 2017. 7 +[11] Christopher Funk, Seungkyu Lee, Martin R Oswald, Stavros Tsogkas, Wei Shen, Andrea Cohen, Sven Dickinson, and Yanxi Liu. 2017 iccv challenge: Detecting symmetry in the wild. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 1692-1701, 2017. 3 +[12] Ge Gao, Mikko Lauri, Xiaolin Hu, Jianwei Zhang, and Simone Frintrop. Cloudaae: Learning 6d object pose regression with on-line data synthesis on point clouds. In ICRA, 2021. 6, 7 +[13] Ge Gao, Mikko Lauri, Yulong Wang, Xiaolin Hu, Jianwei Zhang, and Simone Frintrop. 6d object pose regression via supervised learning on point clouds. In 2020 IEEE International Conference on Robotics and Automation (ICRA), pages 3643-3649. IEEE, 2020. 6, 7 +[14] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international + +conference on computer vision, pages 2961-2969, 2017. 2, 4 +[15] 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. 1, 3, 5, 6, 7 +[16] Yisheng He, Wei Sun, Haibin Huang, Jianran Liu, Haoqiang Fan, and Jian Sun. Pvn3d: A deep point-wise 3d keypoints voting network for 6dof pose estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11632-11641, 2020. 3, 5 +[17] 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. 2, 6, 7 +[18] 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. 6 +[19] 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. 1 +[20] Zitian Huang, Yikuan Yu, Jiawen Xu, Feng Ni, and Xinyi Le. Pf-net: Point fractal network for 3d point cloud completion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7662-7670, 2020. 4 +[21] Jarmo Ilonen, Jeannette Bohg, and Ville Kyrki. Three-dimensional object reconstruction of symmetric objects by fusing visual and tactile sensing. The International Journal of Robotics Research, 33(2):321-341, 2014. 3 +[22] 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. 3 +[23] Nilesh Kulkarni, Abhinav Gupta, and Shubham Tulsiani. Canonical surface mapping via geometric cycle consistency. In Proceedings of the IEEE International Conference on Computer Vision, pages 2202-2211, 2019. 4 +[24] Taeyeop Lee, Byeong-Uk Lee, Myungchul Kim, and In So Kweon. Category-level metric scale object shape and pose estimation. IEEE Robotics and Automation Letters, 6(4):8575-8582, 2021. 1, 3 +[25] Vincent Lepetit, Francesc Moreno-Noguer, and Pascal Fua. Epnp: An accurate o (n) solution to the pnp problem. International journal of computer vision, 81(2):155, 2009. 3 +[26] Jake Levinson, Carlos Esteves, Kefan Chen, Noah Snavely, Angjoo Kanazawa, Afshin Rostamizadeh, and Ameesh Makadia. An analysis of svd for deep rotation estimation. arXiv preprint arXiv:2006.14616, 2020. 8 +[27] Yan Li, Leon Gu, and Takeo Kanade. Robustly aligning a shape model and its application to car alignment of unknown + +pose. IEEE transactions on pattern analysis and machine intelligence, 33(9):1860-1876, 2011. 2 +[28] Yi Li, Gu Wang, Xiangyang Ji, Yu Xiang, and Dieter Fox. Deepim: Deep iterative matching for 6d pose estimation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 683-698, 2018. 1 +[29] Zhigang Li, Gu Wang, and Xiangyang Ji. Cdpn: Coordinates-based disentangled pose network for real-time rgb-based 6-dof object pose estimation. In Proceedings of the IEEE International Conference on Computer Vision, pages 7678-7687, 2019. 3 +[30] Jiehong Lin, Zewei Wei, Zhihao Li, Songcen Xu, Kui Jia, and Yuanqing Li. Dualposenet: Category-level 6d object pose and size estimation using dual pose network with refined learning of pose consistency. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 3560-3569, October 2021. 1, 3, 6, 7, 8 +[31] Zhi-Hao Lin, Sheng-Yu Huang, and Yu-Chiang Frank Wang. Convolution in the cloud: Learning deformable kernels in 3d graph convolution networks for point cloud analysis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1800-1809, 2020. 2, 4 +[32] David G Lowe. Object recognition from local scale-invariant features. In Proceedings of the seventh IEEE international conference on computer vision, volume 2, pages 1150-1157. IEEE, 1999. 2 +[33] Lucas Manuelli, Wei Gao, Peter Florence, and Russ Tedrake. kpm: Keypoint affordances for category-level robotic manipulation. arXiv preprint arXiv:1903.06684, 2019. 1 +[34] 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, 2015. 1 +[35] Rajendra Nagar and Shanmuganathan Raman. Reflection symmetry axes detection using multiple model fitting. IEEE Signal Processing Letters, 24(10):1438-1442, 2017. 3 +[36] Markus Oberweger, Mahdi Rad, and Vincent Lepetit. Making deep heatmaps robust to partial occlusions for 3d object pose estimation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 119-134, 2018. 3 +[37] Kiru Park, Timothy Patten, and Markus Vincze. Pix2pose: Pixel-wise coordinate regression of objects for 6d pose estimation. In Proceedings of the IEEE International Conference on Computer Vision, pages 7668-7677, 2019. 1 +[38] Georgios Pavlakos, Xiaowei Zhou, Aaron Chan, Konstantinos G Derpanis, and Kostas Daniilidis. 6-dof object pose from semantic keypoints. In 2017 IEEE international conference on robotics and automation (ICRA), pages 2011-2018. IEEE, 2017. 3 +[39] 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 Conference on Computer Vision and Pattern Recognition, pages 4561-4570, 2019. 1, 3, 4, 5, 6, 7 +[40] 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, pages 9277-9286, 2019. 5 + +[41] 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. 4 +[42] Mahdi Rad and Vincent Lepetit. Bb8: A scalable, accurate, robust to partial occlusion method for predicting the 3d poses of challenging objects without using depth. In Proceedings of the IEEE International Conference on Computer Vision, pages 3828-3836, 2017. 3 +[43] Caner Sahin, Guillermo Garcia-Hernando, Juil Sock, and Tae-Kyun Kim. Instance-and category-level 6d object pose estimation. In RGB-D Image Analysis and Processing, pages 243-265. Springer, 2019. 1 +[44] Caner Sahin, Guillermo Garcia-Hernando, Juil Sock, and Tae-Kyun Kim. A review on object pose recovery: from 3d bounding box detectors to full 6d pose estimators. Image and Vision Computing, page 103898, 2020. 1 +[45] Caner Sahin and Tae-Kyun Kim. Category-level 6d object pose recovery in depth images. In Proceedings of the European Conference on Computer Vision (ECCV), pages 0-0, 2018. 1, 3 +[46] Peter H Schonemann. A generalized solution of the orthogonal procrustes problem. Psychometrika, 31(1):1-10, 1966. 2, 4 +[47] Yifei Shi, Junwen Huang, Xin Xu, Yifan Zhang, and Kai Xu. Stablepose: Learning 6d object poses from geometrically stable patches. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 15222-15231, 2021. 2, 3, 6, 7 +[48] 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 +[49] Zhiqiang Sui, Zheming Zhou, Zhen Zeng, and Odest Chadwicke Jenkins. Sum: Sequential scene understanding and manipulation. In 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 3281-3288. IEEE, 2017. 1 +[50] Bugra Tekin, Sudipta N Sinha, and Pascal Fua. Real-time seamless single shot 6d object pose prediction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 292-301, 2018. 3 +[51] Zhou Teng and Jing Xiao. Surface-based detection and 6-dof pose estimation of 3-d objects in cluttered scenes. IEEE Transactions on Robotics, 32(6):1347-1361, 2016. 1 +[52] Meng Tian, Marcelo H Ang Jr, and Gim Hee Lee. Shape prior deformation for categorical 6d object pose and size estimation. arXiv preprint arXiv:2007.08454, 2020. 1, 3, 6, 7, 8 +[53] Jonathan Tremblay, Thang To, Balakumar Sundaralingam, Yu Xiang, Dieter Fox, and Stan Birchfield. Deep object pose estimation for semantic robotic grasping of household objects. arXiv preprint arXiv:1809.10790, 2018. 1 +[54] S. Umeyama. Least-squares estimation of transformation parameters between two point patterns. IEEE Transactions on Pattern Analysis and Machine Intelligence, 13(4):376-380, 1991. 2, 4 + +[55] Kentaro Wada, Edgar Sucar, Stephen James, Daniel Lenton, and Andrew J Davison. Morefusion: Multi-object reasoning for 6d pose estimation from volumetric fusion. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 14540-14549, 2020. 1 +[56] Chen Wang, Roberto Martin-Martin, Danfei Xu, Jun Lv, Cewu Lu, Li Fei-Fei, Silvio Savarese, and Yuke Zhu. 6-pack: Category-level 6d pose tracker with anchor-based keypoints. In 2020 IEEE International Conference on Robotics and Automation (ICRA), pages 10059-10066. IEEE, 2020. 3 +[57] Chen Wang, Danfei Xu, Yuke Zhu, Roberto Martin-Martin, Cewu Lu, Li Fei-Fei, and Silvio Savarese. Densefusion: 6d object pose estimation by iterative dense fusion. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3343–3352, 2019. 1, 3 +[58] 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 Conference on Computer Vision and Pattern Recognition, pages 2642-2651, 2019. 1, 2, 3, 4, 5, 6, 7 +[59] Zhaozhong Wang, Zesheng Tang, and Xiao Zhang. Reflection symmetry detection using locally affine invariant edge correspondence. IEEE Transactions on Image Processing, 24(4):1297-1301, 2015. 3 +[60] B Wen and Kostas E Bekris. Bundletrack: 6d pose tracking for novel objects without instance or category-level 3d models. In IEEE/RSJ International Conference on Intelligent Robots and Systems, 2021. 3 +[61] Yijia Weng, He Wang, Qiang Zhou, Yuzhe Qin, Yueqi Duan, Qingnan Fan, Baoquan Chen, Hao Su, and Leonidas J. Guibas. Captra: Category-level pose tracking for rigid and articulated objects from point clouds. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 13209-13218, October 2021. 3 +[62] Shangzhe Wu, Christian Rupprecht, and Andrea Vedaldi. Unsupervised learning of probably symmetric deformable 3d objects from images in the wild. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1-10, 2020. 2, 3 +[63] Yu Xiang, Tanner Schmidt, Venkatraman Narayanan, and Dieter Fox. PoseCNN: A convolutional neural network for 6d object pose estimation in cluttered scenes. arXiv preprint arXiv:1711.00199, 2017. 3, 5, 6 +[64] Tianfan Xue, Jianzhuang Liu, and Xiaou Tang. Symmetric piecewise planar object reconstruction from a single image. In CVPR 2011, pages 2577-2584. IEEE, 2011. 3 +[65] Sergey Zakharov, Ivan Shugurov, and Slobodan Ilic. Dpod: 6d pose object detector and refiner. In Proceedings of the IEEE International Conference on Computer Vision, pages 1941-1950, 2019. 3 +[66] 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. 8 \ No newline at end of file diff --git a/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/images.zip b/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4069283f75e70581acbd1ac0e5b797c495331568 --- /dev/null +++ b/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27d39acffd095ef86a308eb741c596aa001a43e932b0d9b3bdf6aaf79b326732 +size 530705 diff --git a/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/layout.json b/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e39dc8d6335312ce15a2062abb1a4fe8640bb9ee --- /dev/null +++ b/sarnetshapealignmentandrecoverynetworkforcategorylevel6dobjectposeandsizeestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a4b0801cceba3e20d85287e6aa5499525946d8a87a0f6a5092195b473ef1891 +size 483080 diff --git a/sasicstereoimagecompressionwithlatentshiftsandstereoattention/f73755b8-d8f0-45f0-98fd-a86b9f29a722_content_list.json b/sasicstereoimagecompressionwithlatentshiftsandstereoattention/f73755b8-d8f0-45f0-98fd-a86b9f29a722_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..c970ee79af426c9a9bd614ee9d78cd4c3d52ee96 --- /dev/null +++ b/sasicstereoimagecompressionwithlatentshiftsandstereoattention/f73755b8-d8f0-45f0-98fd-a86b9f29a722_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25ce4fdaabafa26cef057a05178ce55dff3eabff4114bd4f8b953233d6e517c6 +size 72047 diff --git a/sasicstereoimagecompressionwithlatentshiftsandstereoattention/f73755b8-d8f0-45f0-98fd-a86b9f29a722_model.json b/sasicstereoimagecompressionwithlatentshiftsandstereoattention/f73755b8-d8f0-45f0-98fd-a86b9f29a722_model.json new file mode 100644 index 0000000000000000000000000000000000000000..56208c7e963465c2c663a5752cf17968c3e12e3e --- /dev/null +++ b/sasicstereoimagecompressionwithlatentshiftsandstereoattention/f73755b8-d8f0-45f0-98fd-a86b9f29a722_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a42a5c80bb5b23d8b61b126806c69f32dd2e73586d5a7468d438fd3419cbeeba +size 87344 diff --git a/sasicstereoimagecompressionwithlatentshiftsandstereoattention/f73755b8-d8f0-45f0-98fd-a86b9f29a722_origin.pdf b/sasicstereoimagecompressionwithlatentshiftsandstereoattention/f73755b8-d8f0-45f0-98fd-a86b9f29a722_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6c1e5ee3857c02f0b56253b85ddb6e263817401c --- /dev/null +++ b/sasicstereoimagecompressionwithlatentshiftsandstereoattention/f73755b8-d8f0-45f0-98fd-a86b9f29a722_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:218768e3e3be4c5cc94b03e3bd30aab68e155e0cdb35b6e978caf97fdbac25e0 +size 3401911 diff --git a/sasicstereoimagecompressionwithlatentshiftsandstereoattention/full.md b/sasicstereoimagecompressionwithlatentshiftsandstereoattention/full.md new file mode 100644 index 0000000000000000000000000000000000000000..385b39f44e0195654fc9e1cf01d41fb29f9e0192 --- /dev/null +++ b/sasicstereoimagecompressionwithlatentshiftsandstereoattention/full.md @@ -0,0 +1,311 @@ +# SASIC: Stereo Image Compression with Latent Shifts and Stereo Attention + +Matthias Wödlinger +TU Wien, Vienna, Austria + +Jan Kotera TU Wien + +Jan Xu Deep Render, London, UK + +Robert Sablatnig TU Wien + +mwoedlinger@cvl.tuwien.ac.at + +# Abstract + +We propose a learned method for stereo image compression that leverages the similarity of the left and right images in a stereo pair due to overlapping fields of view. The left image is compressed by a learned compression method based on an autoencoder with a hyperprior entropy model. The right image uses this information from the previously encoded left image in both the encoding and decoding stages. In particular, for the right image, we encode only the residual of its latent representation to the optimally shifted latent of the left image. On top of that, we also employ a stereo attention module to connect left and right images during decoding. The performance of the proposed method is evaluated on two benchmark stereo image datasets (Cityscapes and InStereo2K) and outperforms previous stereo image compression methods while being significantly smaller in model size. + +# 1. Introduction + +Lossy image compression is a fundamental task in image processing that aims to preserve the visual image content while reducing the bitrate needed for storage or transmission. It is a long-studied problem and a very active field of research both in traditional hand-crafted approaches and newly emerging learned methods. The traditional image encoding and decoding pipeline ("codec") typically consist of partitioning the image into small blocks to be processed separately, a linear transform to decorrelate the image values, intra block prediction (motion search) and residual coding to exploit repetition and self-similarity of the image content and decrease the entropy of its representation, quantization to obtain a finite set of symbols to code, and an entropy coder to store the resulting representation most efficiently. The decoding pipeline performs analogous operations in reverse. In contrast, modern learned compression methods typically process the image as a whole, without partitioning, by models, based on variational autoencoders, in which the latent representation is quantised and entropy coded with a learned probability distribution. The parametrization of this + +distribution, the entropy model, along with the autoencoder, are trained to minimize the cross-entropy against the true latent distribution so that the whole codec can be trained by optimizing the weighted rate/distortion loss. + +In stereo image compression, the primary objective is the same with the additional possibility to achieve better performance by exploiting the mutual information between left and right images caused by their overlapping fields of view (albeit from slightly different viewpoints). In traditional methods, this can be achieved by the same set of tools available for inter-frame or motion prediction. Motion vector search in learned compression methods is far less explicit and extending them to stereo compression is therefore paradoxically more difficult. In the current literature, there are two existing deep learning based methods explicitly targeting stereo image compression – the DSIC model by Liu et al. [21] and HESIC model by Deng et al. [13]. In DSIC, a dense warp field is estimated, and warped features from the left image are fed to the encoder and decoder of the right image. In HESIC, a rigid homography transform in the image space is used. In both cases, the models are augmented by additional modules for joint entropy modelling and image enhancement, and as a result, they are rather large, and their training far from straightforward. + +In contrast, the proposed model is very lightweight (4% and 10% the size of DSIC and HESIC, respectively, in number of parameters), conceptually simple, and does not require any special training procedure without sacrificing performance. The "backbone" of our method is an adaption of [38], but in principle, any general single image compression encoder-decoder model can be used as the backbone. The left image is encoded normally. After the right image is processed by the encoder, we find optimal horizontal shifts (minimizing the mean-square error) of each channel of its latent representation to the corresponding channel of the left image latent and subtract the two shifted channels so that only the residual is encoded for the right latent. This is motivated by the observation that the dominant rigid transform between rectified images in a stereo pair is a horizontal shift and working in the latent space results in larger effective disparity range due to downsampling. To account for + +smaller local displacements caused by depth variation, we also connect the two image representations by a stereo attention module [40], proposed originally for stereo image superresolution. A full description of the method is given in Sec. 3. + +To summarize, we propose a method for stereo image compression with the following highlights: + +- The principle of the method mimics the same techniques that are used for stereo compression in traditional codecs but remains fully end-to-end learnable. +- The method outperforms existing stereo image compression state-of-the-art on two standard test datasets. +- The method is very lightweight and easy to train, and its code is publicly available. + +In the rest of the paper, we summarize the related previous work, give a full description of the method and present and discuss the experimental results. + +# 2. Related work + +The image compression literature can be broadly classified into traditional and learned methods. Traditional methods use image partitioning (tiling), hand-crafted transforms, and redundancy elimination by explicit intra prediction. In learned methods the image is typically processed as a whole and the transform operations are parametrized and learned from the training data by minimizing the rate-distortion loss + +$$ +\mathcal {L} _ {R D} = \mathcal {R} + \lambda \mathcal {D}, \tag {1} +$$ + +where $\mathcal{D}$ denotes the distortion metric and $\mathcal{R}$ cross-entropy of the latent code under a learned entropy model and $\lambda \in \mathbb{R}^{+}$ is the trade-off parameter. Both of these approaches rely on the quantization of the transformed representation and subsequent entropy coding to obtain the final bitstream. + +Traditional compression The Joint Photographic Experts Group (JPEG) method, initially proposed in [36] is based on fixed 8x8 block tiling, chroma subsampling, discrete cosine transform, and next-block intra prediction. Its successor JPEG2000 [31] uses discrete wavelet transform and multiresolution processing. Modern image compression methods are usually wrappers over intra-frame compression developed for video CODECs, such as BPG [7] (based on HEVC [32]), AVIF (based on AV1), or VVC intra [9]. VVC intra, in particular, has very slow encoding times but arguably the best compression performance to date among traditional methods. + +Learned compression Initial work on end-to-end learned image compression started with the pioneering work by Toderici et al. [33] where a recurrent neural network is proposed for variable rate image compression. Another line + +of research in learned image compression was proposed by Balle et al. [4] where an autoencoder based model with a parametrized distribution as prior for the latent is trained with rate-distortion loss for a fixed target bitrate. The autoencoder uses generalized divisive normalization [3] as nonlinearities and channel-wise piecewise-linear functions for the entropy model. The latter, however, does not allow for spatial adaptation and was later replaced by a per-pixel fully factorized zero-mean Gaussian with scale determined by a hyperprior [5]. In subsequent works, this model was further extended by allowing Gaussians with non-zero mean [25] or Gaussian mixtures [11]. Using an autoregressive network as a non-factorized conditional entropy model was proposed by Mentzer et al. [22] and Minnen et al. [25], which significantly improved performance at the expense of decoding complexity. A faster channel-based version appeared in [26]. + +Many different approaches and architectures were proposed, such as multiscale processing [28], dense blocks and content weighting [20], non-local attention modules [10, 11, 15], or asymmetric encoder-decoder setup [39]. For a more detailed overview, see [17]. A separate avenue of research is employing generative models, in particular GANs, in the decoders [1, 23, 34]. Such methods are capable of achieving high perceptual quality at very low bitrates, but the reconstructed image may lose semantic fidelity to the original. + +Attention Since the seminal work of Vaswani et al. [35] where the transformer, a self-attention based model for machine translation, has been introduced, several ideas have been proposed for the use of self-attention in vision. Due to the quadratic growth in complexity, a naive application to image data is often prohibitive. In [30] this is circumvented by restricting attention to a local neighborhood, and in [14] self-attention is applied between image patches instead. For rectified stereo images, in particular, parallax stereo attention has been proposed in [37, 40], where attention at a certain location in the left (or right) image is limited to the corresponding epipolar line in the other image. + +Stereo image compression Methods for compression of stereo image pairs work by saving bitrate through the exploitation of the mutual information between the left and right image. From traditional methods, MV-HEVC [24] is an extension of the HEVC video codec, which, on top of intra-frame prediction, also leverages prediction between multiple views. It performs very well, but the official implementation lacks support for several important features, such as operation in higher bit-depths or 4:4:4 chroma mode, and as a result, MV-HEVC is not very competitive against state-of-the-art single image compression methods. Learnable lossless stereo compression was recently proposed by + +Huang et al. [18], consisting of multiscale transforms, disparity estimation, and warping. A "distributed" compression method, which assumes that one image of the stereo pair is available for the decoder, was proposed by Ayzik and Avidan [2] and more recently by Mital et al. [27]. + +The list of learned lossy stereo compression methods is rather short and, to our best knowledge, includes the DSIC model by Liu et al. [21] from 2019 and HESIC model by Deng et al. [13] from 2021. The DSIC method uses skip modules that feed disparity-warped features from the encoded first image to the second and conditional entropy model to capture the dependence of image codes. The disparity map is used implicitly and is not transmitted in the bitstream. In the HESIC model, the second image is warped by an estimated homography, and only the residual is encoded. In addition, context-based entropy model and final quality-enhancement module are used to decrease bitrate and increase quality. Both methods reportedly outperform single-image compression methods by a solid margin. However, these methods are quite large and difficult to train. + +# 3. Proposed method + +Fig. 1 shows an overview of the proposed method. Our method compresses a stereo image pair in two streams that are connected in the latent, the entropy model and in the decoder. We use a hyperprior model to estimate the parameters of our latent entropy model. For a given stereo image pair $x_{1}, x_{2}$ in the first step the left image is encoded independently from the right image. Then the right image is processed by encoder module $E$ and the optimal channelwise horizontal shift for the quantised left latent $\hat{y}_{1}$ is computed such that the MSE to the right latent $y_{2}$ is minimal. For each channel $c$ in the latent representations $y_{2}$ we find the optimal shift $s_{c} = \operatorname{argmin}_{s} \mathrm{MSE}\left(\boldsymbol{y}_{2}^{(c)} - \mathrm{shift}_{s}(\boldsymbol{y}_{1}^{(c)})\right)$ where $\mathrm{shift}_{s}(\boldsymbol{y})$ is defined as a tensor of the same size as $\boldsymbol{y}$ but horizontally (with respect to the original image) shifted by $s$ pixels (zero-padded where necessary). Instead of $y_{2}$ we then encode only the residual defined for each channel as $\boldsymbol{y}_{\mathrm{res}}^{(c)} = \boldsymbol{y}_{2}^{(c)} - \mathrm{shift}_{c}(\boldsymbol{y}_{1}^{(c)})$ . The search range for $s_{c}$ is in our experiments limited to 64 pixels (in the downsampled latent representation) in one direction only (stereo disparity has only one polarity). The optimal shift can be found efficiently using a convolution the horizontal direction (achieved by corresponding padding) and element-wise operations to compute the MSE. It is therefore not significantly more demanding than other common operations in CNNs. The residual between the right latent and the shifted left quantised latent + +$$ +\boldsymbol {y} _ {\text {r e s}} := E \left(\boldsymbol {x} _ {2}\right) - \operatorname {s h i f t} \left(\hat {\boldsymbol {y}} _ {1}\right) \tag {2} +$$ + +is then encoded. During decoding we decode the left latent first and add the shifted left quantised latent shift $(\hat{y}_1)$ to the + +quantised residual $\hat{y}_{\mathrm{res}}$ to obtain the right latent + +$$ +\hat {\mathbf {y}} _ {2} := \hat {\mathbf {y}} _ {\text {r e s}} + \operatorname {s h i f t} \left(\hat {\mathbf {y}} _ {1}\right). \tag {3} +$$ + +In the final step, $\hat{\pmb{y}}_1$ and $\hat{\pmb{y}}_2$ are processed jointly in the decoder modules $D_{1}, D_{2}$ . + +Applying a channel-wise shift is computationally cheap and requires almost no additional side information. Because the encoder performs $4 \times$ downsampling, a maximal shift of 64 pixels in the latent corresponds to a shift of 256 in the original image. This equals to 72 bits of side information (6 bits times 12 latent channels), which for a $512 \times 512$ input image corresponds to only $\approx 0.00027$ bits/pp overhead. Furthermore, a simple shift is also theoretically motivated by the fact that for a rectified stereo image pair, a shift is the transformation between the two image planes. + +# 3.1. Encoding modules and quantization + +The encoder/decoder architecture is loosely based on the single image compression method proposed in [38]. The encoder module $E$ and hyperprior encoder $h_{E}^{1}$ and $h_{E}^{\mathrm{res}}$ each consist of four convolutional layers with Parametrized Rectified Linear Units (PReLUs) [16] as non-linearities. The structure of the encoder modules is shown in the top row of Fig.2. In both cases we downsample in the second and third convolution, which results in a $4\times$ downsampling for the latent and $16\times$ downsampling for the hyperlatent compared to the size of the inputs $x_{1},x_{2}$ . We use the same encoder module $E$ (i.e. shared weights) for left and right images and the same architecture for $h_{E}^{1}$ and $h_{E}^{\mathrm{res}}$ (with separate weights). + +Motivated by the discussion in [29], during training we use the noise approximation of quantization [4] for the rate loss and a straight-through-estimation (STE) quantization for the distortion loss. + +# 3.2.Decoding + +The architectures of the hyperprior decoders follow the same general structure of four convolutional layers with PReLUs as non-linearities; see the bottom row of Fig. 2. The hyperprior decoder for the left image $h_D^1$ gets the quantised hyperlatent $\hat{z}_1$ as input and performs nearest neighbor upsampling after the second and third convolutional layers. The hyperprior decoder for the residual $h_D^{\mathrm{res}}$ gets both the $4\times$ upsampled quantised hyperlatent $\hat{z}_{res}$ as well the shifted $\hat{y}_1$ as input. There is no additional upsampling after the convolutional layers in $h_D^{\mathrm{res}}$ . + +The final decoder modules $D_{1}$ and $D_{2}$ consist again of four convolutional layers with PReLU activation functions and upsampling after the second and third convolution but with stereo attention modules (SAM) from [40] before the first three convolutional layers that connect the left and right decoder stream; see overview in Fig. 3. SAM works by computing an attention mask between left and right input, + +![](images/8d734246d25f66aa07a7f818d4773575436187b06367dc211bb7b52c451062bf.jpg) +Figure 1. The full architecture of our proposed method. Layer structure of submodules are shown in Fig. 2 and Fig. 3. The arithmetic encoder $AE$ and the arithmetic decoder $AD$ are not relevant during training. The bitstreams are pictured with a checkerboard pattern. Dotted lines are connections not relevant during training and dashed lines show connections between the left and the right side. + +![](images/5d8907efdef2c569f67fb6596b13fe38a64599b564d9346991d045152a83960d.jpg) +Figure 2. The top row shows the architecture of encoder $E$ and hyper-encoder $h_E$ . The bottom row shows the decoder of the hyperprior with the decoder for the left image bottom left and the decoder for the right image bottom right. We set $N = 192$ and $M = 12$ + +![](images/500937ae47368abd674c5a99168313de2421d59b4349e9b70d6e3d14428131c2.jpg) + +which is then used to warp left to right and vice versa. The input is then stacked with the warped image in the channel dimension and processed by the next convolutional layer. The attention is only computed between positions on the same epipolar line (we are assuming the images are rectified), which circumvents the issue of the quadratic complexity in sequence length of the attention mechanism. + +# 3.3. Entropy estimation + +Optimal entropy estimation is essential for the rate loss term during training and correct bitrate allocation during testing. For stereo image compression, where a pair of images with mutual information $H(\pmb{x}_1,\pmb{x}_2) > 0$ is compressed jointly, using the left latent as side information in the entropy model of the residual allows in principle to re + +duce the bitrate even further. + +As discussed in 3.1 during training we mimic the quantization of the latent and hyperlatent with a noisy versions $\tilde{\pmb{y}} = \pmb{y} + \pmb{\epsilon}$ and $\tilde{z} = z + \epsilon$ with $\epsilon \sim \mathcal{U}(-0.5,0.5)$ . During testing we replace $\tilde{\pmb{y}}$ and $\tilde{z}$ with their integer quantised equivalents $\hat{\pmb{y}}$ and $\hat{z}$ . + +Similar to [5] we include side information as a hyperprior $\tilde{z}_n, n \in \{1,2\}$ to reduce the entropy of the latents $\tilde{\mathbf{y}}_n, n \in \{1,2\}$ . We start by discussing the entropy model for the hyperpriors $\tilde{z_n}$ . Following the discussion in [5] we model the probability of the hyperprior $\tilde{z}_n$ as a convolution of a parametric probability function $q_{\tilde{z}_n}$ and a uniform distribution $u$ + +$$ +p _ {\tilde {z} _ {n}} \left(\tilde {z} _ {n} \mid \theta_ {\tilde {z} _ {n}}\right) = \left(q _ {\tilde {z} _ {n}} * u\right) \left(\tilde {z} _ {n}\right) \tag {4} +$$ + +where $\theta_{\tilde{z}_n}$ denotes the parameters of $q_{\tilde{z}_n}$ and $u(\tau) = \mathbb{1}_{[-0.5,0.5]}(\tau)$ . $p_{\tilde{z}_n}(\tilde{z}_n \mid \theta_{\tilde{z}_n})$ can then be expressed via the cumulative density function $F_{\tilde{z}_n}$ of $q_{\tilde{z}_n}$ : + +$$ +\begin{array}{l} p _ {\tilde {z} _ {n}} \left(\tilde {z} _ {n} \mid \theta_ {\tilde {z} _ {n}}\right) = \int_ {- \infty} ^ {\infty} q _ {\tilde {z} _ {n}} (\tau \mid \theta_ {\tilde {z} _ {n}}) \mathbb {1} _ {[ - 0. 5, 0. 5 ]} \left(\tilde {z} _ {n} - \tau\right) d \tau \\ = F _ {\tilde {z} _ {n}} \left(\tilde {z} _ {n} + 0. 5 | \theta_ {\tilde {z} _ {n}}\right) - F _ {\tilde {z} _ {n}} \left(\tilde {z} _ {n} - 0. 5 | \theta_ {\tilde {z} _ {n}}\right) \\ \end{array} +$$ + +We model the probability density function of $q_{\tilde{z}_n}$ as a fully factorized Laplacian distribution + +$$ +\operatorname {L a p} _ {\boldsymbol {\mu} _ {n}, \boldsymbol {b} _ {n}} (\tilde {\boldsymbol {z}} _ {n}) = \prod_ {i} \frac {1}{2 b _ {n ; i}} \exp \left(- \frac {| \tilde {\boldsymbol {z}} _ {n ; i} - \mu_ {n ; i} |}{b _ {n ; i}}\right), \tag {5} +$$ + +where $i$ denotes the pixel index and the parameters $\mu_{n;i} \in \mathbb{R}$ , $b_{n;i} \in \mathbb{R}^+$ are shared between all positions in a channel. We denote the set of parameters $(\pmb{\mu}_n, \pmb{b}_n)$ by $\pmb{\theta}_{\tilde{\pmb{z}}_n}$ . + +We proceed similarly for the latent distributions and model them as convolutions of a parametric probability function $q_{\tilde{\mathbf{y}}_n}$ , with $n \in \{1, \mathrm{res}\}$ , and a uniform distribution $u$ . + +$$ +p _ {\tilde {y} _ {1}} \left(\tilde {y} _ {1} \mid \tilde {z} _ {1}, \boldsymbol {\theta} _ {\tilde {y} _ {1}}\right) = \left(q _ {\tilde {y} _ {1}} * u\right) \left(\tilde {y} _ {1}\right) \tag {6} +$$ + +$$ +p _ {\tilde {y} _ {\mathrm {r e s}}} \left(\tilde {y} _ {\mathrm {r e s}} \mid \tilde {y} _ {1}, \tilde {z} _ {\mathrm {r e s}}, \theta_ {\tilde {y} _ {\mathrm {r e s}}}\right) = \left(q _ {\tilde {y} _ {\mathrm {r e s}}} * u\right) \left(\tilde {y} _ {\mathrm {r e s}}\right) \tag {7} +$$ + +The distributions are conditioned on the hyperpriors $\tilde{z}_n$ and the parameters of the hyperprior decoder $\theta_{\tilde{\mathbf{y}}_n}$ . For the residual latent $\tilde{\mathbf{y}}_{\mathrm{res}}$ we additionally condition the probability distribution on $\tilde{\mathbf{y}}_1$ by using the shifted $\tilde{\mathbf{y}}_1$ as an additional input to the decoder of the hyperprior $h_D^{\mathrm{res}}$ . We use a fully factorized Laplacian distribution for $q_{\tilde{\mathbf{y}}_1}$ and, contrary to the hyperlatents where we have a separate set of learned parameters for every channel, we predict a different set of parameters for every position and channel with + +$$ +\boldsymbol {\theta} _ {\tilde {y} _ {1}} = h _ {D} ^ {1} \left(\hat {z} _ {1}\right) \tag {8} +$$ + +$$ +\boldsymbol {\theta} _ {\hat {\mathbf {y}} _ {r e s}} = h _ {D} ^ {r e s} \left(\hat {\mathbf {z}} _ {r e s}, \operatorname {s h i f t} \left(\hat {\mathbf {y}} _ {1}\right)\right). \tag {9} +$$ + +![](images/012dd9e11a6e5273f3a7d5e630dd0dfea9e6cc3c04e2ce9ca9f23b3a31ffbe23.jpg) +Figure 3. The decoder architecture. The SAM blocks contain the stereo attention module proposed in [40]. We set $N = 192$ + +The total rate is then the sum of the cross entropies for $\tilde{z}_1, \tilde{y}_1, \tilde{z}_{\mathrm{res}}, \tilde{y}_{\mathrm{res}}$ : + +$$ +\begin{array}{l} \mathcal {R} = \mathbb {E} _ {\boldsymbol {x} _ {1}, \boldsymbol {x} _ {2} \sim p _ {\boldsymbol {x}}} \left[ - \log_ {2} p \left(\tilde {\boldsymbol {y}} _ {1}, \tilde {\boldsymbol {z}} _ {1} \mid \boldsymbol {\theta} _ {\tilde {\boldsymbol {z}} _ {1}}, \boldsymbol {\theta} _ {\tilde {\boldsymbol {y}} _ {1}}\right) \right. \\ \left. - \log_ {2} p \left(\tilde {\mathbf {y}} _ {r e s}, \tilde {\mathbf {z}} _ {r e s} \mid \tilde {\mathbf {y}} _ {1}, \boldsymbol {\theta} _ {\tilde {\mathbf {z}} _ {r e s}}, \boldsymbol {\theta} _ {\tilde {\mathbf {y}} _ {r e s}}\right) \right], \tag {10} \\ \end{array} +$$ + +where $p_{\pmb{x}}$ denotes the true distribution of the input data. + +# 3.4. Training + +We train our model with the rate distortion loss + +$$ +\mathcal {L} = \mathcal {R} + \lambda \mathcal {D}, \tag {11} +$$ + +where $\mathcal{R}$ denotes the rate term from eq. (10) and $\mathcal{D}$ denotes the distortion metric, which in our is the sum of the MSE values for left and right images between the inputs $\pmb{x}_1, \pmb{x}_2$ and predictions $\hat{\pmb{x}}_1, \hat{\pmb{x}}_2$ , + +$$ +\mathcal {D} = \mathbb {E} _ {\boldsymbol {x} _ {1}, \boldsymbol {x} _ {2} \sim p _ {\boldsymbol {x}}} \left[ \| \boldsymbol {x} _ {1} - \hat {\boldsymbol {x}} _ {1} \| ^ {2} + \| \boldsymbol {x} _ {2} - \hat {\boldsymbol {x}} _ {2} \| ^ {2} \right]. \tag {12} +$$ + +# 4. Experiments + +We will start with a brief overview of the datasets, followed by details about the implementation and benchmarks and finish with the discussion of the results and an ablations study. + +# 4.1. Datasets + +We evaluate our method on two datasets, Cityscapes [12] for distant views, and outdoor scenes and InStereo2K [6] for near views and indoor scenes. The datasets were also chosen to match recent works on stereo image compression. + +Cityscapes The Cityscapes dataset [12] contains 5000 stereo image pairs of size $2048 \times 1024$ with maximum disparity of about 128 pixels. The set is split into 2975 training, + +![](images/0ea0b67d8867e400923cc9069216e965069a69d108d94a854ef97bf8c39c8d33.jpg) +Figure 4. Rate distortion curves for our method against various compression baselines for Cityscapes (left column) and InStereo2K (right column) measured by PSNR + +![](images/d32df5909ed158758c10ec1c6b7fa90d36a8d1d764b8ebf7406e5536c7254c84.jpg) + +500 validation and 1525 test pairs. The images show street scenes from 50 German cities taken from a car while driving. For every image, we crop 64, 256, and 128 pixels from the top, bottom, and sides, respectively, to remove the car hood (repeated in each image) and rectification artefacts. This matches the transforms used in [21]. + +InStereo2K The InStereo2K dataset [6] contains 2060 stereo image pairs of indoor scenes of size $1080 \times 860$ and a maximum disparity of approx. 256 pixels. The set is split into 2010 image pairs for training and 50 for testing. The images are cropped minimally such that height and width are multiples of 16. + +# 4.2. Implementation Details + +We train our method for different values of $\lambda \in \{1\mathrm{e} - 3,\dots ,4\mathrm{e} - 1\}$ to achieve different desired target bitrates. For each bitrate, we train our models from scratch for 300 epochs on Cityscapes and 400 epochs on InStereo2K. We set the initial learning rate to $10^{-4}$ and drop the learning rate by a factor of 10 after 400k steps. We use the Adam optimizer [19] and a batch size of 1 for all runs. We train on random crops of size $256\times 256$ . The testing is done on full images with the exception of the cropping of Cityscapes specified in Sec. 4.1 and minimal required crop such that the input image size is divisible by 16. We train with the mean square error as the distortion metric $\mathcal{D}$ in eq. (11) and report results in terms of the PSNR metric. + +# 4.3. Benchmark methods + +We compare our method directly with the backbone alone (i.e. the backbone compression method is used to compress the left and right image independently) to highlight the improvements due to stereo handling. Apart from that, we show results of several state-of-the-art traditional or learned compression methods used either to compress both + +
Method# of params
Backbone2.8M
SASIC (proposed)6.6M
HESIC66.2M
DSIC159.6M
+ +Table 1. Overview of the size of learned stereo compression methods in number of parameters. + +images of the stereo pair together or each of its images independently, depending on the capabilities of respective methods. With HEVC [32] we disable chroma subsampling and compress the stereo pair as a two-frame video sequence (left frame is an I frame and right frame is a P frame with the corresponding prediction). MV-HEVC [24] is used in its default config for stereo compression (two-view intra mode), but unfortunately supports only 4:2:0 chroma mode, which incurs a huge penalty in higher bitrates (we use bicubic upsampling for chroma channels). BPG [7] is used without chroma subsampling, and each image is compressed independently (essentially equivalent to HEVC intra, without stereo prediction). For DSIC [21] and HESIC [13] we quote their reported results on the respective datasets. We point out that comparison of the proposed method with other single-image learned methods (of similar size) is not critical as any one of such methods can potentially be used as the backbone of the proposed method and inherit its performance. + +# 4.4. Results + +The experimental results of our method as well as the benchmarks on the test datasets are in Fig. 4, with the results for Cityscapes on the left and the results for InStereo2K on the right. The Cityscapes dataset with its many homogeneous regions is well suited for traditional compression, and + +![](images/e0371a648225042d927ef0fa925cf9a2e28a8afd090bc1b4d2bb7b742c08638b.jpg) +Figure 5. Ablation study: Comparison of the effects of the latent shift residual coding (green) and the stereo attention sub-modules (SA) on the rate-distortion performance. SA is used either only in the image decoder (red) or also in the hyperprior decoder (purple). The full proposed method (blue) and the original backbone (orange) are shown for reference. + +![](images/c191a013ff241e722b797cb5f81104b826373b8c4d1f3413912a92d21d8d7d9f.jpg) + +beating traditional methods at PSNR is notoriously hard. HEVC performs best, with the proposed method (SASIC) trailing only slightly in low bitrates. Our method significantly outperforms the DSIC method and shows a consistent improvement over the backbone for the whole bitrate range. + +The InStereo2K dataset offers a larger variation in image content than the Cityscapes. At higher bitrates, the learned methods work better, while at very low bitrates, the traditional methods keep their advantage. The proposed method (SASIC) is clearly on top for most of the bitrate range. The reported performance of HESIC is rather bad at PSNR. We were unable to reproduce the results from the HESIC paper, even when using the model from their official codebase2, which is why we report the scores stated in their paper. The relatively poor results of MV-HEVC on both datasets are due to colour subsampling, which is not competitive in objective evaluations. + +The difference between the proposed method (SASIC) and its backbone illustrates the gains due to stereo handling. This gain is most noticeable for low and medium bitrates, achieving approximately $15\%$ and $18\%$ bitrate reduction for the second image for Cityscapes and InStereo2K, respectively, at the middle $\mathrm{bpp} = 0.4$ . For higher bitrates, the (absolute) reduction gain decreases, which could be intuitively explained as follows: If high reconstruction quality is demanded at the cost of higher bitrate, then it may be optimal to decrease the reliance on predictions and pay the bitrate rather than risk compromising the quality. However, by looking and the results of BPG and HEVC (analogous pair of compression methods, one for single images and the other for stereo), we can see that HEVC maintains its edge + +throughout the whole bitrate range, which suggests that further improvements in bitrate reduction are possible. A qualitative comparison on an image from the InStereo2K test set can be seen in Fig. 6. Additional examples are available in the supplemental material. + +As can be seen from Tab. 1 our model is significantly smaller than existing methods for learned stereo image compression, with a model size of our SASIC model of only $4\%$ and $10\%$ of the DSIC and HESIC models respectively. A comparison and discussion of runtimes can be found in the supplementary material. + +# 4.5. Ablation Study + +In this paragraph, we compare the modules in our method and how they affect the overall rate-distortion curves. A comparison of these cases can be seen in Fig. 5. Furthermore we provide Bjøntegaard Delta PSNR (BD-PSNR) [8] and BD-Rate values in Table 2. BD-PSNR approximates quality increase for equivalent bitrate (higher is better) and BD-Rate approximates bitrate savings percentage for equivalent quality (negative and lower is better). + +Backbone: For the backbone network, both images are compressed independently of each other, with the model used to compress the left image in the SASIC model. + +Backbone + shift (case 1): For this case we remove the stereo attention modules that connect $D_{1}$ and $D_{2}$ in Fig. 1 and only keep the connections between $\hat{\pmb{y}}_{1}$ and $\pmb{y}_{2}$ as well as $h_{D}^{\mathrm{res}}$ . After training, we can see from the RD-curves in Fig. 5 that the model performs significantly worse than the full model, indicating that the stereo attention in the decoder helps to reduce the bitrate further. The BD-rate in Tab. 2 indicates that the remaining connection still leads to a substantial improvement for Cityscapes when compared to + +![](images/be4011876d6f15430812850b47ad3d70ae1d96697bb7aff3133230dd6b057b20.jpg) +Figure 6. A qualitative comparison on an image from the InStereo2K test set. + +the backbone model where no such connections are present. For InStereo2K, the improvements are smaller. + +Backbone + stereo attention in decoder (case 2): In this case we remove the connection between $\hat{y}_1$ and $y_2$ as well as $h_D^{\mathrm{res}}$ . We also replace the decoder of the hyperprior model for the right image with that of the left model (Fig. 2 bottom left). We keep the stereo attention connection between $D_1$ and $D_2$ . The resulting model performs significantly better than the backbone; however still worse than the full SASIC model. + +Backbone + stereo attention in decoder and hyperprior decoder (case 3): To show the effectiveness of the connections in the latent, not present in the case 2, we also investigate an architecture that is solely based on a stereo attention connection. For this case, we add three connections between the hyperprior decoders in the case 2, similar to the decoder connections. From Tab. 2 we see that, indeed, stereo attention alone is inferior in performance to our full SASIC model. In fact, the resulting model performs even worse than the simpler case 2 model. + +SASIC The SASIC model combines all improvements, i.e. Backbone + shift + stereo attention in decoder and hyperprior decoder. It is identical to the SASIC model in Fig. 4. + +# 5. Conclusion + +We have presented a new method for stereo image compression nicknamed SASIC. The method extends a general single image compression backbone model by two additions: a global shift and subtraction in the latent domain so that only the residual is encoded for the right image, and stereo attention modules in the decoder to account for finer local displacements between images. We have shown in the ablation study that the two proposed extensions in combination make a greater positive impact on the compression performance than individually. The resulting model is very lightweight, fast to train and during encoding and decoding, and yet outperforms the existing state-of-the-art in learned + +
MethodCityscapes +BD-RateBD-PSNR
SASIC-23.421.05
BB + Shift-14.580.67
BB + SA in D-19.700.80
BB + SA in D and HD-17.780.73
MethodInStereo2K +BD-RateBD-PSNR
SASIC-11.280.38
BB + Shift-2.280.07
BB + SA in D-10.60.31
BB + SA in D and HD-8.970.28
+ +Table 2. Comparison of BD-Rate (lower is better) and BD-PSNR (higher is better) between the backbone model an each of the cases. + +stereo image compression. Comparison to traditional methods shows that these perform slightly better at low bitrates; at mid to high bitrates, the proposed method is on par or superior and is much faster at encoding. The experimental results further show that the performance gains due to stereo handling diminish for higher bitrates. This is understandable, yet apparently not unavoidable, as the comparison with traditional compression shows, so there remains room for improvement in future work. Our model code is publicly available3. + +# 6. Acknowledgement + +This project has received funding from the European Union's Horizon 2020 research and innovation program under grant agreement No 965502. We thank Christian Besenbruch and the Deep Render team for valuable discussions. + +# References + +[1] Eirikur Agustsson, Michael Tschannen, Fabian Mentzer, Radu Timofte, and Luc Van Gool. Generative adversarial networks for extreme learned image compression. In + +Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 221-231, 2019. 2 +[2] Sharon Ayzik and Shai Avidan. Deep image compression using decoder side information. In European Conference on Computer Vision, pages 699-714. Springer, 2020. 3 +[3] Johannes Balle, Valero Laparra, and Eero P. Simoncelli. Density modeling of images using a generalized normalization transformation. CoRR, abs/1511.06281, 2016. 2 +[4] Johannes Balle, Valero Laparra, and Eero P Simoncelli. End-to-end optimized image compression. In 5th International Conference on Learning Representations, ICLR 2017, 2017. 2, 3 +[5] Johannes Balle, David Minnen, Saurabh Singh, Sung Jin Hwang, and Nick Johnston. Variational image compression with a scale hyperprior. In International Conference on Learning Representations, 2018. 2, 5 +[6] Wei Bao, Wei Wang, Yuhua Xu, Yulan Guo, Siyu Hong, and Xiaohu Zhang. Instereo2k: a large real dataset for stereo matching in indoor scenes. Science China Information Sciences, 63(11):1-11, 2020. 5, 6 +[7] Fabrice Bellard. BPG Image format. https://bellard.org/bpg. Accessed: 2021-09-24. 2, 6 +[8] Gisle Bjontegaard. Calculation of average psnr differences between rd-curves. VCEG-M33, 2001. 7 +[9] Benjamin Bross, Ye-Kui Wang, Yan Ye, Shan Liu, Jianle Chen, Gary J. Sullivan, and Jens-Rainer Ohm. Overview of the Versatile Video Coding (VVC) standard and its applications. IEEE Transactions on Circuits and Systems for Video Technology, pages 1-1, 2021. 2 +[10] Tong Chen, Haojie Liu, Zhan Ma, Qiu Shen, Xun Cao, and Yao Wang. End-to-end learnt image compression via non-local attention optimization and improved context modeling. IEEE Transactions on Image Processing, 30:3179-3191, 2021. 2 +[11] Zhengxue Cheng, Heming Sun, Masaru Takeuchi, and Jiro Katto. Learned image compression with discretized gaussian mixture likelihoods and attention modules. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7936-7945, 2020. 2 +[12] 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, pages 3213-3223, 2016. 5 +[13] Xin Deng, Wenzhe Yang, Ren Yang, Mai Xu, Enpeng Liu, Qianhan Feng, and Radu Timofte. Deep homography for efficient stereo image compression. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 1492-1501, June 2021. 1, 3, 6 +[14] 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. 2 + +[15] Zongyu Guo, Zhizheng Zhang, Runsen Feng, and Zhibo Chen. Causal contextual prediction for learned image compression. IEEE Transactions on Circuits and Systems for Video Technology, pages 1-1, 2021. 2 +[16] 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 +[17] Yueyu Hu, Wenhan Yang, Zhan Ma, and Jiaying Liu. Learning end-to-end lossy image compression: A benchmark. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 1-1, 2021. 2 +[18] Zihao Huang, Zhe Sun, Feng Duan, Andrzej Cichocki, Peiying Ruan, and Chao Li. L3c-stereo: Lossless compression for stereo images. arXiv preprint arXiv:2108.09422, 2021. 3 +[19] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[20] Mu Li, Wangmeng Zuo, Shuhang Gu, Jane You, and David Zhang. Learning content-weighted deep image compression. IEEE Transactions on Pattern Analysis and Machine Intelligence, 43(10):3446-3461, 2021. 2 +[21] Jerry Liu, Shenlong Wang, and R. Urtasun. Dsic: Deep stereo image compression. 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pages 3136-3145, 2019. 1, 3, 6 +[22] Fabian Mentzer, E. Agustsson, M. Tschannen, R. Timofte, and L. Gool. Conditional probability models for deep image compression. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4394-4402, 2018. 2 +[23] Fabian Mentzer, George D Toderici, Michael Tschannen, and Eirikur Agustsson. High-fidelity generative image compression. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 11913-11924. Curran Associates, Inc., 2020. 2 +[24] Philipp Merkle, Karsten Muller, Aljoscha Smolic, and Thomas Wiegand. Efficient compression of multi-view video exploiting inter-view dependencies based on h. 264/mpeg4-avc. In 2006 IEEE International Conference on Multimedia and Expo, pages 1717-1720. IEEE, 2006. 2, 6 +[25] David Minnen, Johannes Balle, and George D Toderici. Joint autoregressive and hierarchical priors for learned image compression. Advances in Neural Information Processing Systems, 31:10771-10780, 2018. 2 +[26] David Minnen and Saurabh Singh. Channel-wise autoregressive entropy models for learned image compression. In 2020 IEEE International Conference on Image Processing (ICIP), pages 3339-3343, 2020. 2 +[27] Nitish Mital, Ezgi Ozyilkan, Ali Garjani, and Deniz Gunduz. Neural distributed image compression using common information, 2021. 3 +[28] Ken M. Nakanishi, Shin-ichi Maeda, Takeru Miyato, and Daisuke Okanohara. Neural multi-scale image compression. In C.V. Jawahar, Hongdong Li, Greg Mori, and Konrad Schindler, editors, Computer Vision – ACCV 2018, pages 718–732, Cham, 2019. Springer International Publishing. 2 + +[29] Shi Pan, Chris Finlay, Chri Besenbruch, and William Knottenbelt. Three gaps for quantisation in learned image compression. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 720-726, 2021. 3 +[30] Prajit Ramachandran, Niki Parmar, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jonathon Shlens. Standalone self-attention in vision models. arXiv preprint arXiv:1906.05909, 2019. 2 +[31] A. Skodras, C. Christopoulos, and T. Ebrahimi. The JPEG 2000 still image compression standard. IEEE Signal Processing Magazine, 18(5):36-58, 2001. 2 +[32] Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, and Thomas Wiegand. Overview of the High Efficiency Video Coding (HEVC) standard. IEEE Transactions on Circuits and Systems for Video Technology, 22(12):1649-1668, 2012. 2, 6 +[33] G. Toderici, Sean M. O'Malley, S. J. Hwang, Damien Vincent, David C. Minnen, S. Baluja, Michele Covell, and R. Sukthankar. Variable rate image compression with recurrent neural networks. CoRR, abs/1511.06085, 2016. 2 +[34] Michael Tschannen, Eirikur Agustsson, and Mario Lucic. Deep generative models for distribution-preserving lossy compression. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. 2 +[35] 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 +[36] G.K. Wallace. The JPEG still picture compression standard. IEEE Transactions on Consumer Electronics, 38(1):xviii-xxxiv, 1992. 2 +[37] Longguang Wang, Yingqian Wang, Zhengfa Liang, Zaiping Lin, Jungang Yang, Wei An, and Yulan Guo. Learning parallax attention for stereo image super-resolution. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 12242-12251, 2019. 2 +[38] Jan Xu, Alexander Lytchier, Ciro Cursio, Dimitrios Kollias, Christian Besenbruch, and Arsalan Zafar. Efficient context-aware lossy image compression. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 130-131, 2020. 1, 3 +[39] Yibo Yang, Robert Bamler, and Stephan Mandt. Improving inference for neural image compression. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 573-584. Curran Associates, Inc., 2020. 2 +[40] Xinyi Ying, Yingqian Wang, Longguang Wang, Weidong Sheng, Wei An, and Yulan Guo. A stereo attention module for stereo image super-resolution. IEEE Signal Processing Letters, 27:496-500, 2020. 2, 3, 5 \ No newline at end of file diff --git a/sasicstereoimagecompressionwithlatentshiftsandstereoattention/images.zip b/sasicstereoimagecompressionwithlatentshiftsandstereoattention/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..45d0b516dd15559fb33d0bd1ac12f1980ed8a03a --- /dev/null +++ b/sasicstereoimagecompressionwithlatentshiftsandstereoattention/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c3a754e577984d03377db8bb0f1a13ba1298b3a87e3d12276101288658e14ce +size 468521 diff --git a/sasicstereoimagecompressionwithlatentshiftsandstereoattention/layout.json b/sasicstereoimagecompressionwithlatentshiftsandstereoattention/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..b96fcbc701605d60484cb415ae00286370d2ac67 --- /dev/null +++ b/sasicstereoimagecompressionwithlatentshiftsandstereoattention/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70378ef8fb9af0c92848800f72e516c540c77ff9531fa0feb1e5919fa778bcda +size 371461 diff --git a/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/017d96fd-ed4a-45aa-be34-d268f83807e7_content_list.json b/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/017d96fd-ed4a-45aa-be34-d268f83807e7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..42db81dcbd7449a504bac1f5a758f49b1af9e7fe --- /dev/null +++ b/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/017d96fd-ed4a-45aa-be34-d268f83807e7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f3c81109162a6e02e6c059909acf7f7d5317172f8b675fbcba67b0c52e2a932 +size 90852 diff --git a/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/017d96fd-ed4a-45aa-be34-d268f83807e7_model.json b/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/017d96fd-ed4a-45aa-be34-d268f83807e7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..051b1369f1fabfe78ec129c233e4b7e5bbcda368 --- /dev/null +++ b/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/017d96fd-ed4a-45aa-be34-d268f83807e7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8df65e5fdf367757e6602e01c1f80357d3851c46468774bdf85738f9c2bad124 +size 112646 diff --git a/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/017d96fd-ed4a-45aa-be34-d268f83807e7_origin.pdf b/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/017d96fd-ed4a-45aa-be34-d268f83807e7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c0250b63e164f269077ef9cabbd79b81080a763a --- /dev/null +++ b/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/017d96fd-ed4a-45aa-be34-d268f83807e7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60806d39fbf41e33723e0946b3bf247ae547564d7078036df58f78bff0001026 +size 1318633 diff --git a/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/full.md b/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/full.md new file mode 100644 index 0000000000000000000000000000000000000000..62c34b964e3136d6385a0b8b4776bacc67aaadb0 --- /dev/null +++ b/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/full.md @@ -0,0 +1,341 @@ +# SC²-PCR: A Second Order Spatial Compatibility for Efficient and Robust Point Cloud Registration + +Zhi Chen + +Kun Sun + +Fan Yang + +Wenbing Tao $^{1*}$ + +$^{1}$ National Key Laboratory of Science and Technology on Multi-spectral Information Processing, School of Artificial Intelligence and Automation, Huazhong University of Science and Technology, China $^{2}$ Hubei Key Laboratory of Intelligent Geo-Information Processing, School of Computer Science, China University of Geosciences, China {z_chen, fanyang, wenbingtao}@hust.edu.cn; sunkun@cug.edu.cn + +# Abstract + +In this paper, we present a second order spatial compatibility $(SC^2)$ measure based method for efficient and robust point cloud registration (PCR), called $SC^2$ -PCR1. Firstly, we propose a second order spatial compatibility $(SC^2)$ measure to compute the similarity between correspondences. It considers the global compatibility instead of local consistency, allowing for more distinctive clustering between inliers and outliers at early stage. Based on this measure, our registration pipeline employs a global spectral technique to find some reliable seeds from the initial correspondences. Then we design a two-stage strategy to expand each seed to a consensus set based on the $SC^2$ measure matrix. Finally, we feed each consensus set to a weighted SVD algorithm to generate a candidate rigid transformation and select the best model as the final result. Our method can guarantee to find a certain number of outlier-free consensus sets using fewer samplings, making the model estimation more efficient and robust. In addition, the proposed $SC^2$ measure is general and can be easily plugged into deep learning based frameworks. Extensive experiments are carried out to investigate the performance of our method. + +# 1. Introduction + +The alignment of two 3D scans of the same scene, known as Point Cloud Registration(PCR), plays an important role in areas such as Simultaneous Localization and Mapping (SLAM) [7, 24, 40], augmented reality [4, 11] and robotic applications [34]. A canonical solution first establishes feature correspondences and then estimates the 3D rotation + +![](images/ee1d0948d83998304839975b73f1edd32911f85c1527a311ff5408fbe22de2f0.jpg) + +![](images/cf117defa4c050002929dd840f5de2845bd40ccde8440ff860aa44180e96d2c1.jpg) +Figure 1. (a): A toy example in which red and green line segments represent outliers and inliers, respectively. (b): The first order compatibility matrix of (a). As highlighted by yellow, the outliers have very high compatibility scores with some inliers. (c): A binarized compatibility matrix of (b) after thresholding. (d): The proposed second order compatibility matrix of (a). By contrast, the values in the rows and columns of the outliers are small. + +![](images/8377422137664c14c1404caeac5b320331f8480f809956a43240ff6559c392c6.jpg) + +![](images/0b3fc4ebbe4f7d2b5e24ec7ec338f513a1a005b38a4baea6c1f3012d89095d6c.jpg) + +and translation that can best align the shared parts. However, due to challenges such as partial overlap or feature ambiguity, model estimation is prone to outliers in the correspondences, leading to inaccurate or wrong alignment. + +RANSAC [25] pioneers the iterative sampling strategy for model estimation. However, it needs more time to converge or sometimes there is no guarantee of an accurate solution due to massive outliers. Spatial Compatibility (SC) [5,35,45,57] is a widely used similarity measure for boosting the robustness and efficiency of the rigid transformation estimation. It assumes that two correspondences will have higher score if the difference of spatial distance between them, e.g. $|d_{12} - d_{12}^{\prime}|$ or $|d_{16} - d_{16}^{\prime}|$ in Fig. 1(a), is minor. + +Thus, sampling from compatible correspondences increases the probability of getting inliers. However, such kind of first order metric still suffers from outliers due to locality and ambiguity. Fig. 1(b) is the spatial compatibility matrix of the correspondences in Fig. 1(a). As we can see from the yellow cells, $c_{6}$ and $c_{7}$ are outliers but they show high compatibility scores with some inliers by chance. As a result, the outliers would be inevitably involved in the model estimation process, leading to performance deterioration. + +In this paper, we propose a new global measure of the similarity between two correspondences. Specifically, we first binarize the spatial compatibility matrix into the hard form, as shown in Fig. 1 (c). Then, for two correspondences which are compatible, we compute the number of their commonly compatible correspondences in the global set. That is, we compute the number of correspondences that are simultaneously compatible with both of them as the new similarity between them. The globally common compatibility is set to 0 for any two incompatible correspondences. Therefore, the similarity of two inliers is at least the number of inliers excluding themselves among all the correspondences. However, the outliers do not have such good properties. A toy example is shown in Fig. 1. There are five inliers $\{\mathrm{c}1,\mathrm{c}2,\mathrm{c}3,\mathrm{c}4,\mathrm{c}5\}$ and two outliers $\{\mathrm{c}6,\mathrm{c}7\}$ in Fig. 1 (a). From Fig. 1 (b) and Fig. 1 (c), we can see that the outliers $c_{6}$ and $c_{7}$ are compatible with some inliers, and the inliers are compatible with each other. But from Fig. 1 (d), we can see that the similarities between any two inliers are large while the similarities between the outliers with the other correspondences are small. To be specific, in Fig. 1 (d), the similarities within the inliers $\{\mathrm{c}1,\mathrm{c}2,\mathrm{c}3,\mathrm{c}4,\mathrm{c}5\}$ are no less than 3, while the similarities related with the outliers $\{\mathrm{c}6,\mathrm{c}7\}$ are no more than 1. Therefore, the global compatibility matrix in Fig. 1 (d) can better distinguish inliers from outliers. Since the new measure can be expressed as the matrix product of the traditional first order metric (See Eq. 8), we name it as the second order spatial compatibility $(\mathrm{SC}^2)$ . + +The proposed second order spatial compatibility measure $\mathrm{SC^2}$ has several advantages. 1) The inliers are much easier distinguished from the outliers. Suppose we have $m$ inliers in $n$ correspondences. The scores between any two inliers would be no less than $m - 2$ . However, its difficult for an outlier to be simultaneously compatible with multiple correspondences and the score for it will be much smaller. 2) The traditional algorithms such as RANSAC and its variants [21, 25, 42, 53] need a large number of randomly samplings to find an outlier-free set for robust model estimation. However, based on the proposed $\mathrm{SC^2}$ matrix, for each row vector corresponding to an inlier, we can easily find an outlier-free set by selecting the top $k$ correspondences with the highest scores. In this way, the $m$ valid samplings can be obtained by traversing all the $n$ rows of the $\mathrm{SC^2}$ matrix. Therefore, we can ensure $m$ reliable model estimations by + +only $n$ samplings, which makes the model estimation more efficient and robust. 3) We theoretically prove that the $\mathrm{SC}^2$ matrix significantly reduces the probability of wrong sampling from a probabilistic view. We define an error event, in which the score between two inliers is smaller than that between an inlier and an outlier. By computing the probability distributions of this event for both the traditional first order metric and our second order metric, the $\mathrm{SC}^2$ matrix is much more robust to obtain reliable sampling (see Fig. 3). + +Based on the $\mathrm{SC^2}$ measure, we design a full pipeline for point cloud registration, called $\mathrm{SC^2}$ -PCR. Following [5, 14, 50], it first selects several seeds that are likely to be inliers. Then we select a consensus set for each seed by finding those having the highest $\mathrm{SC^2}$ scores with it. In order to further exclude outliers, a two-stage sampling strategy is carried out in a coarse-to-fine manner. Finally, we use the weighted SVD to estimate a tentative model for each seed and select the best one as the final output. In a nutshell, this paper distinguishes itself from existing methods in the following aspects. + +- A second order spatial compatibility metric called $\mathrm{SC^2}$ is proposed. We theoretically prove that $\mathrm{SC^2}$ significantly reduces the probability of an outlier being involved in the consensus set. Since the proposed method encodes richer information beyond the first order metric, it enhances the robustness against outliers. +- Compared with state-of-the-art deep learning methods such as [5, 19, 35, 43], our method is a light weighted solution that does not need training. It shows no bias across different datasets and generalizes well on various scenarios, which is also shown in the experiments. +- The proposed method is general. Although we implement it in a handcrafted fashion, it could be easily plugged into other deep learning frameworks such as PointDSC [5]. We show in the experiment that PointDSC produces better results when combined with our method. + +# 2. Related Work + +3D Feature Matching. The widely used Iterative Closest Point [10] and its variants [12, 46, 49] establish correspondences by searching the nearest neighbor in coordinate space. Instead of using the distance in coordinate space, local feature descriptors aim to build 3D matches in feature space. Hand-crafted descriptors represent local feature by encoding spatial distribution histogram [26, 28, 31, 52], geometric histogram [15, 47, 48] or other attributes [61]. Recently, the deep learning techniques are also introduced to learn 3D local descriptors. The pioneering 3DMatch [62] builds a Siamese Network for extracting local descriptors. A number of recent networks try to boost the performance by designing rotation invariant modules [1, 22, 23, 58], fully + +convolution modules [20], feature detection modules [6,59], coarse-to-fine modules [44, 60] and overlapping learning modules [29, 55]. Although these methods achieve remarkable performance improvement, it can hardly establish a totally outlier-free correspondence set. + +Traditional Model Fitting. The model fitting methods estimate the geometric model from a noise correspondence set. The classic RANSAC [25] provides the most commonly adopted generation-and-verification pipeline for robust removing outliers. Many of its variants [21, 42, 53] introduce new sampling strategies and local optimization [21] to accelerate the estimation or boost the robustness. More recently, Graph-cut RANSAC [8] introduces the graphcut technique to better performing local optimization. Magsac [9] proposes a $\sigma$ -consensus to build a threshold-free method for RANSAC. For specific 3D model-fitting, FGR [66] uses the Geman-McClure cost function and estimates the model through graduated non-convexity optimization. TEASER [56] reformulates the registration problem using a Truncated Least Squares (TLS) cost and solving it by a general graph-theoretic framework. + +Learning based Model Fitting. Recent works also adopt deep learning techniques, which were first studied in 2D matching area, to model fitting tasks. The 2D correspondence selection network CN-Net [41] and its variants [13,16,17,37,51,63-65] formulate the model fitting as a combination of a correspondence classification module and a model estimation module. Recent attempts [5,18,19,35,43] also introduce deep learning network for 3D correspondence pruning. 3DRegNet [43] reformulates the CN-Net [41] into 3D form and designs a regression module to solve rigid transformaton. DGR [19] introduces the fully convolution to better capture global context. PointDSC [5] develops a spatial consistency based non-local module and a Neural Spectral matching to accelerate the model generation and selection. DetarNet [18] presents decoupling solutions for translation and rotation. DHVR [35] exploits the deep hough voting to identify the consensus from the Hough space, so as to predict the final transformation. + +# 3. Method + +# 3.1. Problem Formulation + +Given two point clouds to be aligned: source point cloud $X = \{x_{i} \in \mathbb{R}^{3} \mid i = 1, \dots, N_{x}\}$ and target point cloud $Y = \{y_{j} \in \mathbb{R}^{3} \mid j = 1, \dots, N_{y}\}$ , we first extract local features for both of them. Then, for each point in the source point cloud, we find its nearest neighbor in the feature space among the target points to form $N$ pairs of putative correspondences. The proposed method estimates the rigid transformation between the two point clouds, i.e., the rotation matrices $(R \in \mathbb{R}^{3 \times 3})$ and translation vectors $(t \in \mathbb{R}^{3})$ . The pipeline of proposed method is shown in Fig. 2. + +# 3.2. Second Order Spatial Compatibility + +To analyze the effectiveness of a metric for sampling, we first define the probability of an ambiguity event as: + +$$ +\mathrm {P} _ {a m} (M) = \mathrm {P} \left(M _ {i n, o u t} > M _ {i n, i n}\right), \tag {1} +$$ + +where $M$ is a specific metric for measuring correspondence-wise similarity. $\mathrm{P}(\mathrm{Z})$ is the probability of an event $\mathrm{Z}$ (For convenience we use this notation in the following part). $M_{in,out}$ is the similarity between an inlier and an outlier, while $M_{in,in}$ is that between two inliers. When $M_{in,out} > M_{in,in}$ , outlier is the near neighbor of inlier, so the metric based sampling tends to fail. So the lower this probability is, the more robust the metric based sampling will be. + +We first introduce the commonly used first order spatial compatibility (SC) measure [5,35,36,45]. The SC measure between correspondence $i$ and $j$ is defined as follows: + +$$ +S C _ {i j} = \phi \left(d _ {i j}\right), d _ {i j} = \left| d \left(x _ {i}, x _ {j}\right) - d \left(y _ {i}, y _ {j}\right) \right| \tag {2} +$$ + +in which $(x_{i},y_{i})$ and $(x_{j},y_{j})$ are the matched points of correspondences $i$ and $j$ . $\phi (\cdot)$ is a monotonically decreasing kernel function. $d(\cdot ,\cdot)$ is the Euclidean distance. As shown in Fig. 1, the distance difference between two inliers $d_{in,in}$ should be equal to 0 due to the length consistency of rigid transformation. However, because of the noise introduced by data acquisition and point cloud downsampling, $d_{in,in}$ is not exactly equal to 0, but less than a threshold $d_{thr}$ . For convenience, we assume $d_{in,in}$ is uniformly distributed over $d_{thr}$ and get the probability density function (PDF) of the distance difference between two inliers as follows: + +$$ +\operatorname {P D F} _ {i n, i n} (l) = 1 / d _ {t h r}, 0 \leq l \leq d _ {t h r}. \tag {3} +$$ + +Differently, there is no related constraint between two outliers or an inlier and an outlier due to the random distribution of outliers. We consider the distance difference between two unrelated points to be identically distributed and assume the probability density function (PDF) as $F(\cdot)$ : + +$$ +\operatorname {P D F} _ {i n, o u t} (l) = F (l), \operatorname {P D F} _ {o u t, o u t} (l) = F (l); 0 \leq l \leq d _ {r} \tag {4} +$$ + +where $d_r$ is the range of $d_{in,out}$ and $d_{out,out}$ . An empirical $F$ function on 3DMatch dataset is presented in Fig 3 (a). Obviously, $d_r$ is much greater than $d_{thr}$ . So we can approximate that $F(l)$ is a constant within $(0, d_{thr})$ as follows: + +$$ +F (l) = f _ {0}, 0 \leq l \leq d _ {t h r}. \tag {5} +$$ + +Next, we consider the ambiguity probability of $SC$ as Eq. (1), i.e., $\mathrm{P}(SC_{in,out} > SC_{in,in})$ . According to Eq. (2), (3), (4) and (5), it can be computed as follows: + +$$ +\begin{array}{l} \mathrm {P} \left(S C _ {i n, o u t} > S C _ {i n, i n}\right) = \mathrm {P} \left(d _ {i n, o u t} < d _ {i n, i n}\right) \\ = \int_ {0} ^ {d _ {t h r}} \int_ {0} ^ {l} \mathrm {P D F} _ {i n, i n} (l) \cdot \mathrm {P D F} _ {i n, o u t} (x) d x d l. \tag {6} \\ = \int_ {0} ^ {d _ {t h r}} \int_ {0} ^ {l} \frac {1}{d _ {t h r}} \cdot f _ {0} d x d l = \frac {d _ {t h r} \cdot f _ {0}}{2} \\ \end{array} +$$ + +![](images/f739357a7f596cd1a811ea0ed7e831aeb35c4f0cbcfc598aa661ad26b1f18b6c.jpg) +Figure 2. Pipeline of our method. 1. Computing correspondence-wise second order spatial compatibility measure. 2. Selecting some reliable correspondences as seeds. 3. Performing the two-stage sampling around each seed. 4. Performing local spectral matching to generate an estimation of $R$ and $t$ for each seed. 5. Selecting the best estimation as final result. + +Taking the 3DMatch [62] dataset as an example. Following [5], we set $d_{thr} = 10\mathrm{cm}$ , then the ambiguity probability of $SC$ measure is about 0.1 as shown in Fig. 3 (a). Considering the amount of outliers might be large, the number of mistakes is not negligible even at this probability. + +Next, we describe the proposed second order spatial compatibility measure $(SC^2\in \mathbb{R}^{N\times N})$ . Specifically, we first build a hard compatibility matrix $C$ ( $C\in \mathbb{R}^{N\times N}$ ): + +$$ +C _ {i j} = \left\{ \begin{array}{l} 1; d _ {i j} \leq d _ {t h r}, \\ 0; d _ {i j} > d _ {t h r}. \end{array} \right. \tag {7} +$$ + +$C$ considers that two correspondences satisfying length consistency are compatible ( $C_{i,j}$ is set to 0 when $i = j$ ). Then, $SC_{ij}^2$ counts the number of common compatibility correspondences of $i$ and $j$ when they are compatible, as follows: + +$$ +S C _ {i j} ^ {2} = C _ {i j} \cdot \sum_ {k = 1} ^ {N} C _ {i k} \cdot C _ {k j}. \tag {8} +$$ + +Similarly, we analyze the ambiguity probability of this measure, i.e., $\mathrm{P}(SC_{in,out}^2 > SC_{in,in}^2)$ . Suppose there are $N$ pairs of correspondences and the inlier ratio is $\alpha$ . Then, we can prove that $\mathrm{P}(SC_{in,out}^2 > SC_{in,in}^2)$ can be expressed as (The derivation is presented in the supplement materials): + +$$ +\begin{array}{l} \mathrm {P} \left(S C _ {i n, o u t} ^ {2} > S C _ {i n, i n} ^ {2}\right) = p \cdot \mathrm {P} (X > (N \cdot \alpha - 2)), \\ X \sim S ((N \alpha - 1) p + (N (1 - \alpha) - 1) p ^ {2}, N (1 - \alpha) p ^ {2}), \\ p = d _ {t h r} \cdot f _ {0}, \tag {9} \\ \end{array} +$$ + +where $S(\cdot, \cdot)$ is the Skellam distribution [30, 32, 33]. According to the properties of Skellam distribution, the value of $\mathrm{P}(SC_{in,out}^2 > SC_{in,in}^2)$ is going to approach 0 very quickly as $\alpha$ increases. In order to make a clearer comparison between the proposed $\mathrm{SC}^2$ measure and SC measure, we plot the curves of ambiguity probability for both of them according to Eq. (6) and (9). As shown in Fig. 3 (b), the ambiguity probability of the proposed $\mathrm{SC}^2$ measure is significantly lower than the SC measure, even when the inlier rate is close to 0. It shows that using $\mathrm{SC}^2$ measure as guidance for sampling is easier to obtain an outlier-free set. When the inliers rate reaches 1%, the ambiguity probability of $\mathrm{SC}^2$ measure is close to 0, which ensures a robust sampling anti the data with low inlier rate. + +![](images/80a1017c37df7d629a51008e02139082c75fc4c1eca211a371215be39d307cfd.jpg) +(a) Empirical $F$ function +Figure 3. (a) The empirical probability density function $(F)$ of $d_{in,out}$ and $d_{out,out}$ . (b) The ambiguity probability. SC is spatial compatibility measure. $\mathrm{SC}^2 - N$ ( $N = 5000, 2500, 1000$ ) is the second order spatial compatibility measure with $N$ correspondences. + +![](images/9140c8ef35729d58c4f7a6e932c52ca35d3e1f83b767b1f5bdf48748f4b94a85.jpg) +(b) ambiguity probability + +# 3.3. Reliable Seed Selection + +As mentioned above, there are high similarities between inlier correspondences by the proposed $\mathrm{SC^2}$ measure. Then, as long as we find an inlier correspondence, we can construct a consensus set by finding its $k$ nearest neighbors in the metric space. Obviously, traversing all the correspondences must find an inlier, but it is not necessary. We only need to pick some reliable points called seed points to accelerate the registration process. We perform spectral matching technique [36] to select seed points. Specifically, we first build the similarity matrix for all of the correspondences and normalize the value in the matrix to 0-1, following [36]. Then, following [5, 36], the association of each correspondence with the leading eigen-vector is adopted as the confidence for this correspondence. The leading eigen-vetctor is solved by power iteration algorithm [39]. In order to ensure an even distribution of seed points, the correspondences with local maximum confidence score within its neighborhood with radius $R$ are selected. The number of seed points $(N_{s})$ is determined by a proportion of the number of whole correspondences. + +# 3.4. Two-stage Consensus Set Sampling + +As some seed points are selected, we extend each of them into a consensus set. We adopt a two stage selection strategy to perform a coarse-to-fine sampling. In the first stage, we select $K_{1}$ correspondences for each seed by + +finding its top- $K_{1}$ neighbors in the $\mathrm{SC^2}$ measure space. As mentioned before, the ambiguity probability $\mathrm{P}(SC_{in,out}^{2} > SC_{in,in}^{2})$ is very small. Thus, when a seed is an inlier correspondences, the consensus set also mainly contains inliers. Meanwhile, the similarity expressed by $\mathrm{SC^2}$ measure focuses on global information instead of local consistency. Therefore, the neighbors selected in the $\mathrm{SC^2}$ measure space are distributed more evenly rather than clustered together, which benefits the estimation of rigid transformation [5]. + +The second stage sampling operation is adopted to further filter potential outliers in the set obtained in the first stage. The $\mathrm{SC^2}$ matrices are reconstructed within each set produced by the first stage instead of the whole set. We select top- $K_{2}$ ( $K_{2} < K_{1}$ ) correspondences of the seed by the newly constructed local $\mathrm{SC^2}$ matrices. As shown in Fig. 3 (b), since the higher inlier rate ensures a lower ambiguity probability, so that the potential outliers can also be further pruned. Note that we only discussed the case that the seed point is inlier. In fact, when the seed point is an outlier, it can also form a local consistency, especially when there are aggregated false matching in the correspondence set. We encourage these sets to also generate hypothesis and filter them at the final hypothesis selection step (Section 3.6) rather than at the early stage. In this way, we can avoid some correct assumptions being filtered out early. + +# 3.5. Local Spectral Matching + +In this step, we perform the weighted SVD [3] on the consensus set to generate an estimation of rigid transformation for each seed. Although the previous proposed sampling strategy can obtain outlier-free correspondence set, we find that the weighted SVD achieves better performance than treating all correspondences equally. This may be because the inliers still have different degree of noises. So correspondences with bigger noise should have smaller weights when estimating rigid transformation. Traditional spectral matching [36] method analyzes the SC matrix to assign weight for each correspondence, which is effected by ambiguity problem [5]. Since the proposed $\mathrm{SC^2}$ measure is more robust against ambiguity, we also replace the SC matrix with $\mathrm{SC^2}$ measure. In order to facilitate matrix analysis, we convert the $\mathrm{SC^2}$ measure into soft form $(\tilde{S C}^{2})$ as follows: + +$$ +S \tilde {C} ^ {2} = \tilde {C} \cdot (\tilde {C} \times \tilde {C}), +$$ + +$$ +\tilde {C} _ {i j} = \operatorname {R e L U} \left(1 - d _ {i j} ^ {2} / d _ {t h r} ^ {2}\right), (1 \leq i \leq K _ {2}, 1 \leq j \leq K _ {2}) \tag {10} +$$ + +where $\cdot$ is Hadamard product and $\times$ is matrix product. Then we conduct local spectral decomposition on $S\tilde{C}^2$ to obtain a weight $w_{i}$ for correspondences $i$ . Finally, the rotation $R_{k}$ and translation $t_k$ of seed $k$ are computed by performing weighted SVD [19] within its consensus set. + +# 3.6. Hypothesis Selection + +In final step, we select the best estimation over the rigid transformations produced by all the consensus sets. We use the same criteria as RANSAC [25], i.e. inlier count, to select the final estimation. Specifically, for the estimation of $k$ -th seed $R_{k}$ and $t_k$ , we count the number of correspondences that satisfy the constraints of $R_{k}$ and $t_k$ by a predefined error threshold $(\tau)$ as follows: + +$$ +\operatorname {c o u n t} _ {k} = \sum_ {i = 1} ^ {N} [ \| R _ {k} x _ {i} + t _ {k} \| < \tau ], \tag {11} +$$ + +where $[\cdot ]$ is Iverson bracket. The $R_{k}$ and $t_k$ with the highest inlier count are selected as the final results. + +# 4. Experiment + +# 4.1. Datasets and Experimental Setup + +Indoor scenes. We use the 3DMatch benchmark [62] for evaluating the performance on indoor scenes. For each pair of point clouds, we first use $5\mathrm{cm}$ voxel grid to downsample the point cloud. Then we extract the local feature descriptors and match them to form the putative correspondences. Following [5], we use FPFH [47] (handcrafted descriptor) and FCGF [20] (learned descriptor) as feature descriptors respectively. The partial overlapping registration benchmark 3DLoMatch [29] is also adopted to further verify the performance of the method. Following [5,35], we use FCGF [20] and Predator [29] descriptors to generate putative correspondences. + +Outdoor scenes. We use the KITTI dataset [27] for testing the effectiveness on outdoor scenes. Following [19, 20], we choose the 8 to 10 scenes, obtaining 555 pairs of point clouds for testing. Then we construct $30\mathrm{cm}$ voxel grid to down-sampling the point cloud and form the correspondences by FPFH and FCGF descriptors respectively. + +Evaluation Criteria. Following [5], we first report the registration recall (RR) under an error threshold. For the indoor scenes, the threshold is set to $(15^{\circ}, 30\mathrm{cm})$ , while the threshold of outdoor scenes is $(5^{\circ}, 60\mathrm{cm})$ . For a pair of point clouds, we calculate the errors of translation and rotation estimation separately. We compute the isotropic rotation error (RE) [38] and L2 translation error (TE) [19]. Following [5], we also report the outlier removal results using following three evaluation criteria: inlier precision (IP), inlier recall (IP) and F1-measure (F1). + +Implementation Details. When computing the $\mathrm{SC^2}$ matrix, the $d_{thr}$ is set to the twice as the voxel size for down-sampling (10cm for indoor scenes and 60cm for outdoor scenes). The number of seed ( $N_s$ in Section 3.3) is set to $0.2 * N$ , where $N$ is the number of correspondences. When sampling consensus set, we select 30 nearest neighbors ( $K_1 = 30$ ) of seed point at first sampling stage, and remain 20 + +
FPFH (traditional descriptor)FCGF (learning based descriptor)Time(s)
RR(%)↑RE(○↓)TE(cm↓)IP(%)↑IR(%)↑F1(%)↑RR(%)↑RE(○↓)TE(cm↓)IP(%)↑IR(%)↑F1(%)↑
learningDCP* [54]3.228.4221.40---3.228.4221.40---0.07
PointNetLK* [2]1.618.0421.30---1.618.0421.30---0.12
3DRegNet [43]26.313.759.6028.218.9011.6377.762.748.1367.3456.2858.330.05
DGR [19]32.842.457.5329.5116.7821.3588.852.287.0268.5179.9273.151.53
DHVR [35]67.102.787.8460.1964.9062.1191.932.257.0880.2078.1578.983.92
DHVR-Origin [35]80.222.066.8791.402.086.610.46
PointDSC [5]77.572.036.3868.4571.5669.7592.852.086.5178.9186.2382.120.10
traditionalSM [36]55.882.948.1547.9670.6950.7086.572.297.0781.4438.3648.210.03
ICP* [10]5.797.9317.59---5.797.9317.59---0.25
FGR [66]40.914.9610.256.8438.9011.2378.932.908.4125.6353.9033.580.89
TEASER [56]75.482.487.3173.0162.6366.9385.772.738.6682.4368.0873.960.07
GC-RANSAC [8]67.652.336.8748.5569.3856.7892.052.337.1164.4693.3975.690.55
RANSAC-1M [25]64.204.0511.3563.9657.9060.1388.423.059.4277.9679.8678.550.97
RANSAC-2M [25]65.254.0711.5664.4158.3760.5190.882.718.3178.5283.5280.681.63
RANSAC-4M [25]66.103.9511.0364.2759.1061.0291.442.698.3878.8883.8881.042.86
CG-SAC [45]78.002.406.8968.0767.3267.5287.522.427.6675.3284.6179.900.27
Ours83.982.186.5672.4878.3375.1093.282.086.5578.9486.3982.200.11
+ +Table 1. Quantitative results on 3DMatch Dataset. Methods with * are correspondence-free methods. + +
FCGFPredatorTime(s)
RR(%)RE(○)TE(cm)RR(%)RE(○)TE(cm)
DHVR [35]54.414.1412.5665.414.9712.333.55
DGR [19]43.804.1710.8259.463.1910.011.48
PointDSC [5]56.093.8710.3968.893.439.600.10
FGR [66]19.995.2812.9835.994.7711.641.32
RANSAC [25]46.385.0013.1164.854.2811.042.86
CG-SAC [45]52.313.8410.5564.013.8610.940.25
Ours57.833.7710.4669.463.469.580.11
+ +Table 2. Quantitative results on 3DLoMatch Dataset. + +correspondences ( $K_{2} = 20$ ) to form the consensus set. All the experiments are conducted on a machine with an INTEL Xeon E5-2620 CPU and a single NVIDIA GTX1080Ti. + +# 4.2. Evaluation on Indoor Scenes + +We first report the results on 3DMatch dataset in Tab. 1. We compare our method with 13 baselines: DCP [54], PointNetLK [2], 3DRegNet [43], DGR [19], DHVR [35], PointDSC [5], SM [36], ICP [10], FGR [66], TEASER [56], GC-RANSAC [8], RANSAC [25], CG-SAC [45]. The first 6 methods are based on deep learning, while the last 7 methods are traditional methods. For the deep learning methods, we use the provided pre-trained model of them for testing. The results of DHVR we tested have some difference with the original results, so we also report the results in their paper (DHVR-Origin in Tab. 1). DCP, PointNetLK and ICP are correspondence-free methods, so their results are not related with the descriptor. + +Combined with FPFH. We first use the FPFH descriptor to generate the correspondences, in which the mean inlier rate is $6.84\%$ . As shown in Tab. 1, our method greatly outperforms all the methods. For the registration recall (RR), which is the most important criterion, our method improves it by about $6\%$ over the closest competitors among the retested results (PointDSC and CG-SAC). Following [5, 19], since the part of failed registration can generate a large error of translation and rotation, we only compute the mean rotation (RE) and translation error (TE) of successfully registered point cloud pairs of each method + +![](images/8f773c13a2ee2e4570849b769f935f8045bf7fc72f6d505293a00a2bf155465c.jpg) +Figure 4. Qualitative registration results on 3DLoMatch dataset. + +to avoid unreliable metrics. This strategy of measurement makes methods with high registration recall more likely to have large mean error, because they include more difficult data when calculating mean error. Nevertheless, our method still achieves competitive results on RE and TE. Our method is slightly worse than PointDSC on TE and RE, and better than other methods. For the outlier rejection results, our method achieves the highest inlier recall (IR) and F1-measure. The F1 of our method outperforms the PointDSC by $5.35\%$ . + +Combined with FCGF. To further verify the performance, we also adopt the recent FCGF descriptor to generate putative correspondences and report the registration results. The mean inlier rate of putative correspondences is $25.61\%$ . As shown in Tab. 1, since the inlier rate is higher than the correspondences obtained by FPFH descriptor, the performance of all of the feature based methods are boosted. Our method still achieves the best performance over all the methods, achieving $1.84\%$ improvement over RANSAC on registration recall. Besides, the mean registration time for a pair of point clouds are also reported. Since the proposed method only need to sample a few seed points with their consensus set rather than a large number of samples, it is competitive in terms of time-consuming. As shown in Tab. 1, the mean registration time of our methods is 0.11s, which is over $20\times$ faster than RANSAC with 4M iterations. + +Robustness to lower overlap. Furthermore, we report + +
FPFHFCGFTime(s)
RR(%)RE(○)TE(cm)RR(%)RE(○)TE(cm)
DHVR [35]---99.100.2919.800.83
DGR [19]77.121.6433.1096.900.3421.702.29
PointDSC [5]98.200.358.1398.020.3321.030.45
FGR [66]5.230.8643.8489.540.4625.723.88
RANSAC [25]74.411.5530.2080.360.7326.795.43
CG-SAC [45]74.230.7314.0283.240.5622.960.73
Ours99.640.327.2398.200.3320.950.31
+ +the results on the low-overlap scenarios: 3DLoMatch [29]. Following PointDSC [5] and DHVR [35], we adopt the FCGF [20] and Predator (There are two versions of Predator, and we use the updated one) [29] descriptors to generate correspondences. The registration recall (RR), rotation error (RE) and translation error (TE) are reported in Tab. 2. As shown by the data, whether combined with FCGF or Predator descriptor, our method achieves the highest registration recall. Meanwhile, we also present some qualitative results on 3DLoMatch dataset. As shown in Fig. 4, our method can successfully align two point clouds where the low overlap ratio is clearly visible. + +# 4.3. Evaluation on Outdoor Scenes + +In this experiments, we test on the outdoor KITTI [27] dataset. The results of DHVR [35], DGR [19], PointDSC [5], RANSAC [25], FGR [66], CG-SAC [45] are reported as comparison. DHVR, DGR and PointDSC are deep learning based methods, while the remaining methods are non-learning. As shown in Tab. 3, our method remarkably surpasses the non-learning methods. The registration recall (RR) of our method is $25.23\%$ higher than that of RANSAC when combined with FPFH descriptor, and $17.84\%$ higher when combined with FCGF descriptor. The errors of translation and rotation are also much lower than RANSAC. Our method with FPFH descriptor obtains the results of highest registration recall. For the learning networks, our method can achieve close performance with them. + +# 4.4. Generalization and Robustness + +Generalization experiments. As reported above, deep learning based methods also achieve competitive performance on the 3DMatch, 3DLoMatch and KITTI datasets. Compared with these methods based on deep learning, the other advantage of our method is that it has no bias cross different datasets, while deep learning based methods have performance degradation when generalized between different datasets. To demonstrate this, we perform the generalization experiments on both 3DMatch, 3DLoMatch and KITTI dataset. For the recent learning based methods, including DGR and PointDSC, we report the cross-dataset results. Specifically, we adopt their pre-trained model by KITTI to test on 3DMatch and 3DLoMatch and use 3DMatch's + +Table 3. Quantitative results on KITTI Dataset. (For DHVR, the authors have neither released training code nor pretraining model on KITTI dataset, so we report the results in their paper.) + +
3DMatch3DLoMatchKITTI
FPFHFCGFFCGFPredatorFPFHFCGF
DGR-gen49.4881.8923.7545.0373.6986.12
PointDSC-gen68.1287.7440.6553.7990.2792.97
Ours83.9893.2857.8369.4699.6498.20
+ +Table 4. Generalization results. The registration recall $(\%)$ on 3DMatch, 3DLoMatch and KITTI datasets are reported. + +![](images/c5754b51b73fce0834437b6b846a058a141ba385cf45439a598d0287b3627804.jpg) +Figure 5. The registration recall under the different inlier ratio of the putative correspondences. + +model to test on KITTI. As shown in Tab. 4, our method shows a significant improvement on registration recall without generalization problem. This further demonstrates the effectiveness of our method. + +Robustness Anti Noise. An important factor to measure the performance of the model fitting method is the stability under low inlier rate. In order to further verify the performance of our method, we report the results under different inlier ratio in Fig. 5. Specifically, we first use FPFH to generate initial match pairs for the 3DMatch dataset. Then, according to the inlier ratio, all the point cloud pairs are divided into 6 groups: $< 1\%$ , $1\% - 2\%$ , $2\% - 4\%$ , $4\% - 6\%$ , $6\% - 10\%$ and $>10\%$ . The number of point cloud pairs in each group is: 141, 208, 346, 252, 323 and 353. As shown in Fig. 5, when the inlier rate is less than $2\%$ , our method is significantly better than other methods. It demonstrates the robustness anti noise of our method. + +# 4.5. Combined with learning network + +To verify the flexibility of our proposed approach, we combine our approach with a recent deep learning approach PointDSC [5]. It adopts the spatial consistency matrix to guide the non-local module. Since the proposed $\mathrm{SC^2}$ measure is more robust to the ambiguity, we replace the spatial consistency matrix in PointDSC with $\mathrm{SC^2}$ . Instead of retraining the network, we directly plugged our metrics into it. The registration recall of their vanilla version and combined version are shown in Tab. 5. It can be seen that adding our metrics can significantly boost the performance of network, especially for the generalization performance of network. It demonstrates that the proposed measure is flexible to combine with other methods. + +
3DMatch3DLoMatchKITTI
FPFHFCGFFCGFPredatorFPFHFCGF
PointDSC77.5792.8556.0968.8998.2098.02
PointDSC+SC283.2493.1057.0569.0499.1098.02
PointDSC-gen68.1287.7440.6553.7990.2792.97
PointDSC-gen+SC274.1289.5944.8156.7197.4898.02
+ +# 4.6. Ablation Study + +In this section, we perform ablation study on 3DMatch dataset. We use the FPFH and FCGF descriptors to form correspondences respectively. The classic RANSAC is adopted as our baseline, as shown in the Row 1 and Row 7 of Tab. 6. We progressively add the proposed modules to the baseline and report the results. + +Second Order Spatial Compatibility. We first add the Second Order Spatial Compatibility $(\mathrm{SC}^2)$ measure as the guidance for the sampling of RANSAC. Each correspondence is extended into a consensus set by searching the $k$ -nearest neighbors in metric space. The Spatial Compatibility (SC) adopted by previous works [5, 45, 57] is also utilized as the sampling guidance, and the results are reported as comparison. As shown in Row 1, 3 and 7, 9 of Tab. 6, the registration recall obtained by using $\mathrm{SC}^2$ measure as guidance is $14.79\%$ higher than RANSAC when combined with FPFH, and $1.66\%$ higher when combined with FCGF. Meanwhile, since $\mathrm{SC}^2$ measure can narrow the sampling space, the mean registration time of $\mathrm{SC}^2$ measure is much smaller than RANSAC. Besides, using $\mathrm{SC}^2$ measure as guidance can achieve better performance than using SC measure by comparing Row 2, 3 and 8, 9. This is because SC is disturbed by the ambiguity problem, while $\mathrm{SC}^2$ measure can eliminate the ambiguity. + +Two-stage Selection. We further adopt a two-stage selection strategy for generating consensus set for each seed. When one seed is an inlier correspondence, it has almost removed most of the outliers in the consensus set formed in the first stage. Since $\mathrm{SC^2}$ becomes more stable when the inlier rate increases, we construct a local $\mathrm{SC^2}$ matrix to remove potential outliers. Comparing Row 3, 4 and 9, 10 in Tab. 6, using two-stage selection achieves a recall improvement of $1.96\%$ when combined with FPFH, and $0.12\%$ improvement when combined with FCGF. + +Local Spectral Matching. When a minimum set is sampled, RANSAC adopt the instance-equal SVD to generate an estimation of translation and rotation, which is sensitive to errors. We replace the instance-equal SVD [3] with the weighted SVD [19, 43], so that less reliable correspondences are assigned lower weights for robust registration. We construct a soft $\mathrm{SC^2}$ matrix in each consensus set, and then use local spectral matching to compute the association between each correspondence with the main cluster. The association value is utilized as the weight for weighted SVD. + +Table 5. The registration recall of combining $\mathrm{SC^2}$ measure with learning based network. + +
SCSC2TSLSMSeedRR(%)RE(○)TE(cm)Time(s)
FPFH1)66.103.9511.032.86
2)✓71.562.076.480.27
3)✓80.892.346.920.31
4)✓✓82.852.326.690.33
5)✓✓✓84.102.136.560.37
6)✓✓✓✓83.982.186.560.11
FCGF7)91.442.698.382.86
8)✓87.522.427.660.27
9)✓93.102.166.760.31
10)✓✓93.222.106.880.33
11)✓✓✓93.282.086.560.37
12)✓✓✓✓93.282.086.550.11
+ +Table 6. Ablation study on 3DMatch Dataset. SC: Spatial compatibility measure. $\mathbf{SC}^2$ : Second Order Spatial compatibility measure. TS: Two-stage Selection for consensus set sampling. LSM Local Spectral Matching. Seed: Using seed points to reduce the number of sampling. + +Comparing Row 4, 5 and 10, 11 in Tab. 6, using local spectral matching can boost the performance, especially for the mean rotation and translation error. + +Seed Selection. So far, each correspondence is treated as a seed. However, it do not need to generate a consensus set for all correspondences and estimate a rigid transformation. We only need to select a few reliable points, and use the aggregation among the inliers to collect the set without outliers, so as to further improve the efficiency of registration. We use the global spectral matching combined with Non-Maximum Suppression to find several correspondences as seeds instead of all set. Row 5, 6 and 11, 12 of Tab. 6 shows that Seed Selection can reduce registration time by more than half without much performance degradation. + +# 5. Conclusion + +In this paper, we present a second order spatial compatibility $(\mathrm{SC}^2)$ measure based point cloud registration method, called $\mathrm{SC}^2$ -PCR. The core component of our method is to cluster inliers by the proposed $\mathrm{SC}^2$ measure at early stage while eliminating ambiguity. Specifically, some reliable correspondences are selected by a global spectral decomposition with Non-Maximum Suppression firstly, called seed points. Then a two-stage sampling strategy is adopted to extend the seed points into some consensus sets. After that, each consensus set produces a rigid transformation by local spectral matching. Finally, the best estimation is selected as the final result. Extensive experiments demonstrate that our method achieves the state-of-the-art performance and high efficiency. Meanwhile, we also demonstrate the proposed $\mathrm{SC}^2$ is a flexible measure, which can be combined with learning networks to further boost their performance. + +# 6. Acknowledgements + +This work was supported by the National Natural Science Foundation of China under Grants 62176096, 62176242 and 61991412. + +# References + +[1] Sheng Ao, Qingyong Hu, Bo Yang, Andrew Markham, and Yulan Guo. Spinnet: Learning a general surface descriptor for 3d point cloud registration. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11753-11762, 2021. 2 +[2] Yasuhiro Aoki, Hunter Goforth, Rangaprasad Arun Srivatsan, and Simon Lucey. Pointnetlk: Robust & efficient point cloud registration using pointnet. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7163-7172, 2019. 6 +[3] K Somani Arun, Thomas S Huang, and Steven D Blostein. Least-squares fitting of two 3-d point sets. IEEE Transactions on pattern analysis and machine intelligence, (5):698-700, 1987. 5, 8 +[4] Ronald T Azuma. A survey of augmented reality. Presence: teleoperators & virtual environments, 6(4):355-385, 1997. 1 +[5] Xuyang Bai, Zixin Luo, Lei Zhou, Hongkai Chen, Lei Li, Zeyu Hu, Hongbo Fu, and Chiew-Lan Tai. Pointdsc: Robust point cloud registration using deep spatial consistency. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 15859-15869, 2021. 1, 2, 3, 4, 5, 6, 7, 8 +[6] Xuyang Bai, Zixin Luo, Lei Zhou, Hongbo Fu, Long Quan, and Chiew-Lan Tai. D3feat: Joint learning of dense detection and description of 3d local features. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6359–6367, 2020. 3 +[7] Tim Bailey and Hugh Durrant-Whyte. Simultaneous localization and mapping (slam): Part ii. IEEE robotics & automation magazine, 13(3):108-117, 2006. 1 +[8] Daniel Barath and Jiří Matas. Graph-cut ransac. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6733-6741, 2018. 3, 6 +[9] Daniel Barath, Jiri Matas, and Jana Noskova. Magsac: marginalizing sample consensus. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10197-10205, 2019. 3 +[10] 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. International Society for Optics and Photonics, 1992. 2, 6 +[11] Mark Billinghurst, Adrian Clark, and Gun Lee. A survey of augmented reality. 2015. 1 +[12] Sofien Bouaziz, Andrea Tagliasacchi, and Mark Pauly. Sparse iterative closest point. In Computer graphics forum, volume 32, pages 113-123. Wiley Online Library, 2013. 2 +[13] 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. 3 +[14] Luca Cavalli, Viktor Larsson, Martin Ralf Oswald, Torsten Sattler, and Marc Pollefeys. Handcrafted outlier detection revisited. In European Conference on Computer Vision, pages 770-787. Springer, 2020. 2 + +[15] Hui Chen and Bir Bhanu. 3d free-form object recognition in range images using local surface patches. Pattern Recognition Letters, 28(10):1252-1262, 2007. 2 +[16] Hongkai Chen, Zixin Luo, Jiahui Zhang, Lei Zhou, Xuyang Bai, Zeyu Hu, Chiew-Lan Tai, and Long Quan. Learning to match features with seeded graph matching network. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6301-6310, 2021. 3 +[17] Zhi Chen, Fan Yang, and Wenbing Tao. Cascade network with guided loss and hybrid attention for finding good correspondences. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 1123-1131, 2021. 3 +[18] Zhi Chen, Fan Yang, and Wenbing Tao. Detarnet: Decoupling translation and rotation by siamese network for point cloud registration. arXiv preprint arXiv:2112.14059, 2021. 3 +[19] Christopher Choy, Wei Dong, and Vladlen Koltun. Deep global registration. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2514-2523, 2020. 2, 3, 5, 6, 7, 8 +[20] Christopher Choy, Jaesik Park, and Vladlen Koltun. Fully convolutional geometric features. In Proceedings of the IEEE International Conference on Computer Vision, pages 8958-8966, 2019. 3, 5, 7 +[21] Ondrej Chum and Jiri Matas. Matching with prosacprogressive sample consensus. In 2005 IEEE computer society conference on computer vision and pattern recognition (CVPR'05), volume 1, pages 220-226. IEEE, 2005. 2, 3 +[22] Haowen Deng, Tolga Birdal, and Slobodan Ilic. Ppf-foldnet: Unsupervised learning of rotation invariant 3d local descriptors. In Proceedings of the European Conference on Computer Vision (ECCV), pages 602-618, 2018. 2 +[23] Haowen Deng, Tolga Birdal, and Slobodan Ilic. Ppfnet: Global context aware local features for robust 3d point matching. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 195-205, 2018. 2 +[24] Hugh Durrant-Whyte and Tim Bailey. Simultaneous localization and mapping: part i. IEEE robotics & automation magazine, 13(2):99-110, 2006. 1 +[25] Martin A Fischler and Robert C Bolles. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Communications of the ACM, 24(6):381-395, 1981. 1, 2, 3, 5, 6, 7 +[26] Andrea Frome, Daniel Huber, Ravi Kolluri, Thomas Bülow, and Jitendra Malik. Recognizing objects in range data using regional point descriptors. In European conference on computer vision, pages 224-237. Springer, 2004. 2 +[27] 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. 5, 7 +[28] Yulan Guo, Ferdous Sohel, Mohammed Bennamoun, Jianwei Wan, and Min Lu. A novel local surface feature for 3d object recognition under clutter and occlusion. Information Sciences, 293:196-213, 2015. 2 + +[29] Shengyu Huang, Zan Gojcic, Mikhail Usvyatsov, Andreas Wieser, and Konrad Schindler. Predator: Registration of 3d point clouds with low overlap. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4267-4276, 2021. 3, 5, 7 +[30] Joseph Oscar Irwin. The frequency distribution of the difference between two independent variates following the same poisson distribution. Journal of the Royal Statistical Society, 100(3):415-416, 1937. 4 +[31] Andrew E Johnson and Martial Hebert. Using spin images for efficient object recognition in cluttered 3d scenes. IEEE Transactions on pattern analysis and machine intelligence, 21(5):433-449, 1999. 2 +[32] Dimitris Karlis and Ioannis Ntzoufras. Analysis of sports data by using bivariate poisson models. Journal of the Royal Statistical Society: Series D (The Statistician), 52(3):381-393, 2003. 4 +[33] Dimitris Karlis and Ioannis Ntzoufras. Bayesian analysis of the differences of count data. Statistics in medicine, 25(11):1885-1905, 2006. 4 +[34] Ioannis Kostavelis and Antonios Gasteratos. Semantic mapping for mobile robotics tasks: A survey. Robotics and Autonomous Systems, 66:86-103, 2015. 1 +[35] Junha Lee, Seungwook Kim, Minsu Cho, and Jaesik Park. Deep hough voting for robust global registration. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 15994-16003, 2021. 1, 2, 3, 5, 6, 7 +[36] Marius Leordeanu and Martial Hebert. A spectral technique for correspondence problems using pairwise constraints. 2005. 3, 4, 5, 6 +[37] Yuan Liu, Lingjie Liu, Cheng Lin, Zhen Dong, and Wenping Wang. Learnable motion coherence for correspondence pruning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3237-3246, 2021. 3 +[38] Yi Ma, Stefano Soatto, Jana Kosecka, and S Shankar Sastry. An invitation to 3-d vision: from images to geometric models, volume 26. Springer Science & Business Media, 2012. 5 +[39] RV Mises and Hilda Pollaczek-Geiringer. Praktische verfahren der gleichungsauflosung. ZAMM-Journal of Applied Mathematics and Mechanics/Zeitschrift für Angewandte Mathematik und Mechanik, 9(1):58-77, 1929. 4 +[40] Michael Montemerlo, Sebastian Thrun, Daphne Koller, Ben Wegbreit, et al. Fastslam: A factored solution to the simultaneous localization and mapping problem. Aaiiaai, 593598, 2002. 1 +[41] Kwang Moo Yi, Eduard Trulls, Yuki Ono, Vincent Lepetit, Mathieu Salzmann, and Pascal Fua. Learning to find good correspondences. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2666-2674, 2018. 3 +[42] Kai Ni, Hailin Jin, and Frank Dellaert. Groupsac: Efficient consensus in the presence of groupings. In 2009 IEEE 12th International Conference on Computer Vision, pages 2193-2200. IEEE, 2009. 2, 3 +[43] G Dias Pais, Srikumar Ramalingam, Venu Madhav Govindu, Jacinto C Nascimento, Rama Chellappa, and Pedro Miraldo. + +3dregnet: A deep neural network for 3d point registration. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7193-7203, 2020. 2, 3, 6, 8 +[44] Zheng Qin, Hao Yu, Changjian Wang, Yulan Guo, Yuxing Peng, and Kai Xu. Geometric transformer for fast and robust point cloud registration. arXiv preprint arXiv:2202.06688, 2022.3 +[45] Siwen Quan and Jiaqi Yang. Compatibility-guided sampling consensus for 3-d point cloud registration. IEEE Transactions on Geoscience and Remote Sensing, 58(10):7380-7392, 2020. 1, 3, 6, 7, 8 +[46] Szymon Rusinkiewicz and Marc Levoy. Efficient variants of the icp algorithm. In Proceedings third international conference on 3-D digital imaging and modeling, pages 145-152. IEEE, 2001. 2 +[47] Radu Bogdan Rusu, Nico Blodow, and Michael Beetz. Fast point feature histograms (fpfh) for 3d registration. In 2009 IEEE international conference on robotics and automation, pages 3212-3217. IEEE, 2009. 2, 5 +[48] Radu Bogdan Rusu, Nico Blodow, Zoltan Csaba Marton, and Michael Beetz. Aligning point cloud views using persistent feature histograms. In 2008 IEEE/RSJ international conference on intelligent robots and systems, pages 3384-3391. IEEE, 2008. 2 +[49] Aleksandr Segal, Dirk Haehnel, and Sebastian Thrun. Generalized-icp. In Robotics: science and systems, volume 2, page 435. Seattle, WA, 2009. 2 +[50] Kun Sun, Wenbing Tao, and Yuhua Qian. Guide to match: multi-layer feature matching with a hybrid gaussian mixture model. IEEE Transactions on Multimedia, 22(9):2246-2261, 2019. 2 +[51] Weiwei Sun, Wei Jiang, Eduard Trulls, Andrea Tagliasacchi, and Kwang Moo Yi. Acne: Attentive context normalization for robust permutation-equivariant learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11286-11295, 2020. 3 +[52] Federico Tombari, Samuele Salti, and Luigi Di Stefano. U-nique shape context for 3d data description. In Proceedings of the ACM workshop on 3D object retrieval, pages 57-62, 2010. 2 +[53] Philip Hilaire Torr, Slawomir J Nasuto, and John Mark Bishop. Napsac: High noise, high dimensional robust estimationits in the bag. In British Machine Vision Conference (BMVC), 2002. 2, 3 +[54] Yue Wang and Justin M Solomon. Deep closest point: Learning representations for point cloud registration. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3523-3532, 2019. 6 +[55] Hao Xu, Shuaicheng Liu, Guangfu Wang, Guanghui Liu, and Bing Zeng. Omnet: Learning overlapping mask for partial-to-partial point cloud registration. arXiv preprint arXiv:2103.00937, 2021. 3 +[56] Heng Yang, Jingnan Shi, and Luca Carlone. Teaser: Fast and certifiable point cloud registration. IEEE Transactions on Robotics, 37(2):314-333, 2020. 3, 6 +[57] Jiaqi Yang, Zhiqiang Huang, Siwen Quan, Zhaoshuai Qi, and Yanning Zhang. Sac-cot: Sample consensus by sampling + +compatibility triangles in graphs for 3-d point cloud registration. IEEE Transactions on Geoscience and Remote Sensing, 2021. 1, 8 +[58] Yaoqing Yang, Chen Feng, Yiru Shen, and Dong Tian. Foldingnet: Point cloud auto-encoder via deep grid deformation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 206–215, 2018. 2 +[59] Zi Jian Yew and Gim Hee Lee. 3dfeat-net: Weakly supervised local 3d features for point cloud registration. In Proceedings of the European Conference on Computer Vision (ECCV), pages 607-623, 2018. 3 +[60] Hao Yu, Fu Li, Mahdi Saleh, Benjamin Busam, and Slobodan Ilic. Cofinet: Reliable coarse-to-fine correspondences for robust pointcloud registration. Advances in Neural Information Processing Systems, 34, 2021. 3 +[61] Andrei Zaharescu, Edmond Boyer, Kiran Varanasi, and Radu Horaud. Surface feature detection and description with applications to mesh matching. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 373-380. IEEE, 2009. 2 +[62] Andy Zeng, Shuran Song, Matthias Nießner, Matthew Fisher, Jianxiong Xiao, and Thomas Funkhouser. 3dmatch: Learning local geometric descriptors from rgb-d reconstructions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1802-1811, 2017. 2, 4, 5 +[63] Jiahui Zhang, Dawei Sun, Zixin Luo, Anbang Yao, Lei Zhou, Tianwei Shen, Yurong Chen, Long Quan, and Hongen Liao. Learning two-view correspondences and geometry using order-aware network. arXiv preprint arXiv:1908.04964, 2019. 3 +[64] Chen Zhao, Zhiguo Cao, Chi Li, Xin Li, and Jiaqi Yang. Nm-net: Mining reliable neighbors for robust feature correspondences. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 215-224, 2019. 3 +[65] Chen Zhao, Yixiao Ge, Feng Zhu, Rui Zhao, Hongsheng Li, and Mathieu Salzmann. Progressive correspondence pruning by consensus learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6464-6473, 2021. 3 +[66] Qian-Yi Zhou, Jaesik Park, and Vladlen Koltun. Fast global registration. In European Conference on Computer Vision, pages 766-782. Springer, 2016. 3, 6, 7 \ No newline at end of file diff --git a/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/images.zip b/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4504a1cefd35bbf2588aa0a6bbd3aed4b8b1b6bf --- /dev/null +++ b/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45266983c816aec8bf0c7cdf918a8d2c8c4508f54f0053aeaf2fa84d0e647856 +size 537181 diff --git a/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/layout.json b/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d4b276c4a219cb3aaf8400e185ab8e2e3441af5c --- /dev/null +++ b/sc2pcrasecondorderspatialcompatibilityforefficientandrobustpointcloudregistration/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:476d3f69366c3554a67f29761caf974c8e9a6ab099d255d4f7c8de50af9e36cf +size 503260 diff --git a/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/f2e721e2-fad0-48b3-9890-5ee41864e0be_content_list.json b/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/f2e721e2-fad0-48b3-9890-5ee41864e0be_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2060e5eca28a8dbc1cf839b74a4a16faf8433c93 --- /dev/null +++ b/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/f2e721e2-fad0-48b3-9890-5ee41864e0be_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb9bb8319ecec8b02f4e8583c88e3593e8eb2419e19a7808e4f5f2cf69eb54f9 +size 83653 diff --git a/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/f2e721e2-fad0-48b3-9890-5ee41864e0be_model.json b/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/f2e721e2-fad0-48b3-9890-5ee41864e0be_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4ce7c202d20452031fcc6b7e204747cbd4184c3c --- /dev/null +++ b/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/f2e721e2-fad0-48b3-9890-5ee41864e0be_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b8bd8e87b6c6e8eee60bc93c5be118193d1a40fea31205153efc141654650e5 +size 107229 diff --git a/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/f2e721e2-fad0-48b3-9890-5ee41864e0be_origin.pdf b/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/f2e721e2-fad0-48b3-9890-5ee41864e0be_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..df518a5bb8aeb1115c59448cd20cae3ca234fbe9 --- /dev/null +++ b/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/f2e721e2-fad0-48b3-9890-5ee41864e0be_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5e81f6d81f38a400d5f39ced250020ecf8f42b2eddc88cf79607f9070889374 +size 1467479 diff --git a/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/full.md b/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0753947b5b24cc2265948d95de1b8b3b506a0500 --- /dev/null +++ b/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/full.md @@ -0,0 +1,378 @@ +# Scalable Penalized Regression for Noise Detection in Learning with Noisy Labels + +Yikai Wang Xinwei Sun Yanwei Fu* +School of Data Science, Fudan University + +{yikaiwang19, sunxinwei, yanweifu}@fudan.edu.cn + +# Abstract + +Noisy training set usually leads to the degradation of generalization and robustness of neural networks. In this paper, we propose using a theoretically guaranteed noisy label detection framework to detect and remove noisy data for Learning with Noisy Labels (LNL). Specifically, we design a penalized regression to model the linear relation between network features and one-hot labels, where the noisy data are identified by the non-zero mean shift parameters solved in the regression model. To make the framework scalable to datasets that contain a large number of categories and training data, we propose a split algorithm to divide the whole training set into small pieces that can be solved by the penalized regression in parallel, leading to the Scalable Penalized Regression (SPR) framework. We provide the non-asymptotic probabilistic condition for SPR to correctly identify the noisy data. While SPR can be regarded as a sample selection module for standard supervised training pipeline, we further combine it with semi-supervised algorithm to further exploit the support of noisy data as unlabeled data. Experimental results on several benchmark datasets and real-world noisy datasets show the effectiveness of our framework. Our code and pretrained models are released at https://github.com/Yikai-Wang/SPR-LNL. + +# 1. Introduction + +Deep learning has achieved remarkable success on many topics of supervised learning with millions of labeled training data. The performance heavily relies on the quality of label annotation since neural networks are susceptible to noisy labels and even can easily memorize randomly labeled annotations [63], leading to the degradation of generalization and robustness. In many real-world scenarios, it is expensive and difficult to obtain precise labels, exposing a realistic challenge for supervised deep models to learn with noisy data. + +There is a large literature for this challenge from various perspectives, including modifying the network architectures [6, 12, 13, 59] or loss functions [11, 27, 53, 65], or dynamically selecting clean data during training [5, 14, 17, 27,34,40,44,61]. Particularly, the dynamic sample selection methods adopt the spirit of providing only clean data for the training. Such a spirit can form a 'virtuous' cycle between the noisy data elimination and network training: the elimination of noisy data can help the network training; and on the other hand, the improved network is empowered with a better ability in picking up clean data. As this virtuous cycle evolves, the performance can be improved. + +Typical principles to identify outliers include large loss [14], inconsistent prediction [67], and irregular feature representation [57]. The former two principles focus on the label space, while the last one focuses on the feature space of the same class. In this paper, we unify the label and feature space and assume linear relationship between the feature-label pair (denoted as $(\pmb{x}_i,\pmb{y}_i)$ ) of data $i$ by + +$$ +\boldsymbol {y} _ {i} = \boldsymbol {x} _ {i} ^ {\top} \boldsymbol {\beta} + \varepsilon , \tag {1} +$$ + +where $\boldsymbol{x}_i \in \mathbb{R}^p$ is the feature vector, and $\boldsymbol{y}_i \in \mathbb{R}^c$ is the one-hot label vector; $\beta \in \mathbb{R}^{p \times c}$ is the fixed (unknown) coefficient matrix and $\varepsilon \in \mathbb{R}^c$ is random noise. This linear relation is approximately established as the networks are trained to minimize the divergence between a (soft-max) linear projection of the feature and one-hot label vector. For a well-trained network, the output prediction of clean data is expected to be as similar to a one-hot vector as possible, while for noisy data the output is dense. Intuitively, when the linear relation is well-approximated without soft-max operation, the corresponding data is likely to be clean data. + +The simplest way to identify the suspected outliers in the linear model is checking the predict error, or residual, $\boldsymbol{r}_i = \boldsymbol{y}_i - \boldsymbol{x}_i^\top \hat{\boldsymbol{\beta}}$ , where $\hat{\beta}$ is the estimate of $\beta$ . The larger $\| \boldsymbol{r} \|$ indicates more possibility for the instance $i$ to be outlier/noisy data. The classical statistical method to test whether the instance $\boldsymbol{r}_i$ is non-zero is using the leave-one-out approach [38] to test the externally studentized residual + +$$ +t _ {i} = \frac {\boldsymbol {y} _ {i} - \boldsymbol {x} _ {i} ^ {\top} \hat {\boldsymbol {\beta}} _ {- i}}{\hat {\sigma} _ {- i} \left(1 + \boldsymbol {x} _ {i} ^ {\top} \left(\boldsymbol {X} _ {- i} ^ {\top} \boldsymbol {X} _ {- i}\right) ^ {- 1} \boldsymbol {x} _ {i}\right) ^ {1 / 2}}, \tag {2} +$$ + +where $\hat{\sigma}$ is the scale estimate and the subscript $-i$ indicates estimates based on the $n - 1$ observations, leaving out the $i$ -th data where we are testing. Equivalently, the linear regression model can be re-formulated into explicitly representing the residual by the mean-shift parameter $\gamma$ as in [39], + +$$ +\boldsymbol {Y} = \boldsymbol {X} \boldsymbol {\beta} + \boldsymbol {\gamma} + \boldsymbol {\varepsilon}, \quad \varepsilon_ {i, j} \sim \mathcal {N} (0, \sigma^ {2}), \tag {3} +$$ + +where we have the feature $\mathbf{X} \in \mathbb{R}^{n \times p}$ , and label $\mathbf{Y} \in \mathbb{R}^{n \times c}$ paired and stacked by rows; and each row of $\gamma \in \mathbb{R}^{n \times c}$ , $\gamma_{i}$ , represents the predict residual of the corresponding data. This formulation has been widely studied in different research topics, including economics [4, 18, 32, 33], robust regression [8, 39], statistical ranking [9], face recognition [56], semi-supervised few-shot learning [54, 55], and Bayesian preference learning [43], to name a few. The focused formulation is different depending on the specific research tasks. For example, for the robust regression problem, the target is to get a robust estimate $\hat{\beta}$ against the influence of $\gamma$ . Here for solving the problem of learning with noisy labels, we instead aim to amplify the impact of $\gamma$ such that non-zero values can represent the noisy label that existed in the training set. + +To this end, from the statistical perspective, this paper starts from Eq. (3) to build up a sample selection framework, dubbed Scalable Penalized Regression (SPR), which has theoretical guarantees of consistently identifying noisy data, and thus can efficiently learn with noisy labels. Naturally, we expect $\gamma$ in Eq. (3) to be sparse and only a small number of $\gamma_{i}$ are non-zeros, indicating that those data are noisy or outlying. Thus a sparse penalty is utilized on $\gamma_{i}$ to encourage that the non-zero solution is restricted in a small portion. We thus optimize the induced penalized regression problem to solve $\gamma$ and identify the instances with non-zero $\gamma_{i}$ as noisy data. Theoretically, in terms of the model selection consistency theory [51, 66], there is some nice statistical property and theoretical insight in our SPR framework, as we can guarantee that, by meeting certain conditions, our SPR should at least in principle, successfully identify all the noisy data. + +To incorporate Eq. (3) into the end-to-end training pipeline of deep architecture, the simplest way is to solve Eq. (3) for each training mini-batch to detect and remove noisy data. However, when we train large model with small batch size, the information of current mini-batch may not be identifiable enough to distinguish true pattern from noise. On the other hand, use SPR on the whole training data after training an epoch leads to an unacceptable computation + +cost due to the quadratically increased complexity of solving Eq. (3) with the training data. To design a proper optimization environment for solving Eq. (3) that is data-efficient and identifiable, we utilize the whole training set and propose a split algorithm to divide it into small pieces that are class balance with proper data size such that the noisy pattern is identifiable and can be solved efficiently in parallel, making SPR scalable to large datasets. + +Inspired by [69], to further encourage the linear relation between features and labels, we propose using a sparse penalty on the fully-connected output before it is softmaxed. Moreover, we utilize SPR to train the network in a semi-supervised manner using CutMix [62], regarding the detected noisy data as unlabeled data to fully utilize the feature information. We conduct extensive experiments to validate the effectiveness of our framework on several benchmark datasets and real-world noisy datasets. + +# Contributions. Our contributions are as follows: + +- We present a statistical approach, SPR, to identify noisy data under a general scenario with theoretical guarantees. +- A split algorithm is proposed to make SPR scalable to large datasets. +- A sparse penalty is proposed to encourage the linear relation, and a full training framework that combines SPR with semi-supervised methods is designed. +- Experiments on benchmark datasets and real-world noisy datasets validate the effectiveness of SPR. + +# 2. Related Work + +The target of Learning with Noisy Labels (LNL) is to train a more robust model from the noisy dataset. We can roughly categorize LNL algorithms into two groups: robust algorithm and noise detection. Robust algorithm does not focus on specific noisy data, but designs specific modules to ensure that networks can be well-trained even from the noisy datasets. Methods following this direction include constructing robust network [6, 12, 13, 59], robust loss function [11, 27, 53, 65, 68, 69], robust regularization [31, 47, 58] against noisy labels. + +Noise detection method aims to identify the noisy data and design specific strategies to deal with the noisy data, including down-weighting the importance in the loss function for the network training [48], re-labeling them to get correct labels [46], or regarding them as unlabeled data in the semi-supervised manner [23], etc. + +For the noise detection algorithm, noisy data are identified by some irregular patterns, including large error [40], gradient directions [37], disagreement within multiple networks [61], inconsistency along the training path [67] and some spatial properties in the training data [22, 52, 57]. + +Some algorithms [37, 50] rely on the existence of an extra clean set to detect noisy data. + +After detecting the clean data, the simplest strategy is to train the network using the clean data only or re-weight the data [35] to eliminate the noise. Some algorithms [2, 23] regard the detected noisy data as unlabeled data to fully exploit the distribution support of the training set in the semi-supervised learning manner. There are also some studies of designing label-correction module [25,46,49,50, 59,60] to further pseudo-labeling the noisy data to train the network. Few of those approaches are designed from the statistical perspective with non-asymptotic guarantees. In this paper, we propose to use SPR to identify the noisy data under general scenarios with statistical guarantees. + +# 3. Methodology + +Problem Formulation. We are given a dataset of image-label pairs $\{(I_i, y_i)\}_{i=1}^n$ , where $I_i \in \mathcal{I} \subseteq \mathbb{R}^m$ , $y_i \in \mathcal{C} \subseteq \mathbb{R}$ , $|\mathcal{C}| = c$ , with the one-hot encoding of $y_i$ as $y_i$ . We assume that for each instance $i$ , $y_i$ is corrupted from the ground-truth category $y_i^\star$ , where the ground-truth and corruption process is unknown. Our goal is predicting the ground-truth label $y^\star \in \mathcal{C}$ for any $I \in \mathcal{I}$ , by a neural network composed of a feature extractor $f(\cdot)$ and a classifier $g(\cdot)$ . Typically the network first encodes the image $I_i$ as a feature vector $x_i = f(I_i)$ , and return the soft-max probability $\hat{y}_i = g(x_i)$ . + +We present our framework - Scalable Penalized Regression (SPR), designed as a sample selection component to the training pipeline of neural networks. As mentioned in the introduction, SPR is motivated by the leave-one-out approach [38] on the t-test of prediction residuals to identify and remove the noisy data for the network to train, by solving the mean-shift parameter in a sparse linear regression model (Eq. (3)). Specifically, we use a sparse linear regression model to fit the feature-label pairs $\{\pmb{x}_i,\pmb{y}_i\}_i^n$ received from the current training time, and solve the corresponding mean-shift parameter $\gamma$ in + +$$ +\underset {\boldsymbol {\beta}, \boldsymbol {\gamma}} {\operatorname {a r g m i n}} \frac {1}{2} \| \boldsymbol {Y} - \boldsymbol {X} \boldsymbol {\beta} - \boldsymbol {\gamma} \| _ {\mathrm {F}} ^ {2} + \sum_ {i = 1} ^ {n} P \left(\gamma_ {i}; \lambda_ {i}\right), \tag {4} +$$ + +where $P(\cdot ;\cdot)$ is a sparse regularization on $\gamma$ with coefficient $\lambda_{i}$ on row $\gamma_{i}$ to ensure that non-zero $\gamma_{i}$ are sparse, whose corresponding instance are identified as the noisy data. We denote $\mathbf{A}_i,\mathbf{A}_{\cdot ,j},\| \mathbf{A}\|_{\mathrm{F}}^2 := \sum_{i,j}A_{i,j}^2$ as the $i$ -th row, $j$ -th column and the square of Frobenius norm, respectively. + +# 3.1. Preliminary: Penalized Regression in Statistics + +The penalized regression problem (Eq. (4)) is widely studied in statistics, where the standard solving algorithm is an alternating optimization pipeline: for fixed $\gamma$ , the global + +optimal solution of $\beta$ is the Ordinary Least Square (OLS) estimate of the linear regression problem on $(X,Y - \gamma)$ ; while for fixed $\beta$ , the problem is separable in each row of $\gamma$ , which can be solved by soft-thresholding. Further, it is shown in [1, 10] that the penalized regression problem enjoys the same optimal solution of Huber's M-estimate [16], which minimizes + +$$ +\underset {\beta} {\operatorname {a r g m i n}} \sum_ {i = 1} ^ {n} \rho \left(\frac {\boldsymbol {y} _ {i} - \boldsymbol {x} _ {i} ^ {\top} \boldsymbol {\beta}}{\sigma}; \lambda\right) + \frac {1}{2} c n \sigma , \tag {5} +$$ + +for fixed constants $\sigma > 0, c \geq 0, \lambda > 0$ , where $\rho(t; \lambda) = t^2 / 2$ when $|t| \leq \lambda$ and $\rho(t; \lambda) = \lambda |t| - \lambda^2 / 2$ otherwise. The general formulation of the penalty $P$ can be defined with a three-step construction algorithm introduced in [39]. In our experiments, we use the $\ell_1$ norm as the penalty. + +# 3.2. Penalized Regression for LNL + +In this paper, we regard $\gamma$ as the indicator of noisy data, with larger $\| \gamma_i\|$ means more corruption the instance $i$ is suffered. We denote $O\coloneqq \{i:\| \gamma_i\| \neq 0\}$ as the noisy sample set. To estimate $O$ , we only need to solve $\gamma$ with no need to estimate $\beta$ . Thus to simplify the optimization, we substitute the OLS estimate for $\beta$ with $\gamma$ fixed into Eq. (4). To ensure that $\hat{\beta}$ is identifiable, we apply PCA on $\pmb{X}$ to make $p\ll n$ so that the $\pmb{X}$ has full-column rank. Denote $\tilde{\pmb{X}} = \pmb {I} - \pmb {X}\left(\pmb{X}^{\top}\pmb {X}\right)^{\dagger}\pmb{X}^{\top},\tilde{\pmb{Y}} = \tilde{\pmb{X}}\pmb{Y}$ , the Eq. (4) is transformed into + +$$ +\underset {\gamma} {\operatorname {a r g m i n}} \frac {1}{2} \left\| \tilde {\boldsymbol {Y}} - \tilde {\boldsymbol {X}} \boldsymbol {\gamma} \right\| _ {\mathrm {F}} ^ {2} + \sum_ {i = 1} ^ {n} P \left(\gamma_ {i}; \lambda_ {i}\right), \tag {6} +$$ + +which is a standard sparse linear regression for $\gamma$ . Note that in practice we can hardly choose a proper $\lambda$ that works well in all scenarios. Furthermore, from the equivalence between the penalized regression problem and Huber's M-estimate, the solution of $\gamma$ is returned with soft-thresholding. Thus it is not worth to find the precise solution of a single $\gamma$ . Instead, we use a block-wise descent algorithm [41] to solve $\gamma$ with a list of $\lambda$ s and generate the solution path. As $\lambda$ changes from $\infty$ to 0, the influence of sparse penalty decreases, and $\gamma_{i}$ are gradually solved with non-zero values, in other words, selected by the model. Since earlier selected instance is more possible to be noisy, we rank all samples as the descendent order of their selecting time defined as: + +$$ +C _ {i} = \sup \left\{\lambda : \gamma_ {i} (\lambda) \neq 0 \right\}. \tag {7} +$$ + +A large $C_i$ means that the $\gamma_i$ is earlier selected. Then the top samples are identified as noisy data. + +# 3.3. Scalable Penalized Regression + +The computation cost of Eq. (6) is $O(n^{2}c)$ , which increases in quadratic with the growth of the training sample, making + +it not scalable to large datasets. Note that we are finding data that are more noisy than others from Eq. (7); thus we may generate the environment that the noisy instances are easier to be identified and with less computation cost. To this end, we propose to split the total training dataset into many pieces, each of which contains a small portion of training categories with a small number of training data. With the splitting strategy, SPR can run on several pieces in parallel and significantly reduce the running time. + +Recall that the principle of selecting the group of categories is to reduce the optimizing difficulty and generate an easier environment for finding noisy data. Our motivation is that categories with less similarity are helpful to identify the noisy data (based on the noisy set recovery theory which we will introduce later), where the similarity is defined as + +$$ +s (i, j) = \boldsymbol {p} _ {i} ^ {\top} \boldsymbol {p} _ {j}, \tag {8} +$$ + +for class $i,j$ where $\pmb{p}$ represents the class prototype. Specifically, we take the clean features $\pmb{x}_i$ of each class extracted by the network along the training iteration, and average them to get the class prototype $\pmb{p}_c$ after the current training epoch ends, as + +$$ +\boldsymbol {p} _ {c} = \frac {\sum_ {i = 1 , y _ {i} = c , i \notin O} ^ {n} \boldsymbol {x} _ {i}}{\sum_ {i = 1 , y _ {i} = c , i \notin O} ^ {n} 1}, \tag {9} +$$ + +Then the most dissimilar classes are grouped together. In our experiments, we design one group with 10 classes. + +For the instances in each group, we split the training data of each class in a balanced way such that each group contains the same number of instances for each class. The number is determined to ensure that the clean pattern remains the majority in the group, such that optimization can be done easily. In practice, we select 10 training data of each class to construct the group. When there is an imbalance between different classes, we use over-sampling strategy to sample the instance of class with less training data multiple times to ensure that each training instance is selected once in some split group. The detection process is shown in Algorithm 1. + +# 3.4. Learning with Detected Noisy Data + +Supervised training manner. After estimating the noisy set $O$ , the simplest strategy is to remove them and train the network with the remaining clean data. We show that this strategy will lead to an improvement in testing accuracy. Note that we assume in Eq. (3) that the one-hot encoded label is linearly related to the feature $X$ ; however, in practice, the prediction is obtained via the soft-max function on the $XW_{\mathrm{fc}}$ , where $W_{\mathrm{fc}}$ is the weight of the final fully-connected layer (we ignore the bias term for simplicity). + +Algorithm 1: Scalable Regularized Regression + +Input: Feature matrix $\mathbf{X}$ , label matrix $\mathbf{Y}$ , noisy set $O$ . + +Calculate prototypes $P$ of each class using Eq. (9); + +Divide classes into most diverged groups based on the similarity within classes using Eq. (8); + +Split data of each class in the same group into pieces $\{(X_{(i)},Y_{(i)})\}$ + +for each piece of $(X_{(i)},Y_{(i)})$ in parallel do + +Solve $\gamma_{(i)}$ using Eq. (6); + +Select the noisy subset $O_{(i)}$ using Eq. (7); + +end + +Group all the $O_{(i)}$ together and return the result $O$ . + +To reduce this gap, inspired by [69], we append a $\ell_q$ ( $q < 1$ ) penalty on the cross entropy loss, which encourages the linear relationship between $X$ and one-hot encoded vector $Y$ : + +$$ +\mathcal {L} \left(\boldsymbol {x} _ {i}, \boldsymbol {y} _ {i}\right) = 1 _ {i \notin O} \left(\mathcal {L} _ {\mathrm {C E}} \left(\boldsymbol {x} _ {i}, \boldsymbol {y} _ {i}\right) + \lambda \| \boldsymbol {x} _ {i} ^ {\top} W _ {\mathrm {f c}} \| _ {q}\right), \tag {10} +$$ + +where $q < 1$ , $\mathcal{L}_{\mathrm{CE}}$ denotes the cross-entropy loss, and $1_{i\notin O}$ denotes the indicator function such that the loss is only calculated on the clean data. Note that the $\| \pmb{x}^{\top}W_{\mathrm{fc}}\|_q$ enforces the $\pmb{x}^{\top}W_{\mathrm{fc}}$ to approximately be one-hot encoded vector as long as $q$ is small enough. In this training manner, SPR can be regarded as a robust loss function algorithm since we do not modify the training pipeline except the modification of the loss function. + +Semi-supervised training manner. We can further exploit the support of noisy data by incorporating SPR with semi-supervised algorithms. In this paper, we interpolate part of images between clean data and noisy data as in [62], + +$$ +\tilde {\boldsymbol {x}} = \boldsymbol {M} \odot \boldsymbol {x} _ {\text {c l e a n}} + (1 - \boldsymbol {M}) \odot \boldsymbol {x} _ {\text {n o i s y}} \tag {11a} +$$ + +$$ +\tilde {\boldsymbol {y}} = \lambda \boldsymbol {y} _ {\text {c l e a n}} + (1 - \lambda) \boldsymbol {y} _ {\text {n o i s y}} \tag {11b} +$$ + +where $M \in \{0,1\}^{W \times H}$ is a binary mask, $\odot$ is elementwise multiplication, and the clean and noisy data are identified by SPR. Then we train the network using the interpolated data using + +$$ +\mathcal {L} (\tilde {\boldsymbol {x}}, \tilde {\boldsymbol {y}}) = \mathcal {L} _ {\mathrm {C E}} (\tilde {\boldsymbol {x}}, \tilde {\boldsymbol {y}}). \tag {12} +$$ + +Since $\tilde{\pmb{y}}$ is interpolated, it is no longer a one-hot vector, and thus is not sparse. Hence we do not use the sparse penalty when we train the network using the interpolated data. Note that SPR is done using the original data without interpolation, hence the linear relationship still holds. In practice, the above two training method is randomly selected in each mini-batch with the predefined probability. The full algorithm is shown in Algorithm 2. + +Algorithm 2: Training algorithm +Initialize: Noisy dataset $\{(I_i,y_i)\}_{i = 1}^n$ , feature matrix $X$ , noisy label matrix $Y$ , noisy set $O = \phi$ , CutMix probability $p$ +for ep from O to total epochs do for each mini-batch do Sample $r$ from $U(0,1)$ if $r > p$ then Train the network using Eq. (10). else Train the network using Eq. (12). end Update $\pmb{X}$ visited in the current mini-batch; end Run SPR (Algorithm 1) on $(X,Y)$ and update noisy set $O$ . +end + +# 3.5. Noisy Set Recovery of SPR + +In this part, we provide the result that the Eq. (4) can recover the oracle support set $O$ . For simplicity, we use the $\ell_1$ norm as the penalty. In the above we have re-formulate Eq. (4) as Eq. (6), which is a standard multi-response regression problem. Here we further vectorize the problem such that it shares the standard formulation of LASSO. Then we can use the well-studied model selection consistency result [51, 66] to support our conclusion. Specifically, we vectorize $Y, \gamma$ in Eq. (6) as $\vec{y}, \vec{\gamma}$ and the Eq. (6) turns to + +$$ +\underset {\vec {\gamma}} {\operatorname {a r g m i n}} \frac {1}{2} \left\| \vec {\boldsymbol {y}} - \mathring {\boldsymbol {X}} \vec {\boldsymbol {\gamma}} \right\| _ {2} ^ {2} + \lambda \| \vec {\boldsymbol {\gamma}} \| _ {1}, \tag {13} +$$ + +where $\tilde{\pmb{X}} = I_c\otimes \tilde{\pmb{X}}$ with $\otimes$ denoting the Kronecker product operator. Denote $S\coloneqq \mathrm{supp}(\vec{\gamma}^*)$ , then it is sufficient for the recovery of noisy set $O$ to recover $S$ . We further denote $\hat{\pmb{X}}_S(\hat{\pmb{X}}_{S^c})$ as the column vectors of $\tilde{\pmb{X}}$ whose indexes are in $S(S^{c})$ and $\mu_{\tilde{\mathbf{X}}} = \max_{i\in S^c}\| \tilde{\mathbf{X}}\| _2^2$ . Then we have + +Theorem 1 (Noisy set recovery). Assume that: + +C1, Restricted eigenvalue: $\lambda_{\min}(\dot{\pmb{X}}_S^\top \dot{\pmb{X}}_S) = C_{\min} > 0;$ + +C2, Irrepresentability: there exists a $\eta \in (0,1]$ , such that $\| \mathring{\boldsymbol{X}}_{S^c}^\top \mathring{\boldsymbol{X}}_S(\mathring{\boldsymbol{X}}_S^\top \mathring{\boldsymbol{X}}_S)^{-1}\|_\infty \leq 1 - \eta$ ; + +C3, Large error: $\vec{\gamma}_{\mathrm{min}}^{*} \coloneqq \min_{i \in S} |\vec{\gamma}_{i}^{*}| > h(\lambda, \eta, \dot{X}, \vec{\gamma}^{*})$ ; + +where $\| \pmb {A}\|_{\infty}\coloneqq \max_{i}\sum_{j}|A_{i,j}|$ and $h(\lambda ,\eta ,\mathring{X},\vec{\gamma}^{*}) =$ $\lambda \eta /\sqrt{C_{\mathrm{min}}\mu_{\mathring{X}}} +\lambda \| (\mathring{X}_S^\top \mathring{X}_S)^{-1}\mathrm{sign}(\vec{\gamma}_S^*)\|_{\infty}.$ + +Let $\lambda \geq \frac{2\sigma\sqrt{\mu_{\mathbf{X}}}}{\eta}\sqrt{\log cn}$ . Then with probability greater than $1 - 2(cn)^{-1}$ , model Eq. (13) has a unique solution $\hat{\vec{\gamma}}$ such that: 1) If $C1$ and $C2$ hold, $\hat{O} \subseteq O$ ; 2) If $C1$ , $C2$ and $C3$ hold, $\hat{O} = O$ . + +Note that The Theorem 1 is extended from the model selection consistency in [51], which only provides the + +conclusion that $\hat{S} \subseteq S$ and $\hat{S} = S$ , respectively. Here we show that $\hat{S} \subseteq S$ leads to $\hat{O} \subseteq O$ , and of course $\hat{S} = S$ leads to $\hat{O} = O$ in our case. For instance $i, i \in O^c$ only when $\gamma_{i,j} = 0$ for all $j$ , then all the vectorized indexes are in $S^c$ . When $\hat{S} \subseteq S$ , all vectorized indexes of instance $i$ are in $\hat{S}^c$ , which means $i \in \hat{O}^c$ and leads to $\hat{O} \subseteq O$ . + +C1 is necessary to get a unique solution, and in our case is mostly satisfied with the nature assumption that the clean data is the majority in the training data. If C2 holds, the estimated noisy data is the subset of truly noisy data. This condition is the key to ensuring the success of SPR, which requires divergence between clean and noisy data such that we cannot represent clean data by noisy data. If C3 further holds, the estimated noisy data is exactly all the truly noisy data. C3 requires the error measured by $\gamma_{i}$ is large enough to be identified from random noise. If the conditions fail, SPR will fail in a non-vanishing probability, not deterministic. + +# 4. Experiments + +Datasets. We validate the effectiveness of SPR on synthetic noisy datasets MNIST [21] and CIFAR10 [20], and real-world noisy datasets ANIMAL10 [44] and WebVision [24]. We consider two types of noisy labels for MNIST and CIFAR10: (i) Symmetric noise: Every class is corrupted uniformly with all other labels; (ii) Asymmetric noise: Labels are corrupted by similar (in pattern) classes. The ANIMAL10 is published with mislabeling (the ratio is $8\%$ ) and the corruption process and noise type in ANIMAL10 are unknown. WebVision has 2.4 million images collected from the internet with the same category list with ImageNet ILSVRC12. Thus, the ANIMAL10 and WebVision datasets can be regarded as a real-world challenge. + +Backbones. For MNIST, we use two convolutional layers followed by two fully-connected layers, denoted as $C2F2$ . For CIFAR10, a ResNet-18 [15] network is utilized. For ANIMAL10 we use VGG19-BN [42] as our backbone. And for WebVision we use Inception-ResNet [45] to extract features. + +Hyperparameter setting. We use SGD to train all the networks with momentum 0.9 and a cosine learning rate decay strategy. The initial learning rate is set as 0.1 for ANIMAL10 and 0.01 for others. The weight decay is set as 1e-3, 1e-4, 1e-3, 5e-4 for MNIST, CIFAR10, ANIMAL10, and WebVision, respectively. We use a batch size of 128 for all experiments. We use random crop and random horizontal flip as augmentation strategies for CIFAR10, ANIMAL10, and WebVision. The network is trained for 50 epochs for MNIST, 180 epochs for CIFAR10, 160 epochs for ANIMAL10, and 300 epochs for WebVision. We use $q = 0.2$ in Eq. (10) with coefficient $\lambda$ of the sparse penalty initialized as 1.2 and is increased by multiplying 1.2 for + +
DatasetMethodSym. Noise RateAsy. Noise Rate
0.20.40.60.80.20.30.4
MNIST (C2F2)CE91.674.049.422.794.688.882.3
FL91.774.550.422.794.389.182.1
GCE98.997.281.534.096.789.181.5
SCE98.997.488.848.898.093.785.4
NLNL98.397.896.286.398.497.595.8
APL99.198.495.773.098.996.991.5
SR99.299.298.998.099.399.299.2
SPR99.399.299.298.799.399.299.2
CIFAR-10 (ResNet-18)Standard85.781.873.742.088.086.484.9
Forgetting86.082.175.541.389.588.285.0
Bootstrap86.482.575.242.188.887.585.1
Forward85.781.073.331.688.587.385.3
Decoupling87.483.373.836.089.388.185.1
MentorNet88.181.470.431.386.384.878.7
Co-teaching89.286.479.022.990.088.278.4
Co-teaching+89.886.174.017.989.487.171.3
IterNLD87.983.774.138.089.388.885.0
RoG89.283.577.929.189.688.486.2
PENCIL88.286.674.345.390.288.384.5
GCE88.784.776.141.788.186.081.4
SCE89.285.378.044.488.786.381.4
TopoFilter90.287.280.545.790.589.787.9
SPR93.291.082.764.192.891.389.0
+ +Table 1. Test accuracies on several benchmark datasets with different settings. The best result is boldfaced. Results of competitors on MNIST are reported in [69], and on CIFAR10 are reported in [57]. + +MNIST, and 1.02 for others. In CIFAR10 with noise rate 0.8, we do not increase the $\lambda$ . We simply select half of the training data as noisy data in all of our experiments. + +# 4.1. Evaluation on Synthetic Label Noise + +Competitors. In this part, we first use SPR with only using the supervised training manner on MNIST to compare with robust loss function methods. Then we use the full SPR model on CIFAR-10 to compare with sample selection algorithms and other popular algorithms. We use cross-entropy loss (CE) as baseline algorithm for two datasets. For MNIST, we also compare with competitors including an effective loss function Focal Loss (FL) [26], some refined algorithms for CE loss like GCE [65] and SCE [53], NLNL [19] which utilizes complementary labels against the noise, APL [28] which combines robust active and passive loss to train the network. SR [69] which utilizes the sparse regularization combined with the feature normalization and temperature scaling method to train the network. For CIFAR-10, we compare SPR with algorithms include Forgetting [3] with train the network using dropout strategy, Bootstrap [36] which train with bootstrapping, Forward Correction [35] which corrects the + +loss function to get a robust model, Decoupling [30] which uses a meta update strategy to decouple the update time and update method, MentorNet [17] which uses a teacher network to help train the network, Co-teaching [14] which uses two networks to teach each other, Co-teaching+ [61] which further uses an update by disagreement strategy to improve Co-teaching, IterNLD [52] which uses an iterative update strategy, RoG [22] which uses generated classifiers, PENCIL [60] which uses a probabilistic noise correction strategy, GCE [65] and SCE [53] which are extensions of standard cross-entropy loss function, and TopoFilter [57] which uses feature representation to detect noisy data. For each dataset, all the experiments are running with the same backbone to make a fair comparison. + +As in Tab. 1, SPR enjoys a high performance compared with other robust loss function algorithm without using noisy data on MNIST, and shows a high superiority to many competitors on CIFAR-10, validating the effectiveness of SPR on different noise scenarios. + +# 4.2. Evaluation on Real-World Noisy Datasets + +In this part, we compare SPR with other methods in real-world noisy datasets including ANIMAL10 and WebVision. + +For WebVision we use CutMix probability of 1.0. + +Competitors. For ANIMAL10, we compare with the baseline of directly training with cross-entropy loss (CE), as well as previous works including Nested(ND), CE + Dropout (CED), SELFIE [44], PLC [64], and NestedCoTeaching (NCT) [7]. For WebVision, we compare with directly training with cross-entropy loss (CE), as well as Decoupling [30], D2L [29], MentorNet [17], Co-teaching [14], Iterative-CV [5], and DivideMix [23]. + +The results of real-world datasets are shown in Tab. 2, where the results of CE and SELFIE on ANIMAL is reported in [44], the results of ND, CED, and NCT is reported in [7], while the result of PLC is reported in their paper. The results of competitors on WebVision are reported in [23] and the result of CE is reported in [69]. Our algorithm SPR enjoys superior performance to all the competitors, showing the ability of handling real-world challenges. + +
ANIMAL10WebVision
ModelAccuracyModelAccuracy
CE79.4CE66.96
Nested81.3Decoupling62.54
CED81.3MentorNet63.00
SELFIE81.8Co-teaching63.58
PLC83.4Iterative-CV65.24
NCT84.1DivideMix77.32
SPR86.8SPR78.12
+ +# 4.3. More Analysis of SPR + +Precision of noisy detection. Besides accuracy, another metric to test the capacity of a sample selection algorithm is label precision: the ratio of true clean labels in the detected clean instances. In this part, we check the label precision of SPR to show the sample selection effectiveness. We conduct our experiments on the symmetric noise rate of 0.4 and 0.8, as well as asymmetric noise rate of 0.4. Results are shown in Fig. 1. SPR enjoys a monotonically increasing label precision in the symmetric noise setting, leading to a better training environment than the standard noisy dataset. When the training process ends, almost all the selected training data is guaranteed to be clean data (93.90% in the symmetric-40% setting). In the symmetric-80% setting, due to the strategy of selecting half of the training data, the upper bound of the precision is 40%, as illustrated. In this high noise rate scenario, SPR can still achieve the precision of 30.34%, which means that 76.24% of the clean training instances are detected by our algorithm. Note that in the asymmetric-40%, the label precision is first increased then decreased, and ends with 93.50%. Though it is still high, the accuracy drops with the label precision, suggesting that an + +Table 2. Results on real-world datasets. The best are in bold. + +
ModelAccuracy
CE65.5
CE + SPR80.4
CE + ℓq71.6
CE + CutMix87.0
CE + SPR + ℓq88.5
CE + SPR + CutMix89.2
Full91.0
+ +early stopping strategy is needed in the asymmetric noisy setting. We leave it as a future work to provide a fine-grained framework for different noise scenarios. + +Ablation study of modules in SPR. To verify the effectiveness of each module in our framework, we conduct an ablation study on CIFAR10 with $40\%$ symmetric noise rate. Specifically, the "CE" denotes vanilla cross entropy method; the "CE + SPR" means the cross-entropy loss only on the clean data detected by SPR; the "CE + $\ell_q$ " means the Eq. (10) for all training data; the "CE + CutMix" means using CutMix strategy for all the training data; other variants are defined similarly based on utilized components, and the "Full" denotes our SPR method with all components. As shown in Tab. 3, simply using our framework to detect noisy data will lead to better performance compared with the standard CE loss. And the full model enjoys the best performance. We further visualize the learned representation of using SPR compared with standard cross-entropy method in Fig. 2. SPR will learn a better discriminative representations. + +Table 3. Accuracy of using different modules in SPR. + +
ModelTraining Time
SPR w/o split algorithmabout 6h
SPR w/ split algorithm54s
+ +Table 4. Training time for one epoch on CIFAR-10. + +Influence of Split algorithm. In our framework, we propose a split algorithm to divide the whole training set into small pieces to run SPR in parallel. In this part, we compare the running time between using the split algorithm and not using it. Results are shown in Tab. 4. When we do not use the split algorithm, the training time for each epoch will cost an unacceptable time, making it impossible to train on large datasets. Hence we propose the split algorithm to reduce the training time. + +Influence of select ratio. In our experiments, we simply select half of the training data to train the network. It is desirable to investigate how does the ratio of detected noisy data influence the training process. We conduct experiments of SPR on CIFAR10 with a symmetric noise rate of 0.8. To + +![](images/e57321cee971f8323dcf7ed5194f7fc4798dec550f3997309c5d3df263b5dfc2.jpg) +(a) Symmetric-40% + +![](images/e7fe7fa79c1b4c2afcd2b8711d23d37213e6b8f1c0fd033691cd29ce5aa0b900.jpg) +(b) Symmetric- $80\%$ + +![](images/391ae84ecbefc53d7928e8c6783382296c017d70e068b87edfad2ef5e8d10fa6.jpg) +(c) Asymmetric-40% + +![](images/9648e0e412a77033365207b8c6eb86103c5de0f23ebd04064b6013cbcc349a26.jpg) +(a) CE + +![](images/0494cb1452a8ef513c61e1050bf95d61b8a025ee34a84aefbafa9091caf56485.jpg) +(b) SPR + +![](images/fdf4bacc651b89b787736a43989853773350582f957fa50c2c97b70ef12e6809.jpg) +Figure 2. Visualization of learned representations. +Figure 3. Best and final accuracies of SPR running with selecting different ratio of training data. + +avoid the influence of semi-supervised training pipeline, we only use the supervised training manner in this part. It can be found that the best selection ratio is near the noise ratio in the training set. Hence a better selection strategy may be designed based on the estimation of the noise ratio in the training set. We leave it as a future work since in this paper we mainly propose the sample selection framework. + +Influence of $\ell_q$ . In this part, we investigate the influence of $\ell_q$ norm in our framework. We run with a sequence of $q$ from 0.05 to 1, as illustrated in Fig. 4. In general, a smaller $q$ encourages the linear relation as expected by our framework, while too small $q$ will damage the representation capacity of the network. Thus, a convex accuracy curve exists, suggesting a choice of $q = 0.2$ to be the best. Hence in our experiments we use $q = 0.2$ . + +![](images/8b888f94e44d51c3eb946885d85c995cc74f2be0715bada49c44e17516c8a32c.jpg) +Figure 1. Accuracy and Label precision of SPR under different noise scenarios. The red line is the accuracy of SPR, while the dotted line is the label precision. +Figure 4. Accuracies of SPR with different $\ell_q$ . + +Limitations of SPR. The major limitation of SPR is that it requires the almost necessary representability condition to identify the noise set. When this condition is not hold for the problem, SPR will end with a non-vanishing probability to identify at least one clean data as noisy data. Further, the recovery theory are based on the Gaussian noise assumption, which may not hold for special problems. + +# 5. Conclusion + +This paper proposes a statistical sample selection framework - Scalable Penalized Regression (SPR) to identify noisy data with theoretical guarantees. Specifically, we propose an equivalent leave-one-out t-test approach as a penalized linear model, in which non-zero mean-shift parameters can be induced as an indicator for noisy data. We provide theoretical conditions to guarantee the identifiability of SPR to recover the oracle noisy set. Experiments on several synthetic and real-world datasets show the effectiveness of our method. + +Social Impact. Our SPR will have positive impact to social, as it enables to directly identify noisy data with theoretical grounding to help train the network. + +Acknowledgement. This work was supported in part by NSFC Project (62176061), and Shanghai Municipal Science and Technology Major Project (2018SHZDZX01). + +# References + +[1] Anestis Antoniadis. Wavelet methods in statistics: Some recent developments and their applications. Statistics Surveys, 2007. 3 +[2] Eric Arazo, Diego Ortego, Paul Albert, Noel O'Connor, and Kevin McGuinness. Unsupervised label noise modeling and loss correction. In ICML, 2019. 3 +[3] Devansh Arpit, Stanislaw Jastrzebski, Nicolas Ballas, David Krueger, Emmanuel Bengio, Maxinder S Kanwal, Tegan Maharaj, Asja Fischer, Aaron Courville, Yoshua Bengio, et al. A closer look at memorization in deep networks. In ICML, 2017. 6 +[4] Debabrata Basu. On the elimination of nuisance parameters. In Selected Works of Debabrata Basu. 2011. 2 +[5] Pengfei Chen, Ben Ben Liao, Guangyong Chen, and Shengyu Zhang. Understanding and utilizing deep neural networks trained with noisy labels. In ICML, 2019. 1, 7 +[6] Xinlei Chen and Abhinav Gupta. Webly supervised learning of convolutional networks. In ICCV, 2015. 1, 2 +[7] Yingyi Chen, Xi Shen, Shell Xu Hu, and Johan AK Suykens. Boosting co-teaching with compression regularization for label noise. In CVPR workshop, 2021. 7 +[8] Jianqing Fan, Runlong Tang, and Xiaofeng Shi. Partial consistency with sparse incidental parameters. Statistica Sinica, 2018. 2 +[9] Yanwei Fu, Timothy M Hesperales, Tao Xiang, Jiechao Xiong, Shaogang Gong, Yizhou Wang, and Yuan Yao. Robust subjective visual property prediction from crowdsourced pairwise labels. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2015. 2 +[10] Irène Gannaz. Robust estimation and wavelet thresholding in partially linear models. Statistics and Computing, 2007. 3 +[11] Aritra Ghosh, Himanshu Kumar, and PS Sastry. Robust loss functions under label noise for deep neural networks. In AAAI, 2017. 1, 2 +[12] Jacob Goldberger and Ehud Ben-Reuven. Training deep neural-networks using a noise adaptation layer. 2017. 1, 2 +[13] Bo Han, Jiangchao Yao, Gang Niu, Mingyuan Zhou, Ivor W Tsang, Ya Zhang, and Masashi Sugiyama. Masking: a new perspective of noisy supervision. In NeurIPS, 2018. 1, 2 +[14] Bo Han, Quanming Yao, Xingrui Yu, Gang Niu, Miao Xu, Weihua Hu, Ivor W Tsang, and Masashi Sugiyama. Co-teaching: Robust training of deep neural networks with extremely noisy labels. In NeurIPS, 2018. 1, 6, 7 +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 5 +[16] Peter J Huber. Robust statistics. 2004. 3 +[17] Lu Jiang, Zhengyuan Zhou, Thomas Leung, Li-Jia Li, and Li Fei-Fei. Mentornet: Learning data-driven curriculum for very deep neural networks on corrupted labels. In ICML, 2018. 1, 6, 7 +[18] Jack Kiefer and Jacob Wolfowitz. Consistency of the maximum likelihood estimator in the presence of infinitely many incidental parameters. The Annals of Mathematical Statistics, 1956. 2 + +[19] Youngdong Kim, Junho Yim, Juseung Yun, and Junmo Kim. Nlnl: Negative learning for noisy labels. In ICCV, 2019. 6 +[20] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009. 5 +[21] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 1998. 5 +[22] Kimin Lee, Sukmin Yun, Kibok Lee, Honglak Lee, Bo Li, and Jinwoo Shin. Robust inference via generative classifiers for handling noisy labels. In ICML, 2019. 2, 6 +[23] Junnan Li, Richard Socher, and Steven C.H. Hoi. Dividemix: Learning with noisy labels as semi-supervised learning. In ICLR, 2020. 2, 3, 7 +[24] Wen Li, Limin Wang, Wei Li, Eirikur Agustsson, and Luc Van Gool. Webvision database: Visual learning and understanding from web data. arXiv preprint arXiv:1708.02862, 2017.5 +[25] Yuncheng Li, Jianchao Yang, Yale Song, Liangliang Cao, Jiebo Luo, and Li-Jia Li. Learning from noisy labels with distillation. In ICCV, 2017. 3 +[26] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólár. Focal loss for dense object detection. In ICCV, 2017. 6 +[27] Yueming Lyu and Ivor W Tsang. Curriculum loss: Robust learning and generalization against label corruption. In ICLR, 2020. 1, 2 +[28] Xingjun Ma, Hanxun Huang, Yisen Wang, Simone Romano, Sarah Erfani, and James Bailey. Normalized loss functions for deep learning with noisy labels. In ICML, 2020. 6 +[29] Xingjun Ma, Yisen Wang, Michael E Houle, Shuo Zhou, Sarah Erfani, Shutao Xia, Sudanthi Wijewickrema, and James Bailey. Dimensionality-driven learning with noisy labels. In ICML, 2018. 7 +[30] Eran Malach and Shai Shalev-Shwartz. Decoupling" when to update" from" how to update". In NeurIPS, 2017. 6, 7 +[31] Aditya Krishna Menon, Ankit Singh Rawat, Sashank J Reddi, and Sanjiv Kumar. Can gradient clipping mitigate label noise? In ICLR, 2020. 2 +[32] Marcelo Moreira. A maximum likelihood method for the incidental parameter problem. Technical report, 2008. 2 +[33] Jerzy Neyman and Elizabeth L Scott. Consistent estimates based on partially consistent observations. *Econometrica: Journal of the Econometric Society*, 1948. 2 +[34] Duc Tam Nguyen, Chaithanya Kumar Mummadi, Thi Phuong Nhung Ngo, Thi Hoai Phuong Nguyen, Laura Beggel, and Thomas Brox. Self: Learning to filter noisy labels with self-ensembling. In ICLR, 2020. 1 +[35] Giorgio Patrini, Alessandro Rozza, Aditya Krishna Menon, Richard Nock, and Lizhen Qu. Making deep neural networks robust to label noise: A loss correction approach. In CVPR, 2017. 3, 6 +[36] Scott E Reed, Honglak Lee, Dragomir Anguelov, Christian Szegedy, Dumitru Erhan, and Andrew Rabinovich. Training deep neural networks on noisy labels with bootstrapping. In ICLR (Workshop), 2015. 6 +[37] Mengye Ren, Wenyuan Zeng, Bin Yang, and Raquel Urtasun. Learning to reweight examples for robust deep learning. In ICML, 2018. 2, 3 + +[38] Weisberg Sanford. Applied linear regression. John Wiley & Sons, 1985. 1, 3 +[39] Yiyuan She and Art B Owen. Outlier detection using nonconvex penalized regression. Journal of the American Statistical Association, 2011. 2, 3 +[40] Yanyao Shen and Sujay Sanghavi. Learning with bad training data via iterative trimmed loss minimization. In ICML, 2019. 1, 2 +[41] Noah Simon, Jerome Friedman, and Trevor Hastie. A blockwise descent algorithm for group-penalized multiresponse and multinomial regression. arXiv preprint arXiv:1311.6529, 2013. 3 +[42] K Simonyan and A Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. 5 +[43] Edwin Simpson and Iryna Gurevych. Scalable bayesian preference learning for crowds. Machine Learning, 2020. 2 +[44] Hwanjun Song, Minseok Kim, and Jae-Gil Lee. Selfie: Refurbishing unclean samples for robust deep learning. In ICML, 2019. 1, 5, 7 +[45] Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alexander A Alemi. Inception-v4, inception-resnet and the impact of residual connections on learning. In AAAI, 2017. 5 +[46] Daiki Tanaka, Daiki Ikami, Toshihiko Yamasaki, and Kiyoharu Aizawa. Joint optimization framework for learning with noisy labels. In CVPR, 2018. 2, 3 +[47] Ryutaro Tanno, Ardavan Saeedi, Swami Sankaranarayanan, Daniel C Alexander, and Nathan Silberman. Learning from noisy labels by regularized estimation of annotator confusion. In CVPR, 2019. 2 +[48] Sunil Thulasidasan, Tanmoy Bhattacharya, Jeff Bilmes, Gopinath Chennupati, and Jamal Mohd-Yusof. Combating label noise in deep learning using abstention. In ICML, 2019. 2 +[49] Arash Vahdat. Toward robustness against label noise in training deep discriminative neural networks. NeurIPS, 2017. 3 +[50] Andreas Veit, Neil Alldrin, Gal Chechik, Ivan Krasin, Abhinav Gupta, and Serge Belongie. Learning from noisy large-scale datasets with minimal supervision. In CVPR, 2017. 3 +[51] Martin J Wainwright. Sharp thresholds for high-dimensional and noisy sparsity recovery using $\ell_1$ -constrained quadratic programming (lasso). IEEE transactions on information theory, 2009. 2, 5 +[52] Yisen Wang, Weiyang Liu, Xingjun Ma, James Bailey, Hongyuan Zha, Le Song, and Shu-Tao Xia. Iterative learning with open-set noisy labels. In CVPR, 2018. 2, 6 +[53] Yisen Wang, Xingjun Ma, Zaiyi Chen, Yuan Luo, Jinfeng Yi, and James Bailey. Symmetric cross entropy for robust learning with noisy labels. In ICCV, 2019. 1, 2, 6 +[54] Yikai Wang, Chengming Xu, Chen Liu, Li Zhang, and Yanwei Fu. Instance credibility inference for few-shot learning. In CVPR, 2020. 2 + +[55] Yikai Wang, Li Zhang, Yuan Yao, and Yanwei Fu. How to trust unlabeled data? instance credibility inference for few-shot learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021. 2 +[56] John Wright, Allen Y. Yang, Arvind Ganesh, S. Shankar Sastry, and Yi Ma. Robust face recognition via sparse representation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2009. 2 +[57] Pengxiang Wu, Songzhu Zheng, Mayank Goswami, Dimitris N Metaxas, and Chao Chen. A topological filter for learning with label noise. NeurIPS, 2020. 1, 2, 6 +[58] Xiaobo Xia, Tongliang Liu, Bo Han, Chen Gong, Nannan Wang, Zongyuan Ge, and Yi Chang. Robust early-learning: Hinding the memorization of noisy labels. In ICLR, 2021. 2 +[59] Tong Xiao, Tian Xia, Yi Yang, Chang Huang, and Xiaogang Wang. Learning from massive noisy labeled data for image classification. In CVPR, 2015. 1, 2, 3 +[60] Kun Yi and Jianxin Wu. Probabilistic end-to-end noise correction for learning with noisy labels. In CVPR, 2019. 3, 6 +[61] Xingrui Yu, Bo Han, Jiangchao Yao, Gang Niu, Ivor Tsang, and Masashi Sugiyama. How does disagreement help generalization against label corruption? In ICML, 2019. 1, 2, 6 +[62] 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. 2, 4 +[63] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In *ICLR*, 2017. 1 +[64] Yikai Zhang, Songzhu Zheng, Pengxiang Wu, Mayank Goswami, and Chao Chen. Learning with feature-dependent label noise: A progressive approach. In ICLR, 2021. 7 +[65] Zhilu Zhang and Mert R Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. In NeurIPS, 2018. 1, 2, 6 +[66] Peng Zhao and Bin Yu. On model selection consistency of lasso. Journal of Machine learning research, 2006. 2, 5 +[67] Tianyi Zhou, Shengjie Wang, and Jeff Bilmes. Robust curriculum learning: From clean label detection to noisy label self-correction. In ICLR, 2021. 1, 2 +[68] Xiong Zhou, Xianming Liu, Junjun Jiang, Xin Gao, and Xiangyang Ji. Asymmetric loss functions for learning with noisy labels. In ICML, 2021. 2 +[69] Xiong Zhou, Xianming Liu, Chenyang Wang, Deming Zhai, Junjun Jiang, and Xiangyang Ji. Learning with noisy labels via sparse regularization. In ICCV, 2021. 2, 4, 6, 7 \ No newline at end of file diff --git a/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/images.zip b/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a3211be5d58490227a37e38ffd74ab17972802df --- /dev/null +++ b/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d12d411061e92100beba30bed4e1442d75f20a4f27882813afbeae7a9454f69 +size 385874 diff --git a/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/layout.json b/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..89404f8a0a5d97dcf0c7ad955b9df21ee20725b1 --- /dev/null +++ b/scalablepenalizedregressionfornoisedetectioninlearningwithnoisylabels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:374fbf4875997be651d7ca43d03837b1c231eb30d58d53d6653f8787cc69897f +size 518534 diff --git a/scaleequivalentdistillationforsemisupervisedobjectdetection/69474184-b1d6-41d7-929d-fe5bda07b4dd_content_list.json b/scaleequivalentdistillationforsemisupervisedobjectdetection/69474184-b1d6-41d7-929d-fe5bda07b4dd_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..77461e2d2a1ef154b6e53df8408c0feb56bd0371 --- /dev/null +++ b/scaleequivalentdistillationforsemisupervisedobjectdetection/69474184-b1d6-41d7-929d-fe5bda07b4dd_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ce9502505e15516ff1e0e809d2af938a50c4ffe8405802b281f405734b481ab +size 74255 diff --git a/scaleequivalentdistillationforsemisupervisedobjectdetection/69474184-b1d6-41d7-929d-fe5bda07b4dd_model.json b/scaleequivalentdistillationforsemisupervisedobjectdetection/69474184-b1d6-41d7-929d-fe5bda07b4dd_model.json new file mode 100644 index 0000000000000000000000000000000000000000..96cf1e8e1293563878e5cf076d14cb183af5e261 --- /dev/null +++ b/scaleequivalentdistillationforsemisupervisedobjectdetection/69474184-b1d6-41d7-929d-fe5bda07b4dd_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7950b55e37aa06e66829076d8700b23f5fcd7357ec7f78507280aa552e168707 +size 88958 diff --git a/scaleequivalentdistillationforsemisupervisedobjectdetection/69474184-b1d6-41d7-929d-fe5bda07b4dd_origin.pdf b/scaleequivalentdistillationforsemisupervisedobjectdetection/69474184-b1d6-41d7-929d-fe5bda07b4dd_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b29e6fe89672e26e90ad8d2679460c3d6c44d6c0 --- /dev/null +++ b/scaleequivalentdistillationforsemisupervisedobjectdetection/69474184-b1d6-41d7-929d-fe5bda07b4dd_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5c4965856b5b30527644e5bc4417778ac26177e75d6fd1eaa59eb3ccc105d09 +size 9759823 diff --git a/scaleequivalentdistillationforsemisupervisedobjectdetection/full.md b/scaleequivalentdistillationforsemisupervisedobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..025e922fb80efb8c34e3086ec9cd72ba01e060c6 --- /dev/null +++ b/scaleequivalentdistillationforsemisupervisedobjectdetection/full.md @@ -0,0 +1,269 @@ +# Scale-Equivalent Distillation for Semi-Supervised Object Detection + +Qiushan Guo $^{1}$ , Yao Mu $^{1}$ , Jianyu Chen $^{2}$ , Tianqi Wang $^{1}$ , Yizhou Yu $^{1}$ , Ping Luo $^{1}$ $^{1}$ The University of Hong Kong $^{2}$ Tsinghua University + +{qsguo, ymu, tqwang, yzyu, pluo}@cs.hku.hk jianyuchen@tsinghua.edu.cn + +# Abstract + +Recent Semi-Supervised Object Detection (SS-OD) methods are mainly based on self-training, i.e., generating hard pseudo-labels by a teacher model on unlabeled data as supervisory signals. Although they achieved certain success, the limited labeled data in semi-supervised learning scales up the challenges of object detection. We analyze the challenges these methods meet with the empirical experiment results. We find that the massive False Negative samples and inferior localization precision lack consideration. Besides, the large variance of object sizes and class imbalance (i.e., the extreme ratio between background and object) hinder the performance of prior arts. Further, we overcome these challenges by introducing a novel approach, Scale-Equivalent Distillation (SED), which is a simple yet effective end-to-end knowledge distillation framework robust to large object size variance and class imbalance. SED has several appealing benefits compared to the previous works. (1) SED imposes a consistency regularization to handle the large scale variance problem. (2) SED alleviates the noise problem from the False Negative samples and inferior localization precision. (3) A re-weighting strategy can implicitly screen the potential foreground regions of the unlabeled data to reduce the effect of class imbalance. Extensive experiments show that SED consistently outperforms the recent state-of-the-art methods on different datasets with significant margins. For example, it surpasses the supervised counterpart by more than 10 mAP when using $5\%$ and $10\%$ labeled data on MS-COCO. + +# 1. Introduction + +Deep neural networks achieve strong results under the supervised learning framework driven by large-scale datasets, such as ImageNet [5] (about 1.28 million labeled images). However, different from classification, object detection further involves locating objects with a bounding box. Therefore, the annotation for object detection is much more expensive, leading to labeled data remaining scarcely related to classification. Recently, Semi-Supervised Learn- + +![](images/705613935ab5bc20abf4583c6d06c85a021985f53322e0708929b2d67da95cf1.jpg) + +![](images/53e87bb062396baccb6e98558fca6e0a3d9ca9203e4a29e4854b211c2af0d546.jpg) +Example of False Negative Sample + +![](images/a3d23797ccc48205c78e789a67728e5dbd4c975162c738886ed03f064a22a073.jpg) +Example of Scale Inconsistency +Figure 1. The overall framework of SED. Our model improves the scale equivalence, which is critical for object detectors, by regularizing the consistency between different-sized images. Furthermore, the inherent False Negative sample noise is alleviated by self-distillation. A re-weighting strategy is adopted to solve the severe class imbalance problem. The bird in the left example is a False Negative sample when the threshold is set to 0.7. The right example shows the scale inconsistency of different-sized images. + +ing (SSL) for classification has received much attention [2, 29, 33, 35], whose results are comparable to the fully supervised model on ImageNet. However, Semi-supervised Object Detection (SS-OD) is more challenging than SSL on ImageNet classification. Recent SS-OD methods improve the performance by leveraging both the limited labeled data and the massive unlabeled data, but they suffer from the large variance of object sizes, massive False Negative samples and class imbalance problem, as illustrated in Fig. 1. + +The scale of objects varies in a small range for the ImageNet classification model, whereas the scale variation of MS-COCO dataset [18] is large across object instances for the detector. As shown in Fig. 2a, the standard deviation of + +the scale of instances in MS-COCO is 188.4 pixels, while that of ImageNet is 56.7 pixels (the square root of area). A detector is supposed to be scale consistent to object instances, which means that the predictions of an image in different sizes should be equivalent [27, 28]. However, the scale consistency has not been considered by the prior arts [19, 30, 36, 39] in SS-OD. We observe a discrepancy in the objectness score, as indicated in Fig. 2b. The ratio of foreground anchor to background anchor increases as the score distance becomes large, which implies that the model detects an object instance while is blind to the instance in a different size. This inconsistency is typically alleviated by the multi-scale inference ensemble, which increases the computational cost and requires complicated operations to fuse the results. + +Besides, the performance of recent SS-OD methods [19, 29] is moderate in the high-data scenario as a consequence of the False Negative object instance and inferior localization precision. As illustrated in Fig. 2c, the recall drops to 0.1 and 0.3 separately when IoU is set to 0.5 and 0.9, which indicates that most foreground instances are False Negative samples. The precision at IoU = 0.9 is less than 0.2, showing that the location of bounding boxes is not accurate enough. The False Negative object instances below the hard threshold cause a recognition inconsistency. + +Another obstacle is that the foreground and background samples are highly imbalanced. The ratio of the foreground to background sample is about 1:25,000 for RetinaNet [17]. Due to the class imbalance problem, treating all regions equally [32] leads to the background samples contributing significantly to the gradient, as illustrated in Fig. 4. Identifying foreground regions from the unlabeled data with the overwhelming background regions is challenging. + +To overcome the challenges motioned above, we propose Scale-Equivalent Distillation (SED), a simple yet effective end-to-end semi-supervised learning framework for object detection. Since scale is an essential factor of the low-dimensional semantic manifolds, we design a scale consistency regularization across the prediction in different levels as a solution to the large object size variance. Moreover, as the noise from hard pseudo-label has detrimental effects on the recognition consistency, a self-distillation method is proposed to improve generalization performance without increasing the learnable parameters. Due to the class imbalance problem, the overwhelming background samples diminish the effect of our method. We implement a re-weighting strategy to focus on the inconsistency among outputs in different levels and the discordance between the teacher and student detector. As a result, our re-weighting approach avoids selecting the potential foreground regions from the unlabeled data explicitly. + +To evaluate the validation of SED, we conduct extensive experiments on benchmarks for object detection, Pas + +cal VOC [7] and MS-COCO [18]. Our method surpasses the supervised counterpart by more than $10\mathrm{mAP}$ when using $5\%$ and $10\%$ labeled data on MS-COCO. Moreover, our method is tested with both one-stage and two-stage detector based on single feature map and feature pyramid. + +Our contributions are listed as follows: (1) SED imposes a scale consistency regularization to overcome the large scale variance challenge. (2) SED alleviates the noise problem which arises from the False Negative samples and inaccurate bounding box regression. (3) A re-weighting strategy can implicitly screen the potential foreground regions from unlabeled data to reduce the effect of class imbalance. + +# 2. Related Works + +Self-Training. Self-training methods first train a teacher model with the labeled dataset and then generate pseudolabels for the unlabeled dataset. Finally, the student model is optimized with both the labeled data and pseudo-labeled data jointly. For the classification task, Self-training methods [1, 2, 29, 33] perform well. However, Semi-Supervised Object Detection is more challenging than Semi-Supervised Image Classification on the balanced dataset. Some works [19, 39] contribute to alleviating the noise problem brought by pseudo-label. Those methods attach additional modules on the two-stage detector to overcome the heavy overfitting problem on the foreground and background classification and refine the hard pseudo-label by ensemble methods. Nevertheless, methods based on hard pseudo-label have an inherent defect that False Negative object instances influence the consistency of recognition, especially whose scores are near the hard threshold. Humble Teacher [32] adopts soft pseudo-labels to avoid the recognition inconsistency but treat all the regions equally. Due to the extreme imbalance of foreground and background, the contribution of gradients from the two kinds of regions is quite different. UBT [19] adopts Focal Loss to alleviate the problem. Unlike the existing works, our method generates soft pseudolabels for unlabeled data in an online manner, and the reweighting strategy automatically screens the potential foreground regions of the unlabeled data. + +Consistency Regularization. Consistency-based Semi-supervised learning uses unlabeled data to stabilize the predictions under input or weight perturbations. For instance, two different views of the same image are supposed to have similar output. This class of methods [20, 26, 33] does not generate pseudo-label but constrains the discrepancy between the outputs, which is known to help smooth the manifold [21]. For SS-OD, CSD [14] applies simple horizontal flip consistency regularization to train a detector to be robust to flip perturbations. The consistency loss fine-tunes the location of the predicted boxes but ignores the object scale perturbations, which are more common in datasets. In MSCOCO [18] detection dataset, the scale of the smallest and + +![](images/3b35d29b87cf7ec876297922f6f46227c744f94eb1b3b2ba4ddd6affaf69f531.jpg) +(a) Instance Size Distribution + +![](images/b6a520c5f14d7c58e19d95fa2ba1cfec14950f0b328f860a8067aa14cd09b1d6.jpg) +(b) Score Distance Distribution +Figure 2. (a) For the COCO dataset, all the images are resized such that the short edge has 800 pixels while the long edge has less than 1333 pixels. For the ImageNet dataset, all the images are resized to $224 \times 224$ to calculate the statistics. The scale of object is represented as the square root of the area. We discuss the typical training input size for ImageNet classification and COCO detection tasks. (b) All the scores are predicted on COCO minival dataset by the RetinaNet detector with FPN and ResNet 50 backbone, which is trained with $10\%$ COCO data. The score distance is the absolute difference between the predictions of the image in different sizes. The Y-axis is the average number of anchors per image. (c) We predict pseudo-label on the rest of COCO training data with a converged Faster-RCNN detector (with FPN and ResNet50 backbone), trained with $10\%$ COCO data. The low average recall and precision show that hard pseudo-label incur more noise with False Negative samples. + +![](images/a03047068467ff1c57771e13cd0a90d8a63cea1d398aeaedbfc71b024c61e303.jpg) +(c) AP and AR w.r.t Score + +largest $10\%$ of object instances is 0.024 and 0.472, respectively. Our method regularizes the predictions of different sizes to solve the large-scale variation. Furthermore, self-distillation [8, 10, 38] benefits from the high-quality prediction of EMA teacher [33], and can be viewed as consistency regularization from the perspective of soft targets. + +Pre-Training. In recent years, it has been a paradigm that pre-train backbone on a large-scale dataset, such as ImageNet [5] or JFT [31], and fine-tune the model on the target dataset, which contains less training data. Large-scale dataset pre-training speeds up converge and helps improve generalization in the small data scenario [12, 40], which is an extreme of semi-supervised learning. SimCLR [4] and MOCO [11] have been shown to build universal representation, which helps achieve a state-of-the-art result in the scenario of semi-supervised learning classification with $10\%$ ImageNet labeled data. In this paper, we fine-tune with ImageNet pre-trained backbone as default for faster convergence and better results when we enter the low-data regime. + +# 3. Scale-Equivalent Distillation + +Problem Definition. Semi-supervised learning is halfway between supervised and unsupervised learning. More precisely, our model is trained with a labeled set $D_{\mathrm{s}} = \{x_{i}^{\mathrm{s}},y_{i}^{\mathrm{s}}\}_{i = 1}^{N_{\mathrm{s}}}$ and an unlabeled set $D_{\mathrm{u}} = \{x_{i}^{\mathrm{u}}\}_{i = 1}^{N_{\mathrm{u}}}$ , where $x$ is image, $N_{\mathrm{s}}$ and $N_{\mathrm{u}}$ are the number of labeled and unlabeled images. For each supervised image $x_{i}^{\mathrm{s}}$ , the annotation $y_{i}^{\mathrm{s}}$ is composed of both the location and category of the bounding boxes in image. + +Overview. During training, Scale-Equivalent Distillation consists of two branches, the supervised and unsupervised branch, as illustrated in Fig. 3. The supervised branch is trained by following the normal procedure, like [17, 24]. The unsupervised branch is under a teacher-student framework, in which the teacher is implemented as an exponent + +tial moving average of the student. SED aims to predict consistently for the scale variants of input. In practice, the student processes the strongly augmented unlabeled images and resized images. The weakly augmented images are fed into the teacher network to predict soft pseudo-label. The scale consistency loss constrains the outputs of different-sized images. Meanwhile, the soft pseudo-label is set as the target of the strongly augmented images. The final loss is the weighted sum of the supervised and unsupervised loss, + +$$ +L = L _ {\text {s u p e r v i s e d}} + \frac {n _ {\mathrm {u}}}{n _ {\mathrm {s}}} \left(\lambda_ {\mathrm {s}} L _ {\text {s c a l e}} + \lambda_ {d} L _ {\text {d i s t i l l}}\right), \tag {1} +$$ + +where $n_{\mathrm{u}}$ , $n_{\mathrm{s}}$ are the batch size of unlabeled data and labeled data. $L_{\mathrm{scale}}$ and $L_{\mathrm{distill}}$ are Scale Consistency Loss and Self-Distillation Loss. For two-stage detectors, the unsupervised losses are applied to both the RPN and RoI head. + +# 3.1. Scale Consistency Regularization + +Recognizing objects in different scales is a fundamental challenge in computer vision. Scale Consistency Regularization is proposed to optimize the detector to predict smoothly and consistently in scale dimension. Typically, mainstream detectors under the feature pyramid network (FPN) framework outperform a single feature map counterpart, as the multi-scale feature representations are semantically strong. Therefore, we take an example for a single-stage detector with FPN to illustrate our method. Scale Consistency Regularization can be extended to the two-stage detectors and single feature map detectors. + +As indicated in Fig. 3, scale consistency loss regularizes predictions from images in different scales. To be more specific, the output class probability and bounding box regression of the $f$ -th feature level, $r$ -th row, $c$ -th column and $d$ -th anchor box are denoted as $P^{f,r,c,d}(X)$ and $R^{f,r,c,d}(X)$ . Considering the memory and calculational cost, the resized + +![](images/a92a6f455dbccb258958285565823518a29016355527e1cf88317f6330df81b2.jpg) +Figure 3. Details of our method. We take an example of a detector with FPN [16] to illustrate our method. $P^2 - P^6$ are the prediction details. The supervised branch shares the Student Model with the unsupervised branch. sg means the prediction of the Teacher Model is not optimized by the gradient. For Scale Consistency Regularization, the loss constrains the predictions from different levels. + +![](images/b9d87bb458120b35ce8bbfba9246cfd9dbd3837980e9cd31eee9d8d5edb98949.jpg) + +image is downsampled to $\frac{1}{2^s}$ original size. Towards handling the large scale variation, the $s$ is uniformly selected from $\{1, 2, \dots, S\}$ , which also matches the sizes of feature maps in FPN and the label assignment rules. The resized image $\hat{X}$ and the original image $X$ are supposed to be predicted consistently for the corresponding levels. Precisely, the scale consistency loss is defined as + +$$ +\begin{array}{l} L _ {\text {s c a l e}} ^ {f} = D _ {\mathrm {K L}} \left(\operatorname {s g} \left(P ^ {f} (X)\right), P ^ {f ^ {\prime}} (\hat {X})\right) \\ + D _ {\mathrm {K L}} \left(\operatorname {s g} \left(P ^ {f ^ {\prime}} (\hat {X})\right), P ^ {f} (X)\right) \tag {2} \\ + \left\| R ^ {f} (X) - R ^ {f ^ {\prime}} (\hat {X}) \right\| _ {2}, \\ \end{array} +$$ + +where $f'$ equals $f - s$ and $\mathrm{sg}$ is stop-gradient operator. For simplicity, the $r, c, d$ coordinate is ignored in Eq. 2. For RPN and single-stage detector, all the anchor points are regularized for consistency; even some of them may not be assigned labels according to the simple IOU threshold matching strategy. In the second-stage detector framework, the proposals are first filtered by NMS and Top-K selection, which is also a default operation in the supervised branch [13, 24] (typically 1000 proposals left for Faster-RCNN FPN). Then the coordinates of the proposals predicted on the resized image are scaled up by $2^s$ times to match the original image, and vice versa. The proposals from the image pair are simply concatenated as a new proposal set for refining bounding boxes and predicting classification scores. For the second stage of Faster-RCNN, all the predictions of the proposal pairs are regularized by scale consistency loss in a similar way as shown in Eq. 2. It is worth noting that, in implementing a two-stage detector, the RoI-Pooling operator may extract features from the same level for the proposal pair, which is slightly different from single-stage detectors. Nevertheless, this operation shares the same core idea that the detector is supposed to be scale consistent. + +# 3.2. Self-Distillation + +Knowledge distillation improves generalization by replacing hard label supervision with soft label predicted by a stronger teacher model. Based on the observation, the teacher model is implemented as an exponential moving average (EMA) of the detector, which is shown to produce a model with better generalization than the student model [22, 33]. The input of the teacher model is weakly augmented. Furthermore, the model is supposed to predict consistently for similar data points. The student model is input with the strongly augmented image to propagate label to neighbor points in the semantic manifold space. For simplicity, the strong augmentation is only composed of color transformation and Cutout [6], which doesn't contain the geometric transformation. The self-distillation loss is formulated as + +$$ +\begin{array}{l} L _ {\text {d i s t l l}} ^ {i} = D _ {\mathrm {K L}} \left(\operatorname {s g} \left(P ^ {i} \left(X ^ {\prime}, \theta_ {t}\right), P ^ {i} \left(X, \theta_ {s}\right)\right) \right. \\ \begin{array}{l} - D _ {\mathrm {K L}} (\mathrm {s g} (F (X, \theta_ {t})), F (X, \theta_ {s})) \\ + | | \mathrm {s g} (R ^ {i} (X ^ {\prime}, \theta_ {t})) - R ^ {i} (X, \theta_ {s}) | | _ {2}, \end{array} \tag {3} \\ \end{array} +$$ + +where $i$ is the $i$ -th anchor box, $X'$ is the weakly augmented image and $X$ is the strongly augmented image. $P$ and $R$ represent the classification score and bounding box regression same as in Eq. 2. The slowly progressing teacher model weights $\theta_t$ are updated from the student model weights $\theta_s$ every iteration, + +$$ +\theta_ {t} = \alpha \theta_ {t} + (1 - \alpha) \theta_ {s}. \tag {4} +$$ + +Self-Distillation loss constrains each anchor point for RPN and one-stage detector, similar to Scale Consistency Regularization. In the scenario of the two-stage detector, all the proposals are simply concatenated as a new proposal set. Similar to Scale Consistency Regularization, all the predictions of RoIs are regularized as Eq. 3. + +![](images/173a4a36e651378dd949913245a86842a3c3655f5732f1d5b4d49b4271b3990e.jpg) +Figure 4. The average sample is the average anchor number in a single image. The vanilla method is simply treating all samples equally. The samples with large gradients do not contribute significantly because the sample number is relatively small. Our re-weighting strategy focuses on the samples with large score discrepancies and linearizes the relationship between gradient contribution and score distance. + +![](images/94102b4b4535fb73b5f468b1597be84185daf106e5b78f8171f5fa3ffade15e0.jpg) + +![](images/c8d059996ead291148429cc79e252420de24b3795b2670969bc18f5cf1e20ba7.jpg) + +# 3.3. Re-weighting Strategy + +One-stage object detection methods, like RetinaNet [17] and RPN [24], face an extremely class imbalance during training. Due to the overwhelming background samples, most objectness scores are close to 0. Therefore, the KL divergence between the target and source distribution in Eq. 2 and Eq. 3 is close to 0 for most anchor boxes. Simply averaging the unsupervised loss leads to the easy samples contributing significantly to the gradient, as illustrated in Fig. 4. We aim to reduce the discrepancy between similar unlabeled inputs, especially for the potential foreground instances predicted with high objectness scores. In other words, the hard examples should contribute to the gradient more than the easy examples. Inspired by the Gradient Harmonizing Mechanism [15], we re-weight the KL-divergence by the sample numbers in a gradient range to build a linear relationship between the gradient norm and the integral gradient contribution, as illustrated in Fig. 4. Specifically, the gradient of the logits $z$ with KL divergence loss between probability vector $p$ and target probability vector $p'$ is $g = \sum_{i=1}^{C} |p_i - p_i'|$ , where $C$ is the length of probability vector. Then a histogram is constructed by splitting the gradient range [0, 1] into $M$ bins equally. The number of samples in the $j$ -th bin is denoted as $R_j$ , and the index of the bin where gradient $g$ is located is defined as $idx(g)$ . Finally, we have the loss function on $N$ samples: + +$$ +L = \frac {1}{M} \sum_ {i = 1} ^ {N} \frac {D _ {\mathrm {K L}} \left(p _ {i} ^ {\prime} , p _ {i}\right)}{R _ {\mathrm {i d x} \left(g _ {i}\right)}}. \tag {5} +$$ + +As the main bottleneck is detecting objects from the background rather than regression, only the classification loss is re-weighted by the above strategy in scale consistency loss and self-distillation loss. Our goal is to enlarge the contribution from the samples with significant discrepancies. The other methods to solve the class imbalance problem may also improve the performance. + +
MethodDataLRIterAP50
SupervisedVOC070.0140k74.30
STAC [30]VOC07+120.001180k77.45
DGML [34]VOC07+12--78.60
UBT [19]VOC07+120.01180k77.37
ISMT [36]VOC07+12--77.23
IT [39]VOC07+120.01180k78.30
OursVOC07+120.0140k80.60
+ +Table 1. Results on Pascal VOC 2007 test set. For all the semi-supervised methods, Pascal VOC 2012 train set is treated as unlabeled data. Iter means the total training iterations. “-” means that the results or training details are missing in the source paper. + +# 4. Experiments + +Datasets. We mainly verify the validity of our method on the challenging objective detection dataset MS-COCO [18], which contains 80 object categories with about $118\mathrm{k}$ images for training and $5\mathrm{k}$ images for validation. For a fair comparison, we follow the experimental setup as in the previous works [19,30,32,34,39]. In particular, there are three experimental settings: (1) PASCAL VOC: the VOC07 [7] trainval set is used as the labeled dataset and the VOC12 trainval set is used as the unlabeled dataset, as described in Sec.3. The performance is evaluated on the VOC07 test set. VOC07 trainval and VOC12 trainval contains 5,011 and 11,540 images respectively, resulting in a roughly 1:2 ratio of labeled data to unlabeled data. (2) COCO-standard: we randomly sample 5 and $10\%$ of MS-COCO 2017 training data as the labeled dataset and treat the rest of the training data as the unlabeled dataset. As the COCO train dataset contains $118\mathrm{k}$ images and is class-imbalanced, some categories are composed of less than 500 instances. When data percent is $0.5\%$ and $1\%$ , there are only less than 5 instances in the labeled dataset for these categories. This setting is + +
MethodData PercentLRIterationStages
5%10%100%
Supervised18.4723.8638.400.02180k-
STAC [30]24.38(+5.91)28.64(+4.78)-0.01180kTwo
Unbiased Teacher [19]27.84(+9.37)31.39(+7.53)-0.01180kSingle
Instant Teacher [39]26.75(+8.28)30.40(+6.54)40.20(+1.80)0.01180kSingle
Interactive Teacher [36]26.37(+7.90)30.53(+6.67)39.64 (+1.24)--Single
Multi-Phase Learning [34]--40.30 (+1.90)--Three
Ours29.01(+10.54)34.02(+10.16)41.50(+3.10)0.01180kSingle
Supervised--40.200.02270k-
STAC [30]--39.21(-0.99)0.01540kTwo
Unbiased Teacher [19]--41.30(+1.10)0.01270kSingle
Ours--43.40(+3.20)0.02270kSingle
+ +more like few-shot learning than semi-supervised learning. Therefore, we do not report the performance. For the $100\%$ data training setting, the whole training set is used as the labeled dataset, and the additional 123k unlabeled images are used as the unlabeled dataset. The model is tested on the MS-COCO 2017 validation set. (3) COCO-35k: we use the 35k subset of MS-COCO 2014 validation set as the labeled dataset and the 80k training set as the unlabeled dataset. The result is reported on the MS-COCO 2014 minival set. + +Implementation Details. Following STAC [30], we use Faster-RCNN [24] with FPN [16] and ResNet-50 backbone as our default object detector. The weights of the backbone are initialized by the corresponding ImageNet-Pretrained model, which is a default setting in the existing works [14, 19, 30, 39]. The stem and first stage of the backbone are frozen, and all BatchNorm layers are in eval mode. The weak data augmentation only contains random resize from (1333, 640) to (1333, 800) and random horizontal flip. The strong data augmentation comprises random Color Jittering, Grayscale, Gaussian Blur, and Cutout [6], without any geometric augmentation. More training and data augmentation details are in the Appendix. + +# 4.1. Results + +Pascal VOC. In Tab. 1, our method outperforms both previous multi-stage methods and single-stage methods by a large margin. Our model achieves $80.6\%$ AP with $6.3\%$ gain from additional VOC2012 data. In the meantime, our proposed method requires fewer training iterations, showing that our approach is effective yet efficient. Besides, our augmentation only contains color transformation without any geometric transformation or strong regularization, such as Mixup [37] and DropBlock [9]. + +COCO-standard. Given the whole training set, our + +Table 2. Results on MS-COCO 2017 val set. For $5\%$ and $10\%$ protocols, the results are the mean over 5 data folds. Stages are the number of training phases. For example, STAC has two stages: train a teacher model first to hard pseudo-label and train a student model with both labeled and pseudo-labeled data. “-” means that the results or training details are missing in the source paper. + +
MethodSUPDD [23]DGML [34]OracleOurs
mAP31.333.135.237.438.1
+ +Table 3. Results on MS-COCO 2014 minival set. SUP is to train the model only with the labeled data. Oracle means treating all the 115k images as labeled data and training with only the supervised loss. + +method even further improves the strong baseline by 3.2 mAP. For a fair comparison, the learning rate and training iterations are listed in Tab. 2. Our method surpasses the previous methods under different settings of the ratio of labeled data to unlabeled data, from roughly 1:1 to 1:20, on the class-imbalanced MS-COCO dataset. Note that UBT uses Focal Loss to handle the class imbalance issue among ground truths, while we adopt the original Faster-RCNN implementation, standard cross-entropy loss. Our method focuses on the imbalance problem between foreground and background, which is more general in practice. Especially, SED achieves more than $10\mathrm{mAP}$ improvements against the supervised baseline when using $5\%$ and $10\%$ labeled MS-COCO data. With $10\%$ labeled data, the performance of SED is comparable to the fully supervised baseline model. + +COCO-35k. MS-COCO 2014 minival set is identical to MS-COCO 2017 val set. Tab. 3 shows that our method even outperforms the Oracle result with only 35k labeled data, benefiting from the scale consistency regularization, self-distillation, and strong augmentation. The promising result indicates that the semi-supervised method can achieve a comparable result to a fully supervised counterpart. + +# 4.2. Ablation Study + +Scale Consistency Regularization constrains the discrepancy between the predictions of images of different + +
MethodSCRSelf-DistillReweightmAP
HardSoft
SUP23.86
Ours✓26.80
✓✓30.10
✓29.80
✓✓31.40
✓✓✓29.50
✓✓✓34.00
+ +Table 4. The ablative results on MS-COCO 2017 val set. The models are trained with $10\%$ labeled and $90\%$ unlabeled MS-COCO train 2017 split. The SCR represents the scale consistency regularization. We test the self-distillation with two types of target: hard target and soft target. + +sizes. By comparing the second row in Tab. 4 with baseline, we find that Scale Consistency Regularization improves about $3\mathrm{mAP}$ without our re-weighting strategy, naively averaging the loss across the anchor boxes and RoIs. Although suffering from the class imbalance problem, Scale Consistency Regularization is promising. Fig. 2b shows that the discordance between different sizes is alleviated. + +Self-Distillation with Soft Target surpasses the hard pseudo-label counterpart over $4.5\mathrm{mAP}$ , which demonstrates that the quality of hard pseudo-label is inferior. Self-Distillation gains about $6\mathrm{mAP}$ against the baseline individually. The soft target method benefits from fewer False Negative samples and the structural information via knowledge distillation. Furthermore, our approach based on soft target is threshold-free, which is simpler and easier to transfer to other datasets. + +Re-weighting Strategy focuses on the anchor or RoI pairs with large discrepancies and transforms the relationship between gradient contribution and score distance to linearity. The results of Scale Consistency Regularization and Self-Distillation with Soft Target are increased by 3.3 mAP and $1.6\mathrm{mAP}$ separately. For Faster-RCNN, our reweighting strategy still takes effect even though the RoIs are predicted after NMS and Top-K selection operation, increasing the foreground to background sample ratio. + +# 4.3. Discussion + +How to Extend SED to Other Detectors. Most detectors (e.g. RetinaNet, Faster-RCNN) assign foreground labels to the "anchor box" according to a similar rule, the Intersection-over-Union (IoU) threshold criterion. For DETR [3], a single feature map detector, we match the predictions of input in different views according to Hungarian algorithm, where the pair-wise matching cost is defined as: $L_{\mathrm{match}} = D_{\mathrm{JS}}(p_1,p_2) + \lambda L_{\mathrm{IoU}}(b_1,b_2)$ , where $D_{\mathrm{JS}}(p_1,p_2)$ is JS-Divergence between the probability vectors and $L_{\mathrm{IoU}}$ + +
ModelRetina w R50Retina w R18DETR w R50
SUP23.621.564.9
Ours33.031.469.3
+ +Table 5. For RetinaNet, the experiments are conducted on MS-COCO set with $10\%$ labeled training data. Due to the extremely long training epoch of DETR, we report the result on Pascal VOC 2007 test set. Both supervised and our DETR are trained for 300 epochs. + +
Range[640, 800][300, 1200]Ours [640, 800]
Result31.432.034.0
+ +Table 6. The scale jittering results on MS-COCO 2017 val set. The models are trained with $10\%$ labeled and $90\%$ unlabeled MS-COCO train 2017 split. Range is the range of the short edge. The results show that the scale consistency loss is beyond large scale jittering augmentation. + +is GIoU loss [25]. According to the above analysis, our method can be extended to RetinaNet and DETR with different backbones. The results in Tab. 5 demonstrate that our method is valid for different classes of the detector. + +Relationship with Large Scale Jittering. The proposed scale consistency regularization is more than large scale jittering augmentation. The object of our method is $L = L(x) + L(x') + L_{\mathrm{scr}}(x, x')$ , while the object of a large scale jittering augmentation is $L = L(x) + L(x')$ , where $x$ and $x'$ are the input image in different views. The $L_{\mathrm{scr}}$ is the scale consistency loss. The constraint of our method is stronger than large scale jittering augmentation. Thus we believe that the parameter space of local minimum is a subset of that of large scale jittering. Tab. 6 also shows that our method encourages the model to converge with less generalization error. + +Relationship with Multi-Scale Testing. Tab. 7 shows that the baseline models benefit from multi-scale testing by an ensemble with NMS (Threshold=0.5). The model trained with $10\%$ labeled data is increased by $2.0\mathrm{mAP}$ , and the fully supervised model (SUP $100\%$ ) gets $1.5\mathrm{mAP}$ improvement. However, this improvement comes from the discrepancy between the predictions of images in different sizes. Moreover, the ensemble method also consumes $2.5\times$ more inference time than the single-scale testing method. Our method benefits less from multi-scale testing as a consequence of the proposed scale consistency regularization. Our method significantly improves the single-scale testing performance, which has more practical value. + +Downsampling Rate in Scale Consistency Regularization. As shown in Tab. 8, the model achieves the best result when the downsampling rate is set to 2 (i.e. the $S$ in + +
ModelImage SizeEnsemble
4808001200
SUP 10%22.924.122.526.1(+2.0)
SUP 100%33.737.436.838.9(+1.5)
Ours 10%31.534.233.034.8(+0.6)
+ +![](images/3162e895e72779827dd3896705e0b36b1f8e5b1ccbf0e559904834400da899ef.jpg) +Figure 5. The CDF of instance size for Faster-RCNN detector on MS-COCO train dataset. The range of valid instance is calculated according to the label assignment rule. + +Sec. 3.1 is set to 1.). The performance is inferior as the downsampling rate scales up, which means that regularizing the scale consistency with too small images is less effective. The anchor-based detector refines the prior boxes, which constrains the valid detection scale range (from 22.6 to 724.1 pixel², theoretically). Fig. 5 shows that the fraction of instances in the valid range is highest when the downsampling rate is set to 2. All the models are trained with 10% COCO training data, using RetinaNet with FPN and ResNet-18 backbone in Tab. 8. + +Exponential Moving Average (EMA) Rate of Teacher model. In Eq. 4, the weight of the teacher is updated in an exponential moving average manner. The EMA update can be viewed as the average weight of the models in the past $\frac{\alpha}{1 - \alpha}$ steps approximately. As the learning rate policy is step, which decays the learning rate by 0.1 at each milestone iteration, the performance of the teacher is inferior to the student model after switching the learning rate, which leads to the degradation of the student model. We observe the same appearance in UBT [19], which sets the $\alpha$ to 0.9996 and adopts step learning rate policy. To alleviate the degradation, we propose to decay the EMA update rate at the same milestone iteration as the learning rate. The results in Tab. 9 show that our step decay method and cosine decay method both surpass the baseline model. + +Compare Re-weighting strategy with other methods. We conduct experiments by replacing our re-weighting + +Table 7. Multi-Scale Testing on MS-COCO 2017 val set. The small gain indicates that the detector consistently predicts images in different sizes, which means robust to scale variance. + +
RatemAP
123.0
226.1
425.2
823.1
1621.1
+ +Table 8. Results on COCO val set. Rate is the down sampling rate. + +
StartEndPolicymAP
0.9960.9Cosine33.0
0.990.9Step34.1
0.950.95None32.0
+ +Table 9. Results on COCO val set. Start and End mean the initial EMA update rate and the target rate. Cosine policy is cosine annealing schedule. Our Step policy only decays once at the first milestone iteration. + +
MethodVanillaOHEM [32]Focal [17]Ours
Result30.131.431.234.0
+ +Table 10. The comparison results of re-weight strategy on MS-COCO 2017 val set. The Faster-RCNN models are trained with $10\%$ labeled and $90\%$ unlabeled MS-COCO train 2017 split. + +strategy with OHEM (Online Hard Example Mining) and Focal Loss [17]. The vanilla method is training without any class balancing technique. The results in Tab. 10 show that our method is effective. + +# 5. Conclusion + +In this work, we introduce a novel semi-supervised object detection framework based on the consistency regularization method. Our scale consistency regularization overcomes the large scale variance challenge and significantly improves the performance on single-scale testing. Further, SED alleviates the negative effect of False Negative samples and benefits from the structural information via knowledge distillation. The re-weighting strategy focuses on the potential foreground regions of the unlabeled data and linearizes the relationship gradient contribution and score distance. Experiments on MS-COCO and Pascal VOC show that Scale-Equivalent Distillation significantly improves the performance with different ratios of labeled data to unlabeled data and can be extended to different detector classes. Our framework is a holistic approach compatible with other semi-supervised methods, such as Mixmatch and Noisy student self-distillation. In addition, Scale-Equivalent Distillation framework could be further extended to other dense prediction tasks, like instance segmentation, joint human parsing, and post estimation. Our method has great potential to promote the development of semi-supervised learning and further reduce the dependence of labeled data with no negative social impact. + +Acknowledgement. Ping Luo is supported by the General Research Fund of HK No.27208720 and 17212120. + +# References + +[1] David Berthelot, Nicholas Carlini, Ekin D Cubuk, Alex Kurakin, Kihyuk Sohn, Han Zhang, and Colin Raffel. Remix-match: Semi-supervised learning with distribution matching and augmentation anchoring. 2020. 2 +[2] 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, 2019. 1, 2 +[3] 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. 7 +[4] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In Hal Daumé III and Aarti Singh, editors, Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 1597-1607. PMLR, 13-18 Jul 2020. 3 +[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. 1, 3 +[6] Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552, 2017. 4, 6 +[7] 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, 5 +[8] Tommaso Furlanello, Zachary Lipton, Michael Tschannen, Laurent Itti, and Anima Anandkumar. Born again neural networks. In International Conference on Machine Learning, pages 1607-1616. PMLR, 2018. 3 +[9] Golnaz Ghiasi, Tsung-Yi Lin, and Quoc V Le. Dropblock: A regularization method for convolutional networks. arXiv preprint arXiv:1810.12890, 2018.6 +[10] Qiushan Guo, Xinjiang Wang, Yichao Wu, Zhipeng Yu, Ding Liang, Xiaolin Hu, and Ping Luo. Online knowledge distillation via collaborative learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11020-11029, 2020. 3 +[11] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9729-9738, 2020. 3 +[12] Kaiming He, Ross Girshick, and Piotr Dollar. Rethinking imageNet pre-training. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4918-4927, 2019. 3 +[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. 4 + +[14] Jisoo Jeong, Seungeui Lee, Jeesoo Kim, and Nojun Kwak. Consistency-based semi-supervised learning for object detection. Advances in neural information processing systems, 32:10759-10768, 2019. 2, 6 +[15] Buyu Li, Yu Liu, and Xiaogang Wang. Gradient harmonized single-stage detector. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8577-8584, 2019. 5 +[16] Tsung-Yi Lin, Piotr Dólar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2117-2125, 2017. 4, 6 +[17] 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. 2, 3, 5, 8 +[18] 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, 2, 5 +[19] Yen-Cheng Liu, Chih-Yao Ma, Zijian He, Chia-Wen Kuo, Kan Chen, Peizhao Zhang, Bichen Wu, Zsolt Kira, and Peter Vajda. Unbiased teacher for semi-supervised object detection. arXiv preprint arXiv:2102.09480, 2021. 2, 5, 6, 8 +[20] Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. IEEE transactions on pattern analysis and machine intelligence, 41(8):1979–1993, 2018. 2 +[21] Avital Oliver, Augustus Odena, Colin Raffel, Ekin D Cubuk, and Ian J Goodfellow. Realistic evaluation of deep semi-supervised learning algorithms. arXiv preprint arXiv:1804.09170, 2018. 2 +[22] Boris T Polyak and Anatoli B Juditsky. Acceleration of stochastic approximation by averaging. SIAM journal on control and optimization, 30(4):838-855, 1992. 4 +[23] Ilija Radosavovic, Piotr Dollar, Ross Girshick, Georgia Gkioxari, and Kaiming He. Data distillation: Towards omnisupervised learning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4119-4128, 2018. 6 +[24] 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. 3, 4, 5, 6 +[25] Hamid Rezatofighi, Nathan Tsoi, JunYoung Gwak, Amir Sadeghian, Ian Reid, and Silvio Savarese. Generalized intersection over union: A metric and a loss for bounding box regression. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 658-666, 2019. 7 +[26] Laine Samuli and Aila Timo. Temporal ensembling for semi-supervised learning. In International Conference on Learning Representations (ICLR), volume 4, page 6, 2017. 2 +[27] Bharat Singh and Larry S Davis. An analysis of scale invariance in object detection snip. In Proceedings of the + +IEEE conference on computer vision and pattern recognition, pages 3578-3587, 2018. 2 +[28] Bharat Singh, Mahyar Najibi, and Larry S Davis. Sniper: Efficient multi-scale training. arXiv preprint arXiv:1805.09300, 2018. 2 +[29] 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. arXiv preprint arXiv:2001.07685, 2020. 1, 2 +[30] Kihyuk Sohn, Zizhao Zhang, Chun-Liang Li, Han Zhang, Chen-Yu Lee, and Tomas Pfister. A simple semi-supervised learning framework for object detection. arXiv preprint arXiv:2005.04757, 2020. 2, 5, 6 +[31] Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting unreasonable effectiveness of data in deep learning era. In Proceedings of the IEEE international conference on computer vision, pages 843-852, 2017. 3 +[32] Yihe Tang, Weifeng Chen, Yijun Luo, and Yuting Zhang. Humble teachers teach better students for semi-supervised object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3132-3141, 2021. 2, 5, 8 +[33] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pages 1195–1204, 2017. 1, 2, 3, 4 +[34] Zhenyu Wang, Yali Li, Ye Guo, Lu Fang, and Shengjin Wang. Data-uncertainty guided multi-phase learning for semi-supervised object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4568–4577, 2021. 5, 6 +[35] 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 +[36] Qize Yang, Xihan Wei, Biao Wang, Xian-Sheng Hua, and Lei Zhang. Interactive self-training with mean teachers for semi-supervised object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5941-5950, 2021. 2, 5, 6 +[37] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017. 6 +[38] Ying Zhang, Tao Xiang, Timothy M Hospedales, and Huchuan Lu. Deep mutual learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4320-4328, 2018. 3 +[39] 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, 5, 6 +[40] Barret Zoph, Golnaz Ghiasi, Tsung-Yi Lin, Yin Cui, Hanxiao Liu, Ekin D Cubuk, and Quoc V Le. Rethinking pre-training and self-training. arXiv preprint arXiv:2006.06882, 2020. 3 \ No newline at end of file diff --git a/scaleequivalentdistillationforsemisupervisedobjectdetection/images.zip b/scaleequivalentdistillationforsemisupervisedobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ce621daa4f197407bfece9d9a8356059c636839b --- /dev/null +++ b/scaleequivalentdistillationforsemisupervisedobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d714f3c5b02437471b09ce8517fd4814b030c33b0d34af3e2bdacada98790010 +size 498277 diff --git a/scaleequivalentdistillationforsemisupervisedobjectdetection/layout.json b/scaleequivalentdistillationforsemisupervisedobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f23c9462b09fc2ef85d8999a974707f5c8e89c70 --- /dev/null +++ b/scaleequivalentdistillationforsemisupervisedobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bac1b6aac6b14ef8a12c5a7eec63d45778036f6ab49b1bca2080a4ab85f02b47 +size 366729 diff --git a/scalenetashallowarchitectureforscaleestimation/f1e18ebf-284a-4aa5-8354-bcdc0545144d_content_list.json b/scalenetashallowarchitectureforscaleestimation/f1e18ebf-284a-4aa5-8354-bcdc0545144d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..325d219eb716a61a6c92cb03caeded56ef70cf67 --- /dev/null +++ b/scalenetashallowarchitectureforscaleestimation/f1e18ebf-284a-4aa5-8354-bcdc0545144d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7ecedb7f6a7cce7048964d1557ed8240d5875fefeb15422d3546c733f79f03d +size 79899 diff --git a/scalenetashallowarchitectureforscaleestimation/f1e18ebf-284a-4aa5-8354-bcdc0545144d_model.json b/scalenetashallowarchitectureforscaleestimation/f1e18ebf-284a-4aa5-8354-bcdc0545144d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c3d83e67f81e2d7561caeffb151631ae2adf077c --- /dev/null +++ b/scalenetashallowarchitectureforscaleestimation/f1e18ebf-284a-4aa5-8354-bcdc0545144d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba9220e1cd2a11428bf58844a0d548660c867897aab41349275cc60e8dbfff60 +size 99062 diff --git a/scalenetashallowarchitectureforscaleestimation/f1e18ebf-284a-4aa5-8354-bcdc0545144d_origin.pdf b/scalenetashallowarchitectureforscaleestimation/f1e18ebf-284a-4aa5-8354-bcdc0545144d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b3ce71a0ab2298ccd5bc6158872cf4b1ab413bcf --- /dev/null +++ b/scalenetashallowarchitectureforscaleestimation/f1e18ebf-284a-4aa5-8354-bcdc0545144d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89ca87f7773d27b2550ff3eabe6b71201726d99763caaa58b05aa494dfdfed3f +size 2239144 diff --git a/scalenetashallowarchitectureforscaleestimation/full.md b/scalenetashallowarchitectureforscaleestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..16b735daddd7c2188591680a49ef24fdf7cf8cd8 --- /dev/null +++ b/scalenetashallowarchitectureforscaleestimation/full.md @@ -0,0 +1,302 @@ +# ScaleNet: A Shallow Architecture for Scale Estimation + +Axel Barroso-Laguna + +Yurun Tian + +Imperial College London + +{axel.barrosol7, yurun.tian, k.mikolajczyk}@imperial.ac.uk + +Krystian Mikolajczyk + +# Abstract + +In this paper, we address the problem of estimating scale factors between images. We formulate the scale estimation problem as a prediction of a probability distribution over scale factors. We design a new architecture, ScaleNet, that exploits dilated convolutions as well as self-and cross-correlation layers to predict the scale between images. We demonstrate that rectifying images with estimated scales leads to significant performance improvements for various tasks and methods. Specifically, we show how ScaleNet can be combined with sparse local features and dense correspondence networks to improve camera pose estimation, 3D reconstruction, or dense geometric matching in different benchmarks and datasets. We provide an extensive evaluation on several tasks, and analyze the computational overhead of ScaleNet. The code, evaluation protocols, and trained models are publicly available at https://github.com/axelBarroso/ScaleNet. + +# 1. Introduction + +Establishing correspondences is the very first step in many different 3D pipelines. Advancing on this task will have a direct impact on the performance of downstream applications such as camera pose estimation [39], autonomous driving [6], or 3D reconstructions [41]. However, methods that search for correspondences between images face significant challenges, and although some solutions are more mature than others, the task still is far from being solved. + +As the field advances, even though the intermediate tasks in the correspondence search remain the same, their methods are being revisited and redesigned, e.g., keypoint detectors/descriptors [10, 11, 37], dense geometric matchers [25, 53], or geometric verification techniques [31, 40, 46]. These new approaches have shown that the downstream tasks can be pushed to new performance levels through robust correspondences. The key objective of these new methods is to handle more and more extreme cases where previous pipelines failed, and although some methods are arguably application-specific [60], their robustness to extreme + +![](images/47c03866aab67df17cef525a05818edfd4514bb8cb377060f5418c9f82b980af.jpg) + +![](images/f4e6ccf96223d7180ea66b6c6bf7b7264161ffe9a19dd1abd51a1870c4c48a40.jpg) +Figure 1. We propose a scale-aware system that helps establish correspondences under strong scale changes, allowing to correctly match pairs where previous pipelines were not successful. We introduce ScaleNet, a network that estimates the scale distribution between two images so that regions of interest can be corrected and exhibit the same scale factor (top). We display (bottom) an indoor and outdoor example where matches from R2D2 with multiscale pyramid (left) increase if using ScaleNet rectification (right). + +conditions is the main reason for success. + +Inspired by the previous methods targeting visual robustness [29, 30, 58], we address the problem of handling the scale change between images, which is a long-standing challenge in computer vision [23, 26]. Scale robustness and estimation have been the focus of much research in the area of handcrafted feature extraction [23, 54, 60] as a reliable solution that can significantly boost the performance of existing methods. Moreover, the scale change is arguably the most challenging, and the most important parameter to estimate compared to rotation, translation, or even local affine deformations [54]. There are several strategies to deal with scale changes, with the multi-scale pyramid being one of the most popular solutions [3,4,11,23,37,52,54]. Although the multi-scale pyramid mitigates the problem of different + +scales, it increases complexity and ambiguity as the matcher needs to establish correspondences among multiple scale levels. Figure 1 (bottom) shows an example of extreme pairs for which R2D2 [37] with multi-scale pyramid can only get a high number of correct matches once we rectify the scales. Besides the added complexity, a multi-scale pyramid is not always a straightforward solution to incorporate in some methods, such as dense correspondence networks [18,45,53]. In contrast to multi-scale pyramids, some works aim at being invariant to different scales through their learning process [10,34], however, as a side effect, they become progressively less discriminative [55]. Another possible direction, and popular strategy, is to estimate the local or global transformations and rectify the images prior to establishing the correspondences [30,36,50,58]. + +The scale factor characterizes the relationship between pairs of images and, in general, an accurate estimate can only be achieved when considering both images at the same time. Using pairs of images as input may increase the complexity beyond acceptable in some applications such as large-scale retrieval and localization unless used in their final verification stage. Nonetheless, solving the scale before the main analysis improves the discriminative power and allows less robust but more efficient methods to be used in challenging scenarios [34]. Hence, we propose a new approach that estimates and corrects the scale factor between a given pair of images before the correspondence search, which is illustrated at the top of figure 1. Our scale predictor network, termed ScaleNet, is inspired by dense geometric methods [25, 51, 53] and conditioned local features extractors [14, 34, 55]. ScaleNet extracts features from two low-resolution images and exploits CNN correlation layers to predict the scale factor. Due to the non-linear nature of scale changes, we formulate the scale regression problem as the estimation of a probability distribution in logarithmic space. We show how ScaleNet can be combined with different methods and demonstrate the improvements on different tasks and datasets. + +Our contributions include: 1) a scale-aware matching system based on a novel scale predictor architecture, 2) a strategy to measure and label the scale factor between two images, and 3) a learning scheme that tackles the non-linear nature of scale changes. + +# 2. Related work + +Recent works have allowed significant progress in establishing good correspondences between images. Although many works have focused on solving entire tasks in an end-to-end manner [5, 39], there are lots of efforts focused on identifying limitations and improving the robustness of individual steps in modern pipelines [3, 28, 40]. + +Image rectification consists of predicting or applying a + +set of transformations to the images so that the search for correspondences is done in an optimum setting. Pioneering work on this area is ASIFT [58], which applies multiple affine transformations to find less challenging image pairs for matching with SIFT [23]. MODS [29] investigated this line of work by introducing an iterative scheme to generate intermediate synthetic views between images. MODS also proposed an adaptive system to avoid applying synthetic transformations to easy-to-match pairs, being faster and more versatile than previous ASIFT. Closer to our work is [60], which computes the scale factor between a pair of images by detecting and matching exhaustively SIFT features on multiple scale levels. Although it shows that they can deal with strong scale changes, their method is tied to the need of visiting all possible scaled images before the actual local feature matching stage. One negative aspect of these methods is that they still require a blind exploration of synthetic views to find the optimal image transformations. A few works have tried to overcome the previous limitation and proposed to learn such parameterizations directly from the images. One of the first attempts is [57], where authors introduced a neural network to assign a canonical orientation to every input image patch before the descriptor architecture. In AffNet [30], authors follow this trend and learn a full affine shape estimator to geometrically align input patches before the descriptor. Moreover, [36] proposed a scene-specific overlapping estimator and showed that scale rectification based on image overlapping can improve feature matching. Unlike previously learned methods, our labeling strategy is based on keypoint distance ratios, resulting in a scene-agnostic scale predictor that uses pairs of images as input. Even though our ScaleNet tackles only the scale factor out of several possible transformation parameters, we show in section 5 that the scale factor is crucial for boosting the performance of current methods. + +Visual robustness has been the focus of numerous works in the field of correspondence search [4, 13, 24]. The rotation has been addressed by correcting input patches [13, 23, 30] before extracting local descriptors [28,48,49], or by designing robust architectures [4, 22, 24]. However, in the context of scale changes, the standard strategy is the well-known multi-scale (M-S) pyramid approach, which applies methods at different re-scaled versions of the image [11, 37, 47]. Even though M-S pyramids offer a versatile solution for many applications, it does not provide a suitable approach for extreme scale changes (cf. section 5), and thus, both, single and multi-scale feature extractors, benefit from correcting the scale factor before extracting features. Moreover, recent works show that there is growing interest in pair-wise methods, i.e., that use two input images at the same time to establish the local or dense correspondences [14, 18, 25, 35, 45, 53, 55], but, in that scenario, there is no + +![](images/15a3d138d4cf48a9e3fed26a166f74200cb91ed7bf388fe0bc578f83463d28f4.jpg) +Figure 2. ScaleNet uses a multi-scale (M-S) feature extractor and a combination of self- and cross-correlation layers to calculate the relationship within each image and between them. The M-S extractor is composed of a common CNN and an ASPP block [7, 8]. The ASPP module consists of three $3 \times 3$ convolutional layers with different dilation rates. Conv blocks perform $1 \times 1$ convolutions to learn the cross-channel interactions that go into the self- and cross-correlation layers. Correlation volumes' dimensionality is reduced through a CNN, and its results are concatenated into a flat feature vector. Finally, consecutive fully connected layers calculate the scale distribution. + +![](images/56ceb0308594bbc9febdd6ad988bd3cd5bce6183c34f52794bbcf477cd64921e.jpg) + +clear or effective strategy for dealing with scale changes. Hence, given that such methods already take two images as inputs, ScaleNet rectification offers a more natural and intuitive process towards visual robustness than M-S pyramids. + +# 3. Method + +ScaleNet embraces several key concepts to deliver good performance in practical settings. The first key aspect is that it is effective for low-resolution images, which makes it more efficient. Another important idea is the formulation of the scale estimation as a distribution prediction in logarithmic space rather than a regression problem [17, 30, 56]. This allows using a simple and shallow, yet effective architecture. Figure 2 presents our ScaleNet architecture, and the following sections detail each of the aspects of ScaleNet and its learning scheme. + +# 3.1. ScaleNet architecture + +Consider $A$ and $B$ as input images to ScaleNet. Low-resolution images $A$ and $B$ are processed by a multi-scale feature extractor block, which is composed of a generic network, e.g., VGG, or ResNet, followed by the atrous spatial pyramid pooling (ASPP) [7, 8]. The ASPP block achieves multi-scale robustness by applying to the feature map $3 \times 3$ dilated convolutions, each with a different dilation rate, e.g., 2, 3, and 4. Thus, the ASPP block allows the network to compute and fuse features from different receptive fields. M-S features are concatenated and fed into a final $1 \times 1$ convolution, which combines the features from local and global areas at a minimum cost. We then apply self- and cross-correlation layers to multi-scale features $f_{A}$ and $f_{B}$ , and obtain the correlation maps, $c_{A}, c_{B}$ , and $c_{A - B}$ , which contain the self- and cross-pairwise similarities. As in [38], ReLU + +and L2-normalization are applied to the correlation maps before the feature reduction blocks, which are composed of four Conv-Batch-ReLU layers each. Finally, $c_A'$ , $c_B'$ , and $c_{A - B}'$ maps are flattened, concatenated, and fed into a set of fully connected layers to predict the scale distribution $P$ , with a final softmax activation layer. + +# 3.2. Predicting scale distributions + +ScaleNet outputs a scale distribution rather than a regressed single scale factor, which helps the network to converge to a reliable model. In contrast, when tackling the problem as a regression task, the same network cannot predict an accurate scale (cf. appendix C.1). We attribute this to the fact that the network can learn and interpret the relationships between the quantized scale ranges and solve an easier classification task, which requires it to assign the weights to the predefined scale factors instead of predicting its actual value. + +We formulate the scale estimation as a problem of predicting the probability distribution in a scale-space quantized into $L$ bins. Given images $A$ and $B$ , our objective function measures the distance between our computed scale distribution, $P_{A \rightarrow B}$ , and the ground-truth distribution $P_{A \rightarrow B}^{gt}$ : + +$$ +\operatorname {L o s s} (A, B) = K L \left(P _ {A \rightarrow B}, P _ {A \rightarrow B} ^ {g t}\right), \tag {1} +$$ + +where $KL(\cdot ,\cdot)$ is the Kullback-Leibler divergence loss. To obtain the scale factor from the probability distribution $P_{A\rightarrow B}$ , we combine all scale levels using a soft-scale computation. It enables the network to output scale factors that interpolate between the quantized scale values, thus covering all possible scales between images $A$ and $B$ . Soft-assignment gives the architecture further flexibility and + +![](images/356949a7d1f4b7d662e23096b55e81a08b5ff87c68ad4f8388360d8c38902ba8.jpg) +Figure 3. In the dataset generation, we randomly pick pairs of corresponding points in both views and compute their distances in the image planes. The final scale ground-truth is the average of the distance ratios of all picked keypoints. + +![](images/1065ce69e6599a839ce1a3741c1d22be0789e4eec1ec8eacd028dcdebaf38231.jpg) + +robustness when inferring scales as shown in section 5.4. + +The scale factor is a relative ratio operator, hence, it is non-linear. To avoid a bias by high scale values when computing the soft-scale, we transform the quantized scale classes, $s_i$ , to logarithmic space. The logarithmic transformation allows to calculate the soft-scale, $\bar{S}_{A\rightarrow B}$ , as a linear combination of the logarithmic scales, $\bar{s}_i$ , weighted by the predicted scale probabilities from softmax output $p_i$ . The global scale factor $\bar{S}_{A\rightarrow B}$ in log-scale is given as: + +$$ +\bar {S} _ {A \rightarrow B} = \sum_ {i = 0} ^ {L - 1} p _ {i} \cdot l n \left(s _ {i}\right), \tag {2} +$$ + +where $s_i = \sigma^t$ corresponds to the quantized scale for bin $i$ , $\sigma$ is our predefined base scale factor, integer $t \in [-L/2, \dots, 0, \dots, +L/2]$ , and $L = 2t + 1$ is the total number of scale bins. Moreover, we improve the robustness of our scale estimator by a simple yet effective consistency check trick, where we compute the scale factor, $\bar{S}_{A \to B}$ , and its inverse, $\bar{S}_{B \to A}$ , and combine them as: + +$$ +\hat {S} _ {A \rightarrow B} = \frac {\bar {S} _ {A \rightarrow B} - \bar {S} _ {B \rightarrow A}}{2} \quad \text {a n d} \quad S _ {A \rightarrow B} = e ^ {\hat {S} _ {A \rightarrow B}}, \tag {3} +$$ + +with $S_{A\to B}$ as the final scale factor between the images. + +# 3.3. Dataset generation + +ScaleNet is trained with synthetically generated image pairs as well as images from real scenes. + +Synthetic pairs. We define a set of planar affine transformations to map one image into another. Such image pairs are easy to generate on-demand for any ground-truth scale $S_{gt}$ , however, they do not include the real noise from different imaging conditions. + +Real pairs present more challenging conditions than synthetic pairs, i.e., non-planar viewpoint changes, weather/illumination conditions, or occlusions, among others. In addition, in contrast to the previous synthetic global transformations, the scale between two real images may + +spatially vary, and areas of different depth or strong perspective changes may include various scale factors. Thus, we introduce a new approach for obtaining training data by estimating the scale factors between real images. We use 3D reconstruction datasets, where 3D point clouds and their corresponding projected 2D positions on the images are available. First of all, given the 3D model, we find pairs of images with an overlap higher than $10\%$ computed as in [11, 32]. For each pair of images $A$ and $B$ , we identify the 3D points of the model that are visible in both images. Using the registered 3D points from the model as opposed to sampling random positions ensures that the regions used for computing the scale are discriminative. Thus, given the covisible 3D points, we query its projected 2D positions, $k_{A}$ , and $k_{B}$ , on image $A$ and $B$ . We randomly sample pairs of points, $k_{A}$ and $k_{B}$ , and compute their distances as shown in figure 3. + +The scale factor between two images with keypoints $i$ and $j$ is calculated as the ratio of their distances in image $A$ and $B$ : + +$$ +S _ {i - j} = \frac {\left\| k _ {B i} - k _ {B j} \right\|}{\left\| k _ {A i} - k _ {A j} \right\|} \quad \text {a n d} \quad i, j \in [ 1, \dots , K ], \tag {4} +$$ + +with $K$ as the total number of covisible 3D points between images $A$ and $B$ . As different regions may exhibit different scale factors, we compute the global scale factor as the average of ratios in logarithmic scale after sampling $R$ different pairs of points: + +$$ +S _ {A \rightarrow B} ^ {g t} = e ^ {\bar {S} _ {A \rightarrow B}} \quad \text {w h e r e} \quad \bar {S} _ {A \rightarrow B} = \frac {1}{R} \sum_ {i \neq j} l n \left(S _ {i - j}\right). \tag {5} +$$ + +As detailed in section 3.2, the ScaleNet learning scheme minimizes the K-L divergence between the predicted scales and ground-truth distributions. We, therefore, build the ground-truth scale distribution, $P_{A \to B}^{gt}$ , such as it satisfies: + +$$ +\ln \left(S _ {A \rightarrow B} ^ {g t}\right) = \bar {S} _ {A \rightarrow B} ^ {g t} = \sum_ {i = 0} ^ {L - 1} p _ {i} ^ {g t} * \ln \left(s _ {i}\right), \tag {6} +$$ + +where $s_i$ are the quantized scale factors, and $P_{A\rightarrow B}^{gt} = [p_0^{gt},\dots,p_{(L - 1)}^{gt}]$ is the ground-truth distribution of the scale estimated as a normalized histogram of point pairs. + +# 4. Implementation notes + +ScaleNet details. ScaleNet predicts a scale distribution with $L = 13$ bins and $\sigma = \sqrt{2}$ , giving possible scale factors in range $S \in [0.16, \dots, 6]$ . ASPP module has 3 levels with dilation rates 2, 3, and 4. During training, ScaleNet uses Adam Optimizer with a learning rate of $10^{-4}$ and a decay factor of 0.1 every ten epochs. The training takes on average 40 epochs, 20 hours on a machine + +
Pose estimation (AUC)Time (ms)
at 5°at 10°at 20°
Baseline4.87.410.4-
VGG-165.48.311.88.3
ResNet-505.68.812.715.8
VGG w/ self-corr.6.29.312.511.3
VGG w/ ASPP7.311.115.716.6
Ours (VGG+self-corr+ASPP)8.412.317.619.4
Ours + Consistency check8.713.419.519.8
+ +Table 1. Ablation study of the different ScaleNet's design choices. Baseline refers to SuperPoint [10] without scale correction. + +with an i7-7700 CPU running at 3.60GHz, and an NVIDIA GeForce GTX 1080-Ti. ScaleNet model and training scripts are implemented in PyTorch [33]. + +Dataset details. We use Megadepth dataset [20] for generating our custom training and testing dataset. We discard scenes that are in the PhotoTourism test from our training set as in [40] to avoid overlap. We keep $10\%$ of the training scenes as our validation set. During data generation, we sample $R = 200$ random pairs of 3D points (cf. equation 5) for a robust scale estimation between the two images. We sample pairs of images with scale factors $S \in [0.16, \dots, 6]$ and create a collection of 250,000 training and 25,000 validation pairs where all scale factors are well represented. Synthetic pairs are generated on the fly from the Megadepth training images during training. We include more details and examples of our training set in appendix A. + +# 5. Experiments + +This section presents results for ScaleNet integrated with state-of-the-art methods on several datasets and tasks. Refer to appendix for more experiments and qualitative examples. + +# 5.1. Preliminaries + +Multi-scale pyramid & ScaleNet. Multi-scale (M-S) pyramids and ScaleNet aim at making methods more robust against arbitrary scale changes. Although both approaches tackle the same problem, each has its strengths, e.g., M-S pyramids can compute a higher number of features by visiting multiple resized images, and ScaleNet offers a more natural integration into tasks where two images are given as input [14, 25, 53, 55]. Besides, we claim that ScaleNet improves not only single-scale feature extractors but also multi-scale ones. We analyze in figure 4a the robustness of methods against synthetic scale transformations and show how the combination with ScaleNet benefits them. In this experiment, we use 2,000 random images from the Megadepth dataset and scale them to create the pairs. We measure the mean matching accuracy (MMA) computed as in [37]. As expected, results indicate that the performance + +![](images/b2072bbc3072894543069ac77ca411f8f10e3b7e25f92d2d5fbfad4271c69c0b.jpg) +(a) Mean matching accuracy under synthetic scale transformations, $s$ + +![](images/0a7fd6abc99206bf9637fce2c4065509bee45dd81db7f2fe9f5cc277efd6a0eb.jpg) +(b) Histogram of the scale ratios, $r$ , between the globally and locally estimated scales in image pairs used for training, with $r = s_a / s_b$ , and where $s_a = \max(s_{local}, s_{global})$ , and $s_b = \min(s_{local}, s_{global})$ . +Figure 4. Analysis on the visual robustness against pure scale changes, and comparison of local vs global scales. + +of single-scale methods, Key.Net [3] and R2D2 [37], drop notably even when images present small scale perturbations $(s > 1.5)$ . Meanwhile, M-S pyramid or ScaleNet strategies mitigate the effect and lead to a better approach. Moreover, we observe that the combination of M-S pyramids and ScaleNet achieves the top performance, and proves that both strategies contribute and work well together. + +Local vs global scale estimation. ScaleNet can predict a scale for each point within the image, however, it is not straightforward to correct the scale factor locally for networks that process the whole image, e.g., dense correspondences networks [25, 51, 53], or dense local feature extractors [10, 11, 37]. Figure 4b shows the histogram of the average scale ratios between the globally and the locally estimated scales per image. To compute the local scale values, we restrict the random sampling to spatially neighboring keypoints in equation 4 rather than points sampled across the whole image. Figure 4b shows that in the majority of images the differences between global and local estimations are small and within 1.0 and 1.2. A ratio $r$ of 1.0 indicates that the local and the global scales between the two images are the same, and therefore, the global scale is valid across the whole image. Based on results in figure 4b, we argue that although local scales could bring an extra benefit in scenes with strong viewpoint or perspective changes, a single global scale will significantly contribute towards correcting images. + +Ablation study in table 1 displays the contributions of each ScaleNet's block towards robust scale estimation. We com + +Pose estimation (AUC) + +
at 5°at 10°at 20°
SIFT9.815.422.0
w/ ScaleNet12.9 (+32%)19.5 (+27%)27.4 (+25%)
R2D2-SS3.14.45.6
w/ ScaleNet6.5 (+110%)9.7 (+121%)12.8 (+129%)
R2D2-MS10.513.118.9
w/ ScaleNet13.2 (+26%)17.5 (+34%)21.0 (+11%)
Key.Net-SS4.76.99.3
w/ ScaleNet8.9 (+89%)14.0 (+103%)19.5 (+110%)
Key.Net-MS14.022.131.6
w/ ScaleNet17.2 (+23%)26.4 (+20%)38.4 (+22%)
SuperPoint5.48.211.0
w/ ScaleNet8.1 (+50%)12.4 (+51%)17.3 (+57%)
SP+SuperGlue16.525.335.0
w/ ScaleNet22.5 (+36%)33.9 (+34%)45.5 (+30%)
+ +Table 2. Relative camera pose results on custom Megadepth split with and without ScaleNet correction. + +bine different architecture's designs with SuperPoint [10] and test them in the task of relative camera pose estimation. We use Lowe's ratio test [23] and MAGSAC [2] to compute camera poses, and, as in [40,45], report the AUC of the pose errors at $5^{\circ}$ , $10^{\circ}$ , and $20^{\circ}$ , where the error is calculated as the maximum of the rotation and translation angular errors. We sample 2,000 image pairs with scale factors between 0.16 and 6 from an independent validation set. Besides the AUC, we report the overhead inference time of each design. + +We first compare the effect of different pre-trained feature extractors on ImageNet [9] (cf. figure 2), VGG-16 [44], and ResNet-50 [15], and see that the more complex ResNet representation contributes towards better poses with the downside of a higher computational cost. Thus, to keep our method light and fast, and given the similarity of the AUC scores, we use the VGG feature extractor for following experiments. In addition to the extractors, we analyze the effect of the self-correlation layers and the multi-scale ASPP component and observe that both boost the performance. Self-correlations capture the intra-image relationships and, therefore, give a better awareness of the global content. Additionally, ASPP offers a mechanism to extract more global features, thus, address larger scale changes. Furthermore, we show that the consistency check offers a higher AUC at a low computation cost. Note that M-S features and correlation layers only need to be computed once in inference and, hence, the extra cost for consistency check is small and proportional to running the dense layers twice. + +# 5.2. Relative camera pose + +Protocol. We first evaluate ScaleNet on the camera pose estimation task due to its natural integration into the existing pipelines. Similar to the previous ablation experiment, given a collection of image pairs, we calculate + +Geometric matching (PCK-5 %) + +
AllEasyHard
DGC-Net40.234.44.5
w/ ScaleNet41.4 (+3%)36.8 (+7%)20.1 (+347%)
GLU-Net55.555.410.8
w/ ScaleNet57.8 (+4%)56.3 (+2%)26.8 (+148%)
+ +Table 3. Results on sparse correspondences for full, easy, and hard splits in Megadepth, consisting of 1,600, 627, and 440 pairs, respectively. Improvements from ScaleNet are across all splits, in particular, geometric matchers benefit largely from scale correction when there are large scale changes ( $s > 1.8$ ). + +the AUC of the camera pose error at $5^{\circ}$ , $10^{\circ}$ , and $20^{\circ}$ as in [40, 45]. We use the test scenes from Megadepth and mine 4,000 images pairs with small and strong scale changes such as $s \in [0.16, 6]$ . Appendix contains more details and examples of our dataset. We study the effect of ScaleNet on popular and publicly available local feature methods [3, 10, 23, 28, 37], and refer to Key.Net/HardNet as Key.Net in the following tables and figures. + +Results in table 2 show that ScaleNet corrections boost the performance of all methods. As discussed previously, even though ScaleNet excels when combined with a single-scale method, e.g., SuperPoint, ScaleNet is also able to improve the pose estimation of multi-scale extractors. We observe that the average improvements are $77\%$ and $24\%$ for single and multi-scale methods, respectively. In addition, we report results with SuperPoint and SuperGlue [40] and see that even this state-of-the-art matcher benefits $(+33\%)$ on average) from a scale correction prior to the feature extraction. + +# 5.3. Geometric matching + +Protocol. We also evaluate ScaleNet on the geometric correspondence task by integrating it into the popular DGC-Net [25] and GLU-Net [53]. Note that ScaleNet can also be combined with other recent methods [45, 51, 52]. ScaleNet rescales one of the images before the dense correspondence network estimates the dense flow fields between the two images. Due to the lack of dense annotations on real image pairs with large viewpoint and illumination changes, we evaluate ScaleNet using sparse correspondences available in the Megadepth [20] dataset. Specifically, we follow the protocol of 1,600 image pairs introduced in [43] to compute the percentage of correct keypoints (PCK) under a 5 pixel acceptance threshold. The experiment is extended with multiple acceptance thresholds in appendix C.4. + +Results in table 3 show the PCK scores obtained with and without scale correction before the dense architectures, DGC-Net and GLU-Net. Moreover, to highlight the benefit of ScaleNet for images at different scale factors, besides + +
Reg. ImagesNum. Obs.Track LengthRep. ErrorReg. ImagesNum. Obs.Track LengthRep. Error
IMC Dataset (10 scenes)SIFT98.593k7.260.80SuperPoint99.078k10.471.17
w/ ScaleNet98.6126k10.200.87w/ ScaleNet99.5135k12.711.26
w/ D-ScaleNet98.5118k9.550.85w/ D-ScaleNet99.398k11.961.22
R2D2-SS96.052k8.350.93R2D2-MS97.986k14.191.05
w/ ScaleNet97.289k10.711.02w/ ScaleNet99.0114k15.351.13
w/ D-ScaleNet96.472k9.431.01w/ D-ScaleNet97.795k14.371.08
Key.Net-SS99.182k11.051.06Key.Net-MS99.5114k16.230.96
w/ ScaleNet99.6148k14.221.16w/ ScaleNet99.6148k19.231.09
w/ D-ScaleNet99.2126k12.711.10w/ D-ScaleNet99.5147k17.621.02
+ +reporting the results for the full dataset (All), we create the Easy $(s > 1.2)$ and Hard $(s > 1.8)$ splits, where $s$ indicates scale distortions factor between images. Each split has 1,600, 627, and 440 image pairs, respectively. We observe that ScaleNet integration does not bring significant improvements in the All data, where the majority of images have small scale variations, but it is important to note that it does not hurt the performance either. Meanwhile, in extreme cases (Hard split), current dense correspondence methods fail under severe scale changes, and their integration with ScaleNet improves the results by $347\%$ and $148\%$ for DGC-Net and GLU-Net. + +# 5.4.3D reconstruction + +Protocol. ScaleNet can be easily integrated into geometric correspondence or relative camera pose pipelines, which are often a part of a more general 3D reconstruction system. To evaluate ScaleNet in this scenario, we follow the protocol proposed in the Local Feature Evaluation Benchmark [42] for building 3D reconstruction models. As ScaleNet can upsample one of the images, and that could result in a higher number of candidate keypoints, we limit the number of features to the top 2,048 keypoints based on the protocol proposed in [59]. We present results for the test split from the IMC dataset [59], which includes ten different scenes with 100 images each. IMC images pose significant challenges, e.g., weather/illumination, perspective, scale, as well as strong occlusions. + +As ScaleNet is applied to image pairs before the feature extraction, the detectors and descriptors are recomputed every time the scale is corrected. Hence, to reduce the computation time, we propose a discrete variant of ScaleNet (D-ScaleNet) that makes the extraction process more efficient. D-ScaleNet implements a hard-assignment by selecting the maximum scale instead of the soft-scale and consistency check from equation 2 and 3. Analogous to multi-scale pyramid approaches, we run the detectors/descriptors at multiple resized images but then select the optimal set of pre-computed features for matching based on D-ScaleNet estimation. + +Table 4. 3D reconstruction results on the 10 test scenes (100 images each) from the IMC dataset [59] with and without ScaleNet correction. + +
Time (s)
ExtractionMatchingReconst.Total
SuperPoint10.316.7195.3222.3
w/ ScaleNet980.546.3208.91235.7
w/ D-ScaleNet141.8161.8205.6509.2
+ +Table 5. 3D reconstruction times on the British Museum scene (100 images) from IMC dataset [59]. + +Results in table 4 show the 3D reconstruction metrics of state-of-the-art methods with and without ScaleNet. We notice that image rectification by both, D-ScaleNet and ScaleNet, increases the number of registered images and the total number of observations in the 3D models. Track length is especially boosted by scale correction, meaning that the model was able to match the same keypoint simultaneously in more images. This increase of track length is particularly important since it proves that ScaleNet helps current methods distinguish and link points that were not possible without it, due to extreme view differences. On average, improvements added by ScaleNet are greater than those produced by D-ScaleNet, however, D-ScaleNet still brings a notable boost over baselines. On the opposite side, ScaleNet increases the reprojection error (Rep. Error) of the reconstructions by 0.09 points on average. We attribute this to their longer track lengths since more points are triangulated throughout the images, and thus, the reprojection error increases, which has also been reported in [42]. Longer tracks will benefit works that rely on complete and long tracks to refine the point positions and reduce their reprojection errors [12, 21]. In table 5, we show a comparison of the times taken to generate a 3D model when using ScaleNet and D-ScaleNet, and display the benefits in terms of computational time that D-ScaleNet provides. + +# 5.5. Image matching + +Protocol. We compute the Mean Matching Accuracy (MMA) [27] as the ratio of correctly matched features within a threshold (5 pixels) and the total number of features following the benchmark proposed in [11]. We report + +![](images/da53561726fcfe867b65d5ca05d519eef3754ad3689f163926e9fb6c7d8c4b6a.jpg) +Figure 5. MMA on the full Viewpoint HPatches (left), scenes with easy (middle) and hard (right) scale transformations. Dashed lines (--) show ScaleNet combined with other methods. + +results for the 59 viewpoint scenes from the HPatches dataset [1]. Similar to the 3D task, we fix the number of features to top 1,000 as in [19] to eliminate the effect of increased matching scores from a high number of keypoints. + +Results in figure 5 (left) show that ScaleNet improves the robustness of current methods overall, and excels for single-scale methods, e.g., Key.Net-SS [3], or R2D2-SS [37]. However, in contrast to images used for statistics in figure 4b, most of the scenes in the HPatches Viewpoint contain strong perspective changes, i.e., display different scale factors within the scene. Hence, to highlight the effect of ScaleNet, we show results for the subset of scenes with affine transformations, i.e., scenes with stretch and skew transformations in addition to global scale and rotation. We select the splits such that the Easy has $s \in [1.2, \dots, 1.8]$ and the Hard has $s > 1.8$ . When the scale factor is global across the image, ScaleNet correction can deal with planar scenes and improve the matching accuracy of single and multiscale methods. As expected, results show that ScaleNet scaling is more critical for stronger scale changes in figure 5 (right). Only SIFT [23], which is specially designed to be robust against scale changes on planar scenes, does not benefit from ScaleNet correction in the Hard split. Moreover, to deal with scenes with possible strong perspective scale changes, we introduce in appendix Local-ScaleNet, which infers local scale factors and offers a more robust and functional alternative for scenes with perspective changes. + +# 6. Discussion + +Limitations. ScaleNet deals with arbitrary scale changes and, hence, it only brings improvements if such changes are present in the images. This makes ScaleNet useful in applications where those viewpoint changes prevent a successful matching of images, e.g., extreme and sparse + +collection of images, or ground-aerial applications. Nevertheless, even though ScaleNet does not boost performance when there is no scale change, it does not hurt either (cf. appendix C.3). Another limitation comes when ScaleNet needs to be applied to a large collection of images, e.g., 3D tasks. ScaleNet works with pairs of images, hence, features can not be stored but need to be computed every time a new image is presented, increasing the feature extraction time as seen in table 5. Although we propose D-ScaleNet, which mitigates the complexity time for such tasks, ScaleNet can be further optimized for faster processing by replacing VGG with more compact models such as MobileNet [16], or by only using ScaleNet for computing camera pose after a restrictive retrieval search. + +Societal impact. Image matching is a pivotal but small component within large systems that facilitate technologies like AR, 3D reconstruction, navigation, modeling, SLAM, among others. Hence, as we contribute towards more robust matching pipelines, ScaleNet's societal impact is tied to the applications that rely on such technologies. Some applications may include smartphone apps, AR headsets, or autonomous cars. However, as our method cannot work independently of a larger system, the negative or ethical issues are not directly associated with our approach but rather with the specific business and final application where image matching may be used. + +Reproducibility. The experiments are computed on standard and public datasets and tasks, and hence, they can be reproduced. Moreover, we made public the evaluation and training scripts, as well as our custom training dataset. In addition, to encourage the research on scale estimation, we published the test set of section 5.2 and splits of section 5.3 for easier comparison and support of future works. + +# 7. Conclusions + +We introduced ScaleNet, an approach that estimates the scale change between images and improves the performance of methods that search for correspondences throughout different views of the same scene. We proposed a novel learning scheme that formulates the problem of scale estimation as a prediction of a probability distribution of scales. We demonstrated how to make use of images from non-planar scenes to generate the training data. In addition to ScaleNet, we also introduced D-ScaleNet, a discrete variant of the proposed approach, and demonstrated its effectiveness in 3D-related tasks as well as computational time. We proved that ScaleNet can improve the results of popular pipelines in image matching for relative camera pose or 3D reconstruction while not being limited only to these tasks. + +Acknowledgements. This project was supported by Chist-Era EPSRC IPALM EP/S032398/1 grant. + +# References + +[1] Vassileios Balntas, Karel Lenc, Andrea Vedaldi, and Krystian Mikolajczyk. Hpatches: A benchmark and evaluation of handcrafted and learned local descriptors. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5173-5182, 2017. 8 +[2] Daniel Barath, Jiri Matas, and Jana Noskova. Magsac: marginalizing sample consensus. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10197-10205, 2019. 6 +[3] Axel Barroso-Laguna, Edgar Riba, Daniel Ponsa, and Krystian Mikolajczyk. Key.net: Keypoint detection by handcrafted and learned cnn filters. In Proceedings of the IEEE International Conference on Computer Vision, 2019. 1, 2, 5, 6, 8 +[4] Axel Barroso-Laguna, Yannick Verdie, Benjamin Busam, and Krystian Mikolajczyk. Hdd-net: Hybrid detector descriptor with mutual interactive learning. In Proceedings of the Asian Conference on Computer Vision, 2020. 1, 2 +[5] 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 +[6] Mathias Burki, Lukas Schaupp, Marcin Dymczyk, Renaud Dubé, Cesar Cadena, Roland Siegwart, and Juan Nieto. Vizard: Reliable visual localization for autonomous vehicles in urban outdoor environments. In 2019 IEEE Intelligent Vehicles Symposium (IV), pages 1124-1130. IEEE, 2019. 1 +[7] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE transactions on pattern analysis and machine intelligence, 40(4):834-848, 2017. 3 +[8] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv preprint arXiv:1706.05587, 2017.3 +[9] 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 Conference on Computer Vision and Pattern Recognition (CVPR), 2009. 6 +[10] Daniel DeTone, Tomasz Malisiewicz, and Andrew Rabinovich. Superpoint: Self-supervised interest point detection and description. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 224-236, 2018. 1, 2, 5, 6 +[11] Mihai Dusmanu, Ignacio Rocco, Tomas Pajdla, Marc Pollefeys, Josef Sivic, Akihiko Torii, and Torsten Sattler. D2-net: A trainable cnn for joint detection and description of local features. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 1, 2, 4, 5, 7 +[12] Mihai Dusmanu, Johannes L. Schonberger, and Marc Pollefeys. Multi-View Optimization of Local Feature Geometry. In Proceedings of the European Conference on Computer Vision, 2020. 7 +[13] Patrick Ebel, Anastasiia Mishchuk, Kwang Moo Yi, Pascal Fua, and Eduard Trulls. Beyond cartesian representations for + +local descriptors. In Proceedings of the IEEE International Conference on Computer Vision, pages 253-262, 2019. 2 +[14] Hugo Germain, Guillaume Bourmaud, and Vincent Lepetit. S2dnet: Learning accurate correspondences for sparse-to-dense feature matching. In European Conference on Computer Vision, 2020. 2, 5 +[15] 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. 6 +[16] 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. CoRR, abs/1704.04861, 2017. 8 +[17] Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In Advances in neural information processing systems, pages 2017-2025, 2015. 3 +[18] Wei Jiang, Eduard Trulls, Jan Hosang, Andrea Tagliasacchi, and Kwang Moo Yi. Cotr: Correspondence transformer for matching across images. arXiv preprint arXiv:2103.14167, 2021. 2 +[19] Karel Lenc and Andrea Vedaldi. Large scale evaluation of local image feature detectors on homography datasets. In The British Machine Vision Conference (BMVC), 2018. 8 +[20] Zhengqi Li and Noah Snavely. Megadepth: Learning single-view depth prediction from internet photos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3302-3312, 2018. 5, 6 +[21] Philipp Lindenberger, Paul-Edouard Sarlin, Viktor Larsson, and Marc Pollefeys. Pixel-perfect structure-from-motion with featuremetric refinement. arXiv preprint arXiv:2108.08291, 2021. 7 +[22] Yuan Liu, Zehong Shen, Zhixuan Lin, Sida Peng, Hujun Bao, and Xiaowei Zhou. Gift: Learning transformation-invariant dense visual descriptors via group cnns. arXiv preprint arXiv:1911.05932, 2019. 2 +[23] David G. Lowe. Distinctive image features from scale-invariant keypoints. In International booktitle of computer vision, 2004. 1, 2, 6, 8 +[24] Zixin Luo, Lei Zhou, Xuyang Bai, Hongkai Chen, Jiahui Zhang, Yao Yao, Shiwei Li, Tian Fang, , and Long Quan. Aslfeat: Learning local features of accurate shape and localization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2020. 2 +[25] Iaroslav Melekhov, Aleksei Tiulpin, Torsten Sattler, Marc Pollefeys, Esa Rahtu, and Juho Kannala. DGC-Net: Dense geometric correspondence network. In Proceedings of the IEEE Winter Conference on Applications of Computer Vision (WACV), 2019. 1, 2, 5, 6 +[26] Krystian Mokolajczyk and Cordelia Schmid. Scale & affine invariant interest point detectors. International journal of computer vision, 60(1):63-86, 2004. 1 +[27] Krystian Molkajczyk and Cordelia Schmid. A performance evaluation of local descriptors. In IEEE Transactions on Pattern Analysis and Machine Intelligence, number 10, pages 1615-1630. IEEE, 2005. 7 + +[28] Anastasiia Mishchuk, Dmytro Mishkin, Filip Radenovic, and Jiri Matas. Working hard to know your neighbor's margins: Local descriptor learning loss. In Advances in Neural Information Processing Systems, pages 4826-4837, 2017. 2, 6 +[29] Dmytro Mishkin, Jiri Matas, and Michal Perdoch. Mods: Fast and robust method for two-view matching. In Computer Vision and Image Understanding, volume 141, pages 81-93. Elsevier, 2015. 1, 2 +[30] Dmytro Mishkin, Filip Radenovic, and Jiri Matas. Repeatability is not enough: Learning affine regions via discriminability. In Proceedings of the European Conference on Computer Vision (ECCV), pages 284-300, 2018. 1, 2, 3 +[31] Kwang Moo Yi, Eduard Trulls, Yuki Ono, Vincent Lepetit, Mathieu Salzmann, and Pascal Fua. Learning to find good correspondences. In In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2666-2674, 2018. 1 +[32] Yuki Ono, Eduard Trulls, Pascal Fua, and Kwang Moo Yi. Lf-net: learning local features from images. In Advances in Neural Information Processing Systems, pages 6234-6244, 2018. 4 +[33] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017. 5 +[34] Rémi Pautrat, Viktor Larsson, Martin R. Oswald, and Marc Pollefeys. Online invariance selection for local feature descriptors. In Proceedings of the European Conference on Computer Vision (ECCV), 2020. 2 +[35] Rémi Pautrat, Viktor Larsson, Martin R. Oswald, and Marc Pollefeys. Online invariance selection for local feature descriptors. In European Conference on Computer Vision, 2020. 2 +[36] Anita Rau, Guillermo Garcia-Hernando, Danail Stoyanov, Gabriel J Brostow, and Daniyar Turmukhambetov. Predicting visual overlap of images through interpretable non-metric box embeddings. In European Conference on Computer Vision, pages 629-646. Springer, 2020. 2 +[37] Jerome Revaud, Philippe Weinzaepfel, Cesar De Souza, and Martin Humenberger. R2d2: Repeatable and reliable detector and descriptor. In Advances in Neural Information Processing Systems, 2019. 1, 2, 5, 6, 8 +[38] I. Rocco, R. Arandjelovic, and J. Sivic. Convolutional neural network architecture for geometric matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 3 +[39] Paul-Edouard Sarlin, Cesar Cadena, Roland Siegwart, and Marcin Dymczyk. From coarse to fine: Robust hierarchical localization at large scale. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2 +[40] Paul-Edouard Sarlin, Daniel DeTone, Tomasz Malisiewicz, and Andrew Rabinovich. Superglue: Learning feature matching with graph neural networks. In In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2020. 1, 2, 5, 6 + +[41] Johannes L Schonberger and Jan-Michael Frahm. Structure-from-motion revisited. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4104-4113, 2016. 1 +[42] Johannes L Schonberger, Hans Hardmeier, Torsten Sattler, and Marc Pollefeys. Comparative evaluation of hand-crafted and learned local features. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1482-1491, 2017. 7 +[43] Xi Shen, François Darmon, Alexei A Efros, and Mathieu Aubry. Ransac-flow: generic two-stage image alignment. arXiv preprint arXiv:2004.01526, 2020. 6 +[44] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In International Conference on Learning Representations, 2015. 6 +[45] Jiaming Sun, Zehong Shen, Yuang Wang, Hujun Bao, and Xiaowei Zhou. Loftr: Detector-free local feature matching with transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8922-8931, 2021. 2, 6 +[46] Weiwei Sun, Wei Jiang, Eduard Trulls, Andrea Tagliasacchi, and Kwang Moo Yi. Acne: Attentive context normalization for robust permutation-equivariant learning. In In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11286-11295, 2020. 1 +[47] Yurun Tian, Vassileios Balntas, Tony Ng, Axel BarrosoLaguna, Yiannis Demiris, and Krystian Mikolajczyk. D2d: Keypoint extraction with describe to detect approach. In Proceedings of the Asian Conference on Computer Vision (ACCV), 2020. 2 +[48] Yurun Tian, Axel Barroso-Laguna, Tony Ng, Vassileios Balntas, and Krystian Mikolajczyk. Hynet: Local descriptor with hybrid similarity measure and triplet loss. In Advances in neural information processing systems, 2020. 2 +[49] Yurun Tian, Xin Yu, Bin Fan, Fuchao Wu, Huub Heijnen, and Vassileios Balntas. Sosnet: Second order similarity regularization for local descriptor learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11016-11025, 2019. 2 +[50] Carl Toft, Daniyar Turmukhambetov, Torsten Sattler, Fredrik Kahl, and Gabriel Brostow. Single-image depth prediction makes feature matching easier, 2020. 2 +[51] Prune Truong, Martin Danelljan, Luc Van Gool, and Radu Timofte. Gocor: Bringing globally optimized correspondence volumes into your neural network, 2021. 2, 5, 6 +[52] Prune Truong, Martin Danelljan, Luc Van Gool, and Radu Timofte. Learning accurate dense correspondences and when to trust them, 2021. 1, 6 +[53] Prune Truong, Martin Danelljan, and Radu Timofte. GLU-Net: Global-local universal network for dense flow and correspondences. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 1, 2, 5, 6 +[54] Tinne Tuytelaars and Krystian Mikolajczyk. Local invariant feature detectors: a survey. In Foundations and Trends in Computer Graphics and Vision, 2008. 1 + +[55] Olivia Wiles, Sebastien Ehrhardt, and Andrew Zisserman. Co-attention for conditioned image matching. In In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2021. 2, 5 +[56] Kwang Moo Yi, Eduard Trulls, Vincent Lepetit, and Pascal Fua. Lift: Learned invariant feature transform. In European Conference on Computer Vision, pages 467-483. Springer, 2016. 3 +[57] Kwang Moo Yi, Yannick Verdie, Pascal Fua, and Vincent Lepetit. Learning to assign orientations to feature points. CoRR, abs/1511.04273, 2015. 2 +[58] Guoshen Yu and Jean-Michel Morel. Asift: An algorithm for fully affine invariant comparison. Image Processing On Line, 1:11-38, 2011. 1, 2 +[59] Jin Yuhe, Dmytro Mishkin, Anastasiia Mishchuk, Jiri Matas, Pascal Fua, Kwang Moo Yi, and Eduard Trulls. Image matching across wide baselines: From paper to practice. In International Journal of Computer Vision, 2020. 7 +[60] Lei Zhou, Siyu Zhu, Tianwei Shen, Jinglu Wang, Tian Fang, and Long Quan. Progressive large scale-invariant image matching in scale space. In Proceedings of the IEEE International Conference on Computer Vision, pages 2362-2371, 2017. 1, 2 \ No newline at end of file diff --git a/scalenetashallowarchitectureforscaleestimation/images.zip b/scalenetashallowarchitectureforscaleestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1fc2d96550c5befa9f41ce34b81fc129a41cbf57 --- /dev/null +++ b/scalenetashallowarchitectureforscaleestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a9a07ddc7edbd3bf6a0c2b8aab176723cecb89062ddf401fa128bb968f2032a +size 484177 diff --git a/scalenetashallowarchitectureforscaleestimation/layout.json b/scalenetashallowarchitectureforscaleestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e7fb23783be7bdd923df4d555c7b0b3b10d1c7f0 --- /dev/null +++ b/scalenetashallowarchitectureforscaleestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5920e2f7ddca4c67a27c9a7b4f3a231a0c78a30053242ce7d739395ead3026b0 +size 382713 diff --git a/scalingupvisionlanguagepretrainingforimagecaptioning/78d2374a-698b-406e-b521-29c99d295298_content_list.json b/scalingupvisionlanguagepretrainingforimagecaptioning/78d2374a-698b-406e-b521-29c99d295298_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0039143665dceda830587487c247ec9b6060c118 --- /dev/null +++ b/scalingupvisionlanguagepretrainingforimagecaptioning/78d2374a-698b-406e-b521-29c99d295298_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57aea2b7ce4a2a7f6f57d0b0c508bf875d0a46cfeed093832e321e1c2f145d4f +size 74625 diff --git a/scalingupvisionlanguagepretrainingforimagecaptioning/78d2374a-698b-406e-b521-29c99d295298_model.json b/scalingupvisionlanguagepretrainingforimagecaptioning/78d2374a-698b-406e-b521-29c99d295298_model.json new file mode 100644 index 0000000000000000000000000000000000000000..de01c417ea8b03b86fffe91498832b9fa35a5c7d --- /dev/null +++ b/scalingupvisionlanguagepretrainingforimagecaptioning/78d2374a-698b-406e-b521-29c99d295298_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ee356f527b068b58093ae645cb3f4af1a364c9bba5ee0cbc4ff19c879d7a104 +size 94100 diff --git a/scalingupvisionlanguagepretrainingforimagecaptioning/78d2374a-698b-406e-b521-29c99d295298_origin.pdf b/scalingupvisionlanguagepretrainingforimagecaptioning/78d2374a-698b-406e-b521-29c99d295298_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f6b1102b55c2fcb24e2df8cb549f183a5db09d60 --- /dev/null +++ b/scalingupvisionlanguagepretrainingforimagecaptioning/78d2374a-698b-406e-b521-29c99d295298_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aacdba7bad48df03a9f09518cd734b2eda6c60a11c6dcf9b3859eec8b6d67b93 +size 1302043 diff --git a/scalingupvisionlanguagepretrainingforimagecaptioning/full.md b/scalingupvisionlanguagepretrainingforimagecaptioning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..33862db2700c60a5c8aa9730d94f59218b86b1e7 --- /dev/null +++ b/scalingupvisionlanguagepretrainingforimagecaptioning/full.md @@ -0,0 +1,280 @@ +# Scaling Up Vision-Language Pre-training for Image Captioning + +Xiaowei Hu, Zhe Gan, Jianfeng Wang, Zhengyuan Yang, Zicheng Liu, Yumao Lu, Lijuan Wang Microsoft + +{xiaowei.hu,zhe.gan, jianfw, zhengyang,zliu,yumaolu,lijuanw}@microsoft.com + +# Abstract + +In recent years, we have witnessed significant performance boost in the image captioning task based on vision-language pre-training (VLP). Scale is believed to be an important factor for this advance. However, most existing work only focuses on pre-training transformers with moderate sizes (e.g., 12 or 24 layers) on roughly 4 million images. In this paper, we present LEMON, a Large-scale iMage captionNER, and provide the first empirical study on the scaling behavior of VLP for image captioning. We use the state-of-the-art VinVL model as our reference model, which consists of an image feature extractor and a transformer model, and scale the transformer both up and down, with model sizes ranging from 13 to 675 million parameters. In terms of data, we conduct experiments with up to 200 million image-text pairs which are automatically collected from web based on the alt attribute of the image (dubbed as ALT200M $^1$ ). Extensive analysis helps to characterize the performance trend as the model size and the pre-training data size increase. We also compare different training recipes, especially for training on large-scale noisy data. As a result, LEMON achieves new state of the art on several major image captioning benchmarks, including COCO Caption, nocaps, and Conceptual Captions. We also show LEMON can generate captions with long-tail visual concepts when used in a zero-shot manner. + +# 1. Introduction + +Recent advances in image captioning [1, 5, 35] can be largely attributed to vision-language pre-training (VLP) [26, 30, 37, 40], the current prevailing training paradigm for vision-language (VL) research. VLP [6] is usually conducted on a combined image-text dataset comprising of several or tens of millions images in total, e.g., Visual Genome [20], SBU [32] and Conceptual Captions [4, 35]. While previous studies [29, 48, 49] have ana + +![](images/4f457444304a19c831e12cacf9cbfbf8b90a83dc303fa80c04a16d85f4fc17cf.jpg) +Figure 1. Image captioning performance on COCO when upscaling model for each dataset size. The x-axis plots the number of parameters for each model size (e.g., tiny, small, huge) in a logarithmic scale. The definition of model sizes is detailed in Table 2. Increasing the model size is not significantly beneficial at small pre-training dataset scales. However, when we use sufficiently large datasets, we see strong performance boost from a larger model. + +lyzed various choices of pre-training objectives and model architectures, it remains unclear to what extent the pretraining dataset would impact the performance, and how it correlates with different model settings. Along the journey of pushing the limit of VLP, it becomes increasingly important to answer this question. + +Scale is believed to be an important ingredient in attaining excellent performance [17, 33, 43]. Recent work has investigated the Pareto frontier of training transformer models, often referred to as the neural scaling law, in the domains of natural language processing [2, 18, 41] and computer vision [12, 47], via unsupervised or weakly-supervised learning methods. These studies have observed consistent benefits of increasing the model size to billions of parame + +![](images/898340bb2c329c9755e907f6630f625564e4c460c0f96ce4f85622d200578d3c.jpg) +(a) finetuned and evaluated on COCO + +![](images/6c5c50293b29df8dc798c639790c3a4674c347ec5db028e96da738a78284f099.jpg) +Figure 2. Image captioning performance in data upscaling for each model size. The x-axis shows the number of image-text pairs used in pre-training. The y-axis shows the evaluation score (CIDEr) on COCO "Karpathy" test split and nocaps validation set, respectively. The models are first pre-trained, then finetuned on COCO caption training split. Note that x-axis is plotted in a logarithmic scale. + +![](images/d9e2c1c4dbcae596929198d5573b35a35b028b8b0d87acbe1b6b0ffbf59f846b.jpg) +(b) finetuned on COCO, evaluated on nocaps + +ters, given billion magnitude of pre-training data available. + +More recently, contrastive image-text pre-training [17, 33] has also been scaled up to 400 million and 1.8 billion data sizes for image representation learning and image-text retrieval. Both CLIP [33] and ALIGN [17] employ two individual networks to encode the image and the text separately for alignment, which well fits the image-text retrieval task, but little is known about the scaling properties when it comes to image captioning. + +To study the characteristics of this scaling trend on the captioning task, we first construct a large-scale image-text dataset (dubbled as ALT200M), consisting of up to 200 million image-text pairs from web based on the alt attribute of the images. Then, we conduct extensive experiments to scale VLP for image captioning from both the data and model perspectives, and name our model as LEMON short for a Large-scale iImage captionNER. To simulate the process of data scaling, we create multiple subsets of ALT200M, ranging from 3 to 200 million. In terms of model, we use the state-of-the-art image captioning model VinVL [48] as our reference model, composed of an image feature extractor and a transformer model. We adapt the pre-training task to be consistent with the captioning task, and then scale the width and depth of the transformer model with the number of parameters ranging from 13 (i.e., tiny) to 675 (i.e., huge) millions. Combining different models and pre-training data sizes, we summarize our results in Figure 1 and 2, which characterize the linear-logarithmic scaling trend. Larger models tend to benefit more when we have more than 10 million data for pre-training. However, with only 3 million data, the performance starts to saturate early as the model size increases. Moreover, we also investigate other design choices of VLP, e.g., model architectures and + +training objectives. + +Our contributions are summarized as follows. + +- We present the VLP scaling rule for image captioning. Not only does this prove the effectiveness of learning from large-scale noisy data, but it also sheds lights on how performance can be efficiently improved by increasing the model and pre-training data sizes together to avoid a saturation plateau. +- We achieve new state-of-the-art results for image captioning across several major benchmarks, including COCO Caption, nocaps, and Conceptual Captions. + +# 2. Related Work + +Vision-Language Pre-training. Since the birth of ViLBERT [30] and LXMERT [40], we have witnessed a boom of methods for vision-language pre-training [6,7,13,22,26, 37,45,46]. Prominent examples include UNITER [6], VLBERT [37], OSCAR [29], UNIMO [28], and VinVL [48]. Along the journey of VLP, researchers have investigated different training strategies [11,31], robustness [25], compression [9,10,42], probing analysis [3,27], and the extension to video-text modeling [21,24,38,39,50]. More recently, instead of using object detectors for image feature extraction, end-to-end VLP based on convolution networks and transformers are becoming popular [14,15,19,23,44]. + +However, as another important factor in achieving superior performance, the scaling behavior of VLP is less studied. While most works pre-train transformer of base/large sizes on no more than 4M images, we train models from tiny to huge, on up to 200M images. CLIP [33] and ALIGNN [17] scaled up contrastive pre-training to 400M and 1.8B images, and SimVLM [43] further use 1.8B images for prefix language modeling pre-training. However, CLIP and ALIGNN + +
Dataset#images (M)#cap./imageUnigramCaption lengths
#unique#unique in 0.1% tailmean ± stdP5%/50%/95%
COCO Caption [5]0.1519,2641,18410.44 ± 2.248/10/14
CC3M [35]3.1149,63822,67710.25 ± 4.645/9/19
CC12M [4]12.211,319,284193,36817.17 ± 12.766/13/43
ALT200M (Ours)203.412,067,4011,167,30413.01 ± 8.852/11/27
+ +Table 1. Statistics of existing and our collected datasets. The number of images in CC3M and CC12M are calculated for valid RGB images at the time we downloaded them. The unigrams are counted and sorted by occurrences from large to small to form a distribution curve for each dataset. Our dataset features much more long-tail concepts, as indicated by the number of unigrams included in the $0.1\%$ distribution tail. The datasets used in CLIP [33] and ALIGN [17] are not included, since we do not know the corresponding statistics. + +focus on image-text retrieval, while SimVLM did not study its scaling behavior w.r.t. pre-training data sizes. Compared with them, we focus on image captioning, provide a more comprehensive study on the scaling behavior via altering data and model sizes, and show that by using 200M images, we can outperform SimVLM on image captioning. + +Scaling Law. With the success of large-scale pre-trained models in both the language and vision domains, there has been a surging research interest in discovering the empirical scaling law of these models. [18] presented that the language model performance scales as power-law across many orders of magnitude with dataset size, model size, and computation used in training. [12] further studied the scaling of autoregressive generative modeling. Aside from the model size, [41] showed that the model shape also matters for efficient transfer from upstream pre-training to downstream finetuning. In the vision domain, [47] scaled a series of vision transformer models evaluated on image classification tasks. While the scaling protocols have been investigated for many NLP and vision tasks, we are the first to study the scaling behavior of VLP for image captioning, and push multimodal transformer pre-training to a much larger scale. + +In Appendix, we also provide a detailed related work review on non-pretraining-based image captioning methods. + +# 3. Method + +In this section, we present the pre-training dataset in Section 3.1, the model structure in Section 3.2, and training objective in Section 3.3. + +# 3.1. Pre-training Dataset + +We construct a data collection pipeline to crawl the images from the Internet and the associated alt attribute, which usually provides the description of the image content. In order to scale up easily, we follow the natural distribution of images without re-balancing, and apply only minimal rule-based filtering. We keep images with the longer side more than 200 pixels and aspect ratio smaller than 3. As some alt-texts are too long, we split them up by punctuation marks, such as period and exclamation mark, and select the longest part. To filter out some rare or misspelled words, we build + +![](images/f220f0a99be2f56bfa08f8dcbd0417865b00925322ff98a4f0e56ccdfaf2d184.jpg) +Figure 3. Word cloud of the top 200 words in our pre-training dataset ALT200M, excluding the stop words, e.g., a, the, of, etc. + +a vocabulary of unigrams with English Wikipedia titles and body text. We remove unigrams that are present less than 5 times, resulting in approximately 250 million unique unigrams. We remove the alt-text if any of its unigrams cannot be found in the vocabulary. Afterwards, we count the frequency of all the remaining sentences, and filter out some boilerplate sentences that are too generic, e.g., stock image, 3D illustration, vector photo. For the sake of privacy, we use a Named Entity Recognition model $\mathrm{spaCy}^2$ to identify person and location names, and replace them with special tokens $\langle \mathrm{PERSON}\rangle$ , $\langle \mathrm{LOC}\rangle$ , respectively. At last, we perform duplication check on all the collected images to ensure that they do not overlap with existing test sets, such as COCO, nocaps, and Conceptual Captions. + +The final dataset, named as ALT200M, contains more than 200 million images, each corresponding to one alt-text. The word cloud of 200 most frequent words is visualized in Figure 3. As shown in Table 1, compared to CC12M, ALT200M has nearly $16 \times$ more images. The vocabulary is almost doubled. We observe that $56\%$ of unigrams sum up to only $0.1\%$ of total occurrences, characterizing an extremely long tail of rarely occurring unigrams. The average length of the captions is 13.01, more than that of the COCO caption dataset (10.44). We also observe that our dataset contains much more shorter captions with only 2 or 3 unigrams. This indicates a shift in the distribution of captions from pre-training to finetuning. + +
ModelLayersWidthMLPHeadsParam (M)FLOPs
tiny62561024413.41.1
tiny12122561024418.11.5
small123841536634.32.9
small24243841536655.64.8
base12768307212111.79.5
base2424768307212196.716.8
large241024409616338.328.9
huge321280512016675.457.7
+ +Table 2. Details of model architecture. FLOPs are calculated via taking 50 image region features and 35 text tokens as input in one forward pass. The dimension of image region feature is 2054, which is mapped to the transformer width via a linear layer. + +Besides CC12M, there also exist some other large-scale image-text datasets, such as WIT [36], WenLan [16], LAION-400M [34], and the datasets used in CLIP [33] and ALIGN [17]. More detailed discussions on them are provided in Appendix. + +# 3.2. VLP Model for Captioning + +We use the pre-trained Faster R-CNN detector from [48] to extract image region features, which are concatenated with scaled bounding boxes as position encoding. Following [29, 48], we also add the detected object tags as input. The text input, including the caption and objects tags, are tokenized by WordPiece, with a vocabulary of 30522 tokens. A multi-layer transformer model is used for multimodal fusion, which consists of a stack of encoder layers, each of which has a multi-head self-attention (MSA) layer followed by a feed-forward layer. To enable text generation with the encoder layers, we use the sequence-to-sequence attention mask [49] in each self-attention layer for the captioning module. Specifically, the input consists of image embeddings $\mathbf{V} = \{\pmb{v}_i\}_{i=1}^N$ , object tag embeddings $\mathbf{T} = \{\pmb{t}_j\}_{j=1}^M$ , and token embeddings for the caption $\mathbf{W} = \{\pmb{w}_k\}_{k=1}^L$ , where $N, M, L$ are the number of image regions, tags, and caption tokens, respectively. The corresponding outputs are: + +$$ +\mathbf {R} _ {v _ {i}} := \operatorname {M S A} \left(\boldsymbol {v} _ {i}, \mathbf {V} \cup \mathbf {T}\right), \tag {1} +$$ + +$$ +\mathbf {R} _ {t _ {j}} := \operatorname {M S A} \left(\boldsymbol {t} _ {j}, \mathbf {V} \cup \mathbf {T}\right), \tag {2} +$$ + +$$ +\mathbf {R} _ {w _ {k}} := \operatorname {M S A} \left(\boldsymbol {w} _ {k}, \mathbf {V} \cup \mathbf {T} \cup \left\{\boldsymbol {w} _ {l} \right\} _ {l = 1} ^ {k}\right), \tag {3} +$$ + +where $\mathrm{MSA}(\pmb{x},\mathbf{Y})$ is the MSA layer with $\pmb{x}$ mapped to query, and $\mathbf{Y}$ mapped to key/value. $\cup$ means concatenation of matrices, and the index of $\mathbf{R}_{v_i}$ denotes the position corresponding to $v_{i}$ . The output representation is fed into the next layer, or used for prediction at the end. In this way, during inference, the model can decode the token from left + +![](images/284754cd606ed9f4e22b800938db72bf85f204fd01aa3b71b435efd549bf6fe1.jpg) +Figure 4. Comparison of training objectives. (Top) Language Modeling (LM), to predict the next token at each position. (Bottom) Masked Language Modeling (MLM), to predict the masked and/or possibly polluted tokens at the masked positions. Both use causal masking for model training. + +to right in an auto-regressive manner. To study the scaling trend, we experiment with 8 model configurations, ranging from "tiny" of 13M parameters to "huge" of 674M parameters, detailed in Table 2. + +# 3.3. Training Objective + +While bidirectional Masked Language Modeling (MLM) has been widely used in both language and vision-language pre-training, its bidirectional nature makes it sub-optimal for text generation. In contrast to VLP works that are mostly evaluated on VL understanding tasks, we use sequence-to-sequence MLM for generation tasks. During training, we randomly mask out $15\%$ of caption tokens following BERT [8] to form a "corrupted" caption $\widetilde{\mathbf{W}} = \{\tilde{w}_k\}_{k=1}^L$ , where $\tilde{w}_k$ is either equal to $\boldsymbol{w}_k$ , or replaced with [MASK] token or another token sampled from vocabulary. The training loss is defined as: + +$$ +\begin{array}{l} \mathcal {L} (\mathbf {W}, \mathbf {V}, \mathbf {T}) = \sum_ {k \in D} \operatorname {C E} \left(\boldsymbol {w} _ {k}, \mathbf {R} _ {\tilde {w} _ {k}}\right) \tag {4} \\ = \sum_ {k \in D} \left(- \log p \left(\boldsymbol {w} _ {k} | \mathbf {V}, \mathbf {T}, \left\{\tilde {\boldsymbol {w}} _ {l} \right\} _ {l = 1} ^ {k}\right)\right), \\ \end{array} +$$ + +where $\mathrm{CE}(\cdot, \cdot)$ is the cross-entropy loss with softmax, $D$ is the subset of masked positions. The loss for the recovery of the possibly polluted tokens by intuition fits into the scenario of training with noisy captions. Note that we use the same loss in pre-training and finetuning. During inference, at step $s$ , given the previous predicted tokens $\{\hat{w}_k\}_{k=1}^{s-1}$ , we set $\tilde{w}_s$ to [MASK], and $\tilde{w}_k = \hat{w}_k$ for $k < s$ . Therefore, the generation process simulates recovering the [MASK] token at the end in each step. Since the representations of caption tokens do not depend on the subsequent tokens, the intermediate representations of predicted tokens can be saved to + +
#ModelPre-training datain-domainnear-domainout-of-domainoverall
CIDErSPICECIDErSPICECIDErSPICECIDErSPICE
Validation Set
1Encoder-Decoder [4]CC3M [35]81.811.673.711.165.310.173.211.0
2CC12M [4]88.312.386.011.891.311.287.411.8
3CC3M+CC12M92.612.588.312.194.511.990.212.1
4VinVLbase* [48]N/A96.813.590.713.187.411.690.912.8
5VinVLbase†5.65M combined103.114.296.113.888.312.195.513.5
6VinVLlarge†5.65M combined106.314.598.014.088.812.697.313.8
7SimVLMhuge [43]1.8B113.7-110.9-115.2-112.2-
8LEMONbaseN/A91.413.381.412.562.610.679.012.3
9LEMONbaseCC3M96.013.891.713.288.111.891.613.0
10LEMONbaseCC12M104.514.6100.714.096.712.4100.413.8
11LEMONlargeCC12M103.614.4101.113.8102.712.6101.813.6
12LEMONbaseALT200M107.714.7106.214.3107.913.1106.814.1
13LEMONlargeALT200M116.915.8113.315.1111.314.0113.415.0
14LEMONhugeALT200M118.015.4116.315.1120.214.5117.315.0
Test Set
15Human80.615.084.614.791.614.285.314.6
16SimVLMbase1.8B------94.813.1
17SimVLMlarge1.8B------108.514.2
18SimVLMhuge‡1.8B109.014.6110.814.6109.513.9110.314.5
19LEMONlargeALT200M111.215.6112.315.2105.013.6110.915.0
20LEMONhugeALT200M112.815.2115.515.1110.113.7114.314.9
+ +Table 3. Results on nocaps validation and test sets. All our models are trained with cross-entropy loss only, without CIDEr optimization. The VinVL model with * is not pre-trained, but use SCST+CBS as reported in the paper. The VinVL results with † are reproduced by us via finetuning from the released checkpoints, which are pre-trained on the combined datasets including 5.65M images, 2.5M QAs, 4.68M captions and 1.67M pseudo-captions. The numbers with ‡ are copied from the nocaps leaderboard. + +avoid duplicate computation, thereby making the generation efficient. We also experimented with other model structures and training objectives, such as predicting the next token with language modeling, as shown in Figure 4 and will be detailed later in Section 4.3. + +# 4. Experiments + +In this section, we first present our experimental setup in Section 4.1, and then detail our results in Section 4.2, followed by comprehensive analysis in Section 4.3. + +# 4.1. Setup + +Datasets. To measure the progress brought about by large-scale pre-training, we aim to evaluate the model's capability of describing varieties of (long-tail) visual concepts, which is essential for captioning in the wild. For this purpose, we choose nocaps [1] as the evaluation benchmark, which is developed to evaluate object captioning at scale. The dataset consists of 15100 images from Open Images, and covers more than 600 object categories, of which nearly 400 of them are unseen from the training set in COCO [5]. Based on whether the image contains novel + +objects unseen in the COCO training set, the nocaps images are divided into three domains: "in", "near", and "out". None of the objects in the out-domain are seen in COCO. This discrepancy raises the importance of learning from external resources for recognizing novel objects, rather than relying on the clean and fully annotated captioning training data. As the external training resources may vary for different methods, in Table 3, we only compare our model with other models that also use extra imageCaption pairs, and take the pre-training dataset size into account. + +Implementation details. To study the scaling trend, we experiment with 8 model configurations and 5 pre-training data sizes. We train all the models from scratch if not otherwise specified. In the pre-training, we do not include COCO or Visual Genome data, to exclude the possible impact of data quality when plotting the scaling trend, as these datasets are manually annotated instead of web collected. To create pre-training dataset of different sizes, we randomly sample from ALT200M at different data scales. Note that the larger dataset is a superset of the smaller ones. + +We use AdamW optimizer with linearly decaying learning rate. During pre-training, the batch size is 8192. The + +
ModelPre-training dataCross-entropy optimizationCIDEr optimization
B@4MCSB@4MCS
Encoder-Decoder [4]CC12M--110.9-----
VinVLbase5.65M combined38.230.3129.323.640.930.9140.425.1
VinVLlarge38.530.4130.823.441.031.1140.925.2
SimVLMbase1.8B39.032.9134.824.0----
SimVLMlarge40.333.4142.624.7----
SimVLMhuge40.633.7143.325.4----
LEMONbaseALT200M40.330.2133.323.341.631.0142.725.1
LEMONlarge40.630.4135.723.542.331.2144.325.3
LEMONhuge41.530.8139.124.142.631.4145.525.5
+ +initial learning rate is set to $2 \times 10^{-4}$ for the base and large model, and to $1 \times 10^{-4}$ for the huge model. The models are trained for 60 epochs. The maximum length of image regions, tags and caption tokens are 50, 15, 20, respectively. During finetuning, the model is trained for 40 epochs with batch size 512. The initial learning rate is $1 \times 10^{-5}$ , $1 \times 10^{-6}$ , and $8 \times 10^{-7}$ for the base, large, and huge models, respectively. During inference, the caption is generated with beam search and the beam size is 5. The generation ends when the $\langle \mathrm{EOS} \rangle$ token is predicted, or the maximum length of 20 tokens is reached. More training details are provided in Appendix. + +# 4.2. Captioning Results + +Results on nocaps validation and test sets are shown in Table 3. By leveraging large-scale pre-training on the automatically collected alt-texts, LEMON has achieved remarkable improvement, especially for out-of-domain images. Compared to the baseline trained on COCO only (row 8), after pre-training on ALT200M (row 12), the CIDEr score is improved by 16.3 for the in-domain part, and 45.3 for the out-of-domain part. This evidences that large-scale pre-training improves the model's ability to recognize a wide range of long-tailed visual objects. We also present results of models pre-trained on CC3M and CC12M. Compared to the best reported results on these datasets (row 1, 2), our evaluated CIDEr scores (row 9, 10) are increased by 18.4 and 13.0, respectively. This demonstrates the performance improvement in our captioning results brought about by the proposed training scheme when the pre-training dataset is the same. On the leaderboard3 test set, our large and huge models (row 19, 20) both surpassed the top-ranking model (row 18) that is pre-trained on 1.8B image-text pairs, creating the new state-of-the-art of 114.3 in CIDEr. We also achieve the state of the art on other image captioning benchmarks, including COCO Caption and Conceptual Captions, as summarized in Table 4 and 5. + +Table 4. Results (single model) on COCO "Karpathy" test split. B@4: BLEU@4, M:METEOR, C: CIDEr, S: SPICE. + +
ModelB@4MCS
w/o pre-training [4]--100.9-
pre-trained on CC12M [4]--105.4-
LEMONbase w/o PT10.112.1104.419.0
LEMONbase on CC12M10.111.9108.119.8
LEMONbase10.112.0111.920.5
LEMONlarge10.812.3117.421.0
LEMONhuge13.013.9136.823.2
+ +Table 5. Results on the Conceptual Captions (CC3M) dev set. All the models are finetuned on CC3M with cross-entropy loss only. We compare with the best results reported on the dev set with and without pre-training. PT: pre-training. + +Large-scale pre-training not only benefits VL representation learning, but also equips the model with the capability to zero-shot generalization. We use the pre-trained model to generate captions directly without further finetuning. The prefix "a picture of" is added as prompt to improve the quality of generated captions. Some examples are illustrated in Figure 5. The pre-trained model demonstrates strong ability in recognizing various long-tail visual concepts. Compared to the model trained only on small clean set, it shows the knowledge of many fine-grained categories (e.g., "metal instrument" vs. "tuba"), which are learned from the large-scale noisy supervision of alt-texts from web. We also notice that our pre-trained model tends to generate very short descriptions when used in a zero-shot manner, but this is mitigated after finetuning on COCO. We posit that the reason for this is the relatively large proportion of short alt-texts in our pre-training datasets. + +# 4.3. Ablation and Analysis + +Scaling law: influence of data and model sizes. We conduct comprehensive experiments to understand how much gain can be obtained in the downstream tasks by scaling up pre-training. Figure 2 shows the relationship between the number of images used in pre-training and the CIDEr scores evaluated in the downstream captioning tasks. All + +![](images/9831ab291f88e9fa568cfb0a0148b9f8eb63895354b101e8a15482a6e743b378.jpg) +B: a woman holding a pink umbrella over her head. + +![](images/175cda26025d57fa8d66df52f2a35a2aa379138b2d63b177739d1d6c18fc58bd.jpg) +B: a close up of a tree branch +B: a picture of a cat with a red tail. +F: a black and white image of a killer whale. + +![](images/a9b4bea330d35718bea18af3073a66448ebe78b2694ab3c8282c5978ac608f92.jpg) +F: a close up of a dinosaur skull with a black background + +![](images/7599ae8c20e1f0d690ddaccfedd3eae37804e8d4cacf96580e4d3e9be60e9df2.jpg) +Z: a picture of a dinosaur skeleton +B: a man wearing a hat and a straw hat standing in front of a large metal instrument. +F: a man in a green hat playing a tuba. +F: a collection of swords on display in a museum. + +![](images/95a533034dd3ce541d74211a742d1ade1bf9b3aee3946cc21c52b5a975868795.jpg) +B: a collection of wooden tools on a white background. + +![](images/a49ae6a28eef4348015d01467a8c2025a599fc08951f404f47af03b11e232b5a.jpg) +F: a woman in a kimono holding a purple umbrella. +(a) pre-training accuracy +Figure 6. Comparison of sample efficiency for different model sizes. Figure (a) shows the learning curve in pre-training, measured by the accuracy of cross-entropy loss for masked token prediction. Figures (b) and (c) show the results of finetuned intermediate checkpoints, evaluated on COCO "Karpathy" test set and nocaps validation set, respectively. The larger model can consistently achieve better results in downstream tasks with far fewer pre-training epochs, especially for out-of-domain data. + +![](images/98c447c91e37fe706f0037a827f06ae6336c05d66feeeb9912abd1d060a2df30.jpg) +Z: a picture of a geisha +(b) finetuned/evaluated on COCO + +![](images/c8bba00bf03d1195d5aaa272f27cc63523134a817ba02fe7341544ddfad9a151.jpg) +Z: a picture of a killer whale +Z: a picture of a Bavarian musician playing a tuba +Figure 5. Examples of generated captions on nocaps validation set. B: the baseline model trained on COCO caption only without pre-training. F: the model finetuned on COCO after pre-training on ALT200M. Z: the pre-trained model without finetuning, where we add the prefix "a picture of" during inference as the prompt to improve the quality of zero-shot generation following [43]. +(c) finetuned on COCO, evaluated on nocaps + +![](images/c5a8c76d5d00291c437a963ffce15a8941fa30f22017918418af8efda1633720.jpg) +Z: a picture of ancient swords + +![](images/421e8b5965b31d075deee2d490f5243236b90f4a5e23b3e64b85b1d10c6f2ecb.jpg) + +the models are pre-trained from scratch, and then finetuned on COCO. While all the models can be improved after pretraining with more data, the improvement is obviously less significant for the smaller models than for the larger models. On COCO, the gap between "small" and "large" models is negligible at 3M scale, but it becomes large as the data size increases. Moreover, when evaluating on nocaps, the gap in out-of-domain set is consistently larger than that in in-domain. This implies the advantage of large models in transferring knowledge from pre-training to downstream tasks, especially when the finetuning data are too limited to cover all test scenarios. + +Besides, we observe that the model capacity becomes the performance bottleneck as the amount of available data increases. Figure 1 plots the scaling trend w.r.t. the number of model parameters. When pre-training with 3M data, the + +"base" size appears to be sufficient, and there is no significant benefit to using larger models. However, with more than 40M data, the larger models start to outperform the smaller ones by a significant margin. When the data magnitude reaches hundreds of millions, and if the observed trend from "base" to "huge" can be kept, there is promise in training an even larger model to push the limits of VLP for captioning tasks. + +At last, to have a better understanding of the data quality, we perform pre-training with the same settings on CC12M and the 12M subset of ALT200M. With the only difference in pre-training data source, the models yield fairly similar results (0.1 to 0.3 differences in CIDEr) on COCO and nocaps. This indicates that our data quality is comparable to that of CC12M. The observed performance improvement should be attributed to the pre-training scale. + +
Arch.Obj.COCOCC3M
CIDErSPICECIDErSPICE
Enc-DecLM120.921.894.918.1
s2s-MLM120.422.199.918.9
EncoderLM119.221.596.118.0
s2s-MLM119.921.9104.419.0
+ +Table 6. Ablation of models with different architectures, and trained with different objectives. Results are reported on COCO Caption "Karpathy" test split and Conceptual Captions val split. All the models are trained from scratch. s2s-MLM indicates sequence-to-sequence MLM as described in Sec. 3.3. + +Sample efficiency. We examine the improvement of learned representations along with the progress of pretraining. Progress is measured quantitatively by the number of image-text paired samples seen in pre-training, i.e., the effective batch size multiplied by the training steps. In Figure 6, we report the results on COCO Caption after finetuning intermediate pre-trained checkpoints. We also evaluate the finetuned models on nocaps, indicating the ability of generalization under domain shift. We present two models in the figure, one with "base" size, the other with "huge" size. Both models are pre-trained on ALT200M. + +We observe that both models continue to improve after seeing more samples in pre-training, but the larger model learns much "faster". To achieve similar results in the downstream COCO captioning task, the base model must see more than 2 to 8 times more samples in pretraining. This factor is even greater when evaluating on the nocaps out-of-domain images. The result of the "base" model seeing 19 billion samples is still slightly worse than that of the "huge" model seeing 0.8 billion samples. This demonstrates the efficiency of large models in learning from large-scale data, as well as the robustness in generalization. + +Further ablation. We compare with other common model structures and training objectives, such as the encoder-decoder transformer model and unidirectional language modeling (LM). Experiments are conducted with models of "base" size as specified in Table 2. For the encoder-decoder structure, we use 6 encoder layers (with self-attention) followed by 6 decoder layers (with cross-attention after self-attention), while other model configurations remain unchanged. The training objectives are illustrated in Figure 4. For each experiment setting, we sweep the hyperparameters, e.g., pre-training epochs from 40 to 200, finetuning epochs from 10 to 60, and learning rates from $1 \times 10^{-6}$ to $3 \times 10^{-5}$ . The results of the best hyperparameters are reported. + +We train the models under 4 different settings on COCO and CC3M, respectively. Results are summarized in Table 6. On COCO, the differences among the 4 settings are small (1.41% relative change in CIDEr), with the worst + +![](images/21db9f3d6a2e9bcd66efdee4db3228b0aae145fc5822fc3d837f4e13fe852546.jpg) +Figure 7. Comparison of different training objectives by pretraining on CC12M and finetuning on COCO. The models are finetuned from intermediate checkpoints using the same objective as used in pre-training. + +being 119.2 from encoder+LM, and the best being 120.9 from encoder-decoder+LM. In contrast, on CC3M, the difference is much larger (9.10% relative change in CIDEr). The worst is 94.9 from encoder-decoder+LM, while the best is 104.4 from encoder+MLM. As CC3M is collected over the Internet and contains much more noise, we assume that the model that tends to overfit is prone to error when data quality is low, even though it performs well given well-annotated data. + +Moreover, to compare training objectives, we first pretrain the models on CC12M, using s2s-MLM or LM, then finetune the intermediate checkpoints on COCO. As shown in Figure 7, we observe that although the model trained with LM converges faster at the beginning, it enters saturation early, and does not achieve scores as high as the model using s2s-MLM. We also find that training with LM is very sensitive to learning rates. Given the above results, we choose the s2s-MLM model and the encoder structure to scale up with the noisy pre-training data. + +# 5. Conclusions + +In this paper, we study the scaling behavior of VLP models for image captioning, and construct our own largescale dataset ALT200M. Our experiments show that scaling up pre-training leads to remarkable improvement for the downstream captioning tasks. Our model LEMON has achieved new state-of-the-arts on multiple benchmarks, including COCO Caption, nocaps, and Conceptual Cap-tions. LEMON also has impressive capability of recogni-zing a wide range of long-tail visual objects, even in the zero-shot manner. Moreover, our study on large transformer models indicates that with orders of magnitude larger training data available, the model capacity tends to be the bottleneck. It is a promising direction to train a substantially larger model to take more advantage from the large amounts of alt-text data widely circulated on the Internet. + +# 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. 1, 5 +[2] 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. In NeurlPS, 2020. 1 +[3] 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. 2 +[4] Soravit Changpinyo, Piyush Sharma, Nan Ding, and Radu Soricut. Conceptual 12m: Pushing web-scale image-text pretraining to recognize long-tail visual concepts. In CVPR, 2021. 1, 3, 5, 6 +[5] 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. 1, 3, 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 ECCV, 2020. 1, 2 +[7] Jaemin Cho, Jie Lei, Hao Tan, and Mohit Bansal. Unifying vision-and-language tasks via text generation. In ICML, 2021. 2 +[8] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In NAACL, 2019. 4 +[9] Zhiyuan Fang, Jianfeng Wang, Xiaowei Hu, Lijuan Wang, Yezhou Yang, and Zicheng Liu. Compressing visual-linguistic model via knowledge distillation. In ICCV, 2021. 2 +[10] Zhe Gan, Yen-Chun Chen, Linjie Li, Tianlong Chen, Yu Cheng, Shuohang Wang, and Jingjing Liu. Playing lottery tickets with vision and language. arXiv preprint arXiv:2104.11832, 2021. 2 +[11] 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 +[12] Tom Henighan, Jared Kaplan, Mor Katz, Mark Chen, Christopher Hesse, Jacob Jackson, Heewoo Jun, Tom B Brown, Prafulla Dhariwal, Scott Gray, et al. Scaling laws for autoregressive generative modeling. arXiv preprint arXiv:2010.14701, 2020. 1, 3 +[13] Xiaowei Hu, Xi Yin, Kevin Lin, Lijuan Wang, Lei Zhang, Jianfeng Gao, and Zicheng Liu. Vivo: Surpassing human performance in novel object captioning with visual vocabulary pre-training. In AAAI, 2021. 2 +[14] Zhicheng Huang, Zhaoyang Zeng, Yupan Huang, Bei Liu, Dongmei Fu, and Jianlong Fu. Seeing out of the box: End-to-end pre-training for vision-language representation learning. In CVPR, 2021. 2 +[15] Zhicheng Huang, Zhaoyang Zeng, Bei Liu, Dongmei Fu, and Jianlong Fu. Pixel-bert: Aligning image pixels with + +text by deep multi-modal transformers. arXiv preprint arXiv:2004.00849, 2020. 2 +[16] Yuqi Huo, Manli Zhang, Guangzhen Liu, Haoyu Lu, Yizhao Gao, Guoxing Yang, Jingyuan Wen, Heng Zhang, Baogui Xu, Weihao Zheng, et al. Wenlan: Bridging vision and language by large-scale multi-modal pre-training. arXiv preprint arXiv:2103.06561, 2021.4 +[17] 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. In ICML, 2021. 1, 2, 3, 4 +[18] Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020. 1, 3 +[19] Wonjae Kim, Bokyung Son, and Ildoo Kim. Vilt: Vision-and-language transformer without convolution or region supervision. In ICML, 2021. 2 +[20] 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. IJCV, 2017. 1 +[21] 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 CVPR, 2021. 2 +[22] Gen Li, Nan Duan, Yuejian Fang, Daxin Jiang, and Ming Zhou. Unicoder-vl: A universal encoder for vision and language by cross-modal pre-training. In AAAI, 2020. 2 +[23] Junnan Li, Ramprasaath R Selvaraju, Akhilesh Deepak Gotmare, Shafiq Joty, Caiming Xiong, and Steven Hoi. Align before fuse: Vision and language representation learning with momentum distillation. In NeurIPS, 2021. 2 +[24] Linjie Li, Yen-Chun Chen, Yu Cheng, Zhe Gan, Licheng Yu, and Jingjing Liu. Hero: Hierarchical encoder for video+ language omni-representation pre-training. In EMNLP, 2020. 2 +[25] Linjie Li, Zhe Gan, and Jingjing Liu. A closer look at the robustness of vision-and-language pre-trained models. arXiv preprint arXiv:2012.08673, 2020. 2 +[26] 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. 1, 2 +[27] Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, and Kai-Wei Chang. What does bert with vision look at? In ACL, 2020. 2 +[28] Wei Li, Can Gao, Guocheng Niu, Xinyan Xiao, Hao Liu, Jiachen Liu, Hua Wu, and Haifeng Wang. Unimo: Towards unified-modal understanding and generation via cross-modal contrastive learning. In ACL, 2021. 2 +[29] 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. 1, 2, 4 + +[30] Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In NeurIPS, 2019. 1, 2 +[31] Jiasen Lu, Vedanuj Goswami, Marcus Rohrbach, Devi Parikh, and Stefan Lee. 12-in-1: Multi-task vision and language representation learning. In CVPR, 2020. 2 +[32] Vicente Ordonez, Girish Kulkarni, and Tamara Berg. Im2text: Describing images using 1 million captioned photographs. In NeurIPS, 2011. 1 +[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. In ICML, 2021. 1, 2, 3, 4 +[34] Christoph Schuhmann, Richard Vencu, Romain Beaumont, Robert Kaczmarczyk, Clayton Mullis, Aarush Katta, Theo Coombes, Jenia Jitsev, and Aran Komatsuzaki. Laion-400m: Open dataset of clip-filtered 400 million image-text pairs. arXiv preprint arXiv:2111.02114, 2021. 4 +[35] 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. 1, 3, 5 +[36] Krishna Srinivasan, Karthik Raman, Jiecao Chen, Michael Bendersky, and Marc Najork. Wit: Wikipedia-based image text dataset for multimodal multilingual machine learning. arXiv preprint arXiv:2103.01913, 2021. 4 +[37] Weijie Su, Xizhou Zhu, Yue Cao, Bin Li, Lewei Lu, Furu Wei, and Jifeng Dai. Vl-bert: Pre-training of generic visual-linguistic representations. In ICLR, 2020. 1, 2 +[38] Chen Sun, Fabien Baradel, Kevin Murphy, and Cordelia Schmid. Contrastive bidirectional transformer for temporal representation learning. arXiv preprint arXiv:1906.05743, 2019.2 +[39] Chen Sun, Austin Myers, Carl Vondrick, Kevin Murphy, and Cordelia Schmid. Videobert: A joint model for video and language representation learning. In ICCV, 2019. 2 +[40] Hao Tan and Mohit Bansal. Lxmert: Learning cross-modality encoder representations from transformers. In EMNLP, 2019. 1, 2 +[41] Yi Tay, Mostafa Dehghani, Jinfeng Rao, William Fedus, Samira Abnar, Hyung Won Chung, Sharan Narang, Dani Yogatama, Ashish Vaswani, and Donald Metzler. Scale efficiently: Insights from pre-training and fine-tuning transformers. arXiv preprint arXiv:2109.10686, 2021. 1, 3 +[42] Jianfeng Wang, Xiaowei Hu, Pengchuan Zhang, Xiujun Li, Lijuan Wang, Lei Zhang, Jianfeng Gao, and Zicheng Liu. Minivlm: A smaller and faster vision-language model. arXiv preprint arXiv:2012.06946, 2020. 2 +[43] Zirui Wang, Jiahui Yu, Adams Wei Yu, Zihang Dai, Yulia Tsvetkov, and Yuan Cao. Simvlm: Simple visual language model pretraining with weak supervision. arXiv preprint arXiv:2108.10904, 2021. 1, 2, 5, 7 +[44] Hongwei Xue, Yupan Huang, Bei Liu, Houwen Peng, Jianlong Fu, Houqiang Li, and Jiebo Luo. Probing intermodality: Visual parsing with self-attention for vision-language pre-training. In NeurlPS, 2021. 2 + +[45] Zhengyuan Yang, Yijuan Lu, Jianfeng Wang, Xi Yin, Dinei Florencio, Lijuan Wang, Cha Zhang, Lei Zhang, and Jiebo Luo. Tap: Text-aware pre-training for text-vqa and text-caption. In CVPR, 2021. 2 +[46] 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. In AAAI, 2021. 2 +[47] Xiaohua Zhai, Alexander Kolesnikov, Neil Houlsby, and Lucas Beyer. Scaling vision transformers. arXiv preprint arXiv:2106.04560, 2021. 1, 3 +[48] 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, 4, 5 +[49] Luowei Zhou, Hamid Palangi, Lei Zhang, Houdong Hu, Jason Corso, and Jianfeng Gao. Unified vision-language pretraining for image captioning and vqa. In AAAI, 2020. 1, 4 +[50] Linchao Zhu and Yi Yang. Actbert: Learning global-local video-text representations. In CVPR, 2020. 2 \ No newline at end of file diff --git a/scalingupvisionlanguagepretrainingforimagecaptioning/images.zip b/scalingupvisionlanguagepretrainingforimagecaptioning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..cc350fb58b18901d3ff6071ff5d9440d6b350de3 --- /dev/null +++ b/scalingupvisionlanguagepretrainingforimagecaptioning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c159de7c92b2ee9c120ad2f72b719a61cfb1021b1b7d0985b22a28d7c9a7670 +size 684594 diff --git a/scalingupvisionlanguagepretrainingforimagecaptioning/layout.json b/scalingupvisionlanguagepretrainingforimagecaptioning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1fbacd45d5126ea598ebeefe0a02f8758140bf2b --- /dev/null +++ b/scalingupvisionlanguagepretrainingforimagecaptioning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d490ac80913fe05b702c5cd3160d8cc5454b8c5908d52a1e65065e7e403e70bc +size 337340 diff --git a/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/9def3a1a-ff15-4670-a9d5-cf1c5c736b43_content_list.json b/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/9def3a1a-ff15-4670-a9d5-cf1c5c736b43_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ae512122d199afff43ed7dd0e140c69582f790dd --- /dev/null +++ b/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/9def3a1a-ff15-4670-a9d5-cf1c5c736b43_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3f403b5581c9dbe929de9e4b0e40b84b188630df31cc843a8fb7548442e77e6 +size 100137 diff --git a/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/9def3a1a-ff15-4670-a9d5-cf1c5c736b43_model.json b/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/9def3a1a-ff15-4670-a9d5-cf1c5c736b43_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1567719ecb3f52b92a55bb8a2f16f53cbf0d2df9 --- /dev/null +++ b/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/9def3a1a-ff15-4670-a9d5-cf1c5c736b43_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a36de606d7436eb5056acf15d81e812fac1a32bc675cb4e67188465664b3bed2 +size 133878 diff --git a/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/9def3a1a-ff15-4670-a9d5-cf1c5c736b43_origin.pdf b/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/9def3a1a-ff15-4670-a9d5-cf1c5c736b43_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..27e971073b54a7ebba05b5f2254cb85296f81b3b --- /dev/null +++ b/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/9def3a1a-ff15-4670-a9d5-cf1c5c736b43_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3052557159ad445b5f9e7b5eb55a08ab5d1a85306d33e6b3cc12ac631321899 +size 607409 diff --git a/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/full.md b/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0e5264dc36c307a49cea8c96e59b8a5ac0ca9d30 --- /dev/null +++ b/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/full.md @@ -0,0 +1,360 @@ +# Scaling Up Your Kernels to 31x31: Revisiting Large Kernel Design in CNNs + +Xiaohan Ding $^{1*}$ Xiangyu Zhang $^{2\dagger}$ Jungong Han $^{3}$ Guiguang Ding $^{1\ddagger}$ + +1 Beijing National Research Center for Information Science and Technology (BNRist); School of Software, Tsinghua University, Beijing, China + +2 MEGVII Technology + +3 Computer Science Department, Aberystwyth University, SY23 3FL, UK + +dxh17@mails.tsinghua.edu.cn zhangxiangyu@megvii.com + +jungonghan77@gmail.com dinggg@tsinghua.edu.cn + +# Abstract + +We revisit large kernel design in modern convolutional neural networks (CNNs). Inspired by recent advances in vision transformers (ViTs), in this paper, we demonstrate that using a few large convolutional kernels instead of a stack of small kernels could be a more powerful paradigm. We suggested five guidelines, e.g., applying re-parameterized large depth-wise convolutions, to design efficient high-performance large-kernel CNNs. Following the guidelines, we propose RepLKNet, a pure CNN architecture whose kernel size is as large as $31 \times 31$ , in contrast to commonly used $3 \times 3$ . RepLKNet greatly closes the performance gap between CNNs and ViTs, e.g., achieving comparable or superior results than Swin Transformer on ImageNet and a few typical downstream tasks, with lower latency. RepLKNet also shows nice scalability to big data and large models, obtaining $87.8\%$ top-1 accuracy on ImageNet and $56.0\%$ mIoU on ADE20K, which is very competitive among the state-of-the-arts with similar model sizes. Our study further reveals that, in contrast to small-kernel CNNs, large-kernel CNNs have much larger effective receptive fields and higher shape bias rather than texture bias. Code & models at https://github.com/megvii-research/RepLKNet. + +# 1. Introduction + +Convolutional neural networks (CNNs) [40, 53] used to be a common choice of visual encoders in modern computer vision systems. However, recently, CNNs [40, 53] have + +![](images/c55d5a2356966bec6b84d4d493a164e17c3d809f88cb9eb8ff55042a79cd1f0b.jpg) +(A) ResNet-101 + +![](images/c285f0484a90cd3efc4573d72a2446dd770734fed384fbd578c31067c2563179.jpg) +(B) ResNet-152 + +![](images/0008c82c78e16862034b5a3029a7ff65c767df29c866826e43e3dfda72eb3ad2.jpg) +(C) RepLKNet-13 +Figure 1. The Effective Receptive Field (ERF) of ResNet-101/152 and RepLKNet-13/31 respectively. A more widely distributed dark area indicates a larger ERF. More layers (e.g., from ResNet-101 to ResNet-152) help little in enlarging ERFs. Instead, our large kernel model RepLKNet effectively obtains large ERFs. + +![](images/1c9f2674e0561b6027c33d41bc335d1292a2120161ae20d698f7e290032afa6a.jpg) +(D) RepLKNet-31 + +been greatly challenged by Vision Transformers (ViTs) [34, 59, 86, 94], which have shown leading performances on many visual tasks – not only image classification [34, 104] and representation learning [4, 9, 16, 100], but also many downstream tasks such as object detection [24, 59], semantic segmentation [94, 98] and image restoration [10, 54]. Why are ViTs super powerful? Some works believed that multi-head self-attention (MHSA) mechanism in ViTs plays a key role. They provided empirical results to demonstrate that, MHSA is more flexible [50], capable (less inductive bias) [20], more robust to distortions [66, 98], or able to model long-range dependencies [69, 90]. But some works challenge the necessity of MHSA [115], attributing the high performance of ViTs to the proper building blocks [33], and/or dynamic sparse weights [38, 111]. More works [20, 38, 42, 95, 115] explained the superiority of ViTs from different points of views. + +In this work, we focus on one view: the way of building up large receptive fields. In ViTs, MHSA is usually designed to be either global [34, 78, 94] or local but with large kernels [59, 70, 89], thus each output from a single MHSA layer is able to gather information from a large region. However, large kernels are not popularly employed in CNNs (except for the first layer [40]). Instead, a typical fashion is to use a stack of many small spatial con + +volutions1 [40, 44, 47, 68, 77, 82, 109] (e.g., $3 \times 3$ ) to enlarge the receptive fields in state-of-the-art CNNs. Only some old-fashioned networks such as AlexNet [53], Inceptions [79-81] and a few architectures derived from neural architecture search [37, 43, 56, 116] adopt large spatial convolutions (whose size is greater than 5) as the main part. The above view naturally leads to a question: what if we use a few large instead of many small kernels to conventional CNNs? Is large kernel or the way of building large receptive fields the key to close the performance gap between CNNs and ViTs? + +To answer this question, we systematically explore the large kernel design of CNNs. We follow a very simple "philosophy": just introducing large depth-wise convolutions into conventional networks, whose sizes range from $3 \times 3$ to $31 \times 31$ , although there exist other alternatives to introduce large receptive fields via a single or a few layers, e.g. feature pyramids [93], dilated convolutions [13, 101, 102] and deformable convolutions [23]. Through a series of experiments, we summarize five empirical guidelines to effectively employ large convolutions: 1) very large kernels can still be efficient in practice; 2) identity shortcut is vital especially for networks with very large kernels; 3) reparameterizing [30] with small kernels helps to make up the optimization issue; 4) large convolutions boost downstream tasks much more than ImageNet; 5) large kernel is useful even on small feature maps. + +Based on the above guidelines, we propose a new architecture named RepLKNet, a pure $^2$ CNN where reparameterized large convolutions are employed to build up large receptive fields. Our network in general follows the macro architecture of Swin Transformer [59] with a few modifications, while replacing the multi-head self-attention with large depth-wise convolutions. We mainly benchmark middle-size and large-size models, since ViTs used to be believed to surpass CNNs on large data and models. On ImageNet classification, our baseline (similar model size with Swin-B), whose kernel size is as large as $31 \times 31$ , achieves $84.8\%$ top-1 accuracy trained only on ImageNet-1K dataset, which is $0.3\%$ better than Swin-B but much more efficient in latency. + +More importantly, we find that the large kernel design is particularly powerful on downstream tasks. For example, our networks outperform ResNeXt-101 [99] or ResNet-101 [40] backbones by $4.4\%$ on COCO detection [55] and $6.1\%$ on ADE20K segmentation [114] under the similar complexity and parameter budget, which is also on par with or even better than the counterpart Swin Transformers but with higher inference speed. Given more pretraining data + +(e.g., 73M images) and more computational budget, our best model obtains very competitive results among the state-of-the-arts with similar model sizes, e.g. $87.8\%$ top-1 accuracy on ImageNet and $56.0\%$ on ADE20K, which shows excellent scalability towards large-scale applications. + +We believe the high performance of RepLKNet is mainly because of the large effective receptive fields (ERFs) [63] built via large kernels, as compared in Fig. 1. Moreover, RepLKNet is shown to leverage more shape information than conventional CNNs, which partially agrees with human's cognition. We hope our findings can help to understand the intrinsic mechanism of both CNNs and ViTs. + +# 2. Related Work + +# 2.1. Models with Large Kernels + +As mentioned in the introduction, apart from a few old-fashioned models like Inceptions [79-81], large-kernel models became not popular after VGG-Net [77]. One representative work is Global Convolution Networks (GCNs) [67], which uses very large convolutions of $1 \times K$ followed by $K \times 1$ to improve semantic segmentation task. However, large kernels are reported to harm the performance on ImageNet. Local Relation Networks (LR-Net) [45] proposes a spatial aggregation operator (LR-Layer) to replace standard convolutions, which can be viewed as a dynamic convolution. LR-Net could benefit from a kernel size of $7 \times 7$ , but the performance decreases with $9 \times 9$ . With a kernel size as large as the feature map, the top-1 accuracy significantly reduced from $75.7\%$ to $68.4\%$ . + +Recently, Swin Transformers [59] propose to capture the spatial patterns with shifted window attention, whose window sizes range from 7 to 12, which can also be viewed as a variant of large kernel. The follow-ups [32, 58] employ even larger window sizes. Inspired by the success of those local transformers, a recent work [38] replaces MHSA layers with static or dynamic $7 \times 7$ depth-wise convolutions in [59] while still maintains comparable results. Though the network proposed by [38] shares similar design pattern with ours, the motivations are different: [38] does not investigate the relationship between $ERFs$ , large kernels and performances; instead, it attributes the superior performances of vision transformers to sparse connections, shared parameters and dynamic mechanisms. Another three representative works are Global Filter Networks (GFNets) [72], CKConv [74] and FlexConv [73]. GFNet optimizes the spatial connection weights in the Fourier domain, which is equivalent to circular global convolutions in the spatial domain. CKConv formulates kernels as continuous functions to process sequential data, which can construct arbitrarily large kernels. FlexConv learns different kernel sizes for different layers, which can be as large as the feature maps. Although they use very large kernels, they do not intend to answer the + +Table 1. Inference speed of a stack of 24-layer depth-wise convolutions with various kernel sizes and resolutions on a single GTX 2080Ti GPU. The input shape is (64, 384, $R$ , $R$ ). Baselines are evaluated with Pytorch 1.9.0 + cuDNN 7.6.5, in FP32 precision. + +
Resolution RImplLatency (ms) @ Kernel size
3579131721272931
16 × 16Pytorch5.611.014.417.636.057.283.4133.5150.7171.4
Ours5.66.56.46.97.58.48.48.48.38.4
32 × 32Pytorch21.934.154.876.1141.2230.5342.3557.8638.6734.8
Ours21.928.734.640.652.564.573.987.992.796.7
64 × 64Pytorch69.6141.2228.6319.8600.0977.71454.42371.12698.43090.4
Ours69.6112.6130.7152.6199.7251.5301.0378.2406.0431.7
+ +key questions we desire: why do traditional CNNs underperform ViTs, and how to apply large kernels in common CNNs. Besides, both [38] and [72] do not evaluate their models on strong baselines, e.g., models larger than Swin-L. Hence it is still unclear whether large-kernel CNNs can scale up well as transformers. + +# Concurrent works. + +ConvMixer [87] uses up to $9 \times 9$ convolutions to replace the "mixer" component of ViTs [34] or MLPs [84, 85]. MetaFormer [103] suggests pooling layer is an alternate to self-attention. ConvNeXt [60] employs $7 \times 7$ depth-wise convolutions to design strong architectures, pushing the limit of CNN performances. Although those works show excellent performances, they do not show benefits from much larger convolutions (e.g., $31 \times 31$ ). + +# 2.2. Model Scaling Techniques + +Given a small model, it is a common practice to scale it up for better performance, thus scaling strategy plays a vital role in the resultant accuracy-efficiency trade-offs. For CNNs, existing scaling approaches usually focus on model depth, width, input resolution [31, 68, 82], bottleneck ratio and group width [31, 68]. Kernel size, however, is often neglected. In Sec. 3, we will show that the kernel size is also an important scaling dimension in CNNs, especially for downstream tasks. + +# 2.3. Structural Re-parameterization + +Structural Re-parameterization [26-30] is a methodology of equivalently converting model structures via transforming the parameters. For example, RepVGG targeted at a deep inference-time VGG-like (e.g., branch-free) model, and constructed extra ResNet-style shortcuts parallel to the $3 \times 3$ layers during training. In contrast to a real VGG-like model that is difficult to train [40], such shortcuts helped the model reach a satisfactory performance. After training, the shortcuts are absorbed into the parallel $3 \times 3$ kernels via a series of linear transformations, so that the resultant model becomes a VGG-like model. In this paper, we use this methodology to add a relatively small (e.g., $3 \times 3$ or $5 \times 5$ ) kernel into a very large kernel. In this way, we make the very large kernel capable of capturing small-scale patterns, hence improve the performance of the model. + +# 3. Guidelines of Applying Large Convolutions + +Trivially applying large convolutions to CNNs usually leads to inferior performance and speed. In this section, we summarize 5 guidelines for effectively using large kernels. + +Guideline 1: large depth-wise convolutions can be efficient in practice. It is believed that large-kernel convolutions are computationally expensive because the kernel size quadratically increases the number of parameters and FLOPs. The drawback can be greatly overcome by applying depth-wise (DW) convolutions [17,44]. For example, in our proposed RepLKNet (see Table 5 for details), increasing the kernel sizes in different stages from $[3,3,3,3]$ to $[31,29,27,13]$ only increases the FLOPs and number of parameters by $18.6\%$ and $10.4\%$ respectively, which is acceptable. The remaining $1\times 1$ convolutions actually dominate most of the complexity. + +One may concern that DW convolutions could be very inefficient on modern parallel computing devices like GPUs. It is true for conventional DW $3 \times 3$ kernels [44, 75, 109], because DW operations introduce low ratio of computation vs. memory access cost [64], which is not friendly to modern computing architecture. However, we find when kernel size becomes large, the computational density increases: for example, in a DW $11 \times 11$ kernel, each time we load a value from the feature map, it can attend at most 121 multiplications, while in a $3 \times 3$ kernel the number is only 9. Therefore, according to the roofline model, the actual latency should not increase as much as the increasing of FLOPs when kernel size becomes larger. + +Remark 1. Unfortunately, we find off-the-shelf deep learning tools (such as Pytorch) support large DW convolutions poorly, as shown in Table 1. Hence we try several approaches to optimize the CUDA kernels. FFT-based approach [65] appears reasonable to implement large convolutions. However, in practice we find block-wise (inverse) implicit gemm algorithm is a better choice. The implementation has been integrated into the open-sourced framework MegEngine [1] and we omit the details here. We have also released an efficient implementation [2] for PyTorch. Table 1 shows that our implementation is far more efficient, compared with the Pytorch baseline. With our optimization, the latency contribution of DW convolutions in RepLKNet + +Table 2. Results of different kernel sizes in normal/shortcut-free MobileNet V2. + +
ShortcutKernel sizeImageNet top-1 accuracy (%)
✓3×371.76
✓13×1372.53
3×368.67
13×1353.98
+ +reduces from $49.5\%$ to $12.3\%$ , which is roughly in proportion to the FLOPs occupation. + +Guideline 2: identity shortcut is vital especially for networks with very large kernels. To demonstrate this, we use MobileNet V2 [75] to benchmark, since it heavily uses DW layers and has two published variants (with or without shortcuts). For the large-kernel counterparts, we simply replace all the DW $3 \times 3$ layers with $13 \times 13$ . All the models are trained on ImageNet with the identical training configurations for 100 epochs (see Appendix A for details). Table 2 shows large kernels improve the accuracy of MobileNet V2 with shortcuts by $0.77\%$ . However, without shortcuts, large kernels reduce the accuracy to only $53.98\%$ . + +Remark 2. The guideline also works for ViTs. A recent work [33] finds that without identity shortcut, attention loses rank doubly exponentially with depth, leading to oversmoothing issue. Although large-kernel CNNs may degenerate in a different mechanism from ViT's, we also observed without shortcut, it is difficult for the network to capture local details. From a similar perspective as [91], shortcuts make the model an implicit ensemble composed of numerous models with different receptive fields (RFs), so it can benefit from a much larger maximum RF while not losing the ability to capture small-scale patterns. + +Guideline 3: re-parameterizing [30] with small kernels helps to make up the optimization issue. We replace the $3 \times 3$ layers of MobileNet V2 by $9 \times 9$ and $13 \times 13$ respectively, and optionally adopt Structural Reparameterization [26,27,30] methodology. Specifically, we construct a $3 \times 3$ layer parallel to the large one, then add up their outputs after Batch normalization (BN) [49] layers (Fig. 2). After training, we merge the small kernel as well as BN parameters into the large kernel, so the resultant model is equivalent to the model for training but no longer has small kernels. Table 3 shows directly increasing the kernel size from 9 to 13 reduces the accuracy, while re-parameterization addresses the issue. + +We then transfer the ImageNet-trained models to semantic segmentation with DeepLabv3+ [15] on Cityscapes [21]. We only replace the backbone and keep all the default training settings provided by MMSegmentation [19]. The observation is similar to that on ImageNet: $3 \times 3$ re-param improves the mIoU of the $9 \times 9$ model by 0.19 and the $13 \times 13$ model by 0.93. With such simple re-parameterization, increasing kernel size from 9 to 13 no longer degrades the + +Table 3. Results of $3 \times 3$ re-parameterization on MobileNet V2 with various kernel sizes. + +
Kernel3×3 re-paramImageNet top-1 acc (%)Cityscapes val mIoU (%)
3×3N/A71.7672.31
9×972.6776.11
9×9✓73.0976.30
13×1372.5375.67
13×13✓73.2476.60
+ +performance on both ImageNet and Cityscapes. + +Remark 3. It is known that ViTs have optimization problem especially on small datasets [34, 57]. A common workaround is to introduce convolutional prior, e.g., add a DW $3 \times 3$ convolution to each self-attention block [18,96], which is analogous to ours. Those strategies introduce additional translational equivariance and locality prior to the network, making it easier to optimize on small dataset without loss of generality. Similar to what ViT behaves [34], we also find when the pretraining dataset increases to 73 million images (refer to RepLKNet-XL in the next section), re-parameterization can be omitted without degradation. + +Guideline 4: large convolutions boost downstream tasks much more than ImageNet classification. Table 3 (after re-param) shows increasing the kernel size of MobileNet V2 from $3 \times 3$ to $9 \times 9$ improves the ImageNet accuracy by $1.33\%$ but the Cityscapes mIoU by $3.99\%$ . Table 5 shows a similar trend: as the kernel sizes increase from [3, 3, 3, 3] to [31, 29, 27, 13], the ImageNet accuracy improves by only $0.96\%$ , while the mIoU on ADE20K [114] improves by $3.12\%$ . Such phenomenon indicates that models of similar ImageNet scores could have very different capability in downstream tasks (just as the bottom 3 models in Table 5). + +Remark 4. What causes the phenomenon? First, large kernel design significantly increases the Effective Receptive Fields (ERFs) [63]. Numerous works have demonstrated "contextual" information, which implies large ERFs, is crucial in many downstream tasks like object detection and semantic segmentation [61, 67, 93, 101, 102]. We will discuss the topic in Sec. 5. Second, We deem another reason might be that large kernel design contributes more shape biases to the network. Briefly speaking, ImageNet pictures can be correctly classified according to either texture or shape, as proposed in [7, 35]. However, humans recognize objects mainly based on shape cue rather than texture, therefore a model with stronger shape bias may transfer better to downstream tasks. A recent study [88] points out ViTs are strong in shape bias, which partially explains why ViTs are super powerful in transfer tasks. In contrast, conventional CNNs trained on ImageNet tend to bias towards texture [7,35]. Fortunately, we find simply enlarging the kernel size in CNNs can effectively improve the shape bias. Please refer to Appendix C for details. + +![](images/20776cd07d4825eb2dc5661aabd1fff10cbcb789f40060e829a7279c1d7587c9.jpg) +Figure 2. An example of re-parameterizing a small kernel (e.g., $3 \times 3$ ) into a large one (e.g., $7 \times 7$ ). See [27, 30] for details. + +![](images/46d90c3955b221b59b5db184e04ae0b638357ee491e1ecb9eb2ed87782b02c3a.jpg) +Figure 3. Illustration to convolution with small feature map and large kernel. Two outputs at adjacent locations only share a part of kernel weights. Translational equivariance does not strictly hold. + +Table 4. Results of various kernel sizes in the last stage of MobileNet V2. Kernel sizes in previous stages remain to be $3 \times 3$ . + +
Kernel sizeImageNet acc (%)Cityscapes mIoU (%)
3×371.7672.31
7×772.0074.30
13×1371.9774.62
+ +Guideline 5: large kernel (e.g., $13 \times 13$ ) is useful even on small feature maps (e.g., $7 \times 7$ ). To validate it, We enlarge the DW convolutions in the last stage of MobileNet V2 to $7 \times 7$ or $13 \times 13$ , hence the kernel size is on par with or even larger than feature map size ( $7 \times 7$ by default). We apply re-parameterization to the large kernels as suggested by Guideline 3. Table 4 shows although convolutions in the last stage already involve very large receptive field, further increasing the kernel sizes still leads to performance improvements, especially on downstream tasks such as Cityscapes. + +Remark 5. When kernel size becomes large, notice that translational equivariance of CNNs does not strictly hold. As illustrated in Fig. 3, two outputs at adjacent spatial locations share only a fraction of the kernel weights, i.e., are transformed by different mappings. The property also agrees with the "philosophy" of ViTs - relaxing the symmetric prior to obtain more capacity. Interestingly, we find 2D Relative Position Embedding (RPE) [5,76], which is widely used in the transformer community, can also be viewed as a large depth-wise kernel of size $(2H - 1)\times (2W - 1)$ , where $H$ and $W$ are feature map height and width respectively. Large kernels not only help to learn the relative positions between concepts, but also encode the absolute position information due to padding effect [51]. + +# 4. RepLKNet: a Large-Kernel Architecture + +Following the above guidelines, in this section we propose RepLKNet, a pure CNN architecture with large ker + +nel design. To our knowledge, up to now CNNs still dominate small models [108, 110], while vision transformers are believed to be better than CNNs under more complexity budget. Therefore, in the paper we mainly focus on relatively large models (whose complexity is on par with or larger than ResNet-152 [40] or Swin-B [59]), in order to verify whether large kernel design could eliminate the performance gap between CNNs and ViTs. + +# 4.1. Architecture Specification + +We sketch the architecture of RepLKNet in Fig. 4: + +Stem refers to the beginning layers. Since we target at high performance on downstream dense-prediction tasks, we desire to capture more details by several conv layers at the beginning. After the first $3 \times 3$ with $2 \times$ downsampling, we arrange a DW $3 \times 3$ layer to capture low-level patterns, a $1 \times 1$ conv, and another DW $3 \times 3$ layer for downsampling. + +Stages 1-4 each contains several RepLK Blocks, which use shortcuts (Guideline 2) and DW large kernels (Guideline 1). We use $1 \times 1$ conv before and after DW conv as a common practice. Note that each DW large conv uses a $5 \times 5$ kernel for re-parameterization (Guideline 3), which is not shown in Fig. 4. Except for the large conv layers which provide sufficient receptive field and the ability to aggregate spatial information, the model's representational capacity is also closely related to the depth. To provide more nonlinearities and information communications across channels, we desire to use $1 \times 1$ layers to increase the depth. Inspired by the Feed-Forward Network (FFN) which has been widely used in transformers [34, 59] and MLPs [26, 84, 85], we use a similar CNN-style block composed of shortcut, BN, two $1 \times 1$ layers and GELU [41], so it is referred to as ConvFFN Block. Compared to the classic FFN which uses Layer Normalization [3] before the fully-connected layers, BN has an advantage that it can be fused into conv for efficient inference. As a common practice, the number of internal channels of the ConvFFN Block is $4 \times$ as the input. Simply following ViT and Swin, which interleave attention and FFN blocks, we place a ConvFFN after each RepLK Block. + +Transition Blocks are placed between stages, which first increase the channel dimension via $1 \times 1$ conv and then conduct $2 \times$ downsampling with DW $3 \times 3$ conv. + +In summary, each stage has three architectural hyper-parameters: the number of RepLK Blocks $B$ , the channel dimension $C$ , and the kernel size + +![](images/2b88fcca107f919168030090e32088c7ed09dd30f677ca3107f2b019d72df7e8.jpg) +Figure 4. RepLKNet comprises Stem, Stages and Transitions. Except for depth-wise (DW) large kernel, the other components include DW $3 \times 3$ , dense $1 \times 1$ conv, and batch normalization [49] (BN). Note that every conv layer has a following BN, which are not depicted. Such conv-BN sequences use ReLU as the activation function, except those before the shortcut-addition (as a common practice [40, 75]) and those preceding GELU [41]. + +Table 5. RepLKNet with different kernel sizes. The models are pretrained on ImageNet-1K in 120 epochs with $224 \times 224$ input and finetuned on ADE20K with UperNet in 80K iterations. On ADE20K, we test the single-scale mIoU, and compute the FLOPs with input of $2048 \times 512$ , following Swin. + +
Kernel sizeImageNetADE20K
Top-1ParamsFLOPsmIoUParamsFLOPs
3-3-3-382.1171.8M12.9G46.05104.1M1119G
7-7-7-782.7372.2M13.1G48.05104.6M1123G
13-13-13-1383.0273.7M13.4G48.35106.0M1130G
25-25-25-1383.0078.2M14.8G48.68110.6M1159G
31-29-27-1383.0779.3M15.3G49.17111.7M1170G
+ +$K$ . So that a RepLKNet architecture is defined by $[B_1, B_2, B_3, B_4], [C_1, C_2, C_3, C_4], [K_1, K_2, K_3, K_4]$ . + +# 4.2. Making Large Kernels Even Larger + +We continue to evaluate large kernels on RepLKNet via fixing $\mathbf{B} = [2, 2, 18, 2]$ , $\mathbf{C} = [128, 256, 512, 1024]$ , varying $\mathbf{K}$ and observing the performance of both classification and semantic segmentation. Without careful tuning of the hyper-parameters, we casually set the kernel sizes as [13, 13, 13, 13], [25, 25, 25, 13], [31, 29, 27, 13], respectively, and refer to the models as RepLKNet-13/25/31. We also construct two small-kernel baselines where the kernel sizes are all 3 or 7 (RepLKNet-3/7). + +On ImageNet, we train for 120 epochs with AdamW [62] optimizer, RandAugment [22], mixup [106], CutMix [105], Rand Erasing [113] and Stochastic Depth [48], following the recent works [4, 59, 60, 86]. The detailed training configurations are presented in Appendix A. + +For semantic segmentation, we use ADE20K [114], + +Table 6. ImageNet results. The throughput is tested with FP32 and a batch size of 64 on 2080Ti. $\ddagger$ indicates ImageNet-22K pretraining. $\diamond$ indicates pretrained with extra data. + +
ModelInput resolutionTop-1 accParams (M)FLOPs (G)Throughput examples/s
RepLKNet-31B224×22483.57915.3295.5
Swin-B224×22483.58815.4226.2
RepLKNet-31B384×38484.87945.197.0
Swin-B384×38484.58847.067.9
RepLKNet-31B‡224×22485.2---
Swin-B‡224×22485.2---
RepLKNet-31B‡384×38486.0---
Swin-B‡384×38486.4---
RepLKNet-31L‡384×38486.617296.050.2
Swin-L‡384×38487.3197103.936.2
RepLKNet-XL°320×32087.8335128.739.1
+ +which is a widely-used large-scale semantic segmentation dataset containing 20K images of 150 categories for training and 2K for validation. We use the ImageNet-trained models as backbones and adopt UperNet [97] implemented by MMSegmentation [19] with the 80K-iteration training setting and test the single-scale mIoU. + +Table 5 shows our results with different kernel sizes. On ImageNet, though increasing the kernel sizes from 3 to 13 improves the accuracy, making them even larger brings no further improvements. However, on ADE20K, scaling up the kernels from [13, 13, 13, 13] to [31, 29, 27, 13] brings 0.82 higher mIoU with only $5.3\%$ more parameters and $3.5\%$ higher FLOPs, which highlights the significance of large kernels for downstream tasks. + +In the following subsections, we use RepLKNet-31 with stronger training configurations to compare with the state-of-the-arts on ImageNet classification, Cityscapes/ADE20K semantic segmentation and COCO [55] object detection. We refer to the aforementioned model as RepLKNet-31B (B for Base) and a wider model with $\mathbf{C} = [192, 384, 768, 1536]$ as RepLKNet-31L (Large). We construct another RepLKNet-XL with $\mathbf{C} = [256, 512, 1024, 2048]$ and $1.5 \times$ inverted bottleneck design in the RepLK Blocks (i.e., the channels of the DW large conv layers are $1.5 \times$ as the inputs). + +# 4.3. ImageNet Classification + +Since the overall architecture of RepLKNet is akin to Swin, we desire to make a comparison at first. For RepLKNet-31B on ImageNet-1K, we extend the aforementioned training schedule to 300 epochs for a fair comparison. Then we finetune for 30 epochs with input resolution of $384 \times 384$ , so that the total training cost is much lower than the Swin-B model, which was trained with $384 \times 384$ from scratch. Then we pretrain RepLKNet-B/L models on ImageNet-22K and finetune on ImageNet-1K. RepLKNet-XL is pretrained on our private semi-supervised dataset + +Table 7. Cityscapes results. The FLOPs is computed with $1024 \times 2048$ inputs. The mIoU is tested with single-scale (ss) and multi-scale (ms). The results with Swin are implemented by [36]. $\ddagger$ indicates ImageNet-22K pretraining. + +
BackboneMethodmIoU (ss)mIoU (ms)Param (M)FLOPs (G)
RepLKNet-31BUperNet [97]83.183.51102315
ResNeSt-200 [107]DeepLabv3 [14]-82.7--
Axial-Res-XLAxial-DL [92]80.681.11732446
Swin-BUperNet80.481.51212613
Swin-BUperNet + [36]80.881.8121-
ViT-L‡SETR-PUP [112]79.382.1318-
ViT-L‡SETR-MLA77.2-310-
Swin-L‡UperNet82.383.12343771
Swin-L‡UperNet + [36]82.783.6234-
+ +Table 8. ADE20K results. The mIoU is tested with single-scale (ss) and multi-scale (ms). The results with 1K-pretrained Swin are cited from the official GitHub repository. $\ddagger$ indicates ImageNet-22K pretraining and $640\times 640$ finetuning on ADE20K. $\diamond$ indicates pretrained with extra data. The FLOPs is computed with $2048\times 512$ for the ImageNet-1K pretrained models and $2560\times 640$ for the ImageNet-22K and larger, following Swin. + +
BackboneMethodmIoU (ss)mIoU (ms)Param (M)FLOPs (G)
RepLKNet-31BUperNet49.950.61121170
ResNet-101UperNet [97]43.844.9861029
ResNeSt-200 [107]DeepLabv3 [14]-48.41131752
Swin-BUperNet48.149.71211188
Swin-BUperNet + [36]48.450.1121-
ViT-HybridDPT-Hybrid [71]-49.090-
ViT-LDPT-Large-47.6307-
ViT-BSETR-PUP [112]46.347.397-
ViT-BSETR-MLA [112]46.247.792-
RepLKNet-31B‡UperNet51.552.31121829
Swin-B‡UperNet50.051.61211841
RepLKNet-31L‡UperNet52.452.72072404
Swin-L‡UperNet52.153.52342468
ViT-L‡SETR-PUP48.650.1318-
ViT-L‡SETR-MLA48.650.3310-
RepLKNet-XL°UperNet55.256.03743431
+ +named MegData73M, which is introduced in the Appendix. We also present the throughput tested with a batch size of 64 on the same 2080Ti GPU. The training configurations are presented in the Appendix. + +Table 6 shows that though very large kernels are not intended for ImageNet classification, our RepLKNet models show a favorable trade-off between accuracy and efficiency. Notably, with only ImageNet-1K training, RepLKNet-31B reaches $84.8\%$ accuracy, which is $0.3\%$ higher than Swin-B, and runs $43\%$ faster. And even though RepLKNet-XL has higher FLOPs than Swin-L, it runs faster, which highlights the efficiency of very large kernels. + +# 4.4. Semantic Segmentation + +We then use the pretrained models as the backbones on Cityscapes (Table 7) and ADE20K (Table 8). Specifically, we use the UperNet [97] implemented by MMSegmentation [19] with the 80K-iteration training schedule for Cityscapes and 160K for ADE20K. Since we desire to evaluate the backbone only, we do not use any advanced techniques, tricks, nor custom algorithms. + +On Cityscapes, ImageNet-1K-pretrained RepLKNet31B outperforms Swin-B by a significant margin (single-scale mIoU of 2.7), and even outperforms the ImageNet22K-pretrained Swin-L. Even equipped with DiversePatch [36], a technique customized for vision transformers, the single-scale mIoU of the 22K-pretrained Swin-L is still lower than our 1K-pretrained RepLKNet-31B, though the former has $2\times$ parameters. + +On ADE20K, RepLKNet-31B outperforms Swin-B with both 1K and 22K pretraining, and the margins of single-scale mIoU are particularly significant. Pretrained with our semi-supervised dataset MegData73M, RepLKNet-XL achieves an mIoU of 56.0, which shows feasible scalability towards large-scale vision applications. + +# 4.5. Object Detection + +For object detection, we use RepLKNets as the backbone of FCOS [83] and Cascade Mask R-CNN [8, 39], which are representatives of one-stage and two-stage detection methods, and the default configurations in MMDetection [12]. The FCOS model is trained with the 2x (24-epoch) training schedule for a fair comparison with the X101 (short for ResNeXt-101 [99]) baseline from the same code base [19], and the other results with Cascade Mask R-CNN all use 3x (36-epoch). Again, we simply replace the backbone and do not use any advanced techniques. Table 9 shows RepLKNets outperform ResNeXt-101-64x4d by up to 4.4 mAP while have fewer parameters and lower FLOPs. Note that the results may be further improved with the advanced techniques like HTC [11], HTC++ [59], Soft-NMS [6] or a 6x (72-epoch) schedule. Compared to Swin, RepLKNets achieve higher or comparable mAP with fewer parameters and lower FLOPs. Notably, RepLKNet-XL achieves an mAP of 55.5, which demonstrates the scalability again. + +# 5. Discussions + +1) Large-Kernel CNNs have Larger ERF than Deep Small-Kernel Models. We have demonstrated large kernel design can significantly boost CNNs (especially on downstream tasks). However, it is worth noting that large kernel can be expressed by a series of small convolutions [77], e.g., a $7 \times 7$ convolution can be decomposed into a stack of three $3 \times 3$ kernels without information loss (more channels are required after the decomposition to maintain the degree + +Table 9. Object detection on COCO. The FLOPs is computed with $1280 \times 800$ inputs. The results of ResNeXt-101-64x4d + Cas Mask are reported by [59]. The results of 22K-pretrained Swin (without HTC++ [59]) are reported by [60]. $\ddagger$ indicates ImageNet-22K pretraining. $\diamond$ indicates pretrained with extra data. + +
BackboneMethod\(AP^{box}\)\(AP^{mask}\)Param (M)FLOPs (G)
RepLKNet-31BFCOS47.0-87437
X101-64x4dFCOS42.6-90439
RepLKNet-31BCas Mask52.245.2137965
X101-64x4dCas Mask48.341.7140972
ResNeSt-200Cas R-CNN [8]49.0---
Swin-BCas Mask51.945.0145982
RepLKNet-31B‡Cas Mask53.046.0137965
Swin-B‡Cas Mask53.045.8145982
RepLKNet-31L‡Cas Mask53.946.52291321
Swin-L‡Cas Mask53.946.72541382
RepLKNet-XL°Cas Mask55.548.03921958
+ +of freedom). Given that fact, a question naturally comes up: why do conventional CNNs, which may contain tens or hundreds of small convolutions (e.g., ResNets [40]), still behave inferior to large-kernel networks? + +We argue that in terms of obtaining large receptive field, a single large kernel is much more effective than many small kernels. First, according to the theory of Effective Receptive Field (ERF) [63], ERF is proportion to $\mathcal{O}(K\sqrt{L})$ where $K$ is the kernel size and $L$ is the depth, i.e., number of layers. In other words, ERF grows linearly with the kernel size while sub-linearly with the depth. Second, the increasing depth introduces optimization difficulty [40]. Although ResNets seem to overcome the dilemma, managing to train a network with hundreds of layers, some works [25, 91] indicate ResNets might not be as deep as they appear to be. For example, [91] suggests ResNets behave like ensembles of shallow networks, which implies the ERFs of ResNets could still be very limited even if the depth dramatically increases. Such phenomenon is also empirically observed in previous works [52]. To summarize, large kernels design requires fewer layers to obtain large ERFs and avoids the optimization issue brought by the increasing depth. + +To support our viewpoint, we choose ResNet-101/152 and the aforementioned RepLKNet-13/31 as the representatives of small-kernel and large-kernel models, which are all well-trained on ImageNet, and test with 50 images from the ImageNet validation set resized to $1024 \times 1024$ . To visualize the ERF, we use a simple yet effective method (code released at [2]) as introduced in Appendix B, following [52]. Briefly, we produce an aggregated contribution score matrix A $(1024 \times 1024)$ , where each entry $a$ $(0 \leq a \leq 1)$ measures the contribution of the corresponding pixel on the input image to the central point of the feature map produced by the last layer. Fig. 1 shows the high-contribution pixels of ResNet-101 gather around the central point, but the outer points have very low contributions, indicating a limited + +ERF. ResNet-152 shows a similar pattern, suggesting the more $3 \times 3$ layers do not significantly increase the ERF. On the other hand, the high-contribution pixels in Fig. 1 (C) are more evenly distributed, suggesting RepLKNet-13 attends to more outer pixels. With larger kernels, RepLKNet-31 makes the high-contribution pixels spread more uniformly, indicating an even larger ERF. Apart from the visualization, a quantitative analysis is also presented in Appendix B. + +2) Large-kernel Models are More Similar to Human in Shape Bias. We have found out that RepLKNet-31B has much higher shape bias than Swin Transformer and small-kernel CNNs. Please refer to Appendix C for details. +3) Large kernel design is a generic design element that works with ConvNeXt. Replacing the $7 \times 7$ convolutions in ConvNeXt [60] by kernels as large as $31 \times 31$ brings significant improvements, e.g., ConNeXt-Tiny + large kernel >ConNeXt-Small, and ConNeXt-Small + large kernel >ConNeXt-Base. Please refer to Appendix D. +4) Large kernels outperform small kernels with high dilation rates. Please refer to Appendix E for details. + +# 6. Limitations + +Although large kernel design greatly improves CNNs on both ImageNet and downstream tasks, however, according to Table 6, as the scale of data and model increases, RepLKNets start to fall behind Swin Transformers, e.g., the ImageNet top-1 accuracy of RepLKNet-31L is $0.7\%$ lower than Swin-L with ImageNet-22K pretraining (while the downstream scores are still comparable). It is not clear whether the gap is resulted from suboptimal hyperparameter tuning or some other fundamental drawback of CNNs which emerges when data/model scales up. We are working in progress on the problem. + +# 7. Conclusion + +This paper revisits large convolutional kernels, which have long been neglected in designing CNN architectures. We demonstrate that using a few large kernels instead of many small kernels results in larger effective receptive field more efficiently, boosting CNN's performances especially on downstream tasks by a large margin, and greatly closing the performance gap between CNNs and ViTs when data and models scale up. We hope our work could advance both studies of CNNs and ViTs. On one hand, for CNN community, our findings suggest that we should pay special attention to $ERFs$ , which may be the key to high performances. On the other hand, for ViT community, since large convolutions act as an alternative to multi-head self-attention with similar behaviors, it may help to understand the intrinsic mechanism of self-attention. + +# References + +[1] Megengine:a fast, scalable and easy-to-use deep learning framework. https://github.com/MegEngine/MegEngine, 2020.3 +[2] Official pytorch implementation of replknet. https://github.com/DingXiaoH/RepLKNet-pytorch, 2022.3,8 +[3] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. 5 +[4] Hangbo Bao, Li Dong, and Furu Wei. Beit: Bert pre-training of image transformers. arXiv preprint arXiv:2106.08254, 2021. 1, 6 +[5] Irwan Bello, Barret Zoph, Ashish Vaswani, Jonathon Shlens, and Quoc V Le. Attention augmented convolutional networks. In Proceedings of the IEEE/CVF international conference on computer vision, pages 3286-3295, 2019. 5 +[6] Navaneeth Bodla, Bharat Singh, Rama Chellappa, and Larry S Davis. Soft-nms-improving object detection with one line of code. In Proceedings of the IEEE international conference on computer vision, pages 5561-5569, 2017. 7 +[7] Wieland Brendel and Matthias Bethge. Approximating cnns with bag-of-local-features models works surprisingly well on imagenet. arXiv preprint arXiv:1904.00760, 2019. 4 +[8] Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn: High quality object detection and instance segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2019. 7, 8 +[9] 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. 1 +[10] Hanting Chen, Yunhe Wang, Tianyu Guo, Chang Xu, Yiping Deng, Zhenhua Liu, Siwei Ma, Chunjing Xu, Chao Xu, and Wen Gao. Pre-trained image processing transformer. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12299-12310, 2021. 1 +[11] 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 Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4974-4983, 2019. 7 +[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. 7 +[13] 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. 2 +[14] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv preprint arXiv:1706.05587, 2017. 7 +[15] 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. 4 +[16] Xinlei Chen, Saining Xie, and Kaiming He. An empirical study of training self-supervised visual transformers. arXiv e-prints, pages arXiv-2104, 2021. 1 +[17] François Chollet. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1251-1258, 2017. 3 +[18] 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. 4 +[19] MMSegmentation Contributors. MMSegmentation: Openmmlab semantic segmentation toolbox and benchmark. https://github.com/open-mmlab/mmsegmentation, 2020.4,6,7 +[20] Jean-Baptiste Cordonnier, Andreas Loukas, and Martin Jaggi. On the relationship between self-attention and convolutional layers. arXiv preprint arXiv:1911.03584, 2019. 1 +[21] 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 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pages 3213-3223. IEEE Computer Society, 2016. 4 +[22] Ekin D Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V Le. Randaugment: Practical automated data augmentation with a reduced search space. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 702-703, 2020. 6 +[23] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In Proceedings of the IEEE international conference on computer vision, pages 764-773, 2017. 2 +[24] Xiyang Dai, Yinpeng Chen, Bin Xiao, Dongdong Chen, Mengchen Liu, Lu Yuan, and Lei Zhang. Dynamic head: Unifying object detection heads with attentions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7373-7382, 2021. 1 +[25] Soham De and Samuel L Smith. Batch normalization biases residual blocks towards the identity function in deep networks. arXiv preprint arXiv:2002.10444, 2020. 8 +[26] Xiaohan Ding, Honghao Chen, Xiangyu Zhang, Jungong Han, and Guiguang Ding. Repmlpnet: Hierarchical vision mlp with re-parameterized locality. arXiv preprint arXiv:2112.11081, 2021.3,4,5 + +[27] Xiaohan Ding, Yuchen Guo, Guiguang Ding, and Jungong Han. Acnet: Strengthening the kernel skeletons for powerful cnn via asymmetric convolution blocks. In Proceedings of the IEEE International Conference on Computer Vision, pages 1911-1920, 2019. 3, 4, 5 +[28] Xiaohan Ding, Tianxiang Hao, Jianchao Tan, Ji Liu, Jungong Han, Yuchen Guo, and Guiguang Ding. Resrep: Lossless cnn pruning via decoupling remembering and forgetting. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4510-4520, 2021. 3 +[29] Xiaohan Ding, Xiangyu Zhang, Jungong Han, and Guiguang Ding. Diverse branch block: Building a convolution as an inception-like unit. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10886-10895, 2021. 3 +[30] Xiaohan Ding, Xiangyu Zhang, Ningning Ma, Jungong Han, Guiguang Ding, and Jian Sun. Repvgg: Making vgg-style convnets great again. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13733-13742, 2021. 2, 3, 4, 5 +[31] Piotr Dólar, Mannat Singh, and Ross Girshick. Fast and accurate model scaling. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 924-932, 2021. 3 +[32] Xiaoyi Dong, Jianmin Bao, Dongdong Chen, Weiming Zhang, Nenghai Yu, Lu Yuan, Dong Chen, and Baining Guo. Cswin transformer: A general vision transformer backbone with cross-shaped windows. arXiv preprint arXiv:2107.00652, 2021. 2 +[33] Yihe Dong, Jean-Baptiste Cordonnier, and Andreas Loukas. Attention is not all you need: Pure attention loses rank doubly exponentially with depth. arXiv preprint arXiv:2103.03404, 2021. 1, 4 +[34] 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 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net, 2021. 1, 3, 4, 5 +[35] 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. 4 +[36] Chengyue Gong, Dilin Wang, Meng Li, Vikas Chandra, and Qiang Liu. Improve vision transformers training by suppressing over-smoothing. arXiv preprint arXiv:2104.12753, 2021. 7 +[37] 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. 2 +[38] Qi Han, Zejia Fan, Qi Dai, Lei Sun, Ming-Ming Cheng, Jiaying Liu, and Jingdong Wang. Demystifying local vision + +transformer: Sparse connectivity, weight sharing, and dynamic weight. arXiv preprint arXiv:2106.04263, 2021. 1, 2, 3 +[39] 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. 7 +[40] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 1, 2, 3, 5, 6, 8 +[41] Dan Hendrycks and Kevin Gimpel. Gaussian error linear units (gelus). arXiv preprint arXiv:1606.08415, 2016. 5, 6 +[42] Geoffrey Hinton. How to represent part-whole hierarchies in a neural network. arXiv preprint arXiv:2102.12627, 2021. 1 +[43] Andrew Howard, Ruoming Pang, Hartwig Adam, Quoc V. Le, Mark Sandler, Bo Chen, Weijun Wang, Liang-Chieh Chen, Mingxing Tan, Grace Chu, Vijay Vasudevan, and Yukun Zhu. Searching for mobilenetv3. In 2019 IEEE/CVF International Conference on Computer Vision, ICCV 2019, Seoul, Korea (South), October 27 - November 2, 2019, pages 1314-1324. IEEE, 2019. 2 +[44] 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. 2, 3 +[45] Han Hu, Zheng Zhang, Zhenda Xie, and Stephen Lin. Local relation networks for image recognition. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3464-3473, 2019. 2 +[46] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7132-7141, 2018. 2 +[47] Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger. Densely connected convolutional networks. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 2261-2269. IEEE Computer Society, 2017. 2 +[48] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q. Weinberger. Deep networks with stochastic depth. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max Welling, editors, Computer Vision - ECCV 2016 - 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part IV, volume 9908 of Lecture Notes in Computer Science, pages 646-661. Springer, 2016. 6 +[49] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, pages 448-456, 2015. 4, 6 +[50] 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. 1 + +[51] Osman Semih Kayhan and Jan C van Gemert. On translation invariance in cnns: Convolutional layers can exploit absolute spatial location. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14274-14285, 2020. 5 +[52] Bum Jun Kim, Hyeyeon Choi, Hyeonah Jang, Dong Gu Lee, Wonseok Jeong, and Sang Woo Kim. Dead pixel test using effective receptive field. arXiv preprint arXiv:2108.13576, 2021. 8 +[53] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097-1105, 2012. 1, 2 +[54] Jingyun Liang, Jiezhang Cao, Guolei Sun, Kai Zhang, Luc Van Gool, and Radu Timofte. Swinir: Image restoration using swim transformer. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1833-1844, 2021. 1 +[55] 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. 2, 6 +[56] Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018. 2 +[57] Liyuan Liu, Xiaodong Liu, Jianfeng Gao, Weizhu Chen, and Jiawei Han. Understanding the difficulty of training transformers. arXiv preprint arXiv:2004.08249, 2020. 4 +[58] Ze Liu, Han Hu, Yutong Lin, Zhuliang Yao, Zhenda Xie, Yixuan Wei, Jia Ning, Yue Cao, Zheng Zhang, Li Dong, et al. Swin transformer v2: Scaling up capacity and resolution. arXiv preprint arXiv:2111.09883, 2021. 2 +[59] 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, pages 10012-10022, 2021. 1, 2, 5, 6, 7, 8 +[60] Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, and Saining Xie. A convnet for the 2020s. arXiv preprint arXiv:2201.03545, 2022. 3, 6, 8 +[61] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3431-3440, 2015. 4 +[62] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017. 6 +[63] Wenjie Luo, Yujia Li, Raquel Urtasun, and Richard S. Zemel. Understanding the effective receptive field in deep convolutional neural networks. In Daniel D. Lee, Masashi Sugiyama, Ulrike von Luxburg, Isabelle Guyon, and Roman Garnett, editors, Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 4898-4906, 2016. 2, 4, 8 +[64] 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. 3 +[65] Michael Mathieu, Mikael Henaff, and Yann LeCun. Fast training of convolutional networks through ffts. In Yoshua Bengio and Yann LeCun, editors, 2nd International Conference on Learning Representations, ICLR 2014, Banff, AB, Canada, April 14-16, 2014, Conference Track Proceedings, 2014. 3 +[66] Sayak Paul and Pin-Yu Chen. Vision transformers are robust learners. arXiv preprint arXiv:2105.07581, 2021. 1 +[67] Chao Peng, Xiangyu Zhang, Gang Yu, Guiming Luo, and Jian Sun. Large kernel matters-improve semantic segmentation by global convolutional network. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4353-4361, 2017. 2, 4 +[68] Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dólar. Designing network design spaces. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10428-10436, 2020. 2, 3 +[69] 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. 1 +[70] Prajit Ramachandran, Niki Parmar, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jonathon Shlens. Standalone self-attention in vision models. arXiv preprint arXiv:1906.05909, 2019. 1 +[71] René Ranftl, Alexey Bochkovskiy, and Vladlen Koltun. Vision transformers for dense prediction. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 12179-12188, 2021. 7 +[72] Yongming Rao, Wenliang Zhao, Zheng Zhu, Jiwen Lu, and Jie Zhou. Global filter networks for image classification. arXiv preprint arXiv:2107.00645, 2021. 2, 3 +[73] David W Romero, Robert-Jan Bruintjes, Jakub M Tomczak, Erik J Bekkers, Mark Hoogendoorn, and Jan C van Gemert. Flexconv: Continuous kernel convolutions with differentiable kernel sizes. arXiv preprint arXiv:2110.08059, 2021. 2 +[74] David W Romero, Anna Kuzina, Erik J Bekkers, Jakub M Tomczak, and Mark Hoogendoorn. Ckconv: Continuous kernel convolution for sequential data. arXiv preprint arXiv:2102.02611, 2021. 2 +[75] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4510-4520, 2018. 3, 4, 6 +[76] Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. Self-attention with relative position representations. arXiv preprint arXiv:1803.02155, 2018. 5 +[77] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 2, 7 +[78] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shiens, Pieter Abbeel, and Ashish Vaswani. Bottleneck + +transformers for visual recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 16519-16529, 2021. 1 +[79] Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alexander A Alemi. Inception-v4, inception-resnet and the impact of residual connections on learning. In Thirty-first AAAI conference on artificial intelligence, 2017. 2 +[80] 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. 2 +[81] 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 +[82] Mingxing Tan and Quoc V Le. Efficientnet: Rethinking model scaling for convolutional neural networks. arXiv preprint arXiv:1905.11946, 2019. 2, 3 +[83] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. FCOS: fully convolutional one-stage object detection. In 2019 IEEE/CVF International Conference on Computer Vision, ICCV 2019, Seoul, Korea (South), October 27 - November 2, 2019, pages 9626-9635. IEEE, 2019. 7 +[84] Ilya Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Thomas Unterthiner, Jessica Yung, Andreas Steiner, Daniel Keysers, Jakob Uszkoreit, et al. Mlp-mixer: An all-mlp architecture for vision. arXiv preprint arXiv:2105.01601, 2021. 3, 5 +[85] Hugo Touvron, Piotr Bojanowski, Mathilde Caron, Matthieu Cord, Alaaeldin El-Nouby, Edouard Grave, Gautier Izacard, Armand Joulin, Gabriel Synnaeve, Jakob Verbeek, et al. Resmlp: Feedforward networks for image classification with data-efficient training. arXiv preprint arXiv:2105.03404, 2021. 3, 5 +[86] 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. 1, 6 +[87] Asher Trockman and J Zico Kolter. Patches are all you need? arXiv preprint arXiv:2201.09792, 2022. 3 +[88] Shikhar Tuli, Ishita Dasgupta, Erin Grant, and Thomas L Griffiths. Are convolutional neural networks or transformers more like human vision? arXiv preprint arXiv:2105.07197, 2021. 4 +[89] Ashish Vaswani, Prajit Ramachandran, Aravind Srinivas, Niki Parmar, Blake Hechtman, and Jonathon Shlens. Scaling local self-attention for parameter efficient visual backbones. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12894–12904, 2021. 1 +[90] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Ad- + +vances in neural information processing systems, pages 5998-6008, 2017. 1 +[91] Andreas Veit, Michael J Wilber, and Serge Belongie. Residual networks behave like ensembles of relatively shallow networks. In Advances in neural information processing systems, pages 550-558, 2016. 4, 8 +[92] Huiyu Wang, Yukun Zhu, Bradley Green, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. Axial-deeplab: Standalone axial-attention for panoptic segmentation. In European Conference on Computer Vision, pages 108–126. Springer, 2020. 7 +[93] 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. IEEE transactions on pattern analysis and machine intelligence, 2020. 2, 4 +[94] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021. 1 +[95] Felix Wu, Angela Fan, Alexei Baevski, Yann N Dauphin, and Michael Auli. Pay less attention with lightweight and dynamic convolutions. arXiv preprint arXiv:1901.10430, 2019. 1, 2 +[96] Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan, and Lei Zhang. Cvt: Introducing convolutions to vision transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 22-31, 2021. 4 +[97] Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In Proceedings of the European Conference on Computer Vision (ECCV), pages 418-434, 2018. 6, 7 +[98] Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M Alvarez, and Ping Luo. Segformer: Simple and efficient design for semantic segmentation with transformers. arXiv preprint arXiv:2105.15203, 2021. 1 +[99] Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1492–1500, 2017. 2, 7 +[100] Zhenda Xie, Yutong Lin, Zhuliang Yao, Zheng Zhang, Qi Dai, Yue Cao, and Han Hu. Self-supervised learning with swim transformers. arXiv preprint arXiv:2105.04553, 2021. 1 +[101] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015. 2, 4 +[102] Fisher Yu, Vladlen Koltun, and Thomas Funkhouser. Dilated residual networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 472-480, 2017. 2, 4 +[103] Weihao Yu, Mi Luo, Pan Zhou, Chenyang Si, Yichen Zhou, Xinchao Wang, Jiashi Feng, and Shuicheng Yan. Metaformer is actually what you need for vision. arXiv preprint arXiv:2111.11418, 2021. 3 + +[104] Li Yuan, Qibin Hou, Zihang Jiang, Jiashi Feng, and Shuicheng Yan. Volo: Vision observer for visual recognition. arXiv preprint arXiv:2106.13112, 2021. 1 +[105] 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 Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6023-6032, 2019. 6 +[106] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017. 6 +[107] Hang Zhang, Chongruo Wu, Zhongyue Zhang, Yi Zhu, Zhi Zhang, Haibin Lin, Yue Sun, Tong He, Jonas Mueller, R Manmatha, et al. Resnest: Split-attention networks. arXiv preprint arXiv:2004.08955, 2020. 7 +[108] Mingda Zhang, Chun-Te Chu, Andrey Zhmoginov, Andrew Howard, Brendan Jou, Yukun Zhu, Li Zhang, Rebecca Hwa, and Adriana Kovashka. Basisnet: Two-stage model synthesis for efficient inference. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3081–3090, 2021. 5 +[109] Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6848-6856, 2018. 2, 3 +[110] Yikang Zhang, Zhuo Chen, and Zhao Zhong. Collaboration of experts: Achieving $80\%$ top-1 accuracy on imagenet with 100m flops. arXiv preprint arXiv:2107.03815, 2021. 5 +[111] Yucheng Zhao, Guangting Wang, Chuanxin Tang, Chong Luo, Wenjun Zeng, and Zheng-Jun Zha. A battle of network structures: An empirical study of cnn, transformer, and mlp. arXiv preprint arXiv:2108.13002, 2021. 1 +[112] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip HS Torr, et al. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6881-6890, 2021. 7 +[113] Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. In Proceedings of the AAAI conference on artificial intelligence, volume 34, pages 13001-13008, 2020. 6 +[114] Bolei Zhou, Hang Zhao, Xavier Puig, Tete Xiao, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Semantic understanding of scenes through the ade20k dataset. International Journal of Computer Vision, 127(3):302-321, 2019. 2, 4, 6 +[115] Xizhou Zhu, Dazhi Cheng, Zheng Zhang, Stephen Lin, and Jifeng Dai. An empirical study of spatial attention mechanisms in deep networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6688-6697, 2019. 1 + +[116] Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016. 2 \ No newline at end of file diff --git a/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/images.zip b/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1e5ecee058e8760dfb7662cb24667545c3d4fd9e --- /dev/null +++ b/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8557e8c20d6e419718e39b3b70bedfa3667e4a1b86476c976a806efb980e077 +size 452205 diff --git a/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/layout.json b/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6e06c0294b3d3fd809a70b79ecce671aeb122d3d --- /dev/null +++ b/scalingupyourkernelsto31x31revisitinglargekerneldesignincnns/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6da757450c947d4f23d342bb58e1c0270099a9904823cbd457c33306fb6291c0 +size 544024 diff --git a/scalingvisiontransformers/b27d08f8-7319-4ca8-b43c-59f3230cf93c_content_list.json b/scalingvisiontransformers/b27d08f8-7319-4ca8-b43c-59f3230cf93c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f267d4a0e30d635156d68de36629c8b705f88d15 --- /dev/null +++ b/scalingvisiontransformers/b27d08f8-7319-4ca8-b43c-59f3230cf93c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf37d201c0ad367f44bac1b25a73d500817e51808c427172c127ec27fb264274 +size 71020 diff --git a/scalingvisiontransformers/b27d08f8-7319-4ca8-b43c-59f3230cf93c_model.json b/scalingvisiontransformers/b27d08f8-7319-4ca8-b43c-59f3230cf93c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..dc1b6dfac3489b9e0e88e8e5d31e819b48c9a85a --- /dev/null +++ b/scalingvisiontransformers/b27d08f8-7319-4ca8-b43c-59f3230cf93c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ac0bfd8a6099c84af5ee59e40e49843b48a1e42b0718001a2b755403daad643 +size 88305 diff --git a/scalingvisiontransformers/b27d08f8-7319-4ca8-b43c-59f3230cf93c_origin.pdf b/scalingvisiontransformers/b27d08f8-7319-4ca8-b43c-59f3230cf93c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..43eec182ce8f8ed736496016fc086d53f61d4f3c --- /dev/null +++ b/scalingvisiontransformers/b27d08f8-7319-4ca8-b43c-59f3230cf93c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:553ef0a2a29d92062f49e12e4ec3e67b16681a4480f5611b5af224de35f98daf +size 386680 diff --git a/scalingvisiontransformers/full.md b/scalingvisiontransformers/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ee4fc05f859d4a8cecfd4117564037e1e5ff5f2d --- /dev/null +++ b/scalingvisiontransformers/full.md @@ -0,0 +1,278 @@ +# Scaling Vision Transformers + +Xiaohua Zhai*, Alexander Kolesnikov*, Neil Houlsby, Lucas Beyer* + +Google Research, Brain Team, Zürich + +{xzhai, akolesnikov, neilhoulsby, lbeyer}@google.com + +# Abstract + +Attention-based neural networks such as the Vision Transformer (ViT) have recently attained state-of-the-art results on many computer vision benchmarks. Scale is a primary ingredient in attaining excellent results, therefore, understanding a model's scaling properties is a key to designing future generations effectively. While the laws for scaling Transformer language models have been studied, it is unknown how Vision Transformers scale. To address this, we scale ViT models and data, both up and down, and characterize the relationships between error rate, data, and compute. Along the way, we refine the architecture and training of ViT, reducing memory consumption and increasing accuracy of the resulting models. As a result, we successfully train a ViT model with two billion parameters, which attains a new state-of-the-art on ImageNet of $90.45\%$ top-1 accuracy. The model also performs well for few-shot transfer, for example, reaching $84.86\%$ top-1 accuracy on ImageNet with only 10 examples per class. + +# 1. Introduction + +Attention-based Transformer architectures [44] have taken computer vision domain by storm [7, 15] and are becoming an increasingly popular choice in research and practice. Previously, Transformers have been widely adopted in the natural language processing (NLP) domain [6, 14]. Optimal scaling of Transformers in NLP was carefully studied in [21], with the main conclusion that large models not only perform better, but do use large computational budgets more efficiently. However, it remains unclear to what extent these findings transfer to the vision domain, which has several important differences. For example, the most successful pre-training schemes in vision are supervised, as opposed to unsupervised pre-training in the NLP domain. + +In this paper we concentrate on scaling laws for transfer performance of ViT models pre-trained on image classifica + +![](images/388bc2de21449248adc5502d60e8a35f68334cbe989e5bdbfdc8472adfd80a2e.jpg) +Figure 1. Few-shot transfer results. Our ViT-G model reaches $84.86\%$ top-1 accuracy on ImageNet with 10-shot linear evaluation. + +tion tasks. In particular, we experiment with models ranging from five million to two billion parameters, datasets ranging from one million to three billion training images and compute budgets ranging from below one TPUv3 core-day to beyond 10 000 core-days. Our main contribution is a characterization of the performance-compute frontier for ViT models, on two datasets. + +Along the way, we create an improved large-scale training recipe. We investigate training hyper-parameters and discover subtle choices that make drastic improvements in few-shot transfer performance. The few-shot transfer evaluation protocol has also been adopted by previous large-scale pre-training efforts in NLP domain [5]. Specifically, we discover that very strong L2 regularization, applied to the final linear prediction layer only, results in a learned visual representation that has very strong few-shot transfer capabilities. For example, with just a single example per class on the ImageNet dataset (which has 1000 classes), our best model achieves $69.52\%$ accuracy; and with 10 examples per class it attains $84.86\%$ . In addition, we substantially reduce the memory footprint of the original ViT model proposed in [15]. We achieve this by hardware-specific architecture changes and a different optimizer. As a result, we train a model with two billion parameters and attain a new state-of-the-art $90.45\%$ accuracy on ImageNet. + +![](images/6066ecbebff126bc060187ee5d1735b8405d0f13c97aaaa2b49601edf11d3370.jpg) +Figure 2. Left/Center: Representation quality, measured as ImageNet finetune and linear 10-shot error rate, as a function of total training compute. A saturating power-law approximates the Pareto frontier fairly accurately. Note that smaller models (blue shading), or models trained on fewer images (smaller markers), saturate and fall off the frontier when trained for longer. Top right: Representation quality when bottlenecked by model size. For each model size, a large dataset and amount of compute is used, so model capacity is the main bottleneck. Faintly-shaded markers depict sub-optimal runs of each model. Bottom Right: Representation quality by datasets size. For each dataset size, the model with an optimal size and amount of compute is highlighted, so dataset size is the main bottleneck. + +![](images/eb0aad742fd99e914646cc4b46e30e5f14a3e44812269646e80c3b9a5e33cd64.jpg) + +# 2. Core Results + +We first present our main results on scaling trends, before presenting detailed architecture and training protocol improvements in Section 3. In the following experiments, we train several ViT models on both public ImageNet-21k [13] dataset and privately gathered images, up to three billion weakly-labelled images. We vary the architecture size, number of training images, and training duration. All models are trained on TPUv3, thus total compute is measured in TPUv3 core-days. To evaluate the quality of the representation learned by the models, we measure (i) few-shot transfer via training a linear classifier on frozen weights, (ii) transfer via fine-tuning the whole model on all data, both to multiple benchmark tasks. + +# 2.1. Scaling up compute, model and data together + +Figure 2 shows both the 10-shot linear evaluation and finetuning evaluation on ImageNet [13]. Similar trends on other datasets, Oxford IIIT Pets [27], CIFAR-100 [23], and Caltech-UCSD Birds [46] are presented in the Appendix, Figure 9. For each combination of model size and data size we pre-train for various numbers of steps. In Figure 2, connected points represent the same model trained for a different number of steps. We make the following observations. + +First, scaling up compute, model and data together improves representation quality. In the left plot and center plot, the lower right point shows the model with the largest size, dataset size and compute achieving the lowest error rate. However, it appears that at the largest size the models starts to saturate, and fall behind the power law frontier (linear + +relationship on the log-log plot in Figure 2). + +Second, representation quality can be bottlenecked by model size. The top-right plot shows the best attained performance for each model size. Due to limited capacity, small models are not able to benefit from either the largest dataset, or compute resources. Figure 2, left and center, show the Ti/16 model tending towards a high error rate, even when trained on a large number of images. + +Third, large models benefit from additional data, even beyond 1B images. When scaling up the model size, the representation quality can be limited by smaller datasets; even 30-300M images is not sufficient to saturate the largest models. In Figure 2, center, the error rate of L/16 model on the 30M dataset does not improve past $27\%$ . On the larger datasets, this model attains $19\%$ . Further, when increasing the dataset size, we observe a performance boost with big models, but not small ones. The largest models even obtain a performance improvement the training set size grows from 1B to 3B images (Figure 2, bottom right). For small models, however, such as Ti/16 or B/32, increasing the dataset size does not help. For example, in Figure 2, left and center, all of the curves for Ti/16 overlap, showing that this model achieves the same performance irrespective of the dataset size. + +# 2.2. Double-saturating power law + +Figure 2, left and center, show the Pareto frontier of representation quality versus training compute. The frontier contains the models with the best allocation of compute to model shape and training duration. + +For over two orders of magnitude of compute, the relation + +![](images/8f57339efc9653601dd3c02d3bc1bf3191d823d21bda8623c7fac859a1c0512d.jpg) +Figure 3. Error rate on ImageNet, with respect to images seen during pre-training. Big models are more sample efficient, which is consistent across diverse setups: few-shot transfer on the frozen representations, fine-tune the network on ImageNet, and evaluate the fine-tuned models on the v2 test set. + +![](images/9603c67df0fe92ef7ba8771edb7aebc81131e92e259d9a11cf4099d04c778b3e.jpg) + +![](images/a21b9ca3bd38fabc51a24a6f82f1a763a1eb625e0be6756dd78f7ad4a69ce617.jpg) + +ship between compute and performance follows a power-law $(E = aC^{b})$ , resulting in a straight line on the log-log plot. However, we observe "saturation" at both ends of the compute spectrum. At the higher end of compute, the largest models do not tend towards zero error-rate. If we extrapolate from our observations, an infinite capacity model will obtain a non-zero error. This effect has also been observed for generative models [18]. The authors of [18] refer to this residual error as the "irreducible entropy" of the task. Since we plot error rate, the information-theoretic interpretation does not apply, but our observations support the notion of fundamental performance ceilings for ImageNet [4]. In terms of the law, this saturation corresponds to an additive constant to the error rate: $c$ in $E = aC^{-b} + c$ . + +At the lower end of the compute spectrum, we see a saturation for smaller models; the performance of the smallest model is better than that would be predicted by a power-law. This saturation occurs because even trivial solutions can achieve non-zero error. For example, predicting the majority class (almost zero compute) will achieve an accuracy related to its occurrence frequency in the test set. This lower bound is not observed in [18], either because their smallest model is large enough to avoid this region, or because log-loss saturates at worse performances than accuracy (it will saturate eventually). This saturation corresponds to a shift in the x-axis: $d$ in $E = a(C + d)^{-b} + c$ . This constant indicates that the zero-compute model will still obtain non-zero accuracy. + +# 2.3. Big models are more sample efficient + +Figure 3 shows the representation quality with respect to the total number of images "seen" (batch size times number of steps) during pre-training. In addition to ImageNet fine-tuning and linear 10-shot results on the public validation set, we also report results of the ImageNet fine-tuned model on the ImageNet-v2 test set [32] as an indicator of robust generalization. Three ViT models pre-trained on three billion + +images are presented in this plot. + +We observe that bigger models are more sample efficient, reaching the same level of error rate with fewer seen images. For 10-shot, the Ti/16 model needs to see nearly 100 times more images to match the representation quality of the L/16 model. When fine-tuning, this factor reduces from 100 to about 20. Our results suggest that with sufficient data, training a larger model for fewer steps is preferable. This observation mirrors results in language modelling and machine translation [21, 25]. + +# 2.4. Do scaling laws still apply on fewer images? + +We extend the study to much fewer images, ranging from one million to 13 millions on the public ImageNet-21k + +![](images/5c36d0678c278a129b55a2e294f3feb174dec2813a175d651c965ee9a83b9714.jpg) +Figure 4. Results on the ImageNet-21k dataset. Left: Representation quality, measured as ImageNet linear 10-shot error rate, as a function of total training compute. The double-saturating power law still applies. Right: Representation quality by model sizes and dataset sizes. + +Table 1. The results for ViT-G/14, compared to the previous state-of-the-art models. + +
BenchmarkImageNetINet V2INet ReaLObjectNetVTAB (light)
NS (Eff.-L2) [48]88.380.2-68.5-
MPL (Eff.-L2) [28]90.2-91.02--
CLIP (ViT-L/14) [30]85.475.9-72.3-
ALIGN (Eff.-L2) [20]88.670.1---
BiT-L (ResNet) [22]87.54-90.5458.776.29
ViT-H/14 [15]88.55-90.72-77.63
Our ViT-G/1490.45±0.0383.33±0.0390.81±0.0170.53±0.5278.29±0.53
+ +dataset. In Figure 4 left, we found that the double-saturation power law still applies, when varying model sizes, dataset sizes and compute resources. This indicates that the conclusions from the study generalize well, and can guide future design choices for vision transformer architectures. In Figure 4 right, we observe similar behaviors that the model performance are bottlenecked by the dataset size. When scaling up compute, model and data together, one gets the best representation quality. + +# 2.5. ViT-G/14 results + +We trained a large Vision Transformer, ViT-G/14, which contains nearly two billion parameters. Section 3.6 details the architecture's shape. We evaluate the ViT-G/14 model on a range of downstream tasks, and compare it to recent state-of-the-art results. We fine-tune on ImaegNet, and report ImageNet [33], ImageNet-v2 [32], Real [4], and ObjectNet [2] accuracies. In addition, we report transfer learning result on the VTAB-1k benchmark consisting of 19 tasks [52]. + +Figure 1 shows the few-shot transfer results on ImageNet. ViT-G/14 outperforms the previous best ViT-H/14 model [15] by a large margin (more than $5\%$ ), attaining $84.86\%$ accuracy with 10 examples per class. Ten images per class is less than $1\%$ of ImageNet data (13 examples per class), as commonly used in self-supervised and semi-supervised learning [51]. For reference, Figure 1 shows three state-of-the-art self-supervised learning models, SimCLR v2 [9] and BYOL [16], using $1\%$ of ImageNet data, DINO [8] using 20 examples per class. Note, however, that these approaches are quite different: ViT-G/14 uses large source of weakly-supervised data, and is pre-trained only once and transferred to different tasks. Meanwhile, the self-supervised learning models use unlabeled but in-domain data for pre-training, and target a single task. + +Table 1 shows the results on the remaining benchmarks. ViT-G/14 achieves $90.45\%$ top-1 accuracy on ImageNet, setting the new state-of-the-art. On ImageNet-v2, ViT-G/14 improves $3\%$ over the Noisy Student model [48] based on EfficientNet-L2. For Real, ViT-G/14 outperforms ViTH [15] and BiT-L [22] by only a small margin, which in + +dicates again that the ImageNet classification task is likely reaching its saturation point. For ObjectNet, ViT-G/14 outperforms BiT-L [22] by a large margin, and is $2\%$ better than Noisy Student, but is about $2\%$ behind CLIP [30]. Note that, unlike the other methods, CLIP does not fine-tune on ImageNet, and evaluates directly on ObjectNet, this likely improves its robustness. Finally, when transferring the ViT-G/14 model to VTAB, it gets consistently better results with just a single hyper parameter across all tasks. The state-of-the-art on VTAB using a heavyweight per-task hyperparameter sweep is 79.99 [20], we leave running a heavy sweep with ViT-G/14 to future work. + +# 3. Method details + +We present a number of improvements to the ViT model and training. These improvements are mostly simple to implement, and can significantly improve memory-utilization and model quality. They allow us to train ViT-G/14 using data-parallelism alone, with the entire model fitting on a single TPUv3 core. + +# 3.1. Decoupled weight decay for the "head" + +Weight decay has a drastic effect on model adaptation in the low-data regime. We conduct an study of this phenomena at a mid-size scale. + +We find that one can benefit from decoupling weight decay strength for the final linear layer ("head"), and for the remaining weights ("body") in the model. Figure 5 demonstrates this effect: we train a collection ViT-B/32 models on JFT-300M, each cell corresponds to the performance of different head/body weight decay values. The diagonal corresponds to using the same value for both decays. One can observe that the best performance appears off-diagonal (i.e. with a decoupled weight decay for the head and body). Interestingly, we observe that high weight decay in the head decreases performance on the pre-training (upstream) task (not shown), despite improving transfer performance. + +We do not have a complete explanation of this phenomena. However, we hypothesize that a stronger weight decay in the + +![](images/0b1996e60721286e8dfaea07a07857402709ca7e70305cebaec14dbd8938c5f2.jpg) +Figure 5. Left and middle: The dependence of 5-shot ImageNet accuracy and upstream performance depends on the weight decay strength. Normally, a single weight decay value is applied to all weights (corresponds to the diagonal on the heatmaps). We show that by using weight decay values for the "head" and the rest of the weights one significantly improves few-shot transfer performance. Right: Few-shot performance on ImageNet for different types of head. A high weight decay on the head works equally well for all of them. + +![](images/a204b0389f74a724d444253c5bf615ea4a28caed9885f5c178b468785c4b1239.jpg) + +![](images/acd3e59b558b2b3ae9e1f62621b6018aa894a5c29264902614ec3720735ed628.jpg) + +head results in representations with larger margin between classes, and thus better few-shot adaptation. This is similar to the main idea behind SVMs [11]. This large decay makes it harder to get high accuracy during upstream pre-training, but our main goal is high quality transfer. + +# 3.2. Saving memory by removing [class] token + +The largest VIT model from [15] uses $14 \times 14$ patches with $224 \times 224$ images. This results in 256 visual "tokens", where each one corresponds to an image patch. On top of this, ViT models have an extra [class] token, which is used to produce the final representation, bringing the total number of tokens to 257. + +For ViT models, current TPU hardware pads the token dimension to a multiple of 128, which may result in up to a $50\%$ memory overhead. To overcome this issue we investigate alternatives to using the extra [class] token. In particular, we evaluate global average pooling (GAP) and multihead attention pooling (MAP) [24] to aggregate representation from all patch tokens. We set the number of heads in MAP to be equal to the number of attention heads in the rest of the model. To further simplify the head design we remove final non-linear projection before the final prediction layer, which was present in the original ViT paper. + +To choose the best head, we perform a side-by-side comparison of a [class] token and GAP/MAP heads. Results are summarized in Figure 5 (right). We find that all heads perform similarly, while GAP and MAP are much more memory efficient due to the aforementioned padding considerations. We also observe that non-linear projection can be safely removed. Thus, we opt for the MAP head, since it is the most expressive and results in the most uniform architecture. MAP head has also been explored in [41], in a different context for better quality rather than saving memory. + +# 3.3. Scaling up data + +For this study, we use the proprietary JFT-3B dataset, a larger version of the JFT-300M dataset used in many previous works on large-scale computer vision models [15,22,36]. This dataset consists of nearly 3 billion images, annotated with a class-hierarchy of around $30\mathrm{k}$ labels via a semiautomatic pipeline. Thus, the data and associated labels are noisy. We ignore the hierarchical aspect of the labels and use only the assigned labels as targets for multi-label classification via a sigmoid cross-entropy loss, following [15,22]. + +We have conducted sensitive category association analysis as described in [1]. We measured (per label) the distribution of sensitive categories across the raw data, the cleaned data, the models trained on this data, and labels that were verified by human raters. Human raters additionally assisted in removing offensive content from the dataset. + +Figure 6 shows an ablation of the effect of changing from JFT-300M to JFT-3B on model performance, even when scale is not increased. Figure 6, left shows linear 10-shot ImageNet performance evaluated throughout. We observe that JFT-3B results in a better model, even before the model has completely one epoch of JFT-300M. Therefore, overfitting JFT-300M is not the sole cause of the improvement. This difference can be seen even for the small B/32 model as well as the larger L/16. We fine-tune the models to the full ImageNet dataset (right), and confirm that these improvements transfer to a full fine-tuning setup. Overall, the change in dataset improves transfer to ImageNet by about $1\%$ for both small and large models. Other than the performance improvement, training behavior is similar on JFT-300M and JFT-3B. Most importantly, JFT-3B allows us to scale up further with fewer concerns about overfitting and regularization. + +Deduplication. We remove all images from the JFT-3B + +![](images/0bcc12ee91897025f746703c9264297821495beaa24e55dfe00d7b04fa80aadd.jpg) +Figure 6. The effect of switching from JFT-300M to JFT-3B, without any further scaling. Both small and large models benefit from this change, by an approximately constant factor, both for linear few-shot evaluation (left) and transfer using the full dataset (right). + +![](images/374c70893fd5b287cb6ccf6c058b89ae829d444338be47c242b71cce9b081582.jpg) + +dataset that are near-duplicates of images from both train set and test set of datasets we evaluate on. Overall we identified and removed 927k duplicate images from JFT-3B. + +# 3.4. Memory-efficient optimizers + +When training large models, storage required for model parameters becomes a bottleneck. Our largest model, ViT-G, has roughly two billion parameters, which occupies 8 GiB of device memory. To make things much worse, the Adam optimizer that is commonly used for training Transformers, stores two additional floating point scalars per each parameter, which results in an additional two-fold overhead (extra 16 GiB). To tackle the overhead introduced by the Adam optimizer we explore two modifications. + +Adam with half-precision momentum. We empirically observe that storing momentum in half-precision (bfloat16 type) does not affect training dynamics and has no effect on the outcome. This allows to reduce optimizer overhead from 2-fold to 1.5-fold. Notably, storing the second momentum using half-precision resulted in a significant performance deterioration. + +Adafactor optimizer. The above optimizer still induces a large memory overhead. Thus, we turn our attention to the Adafactor optimizer [34], which stores second momentum using rank 1 factorization. From practical point of view, this results in the negligible memory overhead. However, the Adafactor optimizer did not work out of the box, so we make the following modifications: + +- We re-introduce the first momentum in half-precision, whereas the recommended setting does not use the first momentum at all. +- We disable scaling of learning rate relative to weight norms, a feature that is part of Adafactor. +- Adafactor gradually increases the second momentum from 0.0 to 1.0 throughout the course of training. In + +our preliminary experiments, we found that clipping the second momentum at 0.999 (Adam's default value) results in better convergence, so we adopt it. + +The resulting optimizer introduces only a $50\%$ memory overhead on top the space needed to store model's parameters. + +We observe that both proposed optimizers perform on par with or slightly better than the original Adam optimizer. We are aware of other memory-efficient optimizers [31, 39], we leave the exploration to future work. + +# 3.5. Learning-rate schedule + +In our study we want to train each of the models for several different durations in order to measure the tradeoff between model size and training duration. When using linear decay, as in [15], each training duration requires its own training run starting from scratch, which would be an inefficient protocol. + +Inspired by [26], we address this issue by exploring learning-rate schedules that, similar to the warmup phase in the beginning, include a cooldown phase at the end of training, where the learning-rate is linearly annealed toward zero. Between the warmup and the cooldown phases, the learning-rate should not decay too quickly to zero. This can be achieved by using either a constant, or a reciprocal square-root schedule for the main part of training. Figure 7 (bottom) depicts several of these options, with a cooldown after approximately $200\mathrm{k}$ , $400\mathrm{k}$ , and $500\mathrm{k}$ steps. The upper half of Figure 7 shows the validation score (higher is better) for each of these options and their cooldowns, together with two linear schedules for reference. While the linear schedule is still preferable when one knows the training duration in advance and does not intend to train any longer, all three alternatives come reasonably close, with the advantage of allowing indefinite training and evaluating multiple training durations from just one run. For each of the schedules, we optimized the learning-rate and the exact shape. We have also briefly + +![](images/6559c8358c33d770fc49e271d98302cc6c4687a921c727fc7221358f28c6f387.jpg) +Figure 7. Various "infinite" learning-rate schedules, along with the finite linear one for reference. + +tried cyclic learning-rate schedules, however they seemed to perform much worse and we have not investigated further. We therefore opt for the reciprocal square-root schedule. + +# 3.6. Selecting model dimensions + +ViT models have many parameters that control the model's shape, and we refer to the original publication for full details. Briefly, these include the patch-size, the number of encoder blocks (depth), the dimensionality of patch embeddings and self-attention (width), the number of attention heads, and the hidden dimension of MLP blocks (MLP-width). On top of this, we rely on the XLA compiler to optimize our models for runtime speed and memory footprint. Behind the scenes, XLA uses complex heuristics to compile a model into code for a specific hardware that trades off memory and speed optimally. As a result, it is hard to predict which model configurations will fit into memory on a single device. + +Therefore we run an extensive simulation, where we instantiate a large amount of ViTs of various shapes, and attempt to train them for a few steps, without considering the quality. We vary the depth, width, heads, and MLP-width, but keep the patch-size at $14\mathrm{px}$ . In this way, we measure their speed and whether or not a given model fits into the device's memory. Figure 8 summarizes the result of this simulation. Each block corresponds to one model configuration, the shade of the block corresponds to its training speed (brighter is faster). Orange blocks show which original ViT models, without any of our modifications, fit. Green blocks then further include the memory savings described in Section 3.2 coupled with the half-precision Adam described in Section 3.4. Finally, blue blocks are with our modified AdaFactor optimizer. The shapes in the white area were not able to fit into memory in any setting. For space reasons, we show here only the models pertaining to the experiments + +Table 2. Model architecture details. + +
NameWidthDepthMLPHeadsMio. +ParamGFLOPs
224²384²
s/282566102485.40.72.0
s/162566102485.02.27.8
S/323841215366222.36.9
Ti/161921276835.52.59.5
B/3276812307212878.726.0
S/163841215366229.231.2
B/28768123072128711.330.5
B/16768123072128635.1111.3
L/16102424409616303122.9382.8
g/141408406144161011533.11596.4
G/141664488192161843965.32859.9
+ +presented, but note that with our modifications we were able to fit thin ViT models of a depth up to 100 encoder blocks. + +The original Vision Transformer publication contains a study in Appendix D2 about the trade-offs between scaling the different components, concluding that it is most effective to scale all aspects (depth, width, MLP-width, and patch-size) simultaneously and by a similar amount. We follow this recommendation, and select shapes for ViT-g and ViT-G at the limit of what fits in memory accordingly, as shown in Figure 8 and summarized in Table 2. + +# 4. Related Work + +Smaller Vision Transformers Early work on Transformers for vision focused on small networks for CIFAR-10 [10]. The Vision Transformer [15], however, was proposed in the context of state-of-the-art medium and large-scale image recognition; the smallest model (ViT-B) containing 86M parameters. [40] present smaller ViT sizes for training from-scratch, down to ViT-Ti, with 5M parameters. New variants of ViT introduce smaller and cheaper architectures. For example, T2T-ViT [50] reduces the number of parameters and compute using a new tokenization and narrower networks. Pyramidal ViTs [45], designed for dense prediction tasks, follow a CNN-like pyramidal structure, that also reduces the size of the model. Hybrids of CNNs and Transformers typically allow smaller models to perform well, such as the ViT-CNN hybrid in [15], BoTNet [35], and HaloNet [43]. However, the other direction, increasing the scale of ViT, is less explored. While language Transformers are still much larger than Vision Transformers, understanding the scaling properties and the improvements introduced in this paper represent a step in this direction. + +Scaling Laws [21] present a thorough study of the empirical scaling laws of neural language models. The authors + +![](images/738a0639f0b678528d8d03ad2cac35b71eed9cd7344ee0534dd6ed4bf0ed0c95.jpg) +Figure 8. Combined results of the "Shapefinder" simulation for the original ViT in orange, our improvements together with half-precision Adam (e.g. ViT-g) in green, and finally with our modified AdaFactor in blue. White areas ran out of memory. The brightness of the dot corresponds to its relative training speed. + +![](images/f868286789bdeb7ceb5613c28e004deb1013fb3daa456b2b7c135a5face60060.jpg) + +![](images/43cc5e2440ba1ef29e6a226dbd6d0ccf9e2ba0b59f53295c17a28fb56d99d4b4.jpg) +MLP-width + +![](images/c25d763149f610208c20696cea496b9c6fbe4faf38fd31ac17a68ff3d2ffd292.jpg) + +![](images/4131be55b2ef8d79ad54e9b33c302fbed3db73e7b24118957b438928143a4f2c.jpg) + +fit power laws that describe the relationships between compute, data size, model size, and performance. Following these laws, GPT-3, a 175B parameter language model was successfully trained [6]. [18] presents laws for autoregressive generative modelling in other modalities, including the generation of images. Our paper contains the first study of scaling laws for the discriminative modelling of images. + +Scaling-up Vision Models Many papers scale up CNNs to attain improved performance. EfficientNets [37, 38] present a scaling strategy that balances compute between depth, width, and resolution and apply it to MobileNets. This strategy is revisited in [3, 47] to further improve the performance of ResNets [17]. Large CNNs have attained excellent performance in visual recognition, such as AmoebaNet-B(18, 512) (557M parameters) trained using GPipe pipeline parallelism [19], ResNeXt-101 $32 \times 48$ d (829M parameters) pre-trained on weakly-labelled Instagram images [26], EfficientNet-L2 (480M parameters) trained with ImageNet pseudo-labels on JFT-300M [49], and BiT-L-ResNet152x4 (928M parameters) pre-trained on JFT-300M [22]. Recently, [41, 53] explore strategies to scale the depth of ViTs. We are the first to scale Vision Transformers to even larger size and reache new state-of-the-art results doing so. The concurrent work [12] focuses on CNN and ViT hybrid architectures. + +# 5. Discussion + +Limitations. This work uses the proprietary JFT-3B dataset for the scaling laws study. To make our insights more reliable and generalizable, we verify that the scaling laws also apply on the public ImageNet-21k dataset. + +Societal impact. A potential broader cost of this work is the energy required to perform the experiments in our scaling study, especially in training the largest ViT-G model. How- + +ever, this cost may be amortized in two ways. First, such studies of scaling laws need only be performed once; We hope future developers of ViT models may use our results to design models that can be trained with fewer compute resources. Second, the models trained are designed primarily for transfer learning. Transfer of pre-trained weights is much less expensive than training from scratch on a downstream task, and typically reaches higher accuracy. Therefore, by transferring our models to many tasks, the pre-training compute is further amortized. + +# 6. Conclusion + +We demonstrate that the performance-compute frontier for ViT models with enough training data roughly follows a (saturating) power law. Crucially, in order to stay on this frontier one has to simultaneously scale compute and model size; that is, not increasing a model's size when extra compute becomes available is suboptimal. We also demonstrate that larger models are much more sample efficient and are great few-shot learners. Finally, we present a new training recipe, which allows one to efficiently train large and high-performing ViT models. Note, that our conclusions may not necessarily generalize beyond the scale we have studied and they may not generalize beyond the ViT family of models. + +Acknowledgements We thank James Bradbury and Vivek Sharma for their help on using large-scale infrastructure; Alexey Dosovitskiy, Joan Puigcerver, Basil Mustafa, Carlos Riquelme for insightful discussions; Tom Duerig, Austin Tarango, Daniel Keysers, Howard Zhou, Wenlei Zhou, Yanan Bao for discussions on JFT; the Google Brain team at large for providing a supportive research environment. + +# References + +[1] Osman Aka, Ken Burke, Alex Bäuerle, Christina Greer, and Margaret Mitchell. Measuring model biases in the absence of ground truth. arXiv preprint arXiv:2103.03417, 2021. 5 +[2] Andrei Barbu, D. Mayo, Julian Alverio, William Luo, Christopher Wang, Dan Gutfreund, J. Tenenbaum, and Boris Katz. Objectnet: A large-scale bias-controlled dataset for pushing the limits of object recognition models. In NeurIPS, 2019. 4 +[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. 8 +[4] Lucas Beyer, Olivier J. Henaff, Alexander Kolesnikov, Xiaohua Zhai, and Aäron van den Oord. Are we done with imagenet? arXiv preprint arXiv:2006.07159, 2020. 3, 4 +[5] 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 +[6] 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. 1, 8 +[7] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. arXiv preprint arXiv:2005.12872, 2020. 1 +[8] Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. CoRR, abs/2104.14294, 2021. 4 +[9] Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey Hinton. Big self-supervised models are strong semi-supervised learners. arXiv preprint arXiv:2006.10029, 2020. 4 +[10] Jean-Baptiste Cordonnier, Andreas Loukas, and Martin Jaggi. On the relationship between self-attention and convolutional layers. In ICLR, 2020. 7 +[11] Corinna Cortes and Vladimir Vapnik. Support-vector networks. Machine learning, 1995. 5 +[12] Zihang Dai, Hanxiao Liu, Quoc V. Le, and Mingxing Tan. Coatnet: Marrying convolution and attention for all data sizes. CoRR, abs/2106.04803, 2021. 8 +[13] J. Deng, W. Dong, R. Socher, L. Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. 2 +[14] 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. 1 + +[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. In ICLR, 2021. 1, 4, 5, 6, 7, 11 +[16] 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, Bilal Piot, Koray Kavukcuoglu, Rémi Munos, and Michal Valko. Bootstrap your own latent: A new approach to self-supervised learning. arXiv preprint arXiv:2006.07733, 2020. 4 +[17] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 8 +[18] Tom Henighan, Jared Kaplan, Mor Katz, Mark Chen, Christopher Hesse, Jacob Jackson, Heewoo Jun, Tom B Brown, Prafulla Dhariwal, Scott Gray, et al. Scaling laws for autoregressive generative modeling. arXiv preprint arXiv:2010.14701, 2020.3,8 +[19] Yanping Huang, Youlong Cheng, Ankur Bapna, Orhan Firat, Dehao Chen, Mia Chen, HyoukJoong Lee, Jiquan Ngiam, Quoc V Le, Yonghui Wu, and zhifeng Chen. Gpipe: Efficient training of giant neural networks using pipeline parallelism. In NeurIPS, 2019. 8 +[20] 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 +[21] Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020. 1, 3, 7 +[22] Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, J. Puigcerver, Jessica Yung, S. Gelly, and N. Houlsby. Big Transfer (BiT): General Visual Representation Learning. In ECCV, 2020. 4, 5, 8, 11 +[23] Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009. 2, 11 +[24] 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 ICML, 2019. 5 +[25] Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen, Orhan Firat, Yanping Huang, Maxim Krikun, Noam Shazeer, and Zhifeng Chen. Gshard: Scaling giant models with conditional computation and automatic sharding. arXiv preprint arXiv:2006.16668, 2020. 3 +[26] Dhruv Mahajan, Ross Girshick, Vignesh Ramanathan, Kaiming He, Manohar Paluri, Yixuan Li, Ashwin Bharambe, and Laurens van der Maaten. Exploring the limits of weakly supervised pretraining. In ECCV, September 2018. 6, 8 +[27] Omkar M. Parkhi, Andrea Vedaldi, Andrew Zisserman, and C. V. Jawahar. Cats and dogs. In CVPR, 2012. 2, 11 + +[28] Hieu Pham, Zihang Dai, Qizhe Xie, Minh-Thang Luong, and Quoc V. Le. Meta pseudo labels. arXiv preprint arXiv:2003.10580, 2020.4 +[29] B. T. Polyak and A. B. Juditsky. Acceleration of stochastic approximation by averaging. SIAM Journal on Control and Optimization, 30(4):838-855, 1992. 11 +[30] 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 preprint arXiv:2103.00020, 2021. 4 +[31] Samyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, and Yuxiong He. Zero: memory optimizations toward training trillion parameter models. In Christine Cuicchi, Irene Qualters, and William T. Kramer, editors, Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, SC 2020, Virtual Event / Atlanta, Georgia, USA, November 9-19, 2020, page 20. IEEE/ACM, 2020. 6 +[32] Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenet classifiers generalize to imageNet? arXiv preprint arXiv:1902.10811, 2019. 3, 4 +[33] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. IJCV, 115(3):211-252, 2015. 4 +[34] Noam Shazeer and Mitchell Stern. Adafactor: Adaptive learning rates with sublinear memory cost. In ICML, 2018. 6 +[35] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. arXiv preprint arXiv:2101.11605, 2021. 7 +[36] Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting Unreasonable Effectiveness of Data in Deep Learning Era. ICCV, Oct 2017. 5 +[37] Mingxing Tan and Quoc Le. EfficientNet: Rethinking model scaling for convolutional neural networks. In ICML, 2019. 8 +[38] Mingxing Tan and Quoc V. Le. Efficientnetv2: Smaller models and faster training. 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 10096-10106. PMLR, 2021. 8 +[39] Hanlin Tang, Shaoduo Gan, Ammar Ahmad Awan, Samyam Rajbhandari, Conglong Li, Xiangru Lian, Ji Liu, Ce Zhang, and Yuxiong He. 1-bit adam: Communication efficient largescale training with adam's convergence speed. 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 10118-10129. PMLR, 2021. 6 +[40] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020. 7 + +[41] Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, and Hervé Jégou. Going deeper with image transformers. CoRR, abs/2103.17239, 2021. 5, 8 +[42] Hugo Touvron, Andrea Vedaldi, Matthijs Douze, and Hervé Jégou. Fixing the train-test resolution discrepancy. arXiv preprint arXiv:1906.06423, 2020. 11 +[43] Ashish Vaswani, Prajit Ramachandran, Aravind Srinivas, Niki Parmar, Blake Hechtman, and Jonathon Shlens. Scaling local self-attention for parameter efficient visual backbones. arXiv preprint arXiv:2103.12731, 2021. 7 +[44] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Ilia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017. 1 +[45] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021. 7 +[46] P. Welinder, S. Branson, T. Mita, C. Wah, F. Schroff, S. Belongie, and P. Perona. Caltech-UCSD Birds 200. Technical Report CNS-TR-2010-001, California Institute of Technology, 2010. 2, 11 +[47] Ross Wightman, Hugo Touvron, and Hervé Jégou. Resnet strikes back: An improved training procedure in timm. CoRR, abs/2110.00476, 2021. 8 +[48] Qizhe Xie, Minh-Thang Luong, Eduard Hovy, and Quoc V. Le. Self-training with noisy student improves imagenet classification. arXiv preprint arXiv:1911.04252, 2019. 4 +[49] Qizhe Xie, Minh-Thang Luong, Eduard Hovy, and Quoc V. Le. Self-training with noisy student improves imagenet classification. In CVPR, June 2020. 8 +[50] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Zihang Jiang, Francis EH Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token vit: Training vision transformers from scratch onImagenet. arXiv preprint arXiv:2101.11986, 2021.7 +[51] Xiaohua Zhai, Avital Oliver, Alexander Kolesnikov, and Lucas Beyer. S4l: Self-supervised semi-supervised learning. In ICCV, pages 1476-1485, 2019. 4 +[52] Xiaohua Zhai, Joan Puigcerver, Alexander Kolesnikov, Pierre Ruyssen, Carlos Riquelme, Mario Lucic, Josip Djolonga, Andre Susano Pinto, Maxim Neumann, Alexey Dosovitskiy, Lucas Beyer, Olivier Bachem, Michael Tschannen, Marcin Michalski, Olivier Bousquet, Sylvain Gelly, and Neil Houlsby. A large-scale study of representation learning with the visual task adaptation benchmark. arXiv preprint arXiv:1910.04867, 2019. 4 +[53] Daquan Zhou, Bingyi Kang, Xiaojie Jin, Linjie Yang, Xiaochen Lian, Qibin Hou, and Jiashi Feng. Deepvit: Towards deeper vision transformer. CoRR, abs/2103.11886, 2021. 8 \ No newline at end of file diff --git a/scalingvisiontransformers/images.zip b/scalingvisiontransformers/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b08ff82b7bf86010748ebcd33752e28eef2f76d9 --- /dev/null +++ b/scalingvisiontransformers/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01dc4acd38dc6a6b9e3f98cb09339e04463d3ccb5b3c4e9ec628dfaf0aff04ed +size 524973 diff --git a/scalingvisiontransformers/layout.json b/scalingvisiontransformers/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..30e4a741833e071cc7edf5eb631bda8281a5b228 --- /dev/null +++ b/scalingvisiontransformers/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03a0451ac354a536b475afc4f99b15444a5d5c49a8f08e19deb45eca95cf829e +size 314549 diff --git a/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/0b34401b-f35b-43ab-bc56-9fd5e07b08c6_content_list.json b/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/0b34401b-f35b-43ab-bc56-9fd5e07b08c6_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ffdcbd2c5211ec3d0239be21bf781c5ff6b75d6c --- /dev/null +++ b/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/0b34401b-f35b-43ab-bc56-9fd5e07b08c6_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9adef380a383d1b45ada0741ea5060e3d961d2540515bd4a3ba2fbf86c9a8bd4 +size 88723 diff --git a/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/0b34401b-f35b-43ab-bc56-9fd5e07b08c6_model.json b/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/0b34401b-f35b-43ab-bc56-9fd5e07b08c6_model.json new file mode 100644 index 0000000000000000000000000000000000000000..8e0d2637b4a69e383c961369da186a927f31020e --- /dev/null +++ b/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/0b34401b-f35b-43ab-bc56-9fd5e07b08c6_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:feb66c476bbc8da09a41c14d54c9acb20d3568089c60d5b68d6d26ceb2ccf006 +size 113195 diff --git a/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/0b34401b-f35b-43ab-bc56-9fd5e07b08c6_origin.pdf b/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/0b34401b-f35b-43ab-bc56-9fd5e07b08c6_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..847d08ca3b98bbe1f2207827cb45be0f36be5f0b --- /dev/null +++ b/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/0b34401b-f35b-43ab-bc56-9fd5e07b08c6_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b509deafde474ca78034d1c7a2ad83d77a20e1025671c2dc757038a9be774cb +size 8957513 diff --git a/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/full.md b/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e4255d4c9711122314fb4d07fb09e2ce61c876ee --- /dev/null +++ b/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/full.md @@ -0,0 +1,280 @@ +# Scaling Vision Transformers to Gigapixel Images via Hierarchical Self-Supervised Learning + +Richard J. Chen $^{1}$ , Chengkuan Chen $^{1}$ , Yicong Li $^{1}$ , Tiffany Y. Chen $^{1}$ , Andrew D. Trister $^{2}$ , Rahul G. Krishnan $^{3,*}$ , Faisal Mahmood $^{1,*}$ + +1Harvard, BWH, Broad Institute 2Bill & Melinda Gates Foundation 3University of Toronto + +richardjchen@g.harvard.edu, faisalmahmood@bwh.harvard.edu + +# Abstract + +Vision Transformers (ViTs) and their multi-scale and hierarchical variations have been successful at capturing image representations but their use has been generally studied for low-resolution images (e.g. $256 \times 256$ , $384 \times 384$ ). For gigapixel whole-slide imaging (WSI) in computational pathology, WSIs can be as large as $150000 \times 150000$ pixels at $20 \times$ magnification and exhibit a hierarchical structure of visual tokens across varying resolutions: from $16 \times 16$ images capturing individual cells, to $4096 \times 4096$ images characterizing interactions within the tissue microenvironment. We introduce a new ViT architecture called the Hierarchical Image Pyramid Transformer (HIPT), which leverages the natural hierarchical structure inherent in WSIs using two levels of self-supervised learning to learn high-resolution image representations. HIPT is pretrained across 33 cancer types using 10,678 gigapixel WSIs, 408,218,4096,4096 images, and 104M $256 \times 256$ images. We benchmark HIPT representations on 9 slide-level tasks, and demonstrate that: 1) HIPT with hierarchical pretraining outperforms current state-of-the-art methods for cancer subtyping and survival prediction, 2) self-supervised ViTs are able to model important inductive biases about the hierarchical structure of phenotypes in the tumor microenvironment. + +# 1. Introduction + +Tissue phenotyping is a fundamental problem in computational pathology (CPATH) that aims at characterizing objective, histopathologic features within gigapixel whole-slide images (WSIs) for cancer diagnosis, prognosis, and the estimation of response-to-treatment in patients [39, 41, 54]. Unlike natural images, whole-slide imaging is a challenging computer vision domain in which image resolutions can be as large as $150000 \times 150000$ pixels, with many methods using the following three-stage, weakly-supervised framework based on multiple instance learning + +![](images/a70ee4c9c3f4d4c0488e292f733794fd031dbcb754e3200e66874a6f8c373c2f.jpg) +Figure 1. Hierarchical Structure of Whole-Slide Images (WSIs). Left. Unlike natural images, since WSIs have a fixed scale, there exists a hierarchical structure of visual tokens at varying image resolutions. Right. In addition to formulating a single $256 \times 256$ image as a sequence of 256 $[16 \times 16]$ tokens, we can also view these $256 \times 256$ image as being part of a larger, disjoint sequence of $[256 \times 256]$ tokens in a $4096 \times 4096$ region. + +(MIL): 1) tissue patching at a single magnification objective ("zoom"), 2) patch-level feature extraction to construct a sequence of embedding instances, and 3) global pooling of instances to construct a slide-level representation for weak-supervision using slide-level labels (e.g. - subtype, grade, stage, survival, origin) [12, 19, 37, 38, 52, 53, 68, 70, 85]. + +Though achieving "clinical-grade" performance on many cancer subtyping and grading tasks, this three-stage process has a few important design limitations. First, patching and feature extraction are generally fixed to $[256 \times 256]$ context regions. Though able to discern fine-grained mor + +phological features such as nuclear atypia or tumor presence, depending on the cancer type, $[256 \times 256]$ windows have limited context in capturing coarser-grained features such as tumor invasion, tumor size, lymphocytic infiltrates, and the broader spatial organization of these phenotypes in the tissue microenvironment, as depicted in Figure 1 [6,15,22]. Second, in contrast with other image-based sequence modeling approaches such as Vision Transformers (ViTs), MIL uses only global pooling operators due to the large sequence lengths of WSIs [38]. As a result, this limitation precludes the application of Transformer attention for learning long-range dependencies between phenotypes such as tumor-immune localization, an important prognostic feature in survival prediction [1,44,63]. Lastly, though recent MIL approaches have adopted self-supervised learning as a strategy for patch-level feature extraction (called tokenization in ViT literature), parameters in the aggregation layers still require training [8,16,18,20,43,45,62]. In viewing patch-based sequence modeling of WSIs in relation to ViTs, we note that the architectural design choice of using Transformer attention enables pretraining of both the tokenization and aggregation layers in ViT models, which is important in preventing MIL models from over- or underfitting in low-data regimes [5,13,23,33,46]. + +To address these issues, we explore the challenge of developing a Vision Transformer for slide-level representation learning in WSIs. In comparison to natural images which are actively explored by ViTs, we note a key difference in modeling WSIs is that visual tokens would always be at a fixed scale for a given magnification objective. For instance, scanning WSIs at a $20 \times$ objective results in a fixed scale of approximately $0.5\mu m$ per pixel, allowing for consistent comparison of visual elements that may elucidate important histomorphological features beyond their normal reference ranges. Moreover, WSIs also exhibit a hierarchical structure of visual tokens at varying image resolutions at $20 \times$ magnification: the $16 \times 16$ images encompass the bounding box of cells and other fine-grained features (stroma, tumor cells, lymphocytes) [22, 36], $256 \times 256$ images capture local clusters of cell-to-cell interactions (tumor cellularity) [2, 7, 30, 59], $1024 \times 1024 - 4096 \times 4096$ images further characterize macro-scale interactions between clusters of cells and their organization in tissue (the extent of tumor-immune localization in describing tumor-infiltrating versus tumor-distal lymphocytes) [1,9], and finally the overall intra-tumoral heterogeneity of the tissue microenvironment depicted at the slide-level of the WSI [4,35,39,57,63]. The hypothesis that this work tests is that the judicious use of this hierarchy in self-supervised learning results in better slide-level representations. + +We introduce a Transformer-based architecture for hierarchical aggregation of visual tokens and pretraining in gigapixel pathology images, called Hierarchical Image Pyra + +mid Transformer (HIPT). We approach the task of slide-level representation learning in a manner similar to learning long document representations in language modeling, in which we develop a three-stage hierarchical architecture that performs bottom-up aggregation from $[16 \times 16]$ visual tokens in their respective $256 \times 256$ and $4096 \times 4096$ windows to eventually form the slide-level representation, as demonstrated in Figure 2 [76, 82]. Our work pushes the boundaries of both Vision Transformers and self-supervised learning in two important ways. By modeling WSIs as a disjoint set of nested sequences, within HIPT: 1) we decompose the problem of learning a good representation of a WSI into hierarchically-related representations each of which can be learned via self-supervised learning, and 2) we use student-teacher knowledge distillation (DINO [13]) to pretrain each aggregation layers with self-supervised learning on regions as large as $4096 \times 4096$ . + +We apply HIPT to the task of learning representations of gigapixel histopathological images extracted at $20 \times$ resolution. We show that our method achieves superior performance to conventional MIL approaches. The difference is pronounced in context-aware tasks such as survival prediction in which larger context is appreciated in characterizing broader prognostic features in the tissue microenvironment [1, 17, 60, 63]. Using K-Nearest Neighbors on the $4096 \times 4096$ representations of our model, we outperform several weakly-supervised architectures in slide-level classification – an important step forward in achieving self-supervised slide-level representations. Finally, akin to self-supervised ViTs on natural images that can perform semantic segmentation of the scene layout, we find that the multi-head self-attention in self-supervised ViTs learn visual concepts in histopathology tissue (from fine-grained visual concepts such as cell locations in the $\mathrm{ViT}_{256}-16$ to coarse-grained visual concepts such as broader tumor cellularity in the $\mathrm{ViT}_{4096}-256$ ), as demonstrated in Figure 3, 4. We make code available at https://github.com/mahmoodlab/HIPT. + +# 2. Related Work + +Multiple Instance Learning in WSIs. In general set-based deep learning, Edwards & Storkey and Zaheer et al. proposed the first network architectures operating on set-based data structures, with Brendel et al. demonstrating "bag-of-features" able to reach high accuracy on ImageNet [10,25,80]. Concurrently in pathology, Ilse et al. extended set-based network architectures as an approach for multiple instance learning in histology region-of-interests, with Campanella et al. later extending end-to-end weak-supervision on gigapixel WSIs [12,38]. Lu et al. demonstrated that by using a pretrained ResNet-50 encoder on ImageNet for instance-level feature extraction, only a global pooling operator needs to be trained for weakly-supervised slide-level tasks [53]. Following Lu et al., there have been + +many variations of MIL that have adapted image pretraining techniques such as VAE-GANs, SimCLR, and MOCO as instance-level feature extraction [45,62,84]. Recent variations of MIL have also evolved to extend the aggregation layers and scoring functions [17,64,68,75,77,78,85]. Li et al. proposed a multi-scale MIL approach that performs patching and self-supervised instance learning at $20 \times$ and $5 \times$ resolution, followed by spatially-resolved alignment of patches [45]. The integration of magnification objectives within WSIs has been followed in other works as well [29,32,56,58], however, we note that combining visual tokens across objectives would not share the same scale. In this work, patching is done at a single magnification objective, with larger patch sizes used to capture macro-scale morphological features, which we hope will contribute towards a shift in rethinking context modeling of WSIs. + +Vision Transformers and Image Pyramids. The seminal work of Vaswani et al. has led to remarkable developments in not only language modeling, but also image representation learning via Vision Transformers (ViTs), in which $256 \times 256$ images are formulated as an image patch sequence of $[16 \times 16]$ visual tokens [23,69,71]. Motivated by multiscale, pyramid-based image processing [11,42,61], recent progress in ViT architecture development has focused on efficiency and integration of multiscale information (e.g. - Swin, ViL, TNT, PVT, MViT) in addressing the varying scale / aspect ratios of visual tokens [27,31,51,72,81]. In contrast with pathology, we highlight that learning scale invariance may not be necessary if the image scale is fixed at a given magnification. Similar to our work is NesT and Hierarchical Perciever, which similarly partitions and then aggregates features from non-overlapping image regions via Transformer blocks [14, 83]. A key difference is that we show ViT blocks at each stage can be separately pretrained for high-resolution encoding (up to $4096 \times 4096$ ). + +# 3. Method + +# 3.1. Problem Formulation + +Patch Size and Visual Token Notation: We use the following notation to distinguish between the sizes of "images" and "tokens" that correspond to that image. For an image $\mathbf{x}$ with resolution $L\times L$ (or $\mathbf{x}_L$ ), we refer to sequence of extracted visual tokens from non-overlapping patches (of size $[l\times l])$ within $\mathbf{x}_L$ as $\{\mathbf{x}_l^{(i)}\}_{i = 1}^M\in \mathbb{R}^{M\times d_l}$ , where $M$ is the sequence length and $d$ is the embedding dimension extracted for $l$ -sized tokens. In working with multiple image resolutions (and their respective tokens) in a WSI, we additionally denote the shape of visual tokens (and the patching parameter) within $\mathbf{x}_L$ image as $[l\times l]$ (using brackets). For natural images with size $\mathbf{x}_{256}$ , ViTs generally use $l = L^{1 / 2} = 16$ which results in a sequence length of $M = 256$ . Addition- + +ally, we denote a ViT working on a $L$ -sized image resolution with $[l \times l]$ tokens as $\mathrm{ViT}_L - l$ . For $\mathbf{x}_{\mathrm{WSI}}$ (referring to the slide-level resolution of the WSI), MIL approaches choose $l = 256$ which fits the input shape of CNN encoders that can be pretrained and using for tokenization, resulting in $M > 10,000$ (variable due to the total area of segmented tissue content). + +Slide-Level Weak Supervision: For a WSI $\mathbf{x}_{\mathrm{WSI}}$ with outcome $y$ , the goal is to solve the slide-level classification task $P(y|\mathbf{x}_{\mathrm{WSI}})$ . Conventional approaches for solving this task use a three-stage MIL framework which performs: 1) $[256 \times 256]$ -patching, 2) tokenization, and 3) global attention pooling. $\mathbf{x}_{\mathrm{WSI}}$ is formulated as the sequence $\{\mathbf{x}_{256}^{(i)}\}_{i=1}^{M} \in \mathbb{R}^{M \times 1024}$ which results from using a ResNet-50 encoder pretrained on ImageNet (truncated after the 3rd residual block). Due to the large sequence lengths with $l = 256$ , neural network architectures in this task are limited to per-patch and global pooling operators in extracting a slide-level embedding for downstream tasks. + +# 3.2. Hierarchical Image Pyramid Transformer (HIPT) Architecture + +In adapting ViTs for slide-level representation learning, we reiterate two important challenges distinct from computer vision in natural images: 1) the fixed scale of visual tokens and their hierarchical relationships across image resolutions, and 2) the large sequence lengths of unrolled WSIs. As mentioned, visual tokens in histopathology are generally object-centric (and vary in granularity) across image resolutions, and also have important contextual dependencies such as tumor-immune (inferring favorable prognosis) or tumor-stroma interactions (inferring invasion). Patching with small visual tokens at high objectives ( $\mathbf{x}_{256}$ at $20\times$ ) results in large sequence lengths that make self-attention intractable, whereas patching with large visual tokens at low objectives results in loss-of-detail of fine-grained morphological structures ( $\mathbf{x}_{256}$ at $5\times$ ) that still requires $[256\times 256]$ patching at $20\times$ . + +To capture this hierarchical structure and the important dependencies that may exist at each image resolution, we approach WSIs similar to long documents as a nested aggregation of visual tokens that recursively break down into smaller tokens until the cell-level (Figure 2), written as: + +$$ +\begin{array}{l} \operatorname {H I P T} \left(\mathbf {x} _ {\mathrm {W S I}}\right) = \operatorname {V i T} _ {\mathrm {W S I}} - 4 0 9 6 \left(\left\{\operatorname {C L S} _ {4 0 9 6} ^ {(k)} \right\} _ {k = 1} ^ {M}\right) \\ \rightarrow \mathrm {C L S} _ {4 0 9 6} ^ {(k)} = \operatorname {V i T} _ {4 0 9 6} - 2 5 6 \left(\left\{\mathrm {C L S} _ {2 5 6} ^ {(j)} \right\} _ {i = 1} ^ {2 5 6}\right) \\ \rightarrow \mathrm {C L S} _ {2 5 6} ^ {(j)} = \operatorname {V i T} _ {2 5 6} - 1 6 \left(\left\{\mathbf {x} _ {1 6} ^ {(i)} \right\} _ {i = 1} ^ {2 5 6}\right) \\ \end{array} +$$ + +where 256 is the sequence length of $[16\times 16]$ - and $[256\times$ 256]-patching in $\mathbf{x}_{256}$ and $\mathbf{x}_{4096}$ images respectively, and $M$ is the total number of $\mathbf{x}_{4096}$ images in $\mathbf{x}_{\mathrm{WSI}}$ . For ease of notation, we refer to $\mathbf{x}_{16}$ images as being at the cell-level, $\mathbf{x}_{256}$ + +![](images/8a6f1f02deb3dfbbab0f3d8c020eb4173c4f3b91e2da33b1a6dd8df90f20e351.jpg) +Figure 2. HIPT Architecture. Motivated by the use of hierarchical representations in natural language processing, where embeddings can be aggregated at the character-, word-, sentence- and paragraph-level to form document representations, we aggregate visual tokens at the $\mathbf{x}_{16}$ cell-, $\mathbf{x}_{256}$ patch-, $\mathbf{x}_{4096}$ region-level to form slide representations. To also model important dependencies between visual concepts at each stage, we adapt Transformer self-attention as a permutation-equivariant aggregation layer. Note that since the complexity of patching $\mathbf{x}_{4096}$ regions with $\mathbf{x}_{256}$ tokens is the same as patching $\mathbf{x}_{256}$ images with $\mathbf{x}_{16}$ tokens, we can pretrain aggregation layers for high-resolution images using similar self-supervised ViT techniques for low-resolution images. + +images as being at the patch-level $^1$ , $\mathbf{x}_{4096}$ images as being at the region-level, with the overall WSI being the slide-level. In choosing these image sizes, the input sequence length of tokens is always $M = 256$ in the forward passes for the $\mathrm{ViT}_{256}$ -16 and $\mathrm{ViT}_{4096}$ -256 (cell- and patch-level aggregation), and usually $M < 256$ in the forward pass for the $\mathrm{ViT}_{\mathrm{WSI}}$ -4096 (slide-level aggregation). The [CLS] tokens from $\mathrm{ViT}_{256}$ -16 (the output of the model) are used as the input sequence for $\mathrm{ViT}_{4096}$ -256, with the [CLS] tokens from $\mathrm{ViT}_{4096}$ -256 subsequently used as the input sequence for $\mathrm{ViT}_{\mathrm{WSI}}$ -4096, with the number of total visual tokens at each stage decreasing geometrically by a factor of 256. In choosing small ViT backbones for each stage, HIPT has less than 10M parameters and is easy-to-implement and train on commercial workstations. We describe each stage below. + +$\mathrm{ViT}_{256}$ -16 for Cell-Level Aggregation. The computation of $\mathbf{x}_{16}$ cell-level token aggregation within $\mathbf{x}_{256}$ windows follows implementing the vanilla ViT in natural images [23]. Given a $\mathbf{x}_{256}$ patch, the ViT unrolls this image as a sequence of non-overlapping $[16 \times 16]$ tokens followed by a linear embedding layer with added position embed + +dings to produce a set of 384-dim embeddings $\{\mathbf{x}_{16}^{(i)}\}_{i = 1}^{256}\in$ $\mathbb{R}^{256\times 384}$ , with a learnable [CLS] token added to aggregate cell embeddings across the sequence. We choose $l = 16$ in this setting to not only follow conventional ViT architectures, but also model important inductive biases in histopathology as at this resolution, a $[16\times 16]$ bounding box at $20\times \approx 8\mu m^2$ area encodes visual concepts that are object-centric in favorizing single cells (e.g. -cell identity, shape, roundness). + +$\mathrm{ViT}_{4096}$ -256 for Patch-Level Aggregation. To represent $\mathbf{x}_{4096}$ regions, despite the image resolution being much larger than conventional natural images, the number of tokens remains the same since the patch size scales with the image resolution. From the previous stage, we use $\mathrm{ViT}_{256}$ -16 to tokenize non-overlapping $\mathbf{x}_{256}$ patches within each $\mathbf{x}_{4096}$ region, forming the sequence $\{\left[\mathrm{CLS}\right]_{256}^{(j)}\}_{j=1}^{256}$ that can be plugged into a ViT block to model larger image contexts. We use a $\mathrm{ViT}_{4096}$ -256 $(n = 4, h = 3, d = 192)$ with output $[\mathrm{CLS}]_{4096}$ . + +$\mathrm{ViT_{WSI}}$ 4096 for Region-Level Aggregation. In computing the slide-level representation for $\mathbf{x}_{\mathrm{WSI}}$ , we use a $\mathrm{ViT_{WSI}}$ 4096(n = 2, h = 3, d = 192) in aggregating the $[\mathrm{CLS}]_{4096}$ tokens. $M$ ranges from 1 - 256 in our observa + +![](images/35ec1b934dcba8b77b032b998086caea3594f2d457052ab0b5dc0891f94aa0d0.jpg) +Figure 3. Multi-Head Self-Attention Visualization of Self-Supervised ViTs. For Invasive Ductal Carcinoma (IDC), We show self-supervised visualizations for $\mathrm{ViT}_{256}$ -16 and $\mathrm{ViT}_{4096}$ -256, pretrained on $\mathbf{x}_{256}$ and $\mathbf{x}_{4096}$ regions respectively. For $\mathbf{x}_{256}$ patches, $\mathrm{ViT}_{256}$ -16 is able to delineate stroma, cell, and "white space" presence in $\mathbf{x}_{16}$ tokens. For $\mathbf{x}_{4096}$ regions, $\mathrm{ViT}_{4096}$ -256 delineates coarse-grained morphological features such as tumor nests and their surrounding desmoplastic (loose) stroma. + +tions depending on size of the WSI. Due to potential tissue segmentation irregularities in patching at $[4096 \times 4096]$ , we ignore positional embeddings at this stage. + +# 3.3. Hierarchical Pretraining + +In building a MIL framework using only Transformer blocks, we additionally explore and pose a new challenge referred to as slide-level self-supervised learning - which aims at extracting slide-level feature representations in gigapixel images for downstream diagnostic and prognostic tasks. This is an important problem as current slide-level training datasets in CPATH typically have between 100 to 10,000 data points, which may cause MIL methods to overfit due to over-parameterization and lack of labels. To address this problem, we hypothesize that the recursive nature of HIPT in using Transformer blocks for image representation learning can enable conventional ViT pretraining techniques (such as DINO [13]) to generalize across stages (of similar subproblems) for high-resolution images. To pretrain HIPT, first, we leverage DINO to pretrain $\mathrm{ViT}_{256}$ -16. Then, keeping fixed the weights of $\mathrm{ViT}_{256}$ -16, we re-use $\mathrm{ViT}_{256}$ -16 as the embedding layer for $\mathrm{ViT}_{4096}$ -256 in a second stage of DINO. We refer to this procedure as hierarchical pretraining, which is similarly performed in the context of learning deep belief networks [26] and hierarchical transformers for long documents [82]. Though hierarchical + +pretraining does not reach the slide-level, we show that: 1) pretrained $\mathbf{x}_{4096}$ representations in self-supervised evaluation are competitive with supervised methods for slide-level subtyping, and that 2) HIPT with two-stage hierarchical pretraining can reach state-of-the-art performance. + +Stage 1: $256 \times 256$ Patch-Level Pretraining. To pretrain $\mathrm{ViT}_{256}-16$ , we use the DINO framework for pretraining of $\mathbf{x}_{256}$ patches, in which a student network $\phi_{s_{256}}$ is trained to match the probability distribution of a siamese teacher network $\phi_{t_{256}}$ using a cross-entropy loss $-p_{t_{256}}(\cdot)\log p_{s_{256}}(\cdot)$ with momentum encoding, with $p_{t_{256}}, p_{s_{256}}$ denoting the outputs of $\phi_{t_{256}}(\cdot), \phi_{s_{256}}(\cdot)$ respectively for $\mathbf{x}_{256}$ . As data augmentation for each $\mathbf{x}_{256}$ patch, DINO constructs a set of $M_l = 8$ local views ( $\mathbf{x}_{96}$ crops, passed through $\phi_{s_{256}}$ ) and $M_g = 2$ global views ( $\mathbf{x}_{224}$ crops, passed through $\phi_{t_{256}}$ ) to encourage local-to-global correspondences between the student and teacher, minimizing the function: + +$$ +\min _ {\theta_ {s _ {2 5 6}}} \sum_ {\left\{\mathbf {x} _ {2 2 4} ^ {(i)} \right\} _ {i = 1} ^ {M _ {g}}} \sum_ {\left\{\mathbf {x} _ {9 6} ^ {(j)} \right\} _ {j = 1} ^ {M _ {l}}} H \left(p _ {t _ {2 5 6}} (\mathbf {x} _ {2 2 4} ^ {(i)}), p _ {s _ {2 5 6}} (\mathbf {x} _ {9 6} ^ {(j)})\right) +$$ + +An intriguing property that makes this data augmentation suitable for histology data is again the natural part-whole hierarchy of cells in a tissue patch. In comparison to natural images in which $[96 \times 96]$ crops may capture only colors and textures without any semantic information, at $20 \times$ , local $[96 \times 96]$ crops would capture the context of multiple cells and their surrounding extracellular matrices, which has shared mutual information with the broader cellular communities. Similar to the original DINO implementation, we use horizontal flips and color jittering for all views, with solarizing performed on one of the global views. + +Stage 2: $4096 \times 4096$ Region-Level Pretraining. With the sequence lengths and computational complexity in tokenizing $\mathbf{x}_{4096}$ regions similar to that of $\mathbf{x}_{256}$ patches, we can also borrow an almost identical DINO recipe in also pretraining $\mathrm{ViT}_{4096}$ -256 and defining student-teacher networks $\phi_{s_{4096}}(\cdot), \phi_{t_{4096}}(\cdot)$ at this stage. Following extracting $[\mathrm{CLS}]_{256}$ tokens from $\mathrm{ViT}_{256}$ -16 as input for $\mathrm{ViT}_{4096}$ -256 input, we rearrange $\{[\mathrm{CLS}]_{256}^{(j)}\}_{j=1}^{M=256}$ as a $16 \times 16 \times 384$ 2D feature grid for data augmentations, performing $[6 \times 6], [14 \times 14]$ local-global crops in matching the scale of $[96 \times 96], [224 \times 224]$ crops for $256 \times 256$ inputs. As additional data augmentation, We apply standard dropout $(p = 0.10)$ to all views following work in Gao et al. [28]. + +# 4. Experiments + +Pretraining:. We pretrain $\mathrm{ViT}_{256}$ -16 and $\mathrm{ViT}_{4096}$ -256 in different stages, using 10,678 FFPE (formalin-fixed, + +
ArchitectureBRCA SubtypingNSCLC SubtypingRCC Subtyping
25% Training100% Training25% Training100% Training25% Training100% Training
MIL [53]0.673 ± 0.1120.778 ± 0.0910.857 ± 0.0590.892 ± 0.0420.904 ± 0.0550.959 ± 0.015
CLAM-SB [53]0.796 ± 0.0630.858 ± 0.0670.852 ± 0.0340.928 ± 0.0210.957 ± 0.0120.973 ± 0.017
DeepAttnMISL [78]0.685 ± 0.1100.784 ± 0.0610.663 ± 0.0770.778 ± 0.0450.904 ± 0.0240.943 ± 0.016
GCN-MIL [84]0.727 ± 0.0760.840 ± 0.0730.748 ± 0.0500.831 ± 0.0340.923 ± 0.0120.957 ± 0.012
DS-MIL [45]0.760 ± 0.0880.838 ± 0.0740.787 ± 0.0730.920 ± 0.0240.949 ± 0.0280.971 ± 0.016
HIPT0.821 ± 0.0690.874 ± 0.0600.923 ± 0.0200.952 ± 0.0210.974 ± 0.0120.980 ± 0.013
ResNet-50IN (Mean)0.638 ± 0.0890.667 ± 0.0700.696 ± 0.0550.794 ± 0.0350.862 ± 0.0300.951 ± 0.016
ViT256-16 (Mean)0.605 ± 0.0920.725 ± 0.0830.622 ± 0.0670.742 ± 0.0450.848 ± 0.0320.899 ± 0.027
ViT4096-256 (Mean)0.682 ± 0.0550.775 ± 0.0420.773 ± 0.0480.889 ± 0.0270.916 ± 0.0220.974 ± 0.016
+ +Table 1. Slide-Level Classification. Top Row. Ablation study assessing 10-fold cross-validated AUC performance of HIPT across other weakly-supervised architectures. For RCC subtyping, we report the macro-averaged AUC performance across the three subtypes. Bottom Row. Ablation study assessing K-Nearest Neighbors (KNN) performance using the average pre-extracted embeddings. + +paraffin-embedded) H&E-stained diagnostic slides from 33 cancer types in the The Genome Cancer Atlas (TCGA), and extracted 408,218 $\mathbf{x}_{4096}$ regions at an $20\times$ objective ( $M\approx$ 38 regions per slide) for pretraining $\mathrm{ViT_{4096}}$ -256, with a total of $104\mathrm{M}$ $\mathbf{x}_{256}$ patches for pretraining $\mathrm{ViT_{256}}$ -16 [50]. For $\mathrm{ViT_{256}}$ -16, we trained for 400,000 iterations using the AdamW optimizer with a batch size of 256, base learning rate of 0.0005, with the first 10 epochs used to warm up to the base learning rate followed by decay using a cosine schedule. A similar implementation was used for $\mathrm{ViT_{4096}}$ -256, with the model trained for 200,000 iterations using the pre-extracted [CLS] tokens from $\mathrm{ViT_{256}}$ -16. + +Fine-tuning: Following hierarchical pretraining, we use the pretrained weights to initialize (and freeze) the $\mathrm{ViT}_{256}$ -16 and $\mathrm{ViT}_{4096}$ -256 subnetworks, with only a lightweight $\mathrm{ViT}_{\mathrm{WSI}}$ -4096 finetuned. Our work can be viewed as a formulation of MIL that pretrains not only the $[256 \times 256]$ instance-level feature extraction step, but also the downstream aggregation layers which extract coarse-grained morphological features. We finetuned HIPT (and its comparisons) for 20 epochs using the Adam optimizer, batch size of 1 with 32 gradient accumulation steps, and a learning rate of 0.01. For survival prediction, we used the survival cross-entropy loss by Zadeh & Schmidt [79]. + +Tasks & Comparisons.: We experiment on several slide-level classification and survival outcome prediction tasks across different organ types in the TCGA [50]. In comparisons with state-of-the-art weakly-supervised architectures, we tested Attention-Based MIL (ABMIL), and it's variants that use clustering losses (CLAM-SB), clustering prototypes (DeepAttnMISL), modified scoring & pooling functions (DS-MIL), and graph message passing (GCN-MIL), which used the same hyperparameters as HIPT. Since these methods are agnostic of input features, all comparisons used the pretrained $\mathrm{ViT}_{256}-16$ as instance-level fea + +ture extraction. In addition, we also compared variations of HIPT without pretraining and self-attention. Finally, we qualitatively study the attention maps that hierarchical self-supervised ViTs learn in computational histopathology. + +# 4.1. Slide-Level Classification + +Dataset Description. We follow the study design in [53]; we examined the following tasks evaluated using a 10-fold cross-validated AUC: 1) Invasive Ductal (IDC) versus Invasive Lobular Carcinoma (ILC) in Invasive Breast Carcinoma (BRCA) subtyping, 2) Lung Adenocarcinoma (LUAD) versus Lung Squamous Cell Carcinoma (LUSC) in Non-Small Cell Lung Carcinoma (NSCLC) subtyping, and 3) Clear Cell, Papillary, and Chromophobe Renal Cell Carcinoma (CCRCC vs. PRCC vs. CHRCC) subtyping, with all methods finetuned (for 20 epochs) with varying percentage folds of training data $(100\% / 25\%)$ as data efficiency experiments. Despite RCC subtyping being a relative easy slide-level task due to having distinct subtypes, we ultimately include this task as a benchmark for self-supervised comparisons. + +Weakly-Supervised Comparison. Classification results are summarized in Table 1. Overall, across all tasks and different percentage folds, HIPT consistently achieves the highest macro-averaged AUC performance across all tasks. In comparison with the best performing baseline, CLAMSB, HIPT achieves a performance increase of $1.86\%$ $2.59\%$ $0.72\%$ on BRCA, NSCLC and RCC subtyping respectively using $100\%$ of training data, with the margin in performance increase widening to $3.14\%$ $8.33\%$ $1.78\%$ respectively using $25\%$ of training data. Similar performance increases are demonstrated on other tasks. HIPT demonstrates the most robust performance when limiting training data, with AUC decreasing slightly from 0.980 to 0.974. + +K-Nearest Neighbor (KNN). We take the mean embedding + +
ArchitectureIDCCRCCCRCCPRCCLUADSTAD
ABMIL [38]0.487 ± 0.0790.566 ± 0.0750.561 ± 0.0740.671 ± 0.0760.584 ± 0.0540.562 ± 0.049
DeepAttnMISL [78]0.472 ± 0.0230.561 ± 0.0880.521 ± 0.0840.472 ± 0.1620.563 ± 0.0370.563 ± 0.067
GCN-MIL [49,84]0.534 ± 0.0600.538 ± 0.0490.591 ± 0.0930.636 ± 0.0660.592 ± 0.0700.513 ± 0.069
DS-MIL [45]0.472 ± 0.0200.470 ± 0.0530.548 ± 0.0570.654 ± 0.1340.537 ± 0.0610.546 ± 0.047
HIPT0.634 ± 0.0500.608 ± 0.0880.642 ± 0.0280.670 ± 0.0650.538 ± 0.0440.570 ± 0.081
+ +Table 2. Survival Prediction. Ablation study assessing cross-validated c-Index of HIPT across other weakly-supervised architectures. + +of the pre-extracted embeddings, followed by a KNN evaluation for the above tasks. As a baseline, we use a ResNet-50 pretrained on ImageNet to extract patch-level embeddings. We compare with pre-extracted $\mathrm{ViT}_{256}$ -16 patch embeddings from DINO pretraining, and pre-extracted $\mathrm{ViT}_{4096}$ -256 region-level embeddings from hierarchical pretraining, with results summarized also in Table 1. In using the average embedding of each WSI as the "slide-level representation", we find that $\mathrm{ViT}_{4096}$ -256 region-level embeddings in HIPT outperform patch-level embeddings across all tasks, which can be attributed to the broader image contexts used in the WSI for pretraining, and can be intuitively viewed as a closer proxy to the slide-level view than small patches. $\mathrm{ViT}_{4096}$ -256 region-level embeddings surpass the AUC performance of weakly-supervised approaches in BRCA and RCC subtyping using $100\%$ of training data. + +# 4.2. Survival Prediction + +Dataset Description. For survival outcome prediction, we validated on the IDC, CCRCC, PRCC, and LUAD cancer types which have relatively large sample sizes in the TCGA, in addition to Colon & Rectal (CRC) and Stomach Adenocarcinoma (STAD) which have been frequently evaluated in real-world clinical studies due to their substantial human intra-observer variability [24, 66, 73]. All tasks were evaluated using cross-validated concordance index (c-Index). + +Weakly-Supervised Comparison. For the following survival prediction tasks in which learning context-aware relationships are important, we observe much larger increases in performance, summarized in Table 2. Overall, HIPT achieves the best c-Index performance in the IDC, COAD-READ, CCRCC, and STAD cancer types, with the largest improvement demonstrated in IDC (0.634) and COAD-READ (0.608) in comparison to other methods. Though other methods such as GCN-MIL use message passing for learning context-aware features, we note that the number of layers needed to achieve similar image receptive fields may cause the number of neighbors to grow exponentially [47]. In modeling important long-range dependencies between instances using self-attention across various stages of the hierarchy, the Transformer attention in HIPT is able to capture regional perturbations that have been well characterized as + +portending worse outcome across different cancer types, as further visualized in Figure 3, 4 [1,66,73,74]. + +# 4.3. Self-Supervised ViTs Find Unique Morphological Phenotypes + +$\mathrm{ViT}_{256}$ -16 Attention Maps. For $\mathbf{x}_{256}$ patches, we visualize the different attention heads in MHSA and reveal that ViTs in pathology are able to isolate distinct morphological features. From visual assessment by a board-certified pathologist across several different cancer types, we observe that MHSA in $\mathrm{ViT}_{256}$ -16 $(n = 8, h = 6, d = 384)$ captures three distinct fine-grained morphological phenotypes as illustrated in Figure 3, with general stroma tissue and red blood cells attended in $h = 1, 2$ , cells (normal, atypical, lymphocyte) attended in $h = 3, 4$ , and "white spaces" (luminal spaces, fat regions, air pockets) attended in $h = 5, 6$ . This observation is in line with current studies that have introspected self-supervised ViT models, in which the attention heads can be used as a method for object localization or discovery [13, 65]. In the application to histopathology tissue, our introspection reveals that the visual tokens at the $[16 \times 16]$ cell-level directly corroborate with semantic, object-centric structures at the $20 \times$ objective. + +$\mathrm{ViT}_{4096}$ -256 Attention Maps. For $\mathbf{x}_{4096}$ regions, we further visualize the attention heads in MHSA from our pretrained $\mathrm{ViT}_{4096}$ -256 $(n = 4, h = 6, d = 192)$ model, capturing two distinct coarse-grained phenotypes: tumor-stroma interface attended in $h = 1, 2, 3$ , and nested tumor cells and other high tumor cellularity regions in $h = 4, 5, 6$ . In comparison with the $\mathrm{ViT}_{256}$ -16 attention maps which may capture only nuclear features (e.g. - nuclear atypia, shape and size of cells), $\mathrm{ViT}_{4096}$ -256 attention maps are able to model the patterns of nested tumor growth, tumor invasion into fat and stroma regions, and other tissue-to-tissue relationships (Figure 3). In factorizing the attention distribution of $[16 \times 16]$ cells from $\mathrm{ViT}_{256}$ -16 onto highly-attended $[256 \times 256]$ patches from $\mathrm{ViT}_{4096}$ -256, we can create a hierarchical attention map, which is able to distinguish tumor cells in stroma tissue from tumor cells in dense tumor cellularity regions (Figure 4). Overall, these captured coarse- and fine-grained morphological features corroborate with the observed performance increases in both finetuning HIPT in weakly-supervised learning and using averaged HIPT features in KNN evaluation. Additional vi + +![](images/ea06e253df82c8f038dbe3dd862edb326c5980e3f605f76c7b5f9a5cd4112663.jpg) + +![](images/6fb08f1bb746d62f51ab9fb69202799ca6b685be43eb408ab144b81f9cf9fbc2.jpg) + +![](images/c3c8e471a321061342c3096655e1832ca0ffb3a3ce96276b3f6017555f1aff6b.jpg) + +![](images/e2cc8fce4afb33aa1f78b0a1e43baa3a6bb329cb1646bf9d76396429b03687a8.jpg) +Figure 4. Hierarchical Attention Maps in HIPT. For Colorectal Cancer (CRC), we observe similar delineation of stroma, cells, and "white space" presence in $\mathrm{ViT}_{256}$ -16, and localizing tumor invasion into stroma and muscle (A) and poorly-differentiated glands (B) from $\mathrm{ViT}_{4096}$ -256. In factorizing these attention distributions together, we develop hierarchical attention visualizations which can visualize tumor cells with associated stromal tissue and high tumor cellularity regions containing poorly-differentiated glands. + +![](images/b03deadd8cc5a0820bf5a94342f18bd1bb24ca01dc36ac950bd3dd3e7a1adaf4.jpg) + +![](images/cf769bafe20e961f1788c800dc5f4f2a87aecb6ef22ffd0f0ce611642db4bce1.jpg) + +sualizations are found in the Supplement. + +# 4.4. Further Ablation Experiments + +Additional experiments are included in the Supplementary Materials, with main findings highlighted below: + +The role of pretraining. Hierarchical pretraining of $\mathrm{ViT}_{4096}-256$ is an important component in our method, as HIPT variants without pretraining overfit in MIL tasks. + +Comparing patch-level representations. We assessed quality of other embedding types, and found that $\mathrm{ViT}_{256}$ -16 achieves strong representation quality of image patches. + +Organ-specific versus pan-cancer pretraining. We additionally assessed the performance of $\mathrm{ViT}_{256}$ -16 pretraining on different data distributions, with improved performance in cell localization with pan-cancer pretraining. + +# 5. Conclusion + +We believe our work is an important step towards self-supervised slide-level representation learning, demonstrating pretrained and finetuned HIPT features achieve superior performance on weakly-supervised and KNN evaluation respectively. Though DINO was used for hierarchical pretraining with conventional ViT blocks, we hope to explore other pretraining methods such as mask patch prediction [5, 23] and efficient ViT architectures [46, 51, 72, 81]. + +Limitations: A limitation of HIPT is the difficulty in pretraining the last aggregation layer due to the small number of WSI data points. In addition, end-to-end hierarchical pre + +training of HIPT is computationally intractable on commercial workstations, with pretraining needed to be performed in stages. Lastly, the study design of this work has several constraints, such as: 1) excluded slides in each TCGA cohort due to limited tissue content and difficulty patching at $[4096 \times 4096]$ , 2) $\mathrm{ViT}_{256}$ -16 pretraining performed on almost all of TCGA and evaluation lacking independent test cohorts, 3), analysis limited to TCGA, which overrepresents patients with European ancestry and not representative of the rich genetic diversity in the world [67]. + +Broader Impacts: Many problems in biology and medicine have hierarchical-like relationships [34, 48, 55]. For instances, DNA motifs within exon sequences which contributes towards protein structure, gene expression, and genetic traits [3, 21, 40]. Our idea of pretraining neural networks based on hierarchical relationships in large, heterogeneous data modalities to derive a patient- or population-level representation can be extended to other domains. + +# 6. Acknowledgements + +We thank Felix Yu, Ming Y. Lu, Chunyuan Li, and the BioML group at Microsoft Research New England for their feedback. This work was supported in part by the BWH president's fund, BWH & MGH Pathology, Google Cloud Research Award, and NIGMS R35GM138216 (F.M.). R.J.C. was also supported by the NSF Graduate Fellowship. T.Y.C. was also supported by the NIH T32CA251062. R.G.K. gratefully acknowledges funding from CIFAR. + +# References + +[1] Khalid Abdul Jabbar, Shan E Ahmed Raza, Rachel Rosenthal, Mariam Jamal-Hanjani, Selvaraju Veeriah, Ayse Akarca, Tom Lund, David A Moore, Roberto Salgado, Maise Al Bakir, et al. Geospatial immune variability illuminates differential evolution of lung adenocarcinoma. Nature Medicine, pages 1-9, 2020. 2, 7 +[2] Shahira Abousamra, David Belinsky, John Van Arnam, Felicia Allard, Eric Yee, Rajarsi Gupta, Tahsin Kurc, Dimitris Samaras, Joel Saltz, and Chao Chen. Multi-class cell detection using spatial context representation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4005-4014, 2021. 2 +[3] Žiga Avsec, Vikram Agarwal, Daniel Visentin, Joseph R Ledsam, Agnieszka Grabska-Barwinska, Kyle R Taylor, Yannis Assael, John Jumper, Pushmeet Kohli, and David R Kelley. Effective gene expression prediction from sequence by integrating long-range interactions. Nature methods, 18(10):1196-1203, 2021. 8 +[4] Frances R Balkwill, Melania Capasso, and Thorsten Hagemann. The tumor microenvironment at a glance. Journal of cell science, 125(23):5591-5596, 2012. 2 +[5] Hangbo Bao, Li Dong, Songhao Piao, and Furu Wei. BEit: BERT pre-training of image transformers. In International Conference on Learning Representations, 2022. 2, 8 +[6] Andrew H Beck, Ankur R Sangoi, Samuel Leung, Robert J Marinelli, Torsten O Nielsen, Marc J Van De Vijver, Robert B West, Matt Van De Rijn, and Daphne Koller. Systematic analysis of breast cancer morphology uncovers stromal features associated with survival. Science Translational Medicine, 3(108):108ra113-108ra113, 2011. 2 +[7] 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 +[8] Joseph Boyd, Mykola Liashuha, Eric Deutsch, Nikos Paragios, Stergios Christodoulidis, and Maria Vakalopoulou. Self-supervised representation learning using visual field expansion on digital pathology. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 639-647, 2021. 2 +[9] Nadia Brancati, Anna Maria Anniciello, Pushpak Pati, Daniel Riccio, Giosue Scognamiglio, Guillaume Jaume, Giuseppe De Pietro, Maurizio Di Bonito, Antonio Foncubierta, Gerardo Botti, et al. Bracs: A dataset for breast carcinoma subtyping in h&E histology images. arXiv preprint arXiv:2111.04740, 2021. 2 +[10] Wieland Brendel and Matthias Bethge. Approximating cnns with bag-of-local-features models works surprisingly well on imagenet. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019. 2 + +[11] Peter J Burt and Edward H Adelson. The laplacian pyramid as a compact image code. In Readings in computer vision, pages 671-679. Elsevier, 1987. 3 +[12] Gabriele Campanella, Matthew G Hanna, Luke Geneslaw, Allen Miraflor, Vitor Werneck Krauss Silva, Klaus J Busam, Edi Brogi, Victor E Reuter, David S Klimstra, and Thomas J Fuchs. Clinical-grade computational pathology using weakly supervised deep learning on whole slide images. Nature Medicine, 25(8):1301-1309, 2019. 1, 2 +[13] 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. 2, 5, 7 +[14] Joao Carreira, Skanda Koppula, Daniel Zoran, Adria Recasens, Catalin Ionescu, Olivier Henaff, Evan Shelhamer, Relja Arandjelovic, Matt Botvinick, Oriol Vinyals, et al. Hierarchical perceiver. arXiv preprint arXiv:2202.10890, 2022. 3 +[15] Lyndon Chan, Mahdi S Hosseini, Corwyn Rowsell, Konstantinos N Plataniotis, and Savvas Damaskinos. Histosegnet: Semantic segmentation of histological tissue type in whole slide images. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 10662-10671, 2019. 2 +[16] Richard J Chen and Rahul G Krishnan. Self-supervised vision transformers learn visual concepts in histopathology. Learning Meaningful Representations of Life, NeurIPS 2021, 2022. 2 +[17] Richard J Chen, Ming Y Lu, Wei-Hung Weng, Tiffany Y Chen, Drew FK Williamson, Trevor Manz, Maha Shady, and Faisal Mahmood. Multimodal co-attention transformer for survival prediction in gigapixel whole slide images. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4015–4025, 2021. 2, 3 +[18] Ozan Ciga, Tony Xu, and Anne Louise Martel. Self supervised contrastive learning for digital histopathology. Machine Learning with Applications, page 100198, 2021. 2 +[19] Pierre Courtiol, Charles Maussion, Matahi Moarii, Edolie Pronier, Samuel Pilcer, Meriem Sefta, Pierre Manceron, Sylvain Toldo, Mikhail Zaslavskiy, Nolwenn Le Stang, et al. Deep learning-based classification of mesothelioma improves prediction of patient outcome. Nature Medicine, 25(10):1519-1525, 2019. 1 +[20] Olivier Dehaene, Axel Camara, Olivier Moindrot, Axel de Lavergne, and Pierre Courtiol. Self-supervision closes the gap between weak and strong supervision in histology. arXiv preprint arXiv:2012.03583, 2020. 2 +[21] Pinar Demetci, Wei Cheng, Gregory Darnell, Xiang Zhou, Sohini Ramachandran, and Lorin Crawford. Multi-scale inference of genetic trait architecture using biologically annotated neural networks. PLoS genetics, 17(8):e1009754, 2021. 8 +[22] James A. Diao, Jason K. Wang, Wan Fung Chui, Victoria Mountain, Sai Chowdary Gullapally, Ramprakash Srinivasan, Richard N. Mitchell, Benjamin Glass, Sara Hoffman, Sudha K. Rao, Chirag Maheshwari, Abhik Lahiri, Aaditya Prakash, Ryan McLoughlin, Jennifer K. Kerner, Murray B. Resnick, Michael C. Montalto, Aditya Khosla, Ilan N. + +Wapinski, Andrew H. Beck, Hunter L. Elliott, and Amaro Taylor-Weiner. Human-interpretable image features derived from densely mapped cancer pathology slides predict diverse molecular phenotypes. Nature Communications, 12(1), Mar. 2021. 2 +[23] 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 International Conference on Learning Representations, 2021. 2, 3, 4, 8 +[24] Amelie Echle, Niklas Timon Rindtorff, Titus Josef Brinker, Tom Luedde, Alexander Thomas Pearson, and Jakob Nikolas Kather. Deep learning in cancer pathology: a new generation of clinical biomarkers. British Journal of Cancer, 124(4):686-696, Nov. 2020. 7 +[25] Harrison Edwards and Amos J. Storkey. Towards a neural statistician. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net, 2017. 2 +[26] Dumitru Erhan, Aaron Courville, Yoshua Bengio, and Pascal Vincent. Why does unsupervised pre-training help deep learning? In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pages 201-208. JMLR Workshop and Conference Proceedings, 2010. 5 +[27] Haoqi Fan, Bo Xiong, Karttikeya Mangalam, Yanghao Li, Zhicheng Yan, Jitendra Malik, and Christoph Feichtenhofer. Multiscale vision transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6824-6835, 2021. 3 +[28] Tianyu Gao, Xingcheng Yao, and Danqi Chen. SimCSE: Simple contrastive learning of sentence embeddings. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 6894-6910, Online and Punta Cana, Dominican Republic, Nov. 2021. Association for Computational Linguistics. 5 +[29] Yi Gao, William Liu, Shipra Arjun, Liangjia Zhu, Vadim Ratner, Tahsin Kurc, Joel Saltz, and Allen Tannenbaum. Multi-scale learning based segmentation of glands in digital colonrectal pathology images. In Medical Imaging 2016: Digital Pathology, volume 9791, page 97910M. International Society for Optics and Photonics, 2016. 3 +[30] Simon Graham, Quoc Dang Vu, Shan E Ahmed Raza, Ayesha Azam, Yee Wah Tsang, Jin Tae Kwak, and Nasir Rajpoot. Hover-net: Simultaneous segmentation and classification of nuclei in multi-tissue histology images. Medical Image Analysis, 58:101563, 2019. 2 +[31] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. Advances in Neural Information Processing Systems, 34, 2021. 3 +[32] Noriaki Hashimoto, Daisuke Fukushima, Ryoichi Koga, Yusuke Takagi, Kaho Ko, Kei Kohno, Masato Nakaguro, Shigeo Nakamura, Hidekata Hontani, and Ichiro Takeuchi. Multi-scale domain-adversarial multiple-instance cnn for + +cancer subtype classification with unannotated histopathological images. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 3852-3861, 2020. 3 +[33] Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollar, and Ross Girshick. Masked autoencoders are scalable vision learners. arXiv preprint arXiv:2111.06377, 2021. 2 +[34] Geoffrey Hinton. How to represent part-whole hierarchies in a neural network. arXiv preprint arXiv:2102.12627, 2021. 8 +[35] Mahdi S Hosseini, Lyndon Chan, Gabriel Tse, Michael Tang, Jun Deng, Sajad Norouzi, Corwyn Rowsell, Konstantinos N Plataniotis, and Savvas Damaskinos. Atlas of digital pathology: A generalized hierarchical histological tissue type-annotated database for deep learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11747–11756, 2019. 2 +[36] Le Hou, Vu Nguyen, Ariel B Kanevsky, Dimitris Samaras, Tahsin M Kurc, Tianhao Zhao, Rajarsi R Gupta, Yi Gao, Wenjin Chen, David Foran, et al. Sparse autoencoder for unsupervised nucleus detection and representation in histopathology images. Pattern Recognition, 86:188-200, 2019. 2 +[37] Le Hou, Dimitris Samaras, Tahsin M Kurc, Yi Gao, James E Davis, and Joel H Saltz. Patch-based convolutional neural network for whole slide tissue image classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2424-2433, 2016. 1 +[38] Maximilian Ilse, Jakub Tomczak, and Max Welling. Attention-based deep multiple instance learning. In Proceedings of the 35th International Conference on Machine Learning, pages 2132-2141, 2018. 1, 2, 7 +[39] Sajid Javed, Arif Mahmood, Muhammad Moazam Fraz, Navid Alemi Koohbanani, Ksenija Benes, Yee-Wah Tsang, Katherine Hewitt, David Epstein, David Snead, and Nasir Rajpoot. Cellular community detection for tissue phenotyping in colorectal cancer histology images. Medical image analysis, 63:101696, 2020. 1, 2 +[40] John Jumper, Richard Evans, Alexander Pritzel, Tim Green, Michael Figurnov, Olaf Ronneberger, Kathryn Tunyasuvunakool, Russ Bates, Augustin Žídek, Anna Potapenko, et al. Highly accurate protein structure prediction with alphafold. Nature, 596(7873):583-589, 2021. 8 +[41] Jakob Nikolas Kather, Cleo-Aron Weis, Francesco Bianconi, Susanne M Melchers, Lothar R Schad, Timo Gaiser, Alexander Marx, and Frank Gerrit Zöllner. Multi-class texture analysis in colorectal cancer histology. Scientific reports, 6(1):1-11, 2016. 1 +[42] Jan J Koenderink. The structure of images. Biological cybernetics, 50(5):363-370, 1984. 3 +[43] Navid Alemi Koohbanani, Balagopal Unnikrishnan, Syed Ali Khurram, Pavitra Krishnaswamy, and Nasir Rajpoot. Self-path: Self-supervision for classification of pathology images with limited annotations. IEEE Transactions on Medical Imaging, 2021. 2 +[44] Han Le, Rajarsi Gupta, Le Hou, Shahira Abousamra, Danielle Fassler, Luke Torre-Healy, Richard A Moffitt, Tahsin Kurc, Dimitris Samaras, Rebecca Batiste, et al. Uti + +lizing automated breast cancer detection to identify spatial distributions of tumor-infiltrating lymphocytes in invasive breast cancer. The American journal of pathology, 190(7):1491-1504, 2020. 2 +[45] Bin Li, Yin Li, and Kevin W Eliceiri. Dual-stream multiple instance learning network for whole slide image classification with self-supervised contrastive learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14318-14328, 2021. 2, 3, 6, 7 +[46] Chunyuan Li, Jianwei Yang, Pengchuan Zhang, Mei Gao, Bin Xiao, Xiyang Dai, Lu Yuan, and Jianfeng Gao. Efficient self-supervised vision transformers for representation learning. In International Conference on Learning Representations, 2022. 2, 8 +[47] Guohao Li, Matthias Muller, Ali Thabet, and Bernard Ghanem. Deep GCs: Can GCs go as deep as cnns? In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9267-9276, 2019. 7 +[48] Michelle M Li, Kexin Huang, and Marinka Zitnik. Representation learning for networks in biology and medicine: advancements, challenges, and opportunities. arXiv preprint arXiv:2104.04883, 2021. 8 +[49] Ruoyu Li, Jiawen Yao, Xinliang Zhu, Yeqing Li, and Junzhou Huang. Graph cnn for survival analysis on whole slide pathological images. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 174-182. Springer, 2018. 7 +[50] Jianfang Liu, Tara Lichtenberg, Katherine A Hoadley, Laila M Poisson, Alexander J Lazar, Andrew D Cherniack, Albert J Kovatich, Christopher C Benz, Douglas A Levine, Adrian V Lee, et al. An integrated tcga pan-cancer clinical data resource to drive high-quality survival outcome analytics. Cell, 173(2):400-416, 2018. 6 +[51] 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, pages 10012-10022, 2021. 3, 8 +[52] Ming Y Lu, Tiffany Y Chen, Drew FK Williamson, Melissa Zhao, Maha Shady, Jana Lipkova, and Faisal Mahmood. Aibased pathology predicts origins for cancers of unknown primary. Nature, 594(7861):106-110, 2021. 1 +[53] Ming Y Lu, Drew FK Williamson, Tiffany Y Chen, Richard J Chen, Matteo Barbieri, and Faisal Mahmood. Data efficient and weakly supervised computational pathology on whole slide images. Nature Biomedical Engineering, 2020. 1, 2, 6 +[54] Joseph A Ludwig and John N Weinstein. Biomarkers in cancer staging, prognosis and treatment selection. Nature Reviews Cancer, 5(11):845-856, 2005. 1 +[55] Jianzhu Ma, Michael Ku Yu, Samson Fong, Keiichiro Ono, Eric Sage, Barry Demchak, Roded Sharan, and Trey Ideker. Using deep learning to model the hierarchical structure and function of a cell. Nature methods, 15(4):290-298, 2018. 8 +[56] Niccolò Marini, Sebastian Otálora, Francesco Ciompi, Gianmaria Silvello, Stefano Marchesin, Simona Vatrano, Genziana Buttafuoco, Manfredo Atzori, and Henning Müller. Multi-scale task multiple instance learning for the classification of digital pathology images with global annotations. + +In MICCAI Workshop on Computational Pathology, pages 170-181. PMLR, 2021. 3 +[57] Andriy Marusyk, Vanessa Almendro, and Kornelia Polyak. Intra-tumour heterogeneity: a looking glass for cancer? Nature Reviews Cancer, 12(5):323-334, 2012. 2 +[58] Zhu Meng, Zhicheng Zhao, Fei Su, and Limei Guo. Hierarchical spatial pyramid network for cervical precancerous segmentation by reconstructing deep segmentation networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3738-3745, 2021. 3 +[59] Pushpak Pati, Guillaume Jaume, Lauren Alisha Fernandes, Antonio Foncubierta-Rodriguez, Florinda Feroce, Anna Maria Anniciello, Giosue Scognamiglio, Nadia Brancati, Daniel Riccio, Maurizio Di Bonito, et al. Hact-net: A hierarchical cell-to-tissue graph neural network for histopathological image classification. In Uncertainty for Safe Utilization of Machine Learning in Medical Imaging, and Graphs in Biomedical Image Analysis, pages 208-219. Springer, 2020. 2 +[60] Pushpak Pati, Guillaume Jaume, Antonio Foncubierta-Rodriguez, Florinda Feroce, Anna Maria Anniciello, Giosue Scognamiglio, Nadia Brancati, Maryse Fiche, Estelle Dubruc, Daniel Riccio, et al. Hierarchical graph representations in digital pathology. Medical image analysis, 75:102264, 2022. 2 +[61] Azriel Rosenfeld and Mark Thurston. Edge and curve detection for visual scene analysis. IEEE Transactions on computers, 100(5):562-569, 1971. 3 +[62] Charlie Saillard, Olivier Dehaene, Tanguy Marchand, Olivier Moindrot, Aurélie Kamoun, Benoit Schmauch, and Simon Jegou. Self supervised learning improves dMMR/MSI detection from histology slides across multiple cancers. In COM-PAY 2021: The third MICCAI workshop on Computational Pathology, 2021. 2, 3 +[63] Joel Saltz, Rajarsi Gupta, Le Hou, Tahsin Kurc, Pankaj Singh, Vu Nguyen, Dimitris Samaras, Kenneth R Shroyer, Tianhao Zhao, Rebecca Batiste, et al. Spatial organization and molecular correlation of tumor-infiltrating lymphocytes using deep learning on pathology images. Cell reports, 23(1):181-193, 2018. 2 +[64] Zhuchen Shao, Hao Bian, Yang Chen, Yifeng Wang, Jian Zhang, Xiangyang Ji, et al. Transmil: Transformer based correlated multiple instance learning for whole slide image classification. Advances in Neural Information Processing Systems, 34, 2021. 3 +[65] Oriane Simeoni, Gilles Puy, Huy V. Vo, Simon Roburin, Spyros Gidaris, Andrei Bursuc, Patrick Pérez, Renaud Marlet, and Jean Ponce. Localizing objects with self-supervised transformers and no labels. In Proceedings of the British Machine Vision Conference (BMVC), November 2021. 7 +[66] Ole-Johan Skrede, Sepp De Raedt, Andreas Kleppe, Tarjei S Hveem, Knut Liestol, John Maddison, Hanne A Askautrud, Manohar Pradhan, John Arne Nesheim, Fritz Albregtsen, et al. Deep learning for prediction of colorectal cancer outcome: a discovery and validation study. The Lancet, 395(10221):350-360, 2020. 7 +[67] Daniel E Spratt, Tiffany Chan, Levi Waldron, Corey Speers, Felix Y Feng, Olorunseun O Ogunwobi, and Joseph R Os + +borne. Racial/ethnic disparities in genomic sequencing. JAMA oncology, 2(8):1070-1074, 2016. 8 +[68] David Tellez, Geert Litjens, Jeroen van der Laak, and Francesco Ciompi. Neural image compression for gigapixel histopathology image analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2019. 1, 3 +[69] 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. 3 +[70] Jeroen van der Laak, Francesco Ciompi, and Geert Litjens. No pixel-level annotations needed. Nature biomedical engineering, 3(11):855-856, 2019. 1 +[71] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017. 3 +[72] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 568-578, 2021. 3, 8 +[73] Ellery Wulczyn, David F. Steiner, Melissa Moran, Markus Plass, Robert Reihs, Fraser Tan, Isabelle Flament-Auvigne, Trissia Brown, Peter Regitig, Po-Hsuan Cameron Chen, Narayan Hegde, Apaar Sadhwani, Robert MacDonald, Benny Ayalew, Greg S. Corrado, Lily H. Peng, Daniel Tse, Heimo Müller, Zhaoyang Xu, Yun Liu, Martin C. Stumpe, Kurt Zatloukal, and Craig H. Mermel. Interpretable survival prediction for colorectal cancer using deep learning. npj Digital Medicine, 4(1), Apr. 2021. 7 +[74] Ellery Wulczyn, David F Steiner, Zhaoyang Xu, Aparar Sadhwani, Hongwu Wang, Isabelle Flament-Auvigne, Craig H Mermel, Po-Hsuan Cameron Chen, Yun Liu, and Martin C Stumpe. Deep learning-based survival prediction for multiple cancer types using histopathology images. PLoS One, 15(6):e0233678, 2020. 7 +[75] Gang Xu, Zhigang Song, Zhuo Sun, Calvin Ku, Zhe Yang, Cancheng Liu, Shuhao Wang, Jianpeng Ma, and Wei Xu. Camel: A weakly supervised learning framework for histopathology image segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 10682-10691, 2019. 3 +[76] Zichao Yang, Diyi Yang, Chris Dyer, Xiaodong He, Alex Smola, and Eduard Hovy. Hierarchical attention networks for document classification. In Proceedings of the 2016 conference of the North American chapter of the association for computational linguistics: human language technologies, pages 1480-1489, 2016. 2 +[77] Jiawen Yao, Xinliang Zhu, and Junzhou Huang. Deep multi-instance learning for survival prediction from whole slide images. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 496-504. Springer, 2019. 3 +[78] Jiawen Yao, Xinliang Zhu, Jitendra Jonnagaddala, Nicholas Hawkins, and Junzhou Huang. Whole slide images based + +cancer survival prediction using attention guided deep multiple instance learning networks. Medical Image Analysis, 65:101789, 2020. 3, 6, 7 +[79] Shekoufeh Gorgi Zadeh and Matthias Schmid. Bias in cross-entropy-based training of deep survival networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020. 6 +[80] Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Ruslan Salakhutdinov, and Alexander Smola. Deep sets. Advances in Neural Information Processing Systems, 2017. 2 +[81] Pengchuan Zhang, Xiyang Dai, Jianwei Yang, Bin Xiao, Lu Yuan, Lei Zhang, and Jianfeng Gao. Multi-scale vision longformer: A new vision transformer for high-resolution image encoding. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2998-3008, 2021. 3, 8 +[82] Xingxing Zhang, Furu Wei, and Ming Zhou. HIBERT: Document level pre-training of hierarchical bidirectional transformers for document summarization. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5059-5069, Florence, Italy, July 2019. Association for Computational Linguistics. 2, 5 +[83] Zizhao Zhang, Han Zhang, Long Zhao, Ting Chen, Sercan Arik, and Tomas Pfister. Nested hierarchical transformer: Towards accurate, data-efficient and interpretable visual understanding. In AAAI Conference on Artificial Intelligence (AAAI), 2022, 2022. 3 +[84] Yu Zhao, Fan Yang, Yuqi Fang, Hailing Liu, Niyun Zhou, Jun Zhang, Jiarui Sun, Sen Yang, Bjoern Menze, Xinjuan Fan, et al. Predicting lymph node metastasis using histopathological images based on multiple instance learning with deep graph convolution. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4837-4846, 2020. 3, 6, 7 +[85] Xinliang Zhu, Jiawen Yao, Feiyun Zhu, and Junzhou Huang. Wsisa: Making survival prediction from whole slide histopathological images. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7234-7242, 2017. 1, 3 \ No newline at end of file diff --git a/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/images.zip b/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ba85f2f333c872f353565bca4b1bba989ae18b83 --- /dev/null +++ b/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2692f85aaaf1b4cbd21930206a3f8e6e8cd01ec9ec2b113659e95584c3efd88b +size 859619 diff --git a/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/layout.json b/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c3b3dc818f696c6a00c6ffa3c3406292aadbada3 --- /dev/null +++ b/scalingvisiontransformerstogigapixelimagesviahierarchicalselfsupervisedlearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d2600b5617057fb5d37c06d14750b1198815fc622e52bae97cde82b3251666d +size 530928 diff --git a/scanlinehomographiesforrollingshutterplaneabsolutepose/335e5ba7-69dd-45ed-913b-a71e2820e217_content_list.json b/scanlinehomographiesforrollingshutterplaneabsolutepose/335e5ba7-69dd-45ed-913b-a71e2820e217_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f9bfd9298896d1742d99188b1932be8099cb1e57 --- /dev/null +++ b/scanlinehomographiesforrollingshutterplaneabsolutepose/335e5ba7-69dd-45ed-913b-a71e2820e217_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0521a00d22283bb34fe6403fb6b495d7b04802d4f5bde83f288b8e4556ced13b +size 84417 diff --git a/scanlinehomographiesforrollingshutterplaneabsolutepose/335e5ba7-69dd-45ed-913b-a71e2820e217_model.json b/scanlinehomographiesforrollingshutterplaneabsolutepose/335e5ba7-69dd-45ed-913b-a71e2820e217_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a2dda146aa9c3b2d0836ad9a59f9049311c96b80 --- /dev/null +++ b/scanlinehomographiesforrollingshutterplaneabsolutepose/335e5ba7-69dd-45ed-913b-a71e2820e217_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ab928052b0030a5cebecf9215c2e5400357f8d8b738ef8a173f923c2ba188ed +size 102059 diff --git a/scanlinehomographiesforrollingshutterplaneabsolutepose/335e5ba7-69dd-45ed-913b-a71e2820e217_origin.pdf b/scanlinehomographiesforrollingshutterplaneabsolutepose/335e5ba7-69dd-45ed-913b-a71e2820e217_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c4fa211c57e2b3664813f7dc3a306747e67ead76 --- /dev/null +++ b/scanlinehomographiesforrollingshutterplaneabsolutepose/335e5ba7-69dd-45ed-913b-a71e2820e217_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c59247b782ae5c37b364c1125ddfcf6025eab6c3bb64cf2f75b12a02f4d148dd +size 3432372 diff --git a/scanlinehomographiesforrollingshutterplaneabsolutepose/full.md b/scanlinehomographiesforrollingshutterplaneabsolutepose/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4e42cdd1f5bc8f1ece2f9e5c462179abe1671007 --- /dev/null +++ b/scanlinehomographiesforrollingshutterplaneabsolutepose/full.md @@ -0,0 +1,451 @@ +# Scanline Homographies for Rolling-Shutter Plane Absolute Pose + +Fang Bai\*, Agniva Sengupta, Adrien Bartoli ENCOV, TGI, Institut Pascal, UMR6602 CNRS, Université Clermont Auvergne, France + +fang.bai@yahoo.com, i.agniva@gmail.com, adrien.bartoli@gmail.com + +# Abstract + +Cameras on portable devices are manufactured with a rolling-shutter (RS) mechanism, where the image rows (aka. scanlines) are read out sequentially. The unknown camera motions during the imaging process cause the so-called RS effects which are solved by motion assumptions in the literature. In this work, we give a solution to the absolute pose problem free of motion assumptions. We categorically demonstrate that the only requirement is motion smoothness instead of stronger constraints on the camera motion. To this end, we propose a novel mathematical abstraction for RS cameras observing a planar scene, called the scanline-homography, a $3 \times 2$ matrix with 5 DOFs. We establish the relationship between a scanline-homography and the corresponding plane-homography, a $3 \times 3$ matrix with 6 DOFs assuming the camera is calibrated. We estimate the scanline-homographies of an RS frame using a smooth image warp powered by B-Splines, and recover the plane-homographies afterwards to obtain the scanline-poses based on motion smoothness. We back our claims with various experiments. Code and new datasets: https://bitbucket.org/clermontferrand/planarscanlinehomography/src/master/. + +# 1. Introduction + +Many portable devices use cameras based on CMOS sensors equipped with a rolling-shutter (RS) mechanism, owing to its low-power consumption, low-price and high frame rate. In RS cameras, each scanline is exposed and read out sequentially [14] during imaging. This is different from cameras based on CCD sensors which mostly use a global-shutter (GS) mechanism that reads out all pixel rows at the same time. The RS mechanism becomes troublesome when imaging highly dynamic environments or when the camera itself undergoes high-speed motions when reading out those scanlines. In general, the effects are two-folds: + +1) An RS camera violates the conventional pinhole cam + +![](images/d562dc5af07f894702fc36b0dcdb0cc16cd31e16995392a4f2e8da71abed3bb8.jpg) +GS image + +![](images/a9143ef9ac344caf2da480538a5d648f3477197221699938e4c772d3d8b93bee.jpg) +RS image + +![](images/3e81fa3cdf32e54aad477ade5dfd0161f5d5fca1b776feabaa00cc2acfd46cda.jpg) +rectified RS image + +![](images/97dd458c27b49ee79a0431ee235b3d767152aebdef8c83101580846d13867b5f.jpg) +Figure 1. RS image rectification using a GS image as the template. + +![](images/6b0afc2db0fc7d1bc41155213b3c38aed73eed3cef9ed4151f465d81fd264877.jpg) + +![](images/303fef5f991aa5867ef9f6be4667c2c31bb0dff5533497ea8a129f6f564bb0bd.jpg) + +era model used in most vision algorithms [17], as most of them are derived based on the GS and the pinhole camera model [16]. + +2) An RS camera can generate images with unintended artefacts, e.g., distortion and blur. + +The first effect leads to research in RS geometry [9, 14, 26, 43] and the second effect to methods for RS image rectification [15, 27, 38, 40]; see section 2 for a review. All these works, with a few exceptions [28], are based on certain types of motion assumptions, e.g., kinematic models [6, 9, 26, 43, 45], trajectory fitting with polynomials [35, 37, 40] and B-Splines [13, 21, 30, 33, 34], pose interpolation [12, 17, 38], or homography mixtures [15]. + +In this paper, we tackle the RS absolute pose problem, that is to estimate all the scanline poses from a single RS image given a template and RS image rectification. We specifically consider the case of planar objects, where the template is a 2D Euclidean object model [1,2,4,6,23,31]. This problem admits a closed-form solution by using a constant kinematic motion model [1]. However, as we shall show in this paper, it is not trivial at all to solve the problem without motion assumptions. In this work, we only require the camera motion to be smooth; this stems from the RS image being a time-coherent set of scanlines rather than jagged fragments. Aside from this, we do not impose any assumption on the actual type of motion the camera undergoes, i.e., + +the motion can be simple kinematics, complicated dynamics, or even random movements as arbitrary as noise. In addition, we extend the template class to include the case of a GS image photoed by a camera whose principal axis is orthogonal to the planar scene (see Fig. 1) which is easy to obtain in practice. + +Recently, there has been work [28] attempting to explain an RS image as a deformed GS image, based on isometric and conformal shape-from-template (SfT) methods [8]. The underlying idea is that as the RS goes along a certain direction, say the $y$ -direction from top to bottom, the deformation along the $x$ -direction preserves relative distances, resulting in a conformal deformation constraint along the $x$ -direction. However, a general (isometric or conformal) SfT method constrains both $x$ - and $y$ -directions, causing the RS motion to be overconstrained. + +To address the above issues, we propose a novel geometric concept for RS cameras, termed scanline homography. The set of scanline homographies of an RS image defines an image warp, with arbitrary flexibility along the $y$ -direction (the RS direction) which admits all possible camera motions. The $x$ -direction of the warp is constrained by the only admissible geometry, that the $y$ -th scanline is imaged from a line in the template plane. The main contribution of this work is to establish the theory of scanline homographies with the following keypoints: + +- We propose the scanline homography, a novel RS geometric concept given as a $3 \times 2$ matrix, which maps points on one RS scanline to a line in the template plane. +- We establish the fundamental homography equation between a scanline homography and its corresponding plane homography defined from the template to the RS image. +- We estimate scanline homographies parameterised by B-Splines along the RS direction to accommodate flexible camera motions by solving a convex minimisation in closed-form. +- We propose a method to solve the ambiguous fundamental homography equation to recover scanline poses, using an articulated plane homography parameterisation and a GS homography initialisation inspired from motion smoothness. +- We design various experiments to demonstrate the validity of the proposed theory, ranging from absolute pose estimation to image rectification. + +# 2. Related work + +RS geometry. Starting from the first attempt on RS geometric modeling by Geyer et al. [14], various works have been + +carried out to extend the classical GS multiple-view geometric techniques to the RS case, e.g., the RS epipolar constraint [9], the RS homography constraint [26, 44], the RS optical flow equation [43], the RS bundle adjustment [17], the RS stereo-rig [5, 39] and the triangulation from an RS stereo-rig [3]. + +RS absolute pose. The RS absolute pose problem is to estimate scanline poses from a single RS image given a known template. When the template is a Euclidean pointcloud and the camera calibration is known, the problem is termed as the RS perspective-n-point (RS-PnP) problem [1, 2, 4, 6, 23, 31]. Typically, work in this regard assumes that the RS camera moves with constant linear and angular velocity during image acquisition. Ait-Aider et al. [1] proposed a projective RS-PnP formulation by minimizing the reprojection error using nonlinear least-squares. For planar objects, a closed-form solution was also given using homography constraints. An extension to line correspondences was given in [2]. Magerand et al. [31] proposed a globally optimal solution using a linearized Rodrigues formula for rotation parameterization. A set of polynomial equations are constructed and minimized by the Gloptipoly solver. There has been work to derive effective minimal RS-PnP solutions to be used in a RANSAC scheme. In specific, Albl et al. [6] proposed R6P, the first non-iterative minimal RS-PnP solver, using a double linearized RS model and the Gröbner basis solver to solve the polynomial equations. The efficiency of R6P is further improved in [23]. The Cayley parameterization for rotations was studied in [4]. Recently, the RS-PnP with an unknown focal length and radial distortion was considered in [24]. + +RS image rectification. There is a body of work dedicated specially to remove RS distortions, see [7,29] for early work on translation only camera motions. In the case of photoing using cellphones, the camera translation is normally negligible with respect to the scene depth, thus inspiring work based on rotation modeling only [15, 27, 38]. Ringaby et al. [38] parameterized the camera rotation using a smooth curve and SLERP (spherical linear interpolation), and estimated the parameters using nonlinear least-squares. Another representative work came from Grundmann et al. [15] who proposed a calibration-free method using a mixture of homographies. Su et al. [40] used image blur to recover both the latent GS image and camera motions which were parameterized with polynomials, in a unified formulation. Geometric information on the scene, e.g., straightness of lines [37] and orthogonal vanishing directions [35] in a Manhattan world has been exploited. Lao et al. [27] improves over [35, 37] by first fitting parametric curves generated from a constant velocity model, then extracting the motion parameters from fitted curves in an RANSAC scheme. Occlusions were considered in [41] based on a multilayer 3D scene model. Data driven methods were proposed to + +![](images/6bd93b2efc71d8d1e7bc46ac76cc6679a4a1828593db9bec13cc560ac725c548.jpg) +Figure 2. Scanline geometry for RS plane absolute pose. + +learn motion kinematics [36], or depth as well to handle ambiguities [45] using a conventional neural network. These methods work on trained scenes but do not generalize to all scenarios. Recently, Albl et al. [5] showed how to obtain an undistorted GS image from an RS rig with different RS directions. + +# 3. The Scanline Homography Model + +# 3.1. General Points, Plane Homography + +We consider the case where the object is planar, see figure 2. Our template can be both the planar Euclidean object or its image in a GS camera whose principal axis is orthogonal to the object plane. In both cases, a point in the template plane can be written as $[X;Y] \in \mathbb{R}^2$ and parameterized in the homogeneous form as $\mathbf{p} = [X;Y;1] \in \mathbb{R}^3$ . We denote the corresponding point in the RS image plane by $[x;y]$ and its homogeneous representation as $\mathbf{q} = [x;y;1] \in \mathbb{R}^3$ . + +Without loss of generality, we stipulate the RS direction to be the $y$ -axis. Thus, for each $y$ -coordinate, the pixels along the $x$ -coordinate are read out at the same time, which are subject to the same camera pose, termed the $y$ -th scanline pose. For an RS image point $\mathbf{q}$ on the $y$ -th RS scanline, $\mathbf{q}$ is related to its corresponding template point $\mathbf{p}$ by a plane homography [16]: + +$$ +\mathbf {q} \propto \mathbf {H} (y) \mathbf {p}, \tag {1} +$$ + +where $\propto$ means equality up to a non-zero scale. The plane-homography $\mathbf{H}(y)$ is defined as a mapping from the template frame to the RS image frame, thus can be decomposed to obtain the $y$ -th scanline pose. Equation (1) is valid for all $\mathbf{q}$ on the $y$ -th RS scanline, and is only valid for the $y$ -th scanline. + +# 3.2. Scanline Homography + +Derivation. We examine the $y$ -th scanline in the RS image, which is made of points imaged by the RS camera at the same time. The set of points in the template corresponding to this scanline is $\mathbf{p} \propto \mathbf{H}^{-1}(y)\mathbf{q}$ . As each $\mathbf{q}$ has the same $y$ -coordinate because it lies on the $y$ -th scanline, we parameterize $\mathbf{q}$ with its $x$ -coordinate only. For this purpose, we first denote the columns of $\mathbf{H}^{-1}(y)$ as $\mathbf{H}^{-1}(y) \propto [\mathbf{a}_1(y), \mathbf{a}_2(y), \mathbf{a}_3(y)]$ , and write: + +$$ +\mathbf {p} \propto \mathbf {H} ^ {- 1} (y) \mathbf {q} \propto x \mathbf {a} _ {1} (y) + y \mathbf {a} _ {2} (y) + \mathbf {a} _ {3} (y). \tag {2} +$$ + +The above can be written compactly per scanline as: + +$$ +\mathbf {p} \propto \mathbf {J} (y) \left[ \begin{array}{l} x \\ 1 \end{array} \right], \tag {3} +$$ + +where we introduce a novel matrix $\mathbf{J}(y)$ , which we term the scanline homography: + +$$ +\mathbf {J} (y) \stackrel {\text {d e f}} {=} [ \mathbf {a} _ {1} (y), y \mathbf {a} _ {2} (y) + \mathbf {a} _ {3} (y) ] \stackrel {\text {d e f}} {=} [ \mathbf {j} _ {1} (y), \mathbf {j} _ {2} (y) ]. \tag {4} +$$ + +The scanline homography matrix $\mathbf{J}(y)$ defines a mapping that brings an RS image point $\mathbf{q}$ on the $y$ -th scanline to its corresponding point $\mathbf{p}$ in the template plane. Obviously, such a mapping is unique per scanline but varies across different scanlines. We formally denote this mapping, given by a matrix $\mathbf{J}(y) \in \mathbb{R}^{3 \times 2}$ as the scanline homography of the $y$ -th scanline. It is easy to see that a scanline homography is defined up to scale, thus has 5 DOFs. + +Scanline geometry. The scanline homography $\mathbf{J}(y)$ maps the $y$ -th scanline in the RS image to a line in the template plane given as $\ell(y) = \mathbf{j}_1(y) \times \mathbf{j}_2(y)$ , comprising points $x\mathbf{j}_1(y) + \mathbf{j}_2(y)$ parameterized by all $x$ . + +The 5 DOFs of a scanline homography. For a calibrated camera, the 5 DOFs of a scanline homography correspond to the 5 parameters of the scanline's partial pose. This can be understood geometrically. The line $\ell(y)$ in the template plane is defined up to a 1-DOF rotational ambiguity, that is we can rotate $\ell(y)$ arbitrarily along the line itself before applying $\mathbf{H}(y)$ . + +# 3.3. Fundamental Homography Equation + +We introduce matrix $\mathbf{M}(y) = [\mathbf{j}_1(y),\mathbf{0},\mathbf{j}_2(y)]$ , and rewrite equation (3) as: + +$$ +\mathbf {J} (y) \left[ \begin{array}{l} x \\ 1 \end{array} \right] = \mathbf {M} (y) \mathbf {q} \propto \mathbf {p}. \tag {5} +$$ + +Combining equations (1) and (5), we obtain: + +$$ +\mathbf {H} (y) \mathbf {M} (y) \mathbf {q} \propto \mathbf {q}, \tag {6} +$$ + +which is satisfied for each RS image point $\mathbf{q}$ on the $y$ -th scanline. We rewrite this equation explicitly as: + +$$ +\left(\mathbf {H} (y) \mathbf {M} (y) - s \mathbf {I}\right) \mathbf {q} = \mathbf {0}, \tag {7} +$$ + +where $s \neq 0$ is an unknown scalar. Expanding the above matrix form, we have: + +$$ +\left[ \mathbf {H} (y) \mathbf {j} _ {1} (y) - s \mathbf {e} _ {1}, - s \mathbf {e} _ {2}, \mathbf {H} (y) \mathbf {j} _ {2} (y) - s \mathbf {e} _ {3} \right] \left[ \begin{array}{l} x \\ y \\ 1 \end{array} \right] = \mathbf {0}, \tag {8} +$$ + +which is satisfied for all $x$ given $y$ . This implies that $\mathbf{H}(y)\mathbf{j}_1(y) - s\mathbf{e}_1 = \mathbf{0}$ . We thus obtain: + +$$ +\left\{ \begin{array}{l} \mathbf {H} (y) \mathbf {j} _ {1} (y) - s \mathbf {e} _ {1} = \mathbf {0} \\ - y s \mathbf {e} _ {2} + \mathbf {H} (y) \mathbf {j} _ {2} (y) - s \mathbf {e} _ {3} = \mathbf {0}. \end{array} \right. \tag {9} +$$ + +By introducing a matrix: + +$$ +\mathbf {N} (y) = \left[ \mathbf {e} _ {1}, y \mathbf {e} _ {2} + \mathbf {e} _ {3} \right] = \left[ \begin{array}{l l} 1 & 0 \\ 0 & y \\ 0 & 1 \end{array} \right], \tag {10} +$$ + +we arrive at the fundamental homography equation: + +$$ +\mathbf {H} (y) \mathbf {J} (y) = s \mathbf {N} (y) \Leftrightarrow \mathbf {H} (y) \mathbf {J} (y) \propto \mathbf {N} (y). \tag {11} +$$ + +This equation connects a scanline homography and the corresponding plane homography defined in the opposite direction. The fundamental homography equation (11) provides 5 constraints as it is defined up to scale. + +# 3.4. Scanline Homography Estimation + +A scanline homography $\mathbf{J}(y)$ is an element lying in the 5-dimensional projective space $\mathbb{P}^5$ . If the underlying camera motion is smooth, $\mathbf{J}(y)$ changes smoothly across scanlines parameterized in $y$ , forming a smooth curve in $\mathbb{P}^5$ . This curve defines a smooth nonlinear image warp from the RS image plane to the template. + +There exist many ways to parameterize a curve in the projective space. Here we present one as follow: + +$$ +\boldsymbol {\Gamma} (y): \mathbb {R} \rightarrow \mathbb {R} ^ {5}, \quad \mathbf {J} (y) = \left[\begin{array}{c c}\gamma_ {1} (y)&\gamma_ {4} (y)\\\gamma_ {2} (y)&\gamma_ {5} (y)\\\gamma_ {3} (y)&1\end{array}\right], \tag {12} +$$ + +where $\Gamma(y) = [\gamma_1(y), \gamma_2(y), \gamma_3(y), \gamma_4(y), \gamma_5(y)]^\top$ is a curve defined in $\mathbb{R}^5$ , parameterized with respect to $y$ . The bottom-right elements of $\mathbf{J}(y)$ is set to 1 to constrain the scale. We find it reasonable to do so because if that element vanished, an RS image point $\mathbf{q} = [0; y; 1]$ would be mapped to infinity in the template, which is an unfeasible event. The curve $\Gamma(y)$ defined in $\mathbb{R}^5$ thus induces a curve in the projective space $\mathbb{P}^5$ . + +We parameterize $\Gamma(y)$ using polynomials and B-Splines [10, 13, 21, 30, 33, 34], while other options are possible, e.g., polynomials [35, 37, 40], interpolation [12, 17, 38] or mixture models [15] which were all heavily exploited. In any case, we assume each $\gamma_j(y)$ to be written as: + +$$ +\gamma_ {j} (y) = \phi_ {j} (y) ^ {\top} \mathbf {w} _ {j}, \tag {13} +$$ + +where $\phi_j(y) \in \mathbb{R}^m$ denotes a collection of given basis functions, and $\mathbf{w}_j \in \mathbb{R}^m$ the weight parameters to be estimated. + +Given a set of point correspondences $\{\mathbf{p} \leftrightarrow \mathbf{q}\}$ , we estimate $\Gamma(y)$ from the scanline homography definition given in equation (3). Based on parameterization (12), we formulate the following 'algebraic' cost [16]: + +$$ +\min _ {\mathbf {r}} \sum_ {\mathbf {p} \leftrightarrow \mathbf {q}} \left\| \left[ \begin{array}{c c c c} x & & - x X & 1 \\ & x & - x Y & 1 \end{array} \right] \mathbf {F} (y) - \left[ \begin{array}{c} X \\ Y \end{array} \right] \right\| ^ {2}. \tag {14} +$$ + +For $\Gamma(y)$ in the form of equation (13), problem (14) is linear least-squares in $\mathbf{w}_j$ ( $j = 1, \dots, 5$ ), thus is solved in closed-form. In practice, we implemented 1) the linear least-squares solver for input correspondences free of mismatches and 2) an M-estimator for input correspondences potentially contaminated by mismatches. + +# 3.5. Scanline Homographies as an Image Warp + +The smooth scanline homographies $\mathbf{J}(\cdot)$ across all scanlines form a nonlinear image warp $\mathcal{W}$ from the RS image plane to the template plane: + +$$ +\mathcal {W} ([ x; y; 1 ]) \stackrel {{\mathrm {d e f}}} {{=}} \mathbf {J} (y) \left[ \begin{array}{c} x \\ 1 \end{array} \right] \text {f o r a l l} (x, y) \text {i n a n R S i m a g e}. +$$ + +The warp $\mathcal{W}$ captures all possible image distortions caused by camera motions assuming $\mathbf{J}(\cdot)$ is flexible enough in the RS direction $y$ . Note that so far, we have not imposed any assumption on the camera motion. This is fundamentally different from previous works [6,9,12,13,15,17,21,26,30, 33-35,37,38,40,43,45], which make explicit assumptions on the possible motions at this stage. + +The scanline geometry asserts that the $y$ -th scanline corresponds to the line $\ell(y) = \mathbf{j}_1(y) \times \mathbf{j}_2(y)$ in the template plane. This is the only geometry we can tell in an RS camera imaging process. In fact, any geometry across scanlines requires additional motion assumptions. This leads to an obvious flaw in previous isometry and conformity based RS image warps [28], where the warp is constrained in both $x$ - and $y$ -directions. Needless to say, the constraint along $y$ -direction is invalid as it must obviously be motion independent. + +At last, the RS image warp $\mathcal{W}$ induced by scanline homographies is constrained by the scanline geometry, that a scanline is photoed from a line. The isometric and conformal constraints are approximations to this scanline geometry, thus the warps based on isometry and conformity [8,28] are as well approximations to $\mathcal{W}$ while they limit possible camera motions. + +# 4. Scanline Pose Estimation + +We denote the $y$ -th scanline pose as $\mathbf{P}(y) = [\mathbf{R}(y), \mathbf{t}(y)]$ , where $\mathbf{R}(y) = [\mathbf{r}_1(y), \mathbf{r}_2(y), \mathbf{r}_3(y)]$ is the + +rotation and $\mathbf{t}(y)$ the translation. We assume the camera is calibrated, thus $\mathbf{H}(y)$ is the so-called Euclidean homography, with 6 DOFs [11, 32, 42]. We shall give two parameterizations of $\mathbf{H}(y)$ in section 4.1 from the scanline pose $\mathbf{P}(y)$ . + +From equation (11), $\mathbf{J}(y)$ provides only 5 constraints on $\mathbf{H}(y)$ , thus we cannot solve for a unique $\mathbf{H}(y)$ from equation (11). We solve this ambiguity in Section 4.2 in an optimization formulation using an approximate GS initialization. The recovered $\mathbf{H}(y)$ satisfies equation (11) exactly, and lies in the vicinity of the initialization, which ensures smoothness. + +# 4.1. Plane Homography Parameterization + +The template is a Euclidean object. In this case, the scanline pose $\mathbf{P}(y)$ is defined in the object's $XYZ$ -Euclidean coordinate frame. Without loss of generality, we assume the planar object is defined in the $XY$ -plane (i.e., $Z = 0$ ). The plane homography takes the form: + +$$ +\mathbf {H} _ {\text {O b j e c t}} (y) = \left[ \mathbf {r} _ {1} (y), \mathbf {r} _ {2} (y), \mathbf {t} (y) \right]. \tag {15} +$$ + +The template is a GS image. In this case, the scanline pose $\mathbf{P}(y)$ is defined with respect to the camera pose of the GS image. We consider the case where the principal axis of the GS camera is orthogonal to the planar Euclidean object. The plane homography is: + +$$ +\mathbf {H} _ {\text {F r a m e}} (y) = \left[ \mathbf {r} _ {1} (y), \mathbf {r} _ {2} (y), \mathbf {r} _ {3} (y) + \mathbf {t} (y) \right]. \tag {16} +$$ + +A unified parameterization. By noticing that $\mathbf{r}_1(y),\mathbf{r}_2(y),\mathbf{r}_3(y)$ constitute a basis of the Euclidean coordinate frame, we can parameterize the translation $\mathbf{t}(y)$ in this frame and write $\mathbf{t}(y) = t_1\mathbf{r}_1(y) + t_2\mathbf{r}_2(y) + t_3\mathbf{r}_3(y)$ . Following this idea, both the plane homographies $\mathbf{H}_{\mathrm{Object}}(y)$ and $\mathbf{H}_{\mathrm{Frame}}(y)$ can be written as: + +$$ +\mathbf {H} (y) = \left[ \mathbf {r} _ {1} (y), \mathbf {r} _ {2} (y), a \mathbf {r} _ {1} (y) + b \mathbf {r} _ {2} (y) + c \mathbf {r} _ {3} (y) \right]. \tag {17} +$$ + +The above $\mathbf{H}(y)$ has the following structure: + +$$ +\mathbf {H} (y) = \mathbf {R} (y) \mathbf {S} (y), \text {w i t h} \mathbf {S} (y) = \left[ \begin{array}{l l l} 1 & 0 & a \\ 0 & 1 & b \\ 0 & 0 & c \end{array} \right], \tag {18} +$$ + +which is the product of a rotation matrix and an upper triangular matrix. Given $\mathbf{H}(y)$ , the rotation component $\mathbf{R}(y)$ and the translation component $\mathbf{S}(y)$ can be obtained via the QR decomposition of $\mathbf{H}(y)$ . + +# 4.2. Scanline Pose Estimation + +Using equation (18) into equation (11), we have: + +$$ +\mathbf {R} (y) \mathbf {S} (y) \mathbf {J} (y) \propto \mathbf {N} (y), \tag {19} +$$ + +which is the basic equation for scanline pose estimation. Unfortunately, equation (19) provides only 5 constraints while $\mathbf{R}(y)$ and $\mathbf{S}(y)$ contains 6 parameters in total. As a consequence, due to the missing 1 DOF, the recovery of $\mathbf{R}(y)$ and $\mathbf{S}(y)$ from equation (19) is not unique. + +To proceed, we first rewrite the set of solutions of equation (19) as the optimal solutions to the following optimization problem: + +$$ +\left\{ \begin{array}{l} \min _ {s (y), \mathbf {R} (y), \mathbf {S} (y)} \| s (y) \mathbf {R} (y) \mathbf {S} (y) \mathbf {J} (y) - \mathbf {N} (y) \| _ {\mathcal {F}} ^ {2} \\ \text {s . t .} \quad \mathbf {R} (y) ^ {\top} \mathbf {R} (y) = 1, \quad \det (\mathbf {R} (y)) = 1, \end{array} \right. \tag {20} +$$ + +where $s(y) \in \mathbb{R}$ is a scale factor to be determined. The optimal value of problem (20) is always zero, while the optimal solution is not unique. At first, it seems nothing has been achieved from equation (19) to problem (20). However, it gives us the possibility to apply various optimization techniques to further constrain the solution, e.g., via initialization or regularization. We propose a method based on initialization, which solves equation (19) exactly in the vicinity of the initialization. We use the approximate GS pose as initialization, while other initializations (e.g., those from constant velocity models) can be trivially used instead. + +# 4.2.1 Approximate Global-Shutter Pose + +If we ignore the RS effects, all the scanline poses are the same, corresponding to the approximate GS pose, where we denote the related plane homography by $\mathbf{H}_{\mathrm{GS}} = \mathbf{R}_{\mathrm{GS}}\mathbf{S}_{\mathrm{GS}}$ . In specific, $\mathbf{H}(y) = \mathbf{H}_{\mathrm{GS}}$ for all $y$ in a GS approximation. In this case, from equation (4), the first column of $\mathbf{J}(y)$ is independent of $y$ , thus can be used to determine the scale. + +We assume $\mathbf{J}(y)$ has been normalized by its first column so that $\| \mathbf{j}_1(y)\| _2 = 1$ . Equation (11) in the GS approximation then becomes: + +$$ +\mathbf {H} _ {\mathrm {G S}} \mathbf {J} (y) = \mathbf {N} (y), \quad \text {f o r e a c h} y. \tag {21} +$$ + +Given a set of scanlines $y_{1},y_{2},\ldots ,y_{n}$ we can estimate $\mathbf{H}_{\mathrm{GS}}$ in closed-form as: + +$$ +\mathbf {H} _ {\mathrm {G S}} = \mathcal {J N} ^ {\dagger}, \tag {22} +$$ + +with $\mathcal{J} = [\mathbf{J}(y_1),\dots ,\mathbf{J}(y_n)],\mathcal{N} = [\mathbf{N}(y_1),\dots ,\mathbf{N}(y_n)].$ We finally decompose $\mathbf{H}_{\mathrm{GS}}$ to obtain $\mathbf{R}_{\mathrm{GS}}$ and $\mathbf{S}_{\mathrm{GS}}$ + +# 4.2.2 Scanline Pose from Alternations + +Starting from the approximate GS pose given as $\mathbf{R}_{\mathrm{GS}}$ , $\mathbf{S}_{\mathrm{GS}}$ , we alternate the estimation of $\mathbf{R}(y)$ and $\mathbf{S}(y)$ to find a solution to problem (20). This process involves the resolution of $\mathbf{R}(y)$ given $\mathbf{S}(y)$ , and vice versa the resolution of $\mathbf{S}(y)$ given $\mathbf{R}(y)$ . Fortunately both subproblems are solvable in closed-form. + +Estimation of $s(y)$ and $\mathbf{R}(y)$ given $\mathbf{S}(y)$ . This is the scaled special-orthogonal Procrustes problem [18-20] whose solution is: + +$$ +\mathbf {R} (y) = \mathbf {V} \operatorname {d i a g} (1, 1, \det (\mathbf {V U} ^ {\top})) \mathbf {U} ^ {\top}, \tag {23} +$$ + +where $\mathbf{S}(y)\mathbf{J}(y)\mathbf{N}(y)^{\top} = \mathbf{U}\pmb{\Sigma}\mathbf{V}^{\top}$ is the Singular Value Decomposition (SVD) of $\mathbf{S}(y)\mathbf{J}(y)\mathbf{N}(y)^{\top}$ . The optimal scale factor $s(y)$ is given as: + +$$ +s (y) = \frac {\operatorname {t r} (\mathbf {R} (y) \mathbf {S} (y) \mathbf {J} (y) \mathbf {N} (y) ^ {\top})}{\operatorname {t r} (\mathbf {S} (y) \mathbf {J} (y) \mathbf {J} (y) ^ {\top} \mathbf {S} (y) ^ {\top})}. \tag {24} +$$ + +Estimation of $\mathbf{S}(y)$ given $s(y)$ and $\mathbf{R}(y)$ . This is linear least-squares whose solution is: + +$$ +\mathbf {S} (y) = \mathbf {I} + \left(\frac {1}{s (y)} \mathbf {R} (y) ^ {\top} \mathbf {N} (y) - \mathbf {J} (y)\right) \mathbf {v} (y) ^ {\dagger} [ 0, 0, 1 ], \tag {25} +$$ + +with $\mathbf{v}(y) = [0, 0, 1]\mathbf{J}(y)$ , and $\mathbf{v}(y)^{\dagger}$ its Moore-Penrose pseudo-inverse. + +Algorithm. Starting from $\mathbf{R}_{\mathrm{GS}}$ , $\mathbf{S}_{\mathrm{GS}}$ , we alternate between equations (23, 24) and (25) until convergence to obtain the $y$ -th scanline pose. Importantly, we achieve the above results without any motion assumptions, but requiring the RS image to be similar to the GS image which is always true in practice by smoothness. + +# 5. Image Rectification + +From the previous presentation, we have given a solution to RS plane absolute pose without motion assumptions. The computed scanline poses can be used to rectify an RS image such that all its scanlines are arranged in the same camera pose. We choose the pose of an arbitrary scanline $y_0$ as the anchor, and denote its plane homography as $\mathbf{H}(y_0)$ . Then for each RS image pixel coordinate $\mathbf{q}$ on the $y$ -th scanline, we obtain its rectified image coordinate, denoted by $\mathbf{q}'$ , as: + +$$ +\mathbf {q} ^ {\prime} \propto \mathbf {H} (y _ {0}) \mathbf {p} \propto \mathbf {H} (y _ {0}) \mathbf {H} (y) ^ {- 1} \mathbf {q}. \tag {26} +$$ + +We process all scanlines using equation (26) to obtain the rectified image. For images, as $\mathbf{q}'$ is fractional, we use equation (26) with interpolations based on a bilinear kernel. + +# 6. Experimental Results + +# 6.1. Pose Estimation + +We use the synthetic dataset from [12], specifically the 12 RS images from the house.trans_rot1_B40 sequence. The facade of the house is planar (see Fig. 1 for samples). We use the GS image frame09 as the template. This dataset is simulated by a constant velocity model across scanlines and provides ground-truth (GT) scanline poses. + +![](images/b0e090f641dc90e3f3abeeabb1ffd0b929e423681595ac2f5f75c8900e422d39.jpg) + +![](images/863da6c2671093989c63898257ff735178b8038efdf76fc95fc0bead75ab9986.jpg) +Figure 3. An example of estimated scanline-homography $\mathbf{J}(y)$ . We use $\gamma_{6}$ to denote the bottom-right corner element in $\mathbf{J}(y)$ , where $\gamma_{6} = 1$ in equation (12) as shown on the left. For a calibrated camera, we know the first column of $\mathbf{J}(y)$ has unit norm, see Section 4.2.1. We thus normalize $\mathbf{J}(y)$ by the norm of its first column and show such normalized $\mathbf{J}(y)$ on the right. + +The parameterization of scanline homography. For calibrated cameras, by equations (17) and (4), we know that the first column of $\mathbf{J}(y)$ admits unit norm. We thus first show in Fig. 3 that how this normalization constraint affects the complexity of the estimated scanline homography. This result shows how a simple $\mathbf{J}(y)$ parameterization can imply more complex normalized $\mathbf{J}(y)$ . Therefore we suggest using simple parameterizations $\mathbf{J}(y)$ over advanced ones. + +Scanline pose estimation and RS image rectification. We report the pose estimation error in Fig. 4 over two typical $\mathbf{J}(y)$ pramerizations, i.e., polynomials (denoted by p....) and B-splines (denoted by p.....c....). The sequences after p indicate the degree of polynomials and c the number of control points in B-splines, respectively for each curve $\gamma_{j}$ . The result shows that simple parameterizations e.g., p11111, p11122, and p11111-c33333 are almost sufficient in most cases, while other complex parameterizations are prone to overfitting especially when the number of correspondences are low. We provide image rectification examples in Fig. 1, using the polynomial parameterization p11122. Although the scene is not strictly planar, we see that this does not substantially violate the planar model, as shown in the image rectification results. + +# 6.2. Image Rectification + +We provide additional examples on RS image rectification in Fig. 5, using the scanline homography parameterizations p11122 and p22222-c44444. Since existing researches are not dedicated to handle a GS image template explicitly, we use the RS plane relative pose solution [26] based on a constant velocity model as the benchmark algorithm where the template is considered as an RS image in [26]. + +We see that a specific absolute pose problem which handles a GS image template is useful, in particular when the + +![](images/5caa28a3b2d4cdaae67b7d1690150ec708294d3ae0c52281957d9e4628b3dfb1.jpg) +Figure 4. Scanline pose estimation error of the sequence house_trans ROT1_B40 [12] which has 12 frames plotted along the x-axis. We use relative pose error (RPE) [25] to avoid gauge transformations. The sequence after 'p' indicates polynomial-degrees for each curve in $\Gamma(y)$ . The sequence after 'c' indicates the number of control points in the B-spline parameterization. The fitness of the scanline homography $\mathbf{J}(y)$ estimation is computed as the root mean squared error (RMSE) of the optimal cost of equation (14). + +![](images/fb3c98cba5ccabba3ebe2d6d7b54679984135d695d92f4aa3dd8f723cc7b81f6.jpg) + +![](images/8c03ea4cba32088258d50950d3d6cb649a25c407057834db7bc2187d26466ffa.jpg) + +![](images/97c072ba3a8df166ff353972147599afeedeb1304e196435633cb0647bbfbba8.jpg) +Figure 5. Rolling-shutter image rectification from a front-view global-shutter image template. We use handcrafted GS images for the first three rows (images from [17]) and a real GS image for the last row (images from [22]). We compare our RS plane absolute pose solution with the RS plane relative pose solution [26] based on a constant velocity model. The correspondences are plotted as green dots. + +correspondences are sparse, e.g., in the last two rows. With that being said, while a simple polynomial p11122 seems to be sufficient in most cases, an advanced B-spline parameterization can handle larger distortions, e.g., the wooden floor in the first row rectified by p22222-c44444. + +# 6.3. Handling Arbitrary Rolling-Shutter Motions + +To test the limit of the proposed method, we use synthetic data generated with arbitrary RS camera motions. + +Dataset generation. We simulate three challenging RS images using arbitrary motions in Fig. 6. Three different tex- + +tures are mapped to a densely sampled planar surface, resulting in a trivial bijective map from the surface to the texture. Arbitrary smooth motions, generated in $\mathbb{R}^3$ using Bézier curves, are used to transform this template plane. A sequence of images depicting such motions are combined by each scanline to arrive at the final synthetic RS image. + +Pose estimation. We report the scanline pose estimation error in Fig. 7, using the relative pose error as in Fig. 4. Interestingly, we find that the pose estimation results are strongly accurate for motion along X and Y axis, while some loss of accuracy remains for the motion along Z-axis (see the + +![](images/e61977e18496e94ac0ebb9b4f23a527c417bc459131f39fbf540fab399e777a6.jpg) +RS image + +![](images/010fde3373b9199b7f36f846255318f654c73eec794d95ac8e8f0b536b57a499.jpg) +by GT poses + +![](images/31cef2e11399223bfa31e22c53c1b68783f5deb095f36c5fa9d671fc097118df.jpg) +ours:poly:p33333 + +![](images/276ed1735d6bfc0773dcfc833f1b6dad5987cd24ce53e36411fc0dffbd12a05a.jpg) +ours:bs:p33333-c99999 + +![](images/c28efcb0139f5b8a7868806b49acb7a13d2b999ac709654907a5486f0a2c69f2.jpg) +RSPnP [6] + +![](images/4dcb40f3c122668c3334992c5a4392cd1fc9857e989f1480ed657ef2d2a80096.jpg) + +![](images/37a8d8f12bc64698c40413bd8a8e904629acfd53bc7b7eb7cd2dc35f9f70a0c0.jpg) + +![](images/b5e4812648949461bdeda8416f35eec756970f7caedee1ee3b1ad202a0f6cc34.jpg) + +![](images/0aa9ad4e076778777be90aa73dc291e1598fe3e43340b717c14a4931b6661471.jpg) + +![](images/9929ce4780b60cbb3e83b7eea2468c4ade8d03f274dceb59e780778d04a6808f.jpg) + +![](images/c9f03824edff014d8f0656320897d47ad8bfb5977c402b0227bed040db647a0c.jpg) +Figure 6. Rolling-shutter image rectification using the 3D object template. We simulate arbitrary camera motions and use a set of evenly distributed fiducial landmarks. The rectification result obtained using GT poses are given in the second column. We report two results of our method, i.e., poly:p33333 and bs:p33333-c99999. We compare with the standard RS-PnP method [6] based on a linearized motion model. The RS-PnP method [6] is used within a RANSAC scheme, and the inliers admitted by the RS motion model are plotted in red. + +![](images/44c9baf3b4ffd4504c90874c05d85a91c33942a8efc1ed779fd384372e57e246.jpg) + +![](images/e41028a945e219beabc99724604659d5ff2535adb6adb0b18fa1cf7a7caea3e5.jpg) + +![](images/15968d9b0a7a3c9b10dc89d7bcbec438a4a26584213f26fb838cf2e5d16e617d.jpg) + +![](images/7dcf550d2a143af17e6f33e7e14a7e3397168a85c5f8d94a742c8b7197b89c1c.jpg) + +![](images/937d1783689878d11e87fc4f617f955b61624fc398ddfbfa0c83ab2c83624acc.jpg) +Figure 7. Scanline pose estimation error across all parameterizations using the same metrics as explained in Fig. 4. + +![](images/302647f2c2ea8d7f193d5d62e0215677aabdaea00e5f26b06ee1dafc3ea81e6c.jpg) + +![](images/1339baba3567732a5278862e81742ba00a3c3fefcbdb6594abd8261fc69d9fc6.jpg) + +![](images/ff11c76f4d6a3b98489734c45d73699cdc6145ca82d9a06f0b850274fcf89ce9.jpg) + +supplementary material). However, this does not strongly impact image rectification accuracy. + +Image rectification. We report image rectification results in Fig. 6. Despite the complex motions and the ridiculous RS distortions as a consequence, our method can give almost exactly the same rectification result compared with the GT rectification. + +These above results confirm that the proposed method is capable to handle arbitrary motions, assuming the underlying distortion is captured by the correspondences. We release our code and the data for future comparisons. More results are provided in the supplementary material. + +# 7. Conclusion + +We have proposed the scanline homography, a novel mathematical abstraction for planar RS geometry. The scanline homography maps a scanline in the RS image to a line in the template plane. Such geometric constraints induce an image warp, which can be designed to be flexible enough along the RS direction to capture any camera motion. We establish key equations to recover the underlying plane homographies and thus the scanline poses. Experiments on absolute pose estimation and image rectification have validated our claims. Future work will extend our method to non-planar objects and relative pose estimation. + +# References + +[1] Omar Ait-Aider, Nicolas Andreff, Jean Marc Lavest, and Philippe Martinet. Simultaneous object pose and velocity computation using a single view from a rolling shutter camera. In European Conference on Computer Vision, pages 56-68. Springer, 2006. 1, 2 +[2] Omar Ait-Aider, Adrien Bartoli, and Nicolas Andreff. Kinematics from lines in a single rolling shutter image. In 2007 IEEE Conference on Computer Vision and Pattern Recognition, pages 1-6. IEEE, 2007. 1, 2 +[3] Omar Ait-Aider and François Berry. Structure and kinematics triangulation with a rolling shutter stereo rig. In 2009 IEEE 12th International Conference on Computer Vision, pages 1835-1840. IEEE, 2009. 2 +[4] Cenek Albl, Zuzana Kukelova, Viktor Larsson, and Tomas Pajdla. Rolling shutter camera absolute pose. IEEE transactions on pattern analysis and machine intelligence, 42(6):1439-1452, 2019. 1, 2 +[5] Cenek Albl, Zuzana Kukelova, Viktor Larsson, Michal Polic, Tomas Pajdla, and Konrad Schindler. From two rolling shutters to one global shutter. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2505-2513, 2020. 2, 3 +[6] Cenek Albl, Zuzana Kukelova, and Tomas Pajdla. R6P-rolling shutter absolute camera pose. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2292–2300, 2015. 1, 2, 4, 8 +[7] Simon Baker, Eric Bennett, Sing Bing Kang, and Richard Szeliski. Removing rolling shutter wobble. In 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 2392-2399. IEEE, 2010. 2 +[8] Adrien Bartoli, Yan Gérard, Francois Chadebecq, Toby Collins, and Daniel Pizarro. Shape-from-template. IEEE transactions on pattern analysis and machine intelligence, 37(10):2099-2118, 2015. 2, 4 +[9] Yuchao Dai, Hongdong Li, and Laurent Kneip. Rolling shutter camera relative pose: Generalized epipolar geometry. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4132-4140, 2016. 1, 2, 4 +[10] Carl De Boor and Carl De Boor. A practical guide to splines, volume 27. springer-verlag New York, 1978. 4 +[11] Olivier D Faugeras and Francis Lustman. Motion and structure from motion in a piecewise planar environment. International Journal of Pattern Recognition and Artificial Intelligence, 2(03):485-508, 1988. 5 +[12] Per-Erik Forssén and Erik Ringaby. Rectifying rolling shutter video from hand-held devices. In 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 507-514. IEEE, 2010. 1, 4, 6, 7 +[13] Paul Furgale, Timothy D Barfoot, and Gabe Sibley. Continuous-time batch estimation using temporal basis functions. In 2012 IEEE International Conference on Robotics and Automation, pages 2088-2095. IEEE, 2012. 1, 4 +[14] Christopher Geyer, Marci Meingast, and Shankar Sastry. Geometric models of rolling-shutter cameras. 6th Workshop on Omnidirectional Vision, 1:4, 2005. 1, 2 + +[15] Matthias Grundmann, Vivek Kwatra, Daniel Castro, and Irfan Essa. Calibration-free rolling shutter removal. In 2012 IEEE international conference on computational photography (ICCP), pages 1-8. IEEE, 2012. 1, 2, 4 +[16] R. I. Hartley and A. Zisserman. Multiple View Geometry in Computer Vision. Cambridge University Press, ISBN: 0521540518, second edition, 2004. 1, 3, 4 +[17] Johan Hedborg, Per-Erik Forssén, Michael Felsberg, and Erik Ringaby. Rolling shutter bundle adjustment. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pages 1434-1441. IEEE, 2012. 1, 2, 4, 7 +[18] Berthold KP Horn. Closed-form solution of absolute orientation using unit quaternions. Josa a, 4(4):629-642, 1987. 6 +[19] Berthold KP Horn, Hugh M Hilden, and Shahriar Negahdaripour. Closed-form solution of absolute orientation using orthonormal matrices. JOSA A, 5(7):1127-1135, 1988. 6 +[20] Ken-ichi Kanatani. Analysis of 3-d rotation fitting. IEEE Transactions on pattern analysis and machine intelligence, 16(5):543-549, 1994. 6 +[21] Christian Kerl, Jorg Stuckler, and Daniel Cremers. Dense continuous-time tracking and mapping with rolling shutter rgb-d cameras. In Proceedings of the IEEE international conference on computer vision, pages 2264-2272, 2015. 1, 4 +[22] Jae-Hak Kim, Cesar Cadena, and Ian Reid. Direct semidense slam for rolling shutter cameras. In 2016 IEEE International Conference on Robotics and Automation (ICRA), pages 1308-1315. IEEE, 2016. 7 +[23] Zuzana Kukelova, Cenek Albl, Akihiro Sugimoto, and Tomas Pajdla. Linear solution to the minimal absolute pose rolling shutter problem. In Asian Conference on Computer Vision, pages 265-280. Springer, 2018. 1, 2 +[24] Zuzana Kukelova, Cenek Albl, Akihiro Sugimoto, Konrad Schindler, and Tomas Pajdla. Minimal rolling shutter absolute pose with unknown focal length and radial distortion. In European Conference on Computer Vision, pages 698-714. Springer, 2020. 2 +[25] Rainer Kümmerle, Bastian Steder, Christian Dornhege, Michael Ruhnke, Giorgio Grisetti, Cyril Stachniss, and Alexander Kleiner. On measuring the accuracy of slam algorithms. Autonomous Robots, 27(4):387-407, 2009. 7 +[26] Yizhen Lao and Omar Ait Aider. Rolling shutter homography and its applications. IEEE transactions on pattern analysis and machine intelligence, 2020. 1, 2, 4, 6, 7 +[27] Yizhen Lao and Omar Ait-Aider. A robust method for strong rolling shutter effects correction using lines with automatic feature selection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4795-4803, 2018. 1, 2 +[28] Yizhen Lao, Omar Ait-Aider, and Adrien Bartoli. Solving rolling shutter 3d vision problems using analogies with non-rigidity. International Journal of Computer Vision, 129(1):100-122, 2021. 1, 2, 4 +[29] Chia-Kai Liang, Li-Wen Chang, and Homer H Chen. Analysis and compensation of rolling shutter effect. IEEE Transactions on Image Processing, 17(8):1323-1330, 2008. 2 + +[30] Steven Lovegrove, Alonso Patron-Perez, and Gabe Sibley. Spline fusion: A continuous-time representation for visual-inertial fusion with application to rolling shutter cameras. In BMVC, volume 2, page 8, 2013. 1, 4 +[31] Ludovic Magerand, Adrien Bartoli, Omar Ait-Aider, and Daniel Pizarro. Global optimization of object pose and motion from a single rolling shutter image with automatic 2D-3D matching. In European Conference on Computer Vision, pages 456-469. Springer, 2012. 1, 2 +[32] Ezio Malis and Manuel Vargas. Deeper understanding of the homography decomposition for vision-based control. PhD thesis, INRIA, 2007. 5 +[33] Luc Oth, Paul Furgale, Laurent Kneip, and Roland Siegwart. Rolling shutter camera calibration. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1360-1367, 2013. 1, 4 +[34] Alonso Patron-Perez, Steven Lovegrove, and Gabe Sibley. A spline-based trajectory representation for sensor fusion and rolling shutter cameras. International Journal of Computer Vision, 113(3):208-219, 2015. 1, 4 +[35] Pulak Purkait, Christopher Zach, and Ales Leonardis. Rolling shutter correction in Manhattan world. In Proceedings of the IEEE International Conference on Computer Vision, pages 882-890, 2017. 1, 2, 4 +[36] Vijay Rengarajan, Yogesh Balaji, and AN Rajagopalan. Unrolling the shutter: CNN to correct motion distortions. In Proceedings of the IEEE Conference on computer Vision and Pattern Recognition, pages 2291-2299, 2017. 3 +[37] Vijay Rengarajan, Ambasamudram N Rajagopalan, and Rangarajan Aravind. From bows to arrows: Rolling shutter rectification of urban scenes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2773-2781, 2016. 1, 2, 4 +[38] Erik Ringaby and Per-Erik Forssén. Efficient video rectification and stabilisation for cell-phones. International journal of computer vision, 96(3):335–352, 2012. 1, 2, 4 +[39] Olivier Saurer, Kevin Koser, Jean-Yves Bouguet, and Marc Pollefeys. Rolling shutter stereo. In Proceedings of the IEEE International Conference on Computer Vision, pages 465-472, 2013. 2 +[40] Shuochen Su and Wolfgang Heidrich. Rolling shutter motion deblurring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1529-1537, 2015. 1, 2, 4 +[41] Subeesh Vasu, AN Rajagopalan, et al. Occlusion-aware rolling shutter rectification of 3D scenes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 636-645, 2018. 2 +[42] Zhongfei Zhang and Allen R Hanson. 3D reconstruction based on homography mapping. Proc. ARPA96, pages 1007-1012, 1996. 5 +[43] Bingbing Zhuang, Loong-Fah Cheong, and Gim Hee Lee. Rolling-shutter-aware differential SfM and image rectification. In Proceedings of the IEEE International Conference on Computer Vision, pages 948-956, 2017. 1, 2, 4 +[44] Bingbing Zhuang and Quoc-Huy Tran. Image stitching and rectification for hand-held cameras. In European Conference on Computer Vision, pages 243-260. Springer, 2020. 2 + +[45] Bingbing Zhuang, Quoc-Huy Tran, Pan Ji, Loong-Fah Cheong, and Manmohan Chandraker. Learning structure-and-motion-aware rolling shutter correction. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4551-4560, 2019. 1, 3, 4 \ No newline at end of file diff --git a/scanlinehomographiesforrollingshutterplaneabsolutepose/images.zip b/scanlinehomographiesforrollingshutterplaneabsolutepose/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..32446d422ff0426e245234278b09a20b5fb74444 --- /dev/null +++ b/scanlinehomographiesforrollingshutterplaneabsolutepose/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a83acdccb3eb4bdca6d4e27403ca60324664de0f05e6c2166f70b3f7ab6c5b55 +size 834008 diff --git a/scanlinehomographiesforrollingshutterplaneabsolutepose/layout.json b/scanlinehomographiesforrollingshutterplaneabsolutepose/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..b5848910529eec51874d8947a6a41a2a5c97bddd --- /dev/null +++ b/scanlinehomographiesforrollingshutterplaneabsolutepose/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9e719825a28f52b9427578b0b53276abd432fbb20c986313065194402c9da59 +size 525031 diff --git a/scanqa3dquestionansweringforspatialsceneunderstanding/fa11e694-c228-4750-bbb1-781fa0321fec_content_list.json b/scanqa3dquestionansweringforspatialsceneunderstanding/fa11e694-c228-4750-bbb1-781fa0321fec_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d4339115c4a62c512217332669301abc1a66e5d2 --- /dev/null +++ b/scanqa3dquestionansweringforspatialsceneunderstanding/fa11e694-c228-4750-bbb1-781fa0321fec_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2dbad398cea5a776a300dcf8ecb3adf68ee0c1b709532a7443315b9cc5784fa +size 82210 diff --git a/scanqa3dquestionansweringforspatialsceneunderstanding/fa11e694-c228-4750-bbb1-781fa0321fec_model.json b/scanqa3dquestionansweringforspatialsceneunderstanding/fa11e694-c228-4750-bbb1-781fa0321fec_model.json new file mode 100644 index 0000000000000000000000000000000000000000..97c456bfe17c9c3da06f4252e50c7a75c95f7869 --- /dev/null +++ b/scanqa3dquestionansweringforspatialsceneunderstanding/fa11e694-c228-4750-bbb1-781fa0321fec_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3eb7349f17d8e654c2feb24392d7f96a2835a93c00d3360a30ae65b8fe2d8a5d +size 105083 diff --git a/scanqa3dquestionansweringforspatialsceneunderstanding/fa11e694-c228-4750-bbb1-781fa0321fec_origin.pdf b/scanqa3dquestionansweringforspatialsceneunderstanding/fa11e694-c228-4750-bbb1-781fa0321fec_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3d35f396f0585216a88e2e1181b10a7b40e5a559 --- /dev/null +++ b/scanqa3dquestionansweringforspatialsceneunderstanding/fa11e694-c228-4750-bbb1-781fa0321fec_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94a924d0f19886489ac970a04427c46ac996a153fd688dacd9717aa6bb14bb94 +size 3815629 diff --git a/scanqa3dquestionansweringforspatialsceneunderstanding/full.md b/scanqa3dquestionansweringforspatialsceneunderstanding/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5b6ce9631c60ec81b36e2c005214298dc16792ef --- /dev/null +++ b/scanqa3dquestionansweringforspatialsceneunderstanding/full.md @@ -0,0 +1,317 @@ +# ScanQA: 3D Question Answering for Spatial Scene Understanding + +Daichi Azuma* Kyoto University + +Taiki Miyanishi* ATR, RIKEN AIP + +Shuhei Kurita* +RIKEN AIP, JST PRESTO + +Motoaki Kawanabe ATR, RIKEN AIP + +# Abstract + +We propose a new 3D spatial understanding task for 3D question answering (3D-QA). In the 3D-QA task, models receive visual information from the entire 3D scene of a rich RGB-D indoor scan and answer given textual questions about the 3D scene. Unlike the 2D-question answering of visual question answering, the conventional 2D-QA models suffer from problems with spatial understanding of object alignment and directions and fail in object localization from the textual questions in 3D-QA. We propose a baseline model for 3D-QA, called the ScanQA1, which learns a fused descriptor from 3D object proposals and encoded sentence embeddings. This learned descriptor correlates language expressions with the underlying geometric features of the 3D scan and facilitates the regression of 3D bounding boxes to determine the described objects in textual questions. We collected human-edited question-answer pairs with free-form answers grounded in 3D objects in each 3D scene. Our new ScanQA dataset contains over 41k question-answer pairs from 800 indoor scenes obtained from the ScanNet dataset. To the best of our knowledge, ScanQA is the first large-scale effort to perform object-grounded question answering in 3D environments. + +# 1. Introduction + +In recent years, significant advances have been achieved in vision-and-language tasks and datasets, and several new datasets have been created to develop models that understand textual expressions, such as captions or questions, which are grounded in two-dimensional (2D) images, such as image captioning [12, 42], understanding referring expressions [25, 50], image region and phrase correspondence [37], and visual question answering (VQA) [6, 20, 23]. VQA is successful in grasping object features visualized in 2D frames. However, when we develop models that understand the spatial information of 3D scenes, such as "What is between the table and TV set?" or "Where is the + +![](images/d3748f9afae8785673d5bef6c44514ca53ccb38752c3e3358798e59f7bb657c9.jpg) +Question + 3D-Scan +Q. Where is the medium sized blue suitcase laid? + +![](images/ee5a1c6f86c3087134f9cf0c8822b4945f1fa4674e0502497ac048661630fdb8.jpg) +A. in front of right bed + +![](images/2f234cf8c79b641c962d57052b5f9583a3374933146b13055aefaf2d9f158d3a.jpg) +Q. What is sitting on the floor between the tv and the wooden chair? +Figure 1. We introduce the new task of question answering for 3D modeling. Given inputs of an entire 3D modeling and a linguistic question, models predict an answer phrase and the corresponding 3D-bounding boxes. + +![](images/ce1071e5b57fe5340c4b1f5c26e7017d7ae9f825e042ed71a2f5d380b0320085.jpg) +A. 2 black backpacks + +suitcase located?", the existing models based on 2D images have several challenges in accurately understanding the 3D world. For example, 2D images lack an accurate sense of the relative directions and distances in the 3D scenes, i.e., the stereoscopic attribute-perception problem. Some objects are hidden by other objects when they overlap, i.e., the occlusion problem. When multiple images are used in 2D-image-based question answering models, such models often encounter difficulties in tracking and recognizing whether some objects are the same object between images, i.e., the object localization and identification problem. + +Currently, 3D spatial-understanding models can be developed for the 3D object localization task of ScanRefer [10], the dialog-based localization of ReferIt3D [1], and the 3D object captioning task of Scan2Cap [13]. Embodied question answering [17, 46, 49] is an important task for navigating agents in a 3D scene. We consider that 3D spatial understanding datasets contribute to developing models that comprehend the embodied 3D scene and ask and answer questions about the 3D environment as humans do. However, unlike their 2D image counterparts, question answering datasets on 3D environmental annotations + +are still limited in terms of dataset size and question variety because existing datasets often rely on template-based question-answer collections. + +In this paper, we propose a 3D question answering (3D-QA) task that uses 3D spatial information instead of 2D images to comprehend real-world information through the question answering form. In the 3D-QA task, models answer a question for a 3D scene as well as the object localization described in the question. We present the overview of the task in Fig. 1. This 3D-QA task setting is reasonable when external sensors or mobile robots collect sufficient visual information to construct a 3D scene before the QA task. We assume that this is plausible when the model can use the preliminarily captured visual information from the 3D scene because of prior navigation in the scene, such as vision-and-language navigation [5]. This task is also applicable to real-world services that use preliminarily extracted 3D scenes, such as interactive virtual room-viewing services or searching in indoor scenes. + +For the 3D-QA task, we developed a novel ScanQA dataset based on RGB-D scans of an indoor scene and annotations derived from the ScanNet dataset [15]. We automatically generated questions from the object captions of ScanRefer [10] using question generation models. However, these auto-generated questions included many invalid questions; therefore, we filtered the invalid questions and refined them if necessary. We collected free-form answers and object annotations from humans using a newly developed interactive 3D scene viewer. In total, we gathered 41k question-answer pairs with 32k unique questions. We propose a 3D-QA model with textual and 3D scene encoding and several baseline models, including 2D image models (2D-QA), a combination of 3D object localization models [10, 38], and a question answering model [51]. We confirmed that the ScanQA model outperformed the baseline models in most evaluations, including exact matching and image captioning metrics in the proposed ScanQA dataset. + +# 2. Related work + +The 3D-QA task is similar to existing visual question answering and 3D embodied question answering. We place our task as a spatial comprehension of the entire 3D scene given linguistic questions. + +# 2.1. Visual Question Answering + +Visual question answering (VQA) is a task in which models are given a 2D image and a question about its content. They are expected to provide an appropriate answer. Question answering in 2D images was proposed by Malinowski et al. [34], and various inference methods [4,6,51] have since been proposed. One of the best VQA methods is Oscar [30], which uses Mask R-CNN to infer a solution by considering the relationship between individual objects + +in the image. In addition, Jang et al. [24] proposed a question answering method that considers more detailed vision and motion information using video. ClipBERT [29] improved its accuracy by dividing a video into clips and reasoning from them individually. VQA $360^{\circ}$ [14] is a task for answering questions about a $360^{\circ}$ image. Although VQA $360^{\circ}$ contributes to understanding the 3D scene, the available information is limited compared with the ScanQA dataset. Our dataset also includes the object identification task, which is different from the existing VQA $360^{\circ}$ dataset. + +# 2.2. 3D Object Localization with Language + +ScanRefer [10] localizes an object referred to in a freeform text description. The ScanRefer model identifies a 3D-bounding box for an object given the input description. This dataset is based on 800 scenes derived from the ScanNet dataset [15]. In addition to answering questions on 3D scenes, the 3D-QA task also includes an object localization task for objects that appear in the question answering. Unlike in the ScanRefer task, the objects in ScanQA object localization can be multiple because multiple objects can appear in a single question. + +# 2.3. Question Answering in 3D scenes + +Unlike 2D-QA, for which many datasets have been proposed, 3D question answering datasets are still limited. We notice that the existing question answering tasks on 3D scenes have interactive forms. The interactive QA dataset (IQUAD) [19] on AI2THOR [27] enables model agents to interact with objects in a scene to determine the answer to a question. Embodied question answering (EQA) [17,46,49] is a combination of visual question answering and navigation such as vision-and-language navigation tasks [5, 11, 43, 47] and models [18, 28]. In the original EQA dataset [17], the embodied model agent receives a question such as "What color is the car?" and navigate to the object described in the question in House 3D [47]. MP3D-EQA [46] is a photorealistic embodied QA for Matterport 3D scans [9]. MT-EQA [49] is a multitarget variation of EQA. We summarize the relation of these datasets with ScanQA in Table 1. Unlike these datasets, the ScanQA dataset is not created from fixed templates and hence includes more natural and a significantly larger number of unique questions, as discussed in Sec. 3.3. + +# 3. ScanQA Dataset + +We hereby define the 3D-QA task and describe the collection of the corresponding dataset. + +# 3.1. 3D-QA Task + +As illustrated in Fig. 1, a 3D-QA task requires models to answer a question when given all the information of a 3D + +
3D-QA DatasetsTypeQuestion CollectionAnswer CollectionEnvironmentPhotorealistic# 3D Scenes
IQUADInteractiveTemplate-basedTemplate-basedAI2THORNo30 rooms
EQANavigationTemplate-basedTemplate-basedHouse3DNo588 scenes
MP3D-EQANavigationTemplate-basedTemplate-basedMatterport 3DYes144 floors
MT-EQANavigationTemplate-basedTemplate-basedHouse3DNo588 scenes
ScanQA dataset3D ScanAutoGen+HumanEditHumanScanNetYes800 rooms
+ +scene. Here, models use the 3D spatial information, such as RGB-D scans or point cloud data. We also require models to specify the 3D-bounding boxes of objects that are related to this question answering. This prevents models from answering questions by relying on the textual priors of the trained questions without examining the scene. However, unlike the ScanRefer dataset, we do not require models to target one described object for each question. This is because multiple objects can be used to answer certain questions. For example, the question "What color is the chairs around the table?" is related to multiple objects. This question is also answerable as long as the chairs around the unique table in the scene have the same color. In such scenarios, we require models to answer the question addressing multiple 3D-bounding boxes. + +# 3.2. Question-Answer Collection + +The ScanQA dataset was created using multiple phrases, including automatic QA generation [2, 8, 32, 48], question filtering, question editing, and answer collection. First, we automatically generated question-answer pairs from the referring expressions to identify objects in 3D scenes obtained from the ScanRefer dataset [10]. We applied the question-and-answer generation model based on a T5-base model [40] trained on a text-based question answering dataset [41] for ScanRefer captions and obtained the seed questions. However, these autogenerated question-answer pairs included many inadequate questions, such as those that are underspecified or not grounded in the scene, as presented in Fig. 2. Auto-generated questions also include easy questions that can be answered with common sense. Therefore, we decided to remove such questions as much as possible. We also did not include auto-generated answers in the final dataset because it was not clear that they were grounded in scenes. Then, we applied filtering and editing to the seed questions with basic rules and human editing in addition to the answer collection via Amazon Mechanical Turk (MTurk). For human editing and answer collection, we developed an interactive visualization website for each 3D scene that enables workers to interact with the 3D scene and check the object names and IDs if they are available. Following the ScanRefer dataset, we attached the object names and IDs for the objects in the 3D scene. We + +Table 1. Comparison of 3D question-answering datasets. + +
Split# Question# Unique Question# 3D Scenes
Train25,56320,546562
Val4,6754,30671
Test w/ objects4,9764,55270
Test w/o objects6,1495,48497
Total41,36332,337800
+ +Table 2. ScanQA dataset statistics. + +embedded this site into the MTurk task page (Fig. 2). + +The filtering and editing of the seed questions were conducted as follows. First, we filtered the inadequate questions from the auto-generated seed questions using basic rules. Subsequently, we asked the workers to classify the remaining questions into four classes: valid, too easy, unanswerable, and unclear questions. Each question was evaluated by at least three workers. We selected questions in which two or more workers were marked as valid for the next phrase of the editing and answer collection process. In the editing and answer collection, we first presented the filtered questions to workers and requested them to rewrite the questions themselves if they were inadequate for the scene before writing a free-form answers. Multiple answers are collected when necessary. We also collected the object IDs that were used in the question to identify the object in the scene in this phrase. See SM D for details. + +# 3.3. Dataset Statistics + +We collected 41,363 questions and 58,191 answers, including 32,337 unique questions and 16,999 unique answers. Table 2 presents the statistics of the ScanQA dataset. This dataset is an order of magnitude larger than existing embodied question-answering datasets in terms of both question size and variation. For example, the EQA dataset [17] contains 4,246 questions, consisting of 147 unique questions in its training set. The EQA-MP3D dataset [46] contains 767 questions consisting of 174 unique questions in its training set. Considering that our dataset contains not only question-answer pairs but also 3D object localization annotations, we assume that this is the largest dataset to specify the nature of objects in 3D scenes with the question answering form. The distribution of the questions based on their first word is shown in Fig. 3. We collected various types of questions through question auto-generation and editing by humans. + +We followed the training, validation, and test set splits + +![](images/41ea0d303bfc5951c1dbb19d0caae916ef0c53b437e79436730fba8a188ebb23.jpg) + +# Underspecified questions + +Q: What is in the corner? +- Several objects at corners! +Q: What color is the chair? +- Three chairs at the scene! + +# Valid questions + +Q: What is over the chair beneath the blackboard? +- Answer: jacket +Q: What color is the office chair next to the desk with a monitor? +- Answer: green + +used in ScanRefer. However, as the object IDs for the test set of ScanRefer are not publicly available, we further split the validation set of ScanRefer into two-holds as the validation set and test set with object annotations in the ScanQA dataset. Therefore, the ScanQA dataset includes two test sets with and without object annotations. We collected at least two answers for each question in the validation and two test sets to evaluate the free-form answers. As our dataset includes the question type of "Where is," writing expressions for answers can vary. Therefore, we adopted evaluation metrics for image captioning in addition to an exact match to the annotated answers in the evaluation. + +# 4. ScanQA Model + +We introduce the baseline model of ScanQA for the 3D-QA task. The 3D-QA is formalized as follows: given inputs of the point cloud $p \in \mathcal{P}$ and question $q \in \mathcal{Q}$ about the 3D scene, the 3D-QA model aims to output $\hat{a}$ that semantically matches true answer $a^*$ . + +3D feature representation. We primarily use the input point cloud $p$ consisting of point coordinates $c \in \mathbb{R}^3$ in the 3D space for 3D representation. Following previous 3D and language research [10, 13], we use additional point features such as the height of the point, colors, normals, and multiview image features [16] that project 2D appearance features to the point cloud. We use these combined point features as 3D features $r \in \mathbb{R}^{135}$ . + +![](images/9735e1f17a2dd61b5f210265771e4e8622b3d7b3fae1e8d121b68649c8e9669f.jpg) +Figure 2. Underspecified and valid questions for an office room scene. We presented scenes with object IDs and names to MTurk workers for the dataset collection. +Figure 3. The distribution of the question types by the beginning of the question writing. + +Overview of network architecture. To solve the 3D-QA task, we developed a ScanQA model consisting of a 3D & language encoder, 3D & language fusion, and object localization & QA layers. An overview of the proposed ScanQA network is presented in Fig. 4. The 3D & language encoder layer transforms the question into contextualized word representations and point clouds into object proposals. The 3D & language fusion layer combines multiple 3D object features guided by language information using transformer-based encoder and decoder layers [44, 51]. The object localization & QA layer estimates the target object box and object labels and predicts answers associated with questions and scene content. + +3D & language encoder layers. This layer encodes the question words $\{w_i\}_{i=1}^{n_q}$ using GloVe [36], and we obtain word representation $Q \in \mathbb{R}^{n_q \times 300}$ , where $n_q$ is the number of words in question, and feeds them into a one-layer bidirectional long short-term memory (biLSTM) [22] for word sequence modeling. We project a series of output states from the LSTM using a nonlinear layer with GELUs [21] activation to obtain the contextualized word representation $Q' \in \mathbb{R}^{n_q \times d}$ , where $d$ is the hidden size of the biLSTM (set to 256). In addition, this layer detects objects in a scene based on point cloud features $r \in \mathbb{R}^{135}$ using VoteNet [38], which uses PointNet++ [39] as a backbone network. We obtain the object proposals (object boxes) from VoteNet and project them using a nonlinear layer with GELUs activation to obtain the object proposal representation $V \in \mathbb{R}^{n_v \times d}$ , where $n_v$ is the number of object proposals (set to 256.) +3D & language fusion layer. Inspired by the architecture of deep modular co-attention networks of MCAN [51], often used for VQA, we use transformer blocks [44] to represent the relationships between object proposals and between question words. After feeding contextual question represen + +![](images/ac0eccc77fa790e4fa810e05ffba66c2fd30cfb43c0b9689bd9939d8dcc58d2b.jpg) +Figure 4. ScanQA model for answering 3D environments. Given a point cloud and RGB frame sequence that capture indoor scenes, the QA model outputs a corresponding answer by fusing 3D and language information through three layers: the 3D scene and language encoder layer, fusion layer, and classification layers. + +tation $Q^{\prime}$ into a stack of $L$ (set to two) transformer encoder layers, we obtain a deeply contextualized question representation $Q^{enc} \in \mathbb{R}^{n_q \times d}$ . In addition, we use transformer decoder layers to represent the features of object proposals related to the question words by using the final output of the transformer encoder as the decoder's keys and values. We obtain a question-aware-object proposal representation $V^{dec} \in \mathbb{R}^{n_v \times d}$ after feeding the question and object proposal pairs into a stack of $L$ transformer decoder layers. Subsequently, the final outputs of the transformer layers $Q^{enc}$ and $V^{dec}$ are fused by a fusion layer that uses two-layer multi-layer perceptron (MLP) with an attention mechanism [33] (for details, see [51]). We obtain the fused feature $f \in \mathbb{R}^d$ , which simultaneously represents a 3D scene and linguistic question information. + +Object localization & QA layer. This layer consists of object localization, object classification, and answer classification modules. Each module is described as follows. + +Object localization module aims to predict which of the proposed object boxes corresponds to the question. The + +question-aware-object proposal representation, $V^{dec} \in \mathbb{R}^{n_v \times d}$ , is fed into a two-layer MLP to determine the likelihood of each object box being related to the question. Following [10], we compute the localization confidence $s^{loc} \in \mathbb{R}^{n_v}$ for the proposed $n_v$ object boxes with the cross-entropy (CE) loss to train this module. + +Object classification module predicts what objects are associated with a question. Note that many questions do not contain target object names related to the answer, in contrast to a 3D localization task [10, 52, 53]. We use the 3D and question-aware fused feature $f$ and feed it into a two-layer MLP to predict 18 ScanNet benchmark classes. We compute the object classification scores $s^{obj} \in \mathbb{R}^{18}$ with a softmax function and use the CE loss to train this module. + +Answer classification module predicts an answer corresponding the question and scene. We project the fused feature $f$ into a vector $s^{ans} \in \mathbb{R}^{n_a}$ for the $n_a$ answer candidates in the training set. To consider multiple answers, we compute final scores with the binary cross-entropy (BCE) loss function to train the module. + +Loss function. We use a loss function similar to ScanRefer [10], such as the localization loss $\mathcal{L}_{loc}$ of the object localization module, object detection loss $\mathcal{L}_{det}$ of VoteNet [38], and object classification loss $\mathcal{L}_{obj}$ of the object classification module. To answer the 3D scene content, we additionally use the answer loss $\mathcal{L}_{ans}$ of the answer classification module. We set the final loss as a simple linear combination of these losses, computed as $\mathcal{L} = \mathcal{L}_{ans} + \mathcal{L}_{obj} + \mathcal{L}_{loc} + \mathcal{L}_{det}$ . + +# 5. Experiments + +# 5.1. Experimental Setup + +In this experimental setup, we referred to the experimental setup of existing studies on scene understanding of ScanNet [15] through languages such as ScanRefer and Scan2Cap [10, 13]. + +Data augmentation. We applied data augmentation to our training data and applied rotation about all three axes using a random angle in $[-5^{\circ}, 5^{\circ}]$ and randomly translated the point cloud within $0.5\mathrm{m}$ in all directions. Because the ground alignment in ScanNet was incomplete, we rotated it on all axes (not just the top). + +Training. To train the ScanQA model, we used Adam [26], a batch size of 16, and an initial learning rate of $5\mathrm{e} - 4$ . We trained the model for 30 epochs until it converged and decreased the learning rate by 0.2 times after 15 epochs. To mitigate the fitting of the model against its training data, we set the weight decay factor to $1\mathrm{e} - 5$ . + +Evaluation. To evaluate the QA performance, we used exact matches EM@1 and EM@10 as the evaluation metric, where EM@K is the percentage of predictions in which the top $K$ predicted answers exactly match any one of the + +
ModelEM@1EM@10BLEU-1BLEU-2BLEU-3BLEU-4ROUGEMETEORCIDErSPICE
Test w/ objects
RandomImage+MCAN22.3153.1126.6618.4916.1614.2631.2712.1360.379.05
VoteNet+MCAN19.7150.7629.4617.2310.336.0830.9712.0758.2310.44
ScanRefer+MCAN (pipeline)17.5249.9219.1710.660.000.0024.409.3844.256.24
ScanRefer+MCAN (e2e)20.5652.3527.8517.2711.887.4630.6811.9757.3610.58
ScanQA23.4556.5131.5621.3915.8712.0434.3413.5567.2911.99
OracleImage+MCAN25.3455.9328.7020.1116.7812.8934.5913.4267.2411.93
Test w/o objects
RandomImage+MCAN20.8251.2326.2917.9014.279.6629.2311.5455.648.87
VoteNet+MCAN18.1548.5629.6317.8011.577.1029.1211.6853.3410.36
ScanRefer+MCAN (pipeline)16.4749.0518.7110.9816.530.7622.458.7640.816.41
ScanRefer+MCAN (e2e)19.0449.7026.9816.1711.287.8228.6111.3853.4110.63
ScanQA20.9054.1130.6821.2015.8110.7531.0912.5960.2411.29
+ +Table 3. Performance comparison of question answering with image captioning metrics. e2e represents an end-to-end model. + +
ANSOBJLOCEM@1EM@10BLEU-1BLEU-2BLEU-3BLEU-4ROUGEMETEORCIDErSPICE
Test w/ objects
✓12.1642.7712.865.450.120.0217.556.7129.174.05
✓✓18.3149.1822.3214.5311.157.9226.379.9449.106.36
✓✓20.4651.6725.0616.9114.0611.3729.2211.1355.178.21
✓✓✓23.4556.5131.5621.3915.8712.0434.3413.5567.2911.99
Test w/o objects
✓10.7839.4411.945.020.120.0215.345.9125.513.51
✓✓16.2346.3021.3713.4910.717.6423.639.1043.216.13
✓✓18.1249.6025.1217.5814.6810.2326.5010.4349.938.16
✓✓✓20.9054.1130.6821.2015.8110.7531.0912.5960.2411.29
+ +Table 4. Performance comparison of different experimental conditions of the ScanQA model. + +
ModelAcc@0.25EM@10
Test w/ objects
ScanQA (xyz)23.6755.67
ScanQA (xyz+rgb)23.4555.43
ScanQA (xyz+rgb+normal)23.3554.50
ScanQA (xyz+multiview)25.4055.51
ScanQA (xyz+multiview+normal)25.4456.51
+ +Table 5. Feature ablation results + +ground-truth answers. We also included sentence evaluation metrics frequently used for image captioning models because some of the questions had multiple possible answer expressions, as discussed in Sec. 3.3. We added the BLEU [35], ROUGE-L [31], METEOR [7], CIDEr [45], and SPICE [3] metrics to evaluate robust answer matching. Baselines. To validate our 3D-QA model (ScanQA), we prepared several baselines. Empirical experiments were conducted using the following methods. + +RandomImage+2D-QA First, we prepared several 2D-QA models as baselines to demonstrate how our 3D-QA models outperformed 2D-based VQA models for the 3D-QA task. We used a pretrained MCAN model [51] as the 2D-QA model. MCAN is a transformer network [44] that uses a cross-attention mechanism to represent the relationship between question words and objects in an image. The proposed method uses some of the modules used in MCAN, such as transformer encoder and decoder layers, to create 3D and language features. By comparing these two, we can + +confirm the importance of creating a model specialized for 3D-QA. Because 2D-QA models cannot be directly applied to a 3D environment, we randomly sampled three images from the video captured to build the ScanNet dataset. We used a bottom-up top-down attention model [4] to extract the appearance features of the objects. We applied pretrained 2D-QA models to these images and computed the answer scores for each image. Finally, we selected the most probable answer according to the averaged answer scores of these images. We experimented with 2D-QA using three images captured in the environment per question. + +OracleImage+2D-QA To investigate the upper bound on the performance of 2D-QA for questions in 3D space, we used images around a target object associated with a question-answer pair. We set the camera's position based on the coordinates of the bounding box of the correct object and captured images from the direction and distance at which the bounding box was most visible. Because the object may not be visible depending on the camera's position, we used three images per question. We applied 2D-QA models to these images similar to RandomImage+2D-QA. Note that it is difficult to obtain such images in actual QA scenarios. By examining the performance of this method, we can determine the difficulty of solving the 3D-QA task using 2D-QA models. + +VoteNet+MCAN VoteNet [38] is a 3D object detection method that locates and recognizes objects in a 3D scene. + +This method detects objects in a 3D space, extracts their features, and uses them in a standard VQA model (MCAN). Unlike our method, this method does not consider the target object or its location in the 3D space. + +ScanRefer+MCAN (pipeline) ScanRefer [10] is a 3D object localization method for localizing a given linguistic description to a corresponding target object in a 3D space. ScanRefer internally uses VoteNet to detect objects in a room and estimates the object corresponding to the linguistic description from among the candidate objects. Note that ScanRefer cannot be used directly for QA. Thus, we used a pretrained ScanRefer model to identify the object corresponding to the question and then applied 2D-QA (MCAN) to the image surrounding the object localized by ScanRefer. Note that ScanRefer and MCAN were run separately, and end-to-end learning was not possible. + +ScanRefer+MCAN (end-to-end) This method is more sophisticated and closer to the proposed method. Although ScanRefer+MCAN (pipeline) conducts object localization and QA separately, this method simultaneously learns localization and QA modules. Specifically, the input to the method is the object proposal feature of ScanRefer for VQA models; subsequently, the model predicts answers based on object box features and question content. Unlike the ScanQA model, this uses the output of VoteNet separately for object localization and QA modules (although the information for both tasks is mutually useful) and does not learn both modules in common. + +# 5.2. Quantitative Analysis + +The performance of 3D-QA on the ScanQA dataset and image caption metrics are presented in Table 3. The best results in each column are shown in bold. We compared our ScanQA model with competitive baselines VoteNet+MCAN, ScanRefer+MCAN (pipeline), and ScanRefer+MCAN (end-to-end). These baselines share some of the components of the proposed method and aided us in understanding useful components for 3D-QA. The results indicated that our ScanQA method significantly outperformed all baselines across all data splits over all evaluation metrics. In particular, ScanQA significantly outperformed ScanRefer+MCAN (end-to-end), which learns QA and object localization separately across all data splits over all evaluation metrics, indicating that the ScanQA model succeeded in synergistic learning by sharing object localization and QA modules. ScanQA outperformed VoteNet+MCAN by a large margin. This result suggested that using object localization in a 3D space and predicting object categories related to questions are important for 3D-QA. We will clarify this point in the section on the ablation study. Interestingly, VoteNet+MCAN, ScanRefer+MCAN (end-to-end), and ScanQA significantly outperformed ScanRefer+MCAN (pipeline), which detects target objects related to a question + +using a pretrained ScanRefer and then applies 2D-QA to the surrounding images of a target object. The results indicated that end-to-end training with 3D and language information is suitable for solving 3D-QA model problems. In addition, we observed that our 3D-QA model, ScanQA, is superior to a 2D-QA model, RandomImage+MCAN, which uses an effective pretrained model. We also observed that the 2D-QA baseline with oracle object identification of OracleImage+MCAN performed better or more competitively than the ScanQA model. Although this suggests that accurate object identification for questions indeed boosts 3D-QA results, this is an oracle setting for real-world applications. We finally evaluated the human performance on the sampled questions in the test set with objects using MTurk. The exact matching score (EM@1) is 51.6 for the best-performing MTurk worker. + +# 5.3. Ablation Studies + +We conducted ablation studies concerning the design of the ScanQA model. Table 4 lists the effects of each major component of the proposed method. The effect of different input data is shown in Table 5. + +Does object classification help? We demonstrated the effectiveness of object classification by conducting an experiment using ScanQA combined with and without the object classification module. We compared our method trained with the answer and object classification modules (ANS+OBJ) with a model trained with only the answer module (ANS), and we also compared a model trained with full modules (ANS+OBJ+LOC) with one trained with the answer and object localization modules (ANS+LOC). The results in Table 4 show that the models with the OBJ outperformed the other models. This suggests that predicting the category of a target object is effective for 3D-QA. + +Does object localization help? We demonstrated the effectiveness of object localization by conducting an experiment with ScanQA and without an object localization module. We compared our method trained with the answer and object localization modules (ANS+LOC) with a model trained with only the answer module (ANS), and we also compared a model trained with full modules (ANS+OBJ+LOC) with one trained with the answer and object classification modules (ANS+OBJ). The results in Table 4 show that the model with LOC consistently outperformed the other models. This suggests that localizing target objects is also important for improving 3D-QA performance. + +Do colors help for 3D-QA? According to the ScanRefer study, models that use color information have better object localization performance than models that use only geometry [10]. Motivated by this finding, we evaluated several models using different features. We compared our method trained with geometry (xyz) and multiview image features (xyz+multiview) with a model trained with only geometry + +![](images/15893cd2144a1a826baf9f71c23daf3dddb28fd6fb579e626bb73e356f127c8d.jpg) +Q: What is on the wall above the backpack? + +![](images/3bab97d263f6cc4c44c5d2555501eea1c2f8c3d4b60a8e76b01e3806390969c3.jpg) +Q: Where is the large window located? +A: X on desk + +![](images/a82724d37492a21f399296facb5d7ad075ac1b7b4f1db5145e2c0102969a9e9c.jpg) +Q: Where is the large whiteboard located? +A: X against wall + +![](images/3db26db17adca01768f6d902a1ccdfd5b9ca54d50670ccfa3509c54217112a9d.jpg) +Q: What color is the chair closest to the door? +A: X brown + +![](images/dcacf516a4fe60785cf67d48e473909bf9278facc8b9f94b5184c218d94d9d69.jpg) +A: X picture +A:whiteboard + +![](images/fb382931b7a5299075f2b78aa912530af77fee7caa6ec227312b18620099130a.jpg) +A: above sink + +![](images/7629a18b255f8890ff8ee0f578c068c2f16dff5864f76788ae5cc2654685ce23.jpg) +A: on wall left of desk + +![](images/3d2b7c81237429b9331b333da6be86cc49e9b48cef53678824ed7a634b1ca28c.jpg) +A:black + +![](images/048ea0f1aa4f9e19d9933220defcbabd52c3ff611eaff17216f8a4dfb8f46190.jpg) +A: whiteboard +Figure 5. Qualitative results. Predicted answers are described below each figure. Predicted boxes are marked blue and the ground truth is marked green. We show examples in which ScanQA produced good object localization when predicting correct answers, whereas ScanRefer+MCAN (pipeline) could not. + +![](images/feffe30996e97f1d6610a722021322d516b35c05c3867d2d185d1f97f5d88669.jpg) +A: above sink + +![](images/42615adb95dec4adf8f3c2cb8b59b2bdb8e1ea562cccc496097030902bae15d7.jpg) +A: on wall left of desk + +![](images/0162a98c29d535114eda415b30f32b7705a5d12c88c45cb2f86d6a5032bf1f03.jpg) +A:black + +try (xyz) and one trained with RGB values $(xyz + rgb)$ . To validate the object localization performance, we used accuracy (Acc@0.25), in which the positive predictions have a higher intersection over union with the ground truths than the threshold of 0.25 used in [10]. As Table 5 shows, RGB values were not effective for both object localization and QA. The multiview image features were slightly effective for object localization but not on QA. This is because it is more difficult for the ScanQA dataset to associate language and object information than the ScanRefer dataset because multiple objects may apply to a single question. Fortunately, ScanQA trained with geometry, preprocessed multiview image features, and normals which is demonstrated in Table 3 outperformed the other models, but the effect was limited. This result suggested that subsequent studies should consider a more balanced selection of features in terms of computational cost and performance. + +# 5.4. Qualitative Analysis + +Finally, we demonstrated the excellent performance of our model by visualizing qualitative examples of ScanQA, ScanRefer+MCAN (pipeline), and ground truth. Fig. 5 shows the representative QA results of a baseline method and ScanQA. The results suggested that answering questions requires object localization related to the answer according to the question content and point cloud matching. For example, the leftmost case shows that a whiteboard located above a backpack could not be answered by Scan- + +Refer+MCAN (pipeline), which localized the backpack in error. This is because the QA and localization modules were separated in ScanRefer+MCAN (pipeline). In contrast, our model successfully localized target objects related to answers and predicted correct answers by simultaneously learning QA and object localization. + +# 6. Conclusion + +Spatial understanding using language expression is a core technology for models deployed in the real world and interacting with humans. We introduce a novel task of 3D question answering (3D-QA), in which models observe an entire 3D scan and answer a question about the 3D scene in addition to the object localization. Based on the ScanRefer dataset, we created a new ScanQA dataset which consists of 41,363 questions and 32,337 unique answers from 800 scenes derived from the ScanNet scenes. We propose a 3D-QA baseline model of ScanQA. We confirm that the ScanQA baseline performs better than the counterpart 2D-based VQA baselines in most of the evaluation measures, including the exact match and image captioning metrics. + +# Acknowledgements + +This work was supported by NEDO JPNP20006, JSPS KAKENHI 21H03516 and 18KK0284, and JST PRESTO JPMJPR20C2. + +# References + +[1] Panos Achlioptas, Ahmed Abdelreehem, Fei Xia, Mohamed Elhoseiny, and Leonidas J. Guibas. ReferIt3D: Neural listeners for fine-grained 3d object identification in real-world scenes. In Proceedings of the 16th European Conference on Computer Vision (ECCV), 2020. 1 +[2] Chris Alberti, Daniel Andor, Emily Pitler, Jacob Devlin, and Michael Collins. Synthetic QA corpora generation with roundtrip consistency. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (ACL), pages 6168-6173, 2019. 3 +[3] Peter Anderson, Basura Fernando, Mark Johnson, and Stephen Gould. SPICE: Semantic propositional image caption evaluation. In Proceedings of the European Conference on Computer Vision (ECCV), 2016. 6 +[4] Peter Anderson, Xiaodong He, Chris Buehler, Damien Teney, Mark Johnson, Stephen Gould, and Lei Zhang. Bottom-up and top-down attention for image captioning and visual question answering. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2, 6 +[5] Peter Anderson, Qi Wu, Damien Teney, Jake Bruce, Mark Johnson, Niko Sunderhauf, Ian Reid, Stephen Gould, and Anton van den Hengel. Vision-and-Language Navigation: Interpreting visually-grounded navigation instructions in real environments. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2018. +[6] 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/CVF International Conference on Computer Vision (ICCV), 2015. 1, 2 +[7] 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. Association for Computational Linguistics, 2005. 6 +[8] Ying-Hong Chan and Yao-Chung Fan. A recurrent BERT-based model for question generation. In Proceedings of the 2nd Workshop on Machine Reading for Question Answering, 2019. 3 +[9] 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. 2 +[10] Dave Zhenyu Chen, Angel X Chang, and Matthias Nießner. Scanrefer: 3d object localization in rgb-d scans using natural language. In Proceedings of the European Conference on Computer Vision (ECCV). Springer, 2020. 1, 2, 3, 4, 5, 7, 8 +[11] Howard Chen, Alane Suhr, Dipendra Misra, Noah Snavely, and Yoav Artzi. Touchdown: Natural language navigation and spatial reasoning in visual street environments. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2 + +[12] Xinlei Chen, Hao Fang, Tsung-Yi Lin, Ramakrishna Vedantam, Saurabh Gupta, Piotr Dólár, and C. Lawrence Zitnick. Microsoft coco captions: Data collection and evaluation server. CoRR, abs/1504.00325, 2015. 1 +[13] 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 (CVPR), 2021. 1, 4, 5 +[14] Shih-Han Chou, Wei-Lun Chao, Wei-Sheng Lai, Min Sun, and Ming-Hsuan Yang. Visual question answering on 360deg images. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), 2020. 2 +[15] Angela Dai, Angel X Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2, 5 +[16] Angela Dai and Matthias Nießner. 3DMV: Joint 3d-multiview prediction for 3d semantic scene segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), 2018. 4 +[17] Abhishek Das, Samyak Datta, Georgia Gkioxari, Stefan Lee, Devi Parikh, and Dhruv Batra. Embodied Question Answering. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2, 3 +[18] Daniel Fried, Ronghang Hu, Volkan Cirik, Anna Rohrbach, Jacob Andreas, Louis-Philippe Morency, Taylor Berg-Kirkpatrick, Kate Saenko, Dan Klein, and Trevor Darrell. Speaker-follower models for vision-and-language navigation. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. 2 +[19] Daniel Gordon, Aniruddha Kembhavi, Mohammad Rastegari, Joseph Redmon, Dieter Fox, and Ali Farhadi. IQA: Visual question answering in interactive environments. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2018. 2 +[20] 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 1 +[21] Dan Hendrycks and Kevin Gimpel. Gaussian error linear units (GELUs). CoRR, abs/1606.08415, 2016. 4 +[22] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-1780, 1997. 4 +[23] Drew A Hudson and Christopher D Manning. Gqa: A new dataset for real-world visual reasoning and compositional question answering. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1 +[24] Yunseok Jang, Yale Song, Chris Dongjoo Kim, Youngjae Yu, Youngjin Kim, and Gunhee Kim. Video Question Answering + +with Spatio-Temporal Reasoning. International Journal of Computer Vision (IJCV), 2019. 2 +[25] Sahar Kazemzadeh, Vicente Ordonez, Mark Matten, and Tamara Berg. ReferItGame: Referring to objects in photographs of natural scenes. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 787-798, Doha, Qatar, 2014. Association for Computational Linguistics. 1 +[26] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations (ICLR), 2015. 5 +[27] 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. 2 +[28] Shuhei Kurita and Kyunghyun Cho. Generative language-grounded policy in vision-and-language navigation with bayes' rule. In International Conference on Learning Representations (ICLR), 2021. 2 +[29] 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 (CVPR), 2021. 2 +[30] 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. Proceedings of the European Conference on Computer Vision (ECCV), 2020. 2, 1 +[31] Chin-Yew Lin. ROUGE: A package for automatic evaluation of summaries. In Text Summarization Branches Out, pages 74-81. Association for Computational Linguistics, 2004. 6 +[32] Luis Enrico Lopez, Diane Kathryn Cruz, Jan Christian Blaise Cruz, and Charibeth Cheng. Simplifying paragraph-level question generation via transformer language models. In Duc Nghia Pham, Thanaruk Theeramunkong, Guido Governorati, and Fenrong Liu, editors, Proceedings of the Pacific Rim International Conference on Artificial Intelligence (PRICAL), 2021. 3 +[33] Thang Luong, Hieu Pham, and Christopher D. Manning. Effective approaches to attention-based neural machine translation. In Proceedings of the Empirical Methods in Natural Language Processing (EMNLP), pages 1412-1421, 2015. 5 +[34] Mateusz Malinowski and Mario Fritz. A multi-world approach to question answering about real-world scenes based on uncertain input. In Proceedings of the Neural Information Processing Systems (NeurIPS), 2014. 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 (ACL), pages 311-318, Philadelphia, Pennsylvania, USA, 2002. Association for Computational Linguistics. 6 +[36] Jeffrey Pennington, Richard Socher, and Christopher D Manning. GloVe: Global vectors for word representation. In Proceeding of Empirical Methods in Natural Language Processing (EMNLP), 2014. 4 + +[37] B. A. Plummer, L. Wang, C. M. Cervantes, J. C. Caicedo, J. Hockenmaier, and S. Lazebnik. Flickr30k entities: Collecting region-to-phrase correspondences for richer imaged-to-sentence models. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 2641–2649, 2015. 1 +[38] 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), 2019. 2, 4, 5, 6 +[39] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. PointNet++: Deep hierarchical feature learning on point sets in a metric space. In Proceedings of Neural Information Processing Systems (NeurIPS), 2017. 4 +[40] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67, 2020. 3 +[41] Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. SQuAD: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2016. 3 +[42] Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In Proceedings of the Association for Computational Linguistics (ACL), 2018. 1 +[43] Mohit Shridhar, Jesse Thomason, Daniel Gordon, Yonatan Bisk, Winson Han, Roozbeh Mottaghi, Luke Zettlemoyer, and Dieter Fox. ALFRED: A Benchmark for Interpreting Grounded Instructions for Everyday Tasks. In Proceedings of The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 2 +[44] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Ilia Polosukhin. Attention is all you need. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Proceedings of Neural Information Processing Systems (NeurIPS), 2017. 4, 6 +[45] Ramakrishna Vedantam, C. Lawrence Zitnick, and Devi Parikh. CIDEr: Consensus-based image description evaluation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 4566-4575. IEEE Computer Society, 2015. 6 +[46] Erik Wijmans, Samyak Datta, Oleksandr Maksymets, Abhishek Das, Georgia Gkioxari, Stefan Lee, Irfan Essa, Devi Parikh, and Dhruv Batra. Embodied Question Answering in Photorealistic Environments with Point Cloud Perception. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2, 3 +[47] Yi Wu, Yuxin Wu, Georgia Gkioxari, and Yuandong Tian. Building generalizable agents with a realistic and rich 3d environment. arXiv preprint arXiv:1801.02209, 2018. 2 +[48] Antoine Yang, Antoine Miech, Josef Sivic, Ivan Laptev, and Cordelia Schmid. Just ask: Learning to answer questions from millions of narrated videos. In Proceedings of + +the IEEE/CVF International Conference on Computer Vision (ICCV), 2021. 3 +[49] Licheng Yu, Xinlei Chen, Georgia Gkioxari, Mohit Bansal, Tamara L. Berg, and Dhruv Batra. Multi-target embodied question answering. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2 +[50] Licheng Yu, Patrick Poirson, Shan Yang, Alexander C. Berg, and Tamara L. Berg. Modeling context in referring expressions. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max Welling, editors, Proceedings of the European Conference on Computer Vision (ECCV), pages 69-85, 2016. 1 +[51] Zhou Yu, Jun Yu, Yuhao Cui, Dacheng Tao, and Qi Tian. Deep modular co-attention networks for visual question answering. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 4, 5, 6, 1 +[52] 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 (ICCV), pages 1791-1800, 2021. 5 +[53] Lichen Zhao, Daigang Cai, Lu Sheng, and Dong Xu. 3dvg-transformer: Relation modeling for visual grounding on point clouds. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 2928-2937, 2021. 5 \ No newline at end of file diff --git a/scanqa3dquestionansweringforspatialsceneunderstanding/images.zip b/scanqa3dquestionansweringforspatialsceneunderstanding/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1739872ef64a546b124970f6b16c438c6b3fc46a --- /dev/null +++ b/scanqa3dquestionansweringforspatialsceneunderstanding/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f389dbfa0d39762ffd1059d19f5932a088b27668f6ad9d96c669b00d990ba3aa +size 570821 diff --git a/scanqa3dquestionansweringforspatialsceneunderstanding/layout.json b/scanqa3dquestionansweringforspatialsceneunderstanding/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..69bb2614821707b3d7bfa158a28c5bf0772a8203 --- /dev/null +++ b/scanqa3dquestionansweringforspatialsceneunderstanding/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:431c7cb0840cceeacc989ba5b4e59927e0068bc361691a7ddfcb359c17b0ccfc +size 386963 diff --git a/sceneconsistencyrepresentationlearningforvideoscenesegmentation/f22e610f-e8dd-40dc-a073-bfc069fc4394_content_list.json b/sceneconsistencyrepresentationlearningforvideoscenesegmentation/f22e610f-e8dd-40dc-a073-bfc069fc4394_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..74409968bc16d503528dc0ed8f172fc173d32541 --- /dev/null +++ b/sceneconsistencyrepresentationlearningforvideoscenesegmentation/f22e610f-e8dd-40dc-a073-bfc069fc4394_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0310d7195dd6dd27200968765ba77aba5c7cf10baa61762cb7aa518b482af2b +size 76636 diff --git a/sceneconsistencyrepresentationlearningforvideoscenesegmentation/f22e610f-e8dd-40dc-a073-bfc069fc4394_model.json b/sceneconsistencyrepresentationlearningforvideoscenesegmentation/f22e610f-e8dd-40dc-a073-bfc069fc4394_model.json new file mode 100644 index 0000000000000000000000000000000000000000..637a8b6380dfaae07534b4878bb4be61ccf104e9 --- /dev/null +++ b/sceneconsistencyrepresentationlearningforvideoscenesegmentation/f22e610f-e8dd-40dc-a073-bfc069fc4394_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a7bd44a3db81be05ce5863b4e1dfb22f2767158fc81e2418a7541423773ed04 +size 96748 diff --git a/sceneconsistencyrepresentationlearningforvideoscenesegmentation/f22e610f-e8dd-40dc-a073-bfc069fc4394_origin.pdf b/sceneconsistencyrepresentationlearningforvideoscenesegmentation/f22e610f-e8dd-40dc-a073-bfc069fc4394_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fafef27d666e9b5a842ee3286cc02ec299e7f8c8 --- /dev/null +++ b/sceneconsistencyrepresentationlearningforvideoscenesegmentation/f22e610f-e8dd-40dc-a073-bfc069fc4394_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:487809efc6be5718342941b2e4775898fd55ba348a2b9aba7346dbc6f74fdd77 +size 4093806 diff --git a/sceneconsistencyrepresentationlearningforvideoscenesegmentation/full.md b/sceneconsistencyrepresentationlearningforvideoscenesegmentation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8bc586f4b54f85530f653ffc7005b3de6bfabb4d --- /dev/null +++ b/sceneconsistencyrepresentationlearningforvideoscenesegmentation/full.md @@ -0,0 +1,351 @@ +# Scene Consistency Representation Learning for Video Scene Segmentation + +Haoqian Wu $^{1,2,3,4*}$ , Keyu Chen $^{2*}$ , Yanan Luo $^{2}$ , Ruizhi Qiao $^{2}$ , Bo Ren $^{2}$ , Haozhe Liu $^{1,3,4,5}$ , Weicheng Xie $^{1,3,4\dagger}$ , Linlin Shen $^{1,3,4}$ + +1 Computer Vision Institute, Shenzhen University 2 Tencent YouTu Lab +3 Shenzhen Institute of Artificial Intelligence and Robotics for Society + +4 Guangdong Key Laboratory of Intelligent Information Processing 5 KAUST + +wuhaogqian2019@email.szu.edu.cn {yolochen, ruizhiqiao, timren}@tencent.com + +luoyanan93@gmail.com haozhe.liu@kaust.edu.sa {wcxie, llshen}@szu.edu.cn + +![](images/71052acae09efc0ddf7f46c994663278f5788e1a683233166702b3f46c4c5688.jpg) +Figure 1. An illustration of representation learning methods from the shot-to-scene perspective. Several continuous shots are shown in Fig. (a), where existing SSL approaches obtain positive pairs from the adjacent shots (e.g., by performing Nearest Neighbor (NN) Selection [1]). While we propose to look further for scenes that are often crossed over, as Scene A/C and Scene B/E shown in Fig. (b), where positive samples are explored in a broader region and the shots are clustered to the same scene in the feature representation space, i.e., Fig. (c). Best viewed in color. + +# Abstract + +A long-term video, such as a movie or TV show, is composed of various scenes, each of which represents a series of shots sharing the same semantic story. Spotting the correct scene boundary from the long-term video is a challenging task, since a model must understand the storyline of the video to figure out where a scene starts and ends. To this end, we propose an effective Self-Supervised Learning (SSL) framework to learn better shot representations from unlabeled long-term videos. More specifically, we present an SSL scheme to achieve scene consistency, while exploring considerable data augmentation and shuffling methods to boost the model generalizability. Instead of explicitly learning the scene boundary features as in the previous methods, we introduce a vanilla temporal model with + +less inductive bias to verify the quality of the shot features. Our method achieves the state-of-the-art performance on the task of Video Scene Segmentation. Additionally, we suggest a more fair and reasonable benchmark to evaluate the performance of Video Scene Segmentation methods. The code is made available.1 + +# 1. Introduction + +In the process of video creation, to make the story more compelling, the editor will use various editing techniques, such as montage, one shot to the end, etc. Quickly switching between stories and scenes makes the movie plot tighter, e.g. inserting outdoor battle scenes into indoor dialogue scenes, as shown in Fig. 1 (b), making the scene tran + +sition more intriguing and unpredictable, thus the task of Video Scene Segmentation turns out to be rather challenging. Hence, it is essential to understand the high-level semantic information of each scene in the long-term video. + +There has been extensive studies dealing with video understanding tasks on datasets where the individual video clip is typically short, while requiring a lot of labor to segment uncurated videos into short videos by category. Although some studies focus on splitting the long video into smaller segments, e.g., the methods of Action Spotting [2-5] aim to locate the positions of the beginning and ending of the action, however, they are the category-aware approaches. By contrast, Video Scene Segmentation is a category-agnostic task that only the scene boundary label is available, and it's very confusing to classify a scene fragment taxonomically. + +Since a long-term video is inherently structured in a specific way, a sequence of frames can be divided into shots or scenes in terms of the granularity of semantics [6] [7]. More specifically, a shot contains only continuous frames taken by the camera without interruption, and a scene is composed of successive shots and describes the same short story. For detecting shot boundaries, [8] [7] split a video into many separate shots using lower-level visual context. Based on this, many mainstream approaches of Video Scene Segmentation [9] [10] [6] [1] determine scene boundaries by exploring semantic correlations among the adjacent shots. + +While computer vision tasks suffer from the high cost of manual annotation, Self-Supervised Learning (SSL) based methods [11-18] are proposed to train a general feature extractor using unlabeled data. By leveraging a small amount of annotated data for training, these SSL methods can achieve appealing feature representation to even rival some supervised learning methods. For Video Scene Segmentation, [1] proposes to narrow the feature representation distance of the most similar shot pair in a local region, it significantly surpasses the supervised learning method [6] by employing a mere MLP classifier. However, in current SSL methods on the task of Video Scene Segmentation, the strategy of positive sample selection, pretraining protocol, evaluation metric and downstream model are not well discussed or addressed. + +To achieve this goal, we propose a self-supervised learning scheme to learn better representations, as well as the evaluation metric for the task of Video Scene Segmentation. The contributions of this paper are summarized as follows: + +- A representation learning scheme based on Scene Consistency is proposed to obtain better shot representations on the unlabeled long-term video. +- A simple yet effective temporal model with less inductive bias is proposed to assess the quality of the shot representation for the downstream Video Scene Seg + +mentation task. + +- A benchmark that is more fair and reasonable is introduced for both pretraining and evaluation. More importantly, the proposed method outperforms the state-of-the-art methods under all the protocols, and can significantly improve the performance of existing supervised methods without bells and whistles. + +# 2. Related Work + +Self-Supervised Learning in Images and Videos. To address the problems of the insufficient and expensive manual annotation, many approaches explore the inherent knowledge in unlabeled data by designing a lot of pretext tasks, including predicting the transformations of images, e.g., image rotation [20], inpainting [21], colorizing [22], jigsaw [23], etc. In short, these Self-Supervised Learning (SSL) methods use the information explored from the data themselves for the supervision. Recently, [11-18] introduce the contrastive similarity metrics to learn invariant feature representation of various views augmented from the original image, where strong data augmentations [13] are frequently used in image-level SSL methods to improve the robustness of the learned representations. From another aspect, by finetuning the model with a small amount of labeled data, SSL methods can achieve competitive performance compared with supervised learning methods, furthermore, the pretrained model can be used in specific downstream tasks. For video-oriented SSL methods, [24-30] show the appealing performance and potential on the task of video classification, while their positive pairs are selected from the adjacent clips within a same video. Meanwhile, most of studies are based on short videos and the quality of learned features is assessed based on video classification. Hence, it is meaningful to explore a suitable SSL scheme for tasks with long-term videos. + +Video Shot Boundary Detection and Scene Segmentation. For Video Scene Segmentation, shot boundary detection is often conducted in advance, which is specified as a task of locating the transition positions in videos based on the similarity of the frames. 3D convolutional networks and color histogram differencing [8] are used to identify the transition boundaries. Based on the shot boundaries, [6] learns the local and global shot representations and utilizes them to split the continuous shots into scenes according to the transition of the story. More specifically, identification of each shot's segmentation point is treated as a binary classification, which is free to the location of the shot. [1] leverages unlabeled video data to obtain shot representations, which outperforms many supervised learning methods on the downstream task of Video Scene Segmentation. However, this method is pretrained on the entire video data of MovieNet [31] that include the testing videos, i.e. the + +![](images/ae9b46db5868fda3a3b849f382b8dda461be0bba0c87d70ceda1ce1def97ac40.jpg) +(a) Representation Learning Stage + +![](images/57a47e50276abd966cd855c6f3823a3226ade611a39ffc94f8caa0d1a9231295.jpg) +(b) Video Scene Segmentation Stage +Figure 2. The pipeline of the proposed method. (a) Unsupervised Representation Learning Stage for learning shot representations, where $\text{Map}(i)$ is the mapping function for selecting positive samples. (b) Supervised Video Scene Segmentation Stage, where the quality of the shot representations is evaluated under the protocols of the non-temporal (MLP) and temporal (Bi-LSTM [19]) models. + +training protocol is inconsistent with that of conventional Self-Supervised Learning methods [24] [25]. For evaluating Video Scene Segmentation approaches, the datasets of OVSD [32], BBC planet earth [10], MovieNet [31] and Ad-Cuepoints [1] are frequently employed. + +In this work, we propose an unsupervised representation learning method based on scene consistency and a reasonable evaluation scheme for Video Scene Segmentation task. + +# 3. Methodology + +As shown in Fig. 2, we aim to obtain scene consistency representations on unlabeled long-term videos and design a more reasonable benchmark to verify the quality of the extracted features on the task of Video Scene Segmentation. To this end, we (i) propose a Self-Supervised Learning scheme based on a novel non-temporal selection strategy to achieve scene consistency from various shots, and (ii) introduce a vanilla temporal model with less inductive bias as well as the corresponding benchmark for this segmentation task. + +# 3.1. Consistency based Representation Learning + +Approaches of Self-Supervised Learning (SSL) aim to model representation consistency to enhance network robustness against various variations, e.g. spatial or temporal transformations. In this work, we use an SSL framework of Siamese network to achieve the representation consistency. + +More precisely, for a given query shot, the objective is to (i) maximize the similarity between the representations of query shot and positive samples, i.e., key shots; (ii) minimize the similarity of the negative sample pairs if they exist. As shown in Fig. 2 (a), the input samples $X$ are first augmented, i.e., $Q = Aug_{Q}(X)$ , $K = Aug_{K}(X)$ , and the $i$ -th positive pair $\{q, k^{+}\}$ is formulated as follows: + +$$ +\{q, k ^ {+} \} = \left\{f (Q [ i ] \mid \theta_ {Q}), f (K [ M A P (i) ] \mid \theta_ {K}) ^ {+} \right\} \tag {1} +$$ + +where $[\cdot]$ stands for the indexing operation, $f(\cdot|\theta_{Q})$ and $f(\cdot|\theta_{K})$ are the encoders with parameters $\theta_{Q}$ and $\theta_{K}$ , respectively, $MAP(i)$ is the mapping function for selecting positive samples. + +For the selection of positive samples in SSL methods based on video data, three selection strategies are frequently employed, i.e., Self-Augmented [14], Random [27] and Nearest Neighbor (NN) [1] selections. For clarity, the three conventional selection strategies for positive samples are represented in Fig. 3 (a)-(c). + +![](images/78203b78f5ed52347cd653ba81e4e13efd8c7613920599486efd3f01ceecb95d.jpg) +(a) Self-Augmented + +![](images/ef844e45792e428c5241fcefcf5a73f8e4b0b89e6202d1e7c05f5c06f84a092a.jpg) +(b) Random + +![](images/5fd063259e51e0ec7caefe67ad8ed46bcf0fdc3c7114cbeb1325f28caf3d6203.jpg) +(c) NN + +![](images/60d7995e9a8759541c6aea40ce1b75d9424beea13efe19180eb66ae09a7c4d03.jpg) + +![](images/ccf4f8fedf73269667531d6a6d31aabb92b9335df6454b353af4603f16903ffa.jpg) +(d) Scene Consistency (SC) +Query +Figure 3. The illustration of four different selection strategies for positive pairs. Best viewed in color. + +![](images/dd5b595e980845b3030f7a37837cff1fb19aeb3f6e8e76642d7b4171dfcfd1ec.jpg) +ONN +Soft-SC + +# 3.1.1 Conventional Positive Sample Selections + +Self-Augmented Selection. As image-level SSL approaches, the augmented view of one shot is frequently used as its positive sample, as shown in Fig. 3 (a), the mapping function, i.e. the identity mapping, is employed as follows: + +$$ +M A P _ {S A} (i) = i \tag {2} +$$ + +Random Selection. As some SSL methods [27] [24] for video classification, we select two adjacent shots of the + +same video as the positive pair, as shown in Fig. 3 (b), and the mapping function can be formulated as follows: + +$$ +M A P _ {R S} (i) = \max (i + j, 0) \tag {3} +$$ + +where $j \in \{-n, -n + 1, \dots, n - 1, n\}$ and $n$ denotes the size of the search region around the $i$ -th shot. + +Nearest Neighborhood (NN) Selection. As shown in Fig. 3 (c), [1] proposed to select the positive shot with the closest representation distance to the query shot within a fixed range, and the mapping function is as follows: + +$$ +M A P _ {N N} (i) = \arg \max _ {j \in I _ {M}} f (Q [ i ] \mid \theta_ {Q}) \cdot f (Q [ \max (j, 0) ] \mid \theta_ {Q}) \tag {4} +$$ + +where $I_M = \{i - m, \dots, i - 1, i + 1, \dots, i + m\}$ , $I_M$ stands for the indices of candidate samples for NN selection, $m$ is the search region size of a given shot, and $2m + 1$ is the length of the sliding window. + +# 3.1.2 Scene Consistency Selection + +In this work, we propose the Scene Consistency Selection, while exploring considerable data augmentation and shuffling methods for the task of Video Scene Segmentation. + +Positive Sample Selection with Scene Consistency. As shown in Fig. 1, for the video with non-linear narrative, previous selection methods may not work in the case that the most matching shots are far away. Therefore, we propose to select positive shot pair based on scene consistency, while the main advantage over Random/NN Selection is that our method is non-temporal, which is free to the shots order. + +We argue that scene consistency is critical for the training on the unlabeled long-term videos due to the three reasons: (i) the similar shots in the same scene may be far away; (ii) the greater feature spacing between scenes is beneficial to the downstream task of Video Scene Segmentation, and it can be achieved by maximizing inter-scene distance and minimizing intra-scene distance; (iii) while the $NN$ selection may result in a trivial objective, due to the maximization of the similarity of the sample pairs that maybe already the closest, the scene consistency enables the selection to achieve a more non-trivial objective. + +For the proposed scene consistency-based selection, we perform online clustering of samples in a batch, and use the cluster center sample as the positive sample with respect to the query shot, as shown in Fig. 3 (d). The specified mapping function is formulated as follows: + +$$ +M A P _ {S C} (i) = \arg \min _ {j \in I _ {C}} \| f (Q [ i ] \mid \theta_ {Q}) - f (Q [ j ] \mid \theta_ {Q}) \| _ {2} \tag {5} +$$ + +where $I_C = \{ic_1, ic_2, \ldots, ic_{\#class}\}$ stands for the indices of cluster centers, $\#class$ is the number of cluster centers. + +While center sample reflects the cluster-specified common information, we additionally use the query-specific individual information to generate the positive sample. Unlike the conventional multiple-instance learning [29], which + +treats center and query samples as multiple positive samples, we propose to construct the soft positive sample, namely Soft-Scene Consistency (SC) sample as follows: + +$$ +k _ {S o f t - S C} = \gamma k _ {S A} + (1 - \gamma) k _ {S C} \tag {6} +$$ + +where $\gamma$ is a trade-off parameter, $k_{SA}$ and $k_{SC}$ are the key (positive) samples selected by Self-Augmented Selection and Scene Consistency Selection. + +Scene Consistency Data Augmentation. Since the early stage of training is not stable, too much color augmentations, e.g. grayscale transformations, color jitter, etc., misguide the selection of positive samples, namely as Selection Shift. In this case, the model focuses more on nonsemantic information. To solve this problem, some studies [33] directly omit color augmentations for better performance. By contrast, we propose Asymmetric Augmentation to alleviate the influence of Selection Shift and use color augmentation to further improve the performance. More specifically, augmentations without the color transformation are used in $Aug_{Q}$ to get more accurate and scene consistent positive samples, while the color data augmentation operations are performed in $Aug_{K}$ . + +Scene Agnostic Clip-Shuffling. For fully leveraging the limited video data, we propose to construct more pseudo scene cues. In this work, the data augmentation is based on the basic unit of clip, i.e. $\rho$ continuous shots, the generated clips are then randomly spliced disorderly for the training. + +The process of Scene Agnostic Clip Generation and Shuffling is shown in Fig. 4. + +![](images/dd45a08b4a860034375b0dcc62f55eb847a3715f3dc792e48307106a8e6970fd.jpg) +Figure 4. The illustration of Scene Agnostic Clip-Shuffling. Clips are spliced disorderly for training and each clip contains $\rho$ continuous shots. + +# 3.1.3 Negative Sample Selections + +The way to choose negative samples varies according to the specific SSL frameworks. For SimCLR [12], the set of all non-positive samples within a batch is used as the negative samples, and MoCo [14] leverages a negative sample queue, which is a memory bank of previous samples output from the key encoder. However, BYOL [17] and SimSiam [16] do not use negative samples and instead resort to exploring more non-trivial solutions of SSL. + +# 3.1.4 Objective Function + +With Negative Samples. By defining $\text{sim}(\cdot, \cdot)$ as the cosine similarity, the contrastive loss function, i.e., InfoNCE [11] is employed and formulated as follows: + +$$ +L _ {c o n} = - \log \frac {\sum_ {k \in \{k ^ {+} \}} e ^ {(\operatorname {s i m} (q , k) / \tau)}}{\sum_ {k \in \{k ^ {+} , k ^ {-} \}} e ^ {(\operatorname {s i m} (q , k) / \tau)}} \tag {7} +$$ + +where $k^{+}$ and $k^{-}$ stand for the positive and negative samples for the query $q$ , and the $\tau$ is the temperature term [34]. + +Without Negative Samples. By maximizing the similarity between the query and positive samples, the contrastive loss without negative samples is formulated as follows: + +$$ +L _ {c o n} = - 2 \sum_ {k \in \{k ^ {+} \}} \left(\operatorname {s i m} \left(\mathcal {P} _ {\theta} (q), k _ {S G}\right) + \operatorname {s i m} \left(\mathcal {P} _ {\theta} (k), q _ {S G}\right)\right) \tag {8} +$$ + +where $\mathcal{P}_{\theta}$ is the predictor $\mathcal{P}$ with parameters $\theta$ [16,17], $k_{SG}$ and $q_{SG}$ are the samples with stop-gradient (SG) [16, 17]. + +# 3.2. Video Scene Segmentation + +After the unsupervised pretraining, two downstream models are used to evaluate the quality of the extracted features with the frozen query encoder. + +Problem Definition. For the Video Scene Segmentation, [6] [1] convert the task into a binary classification task of shot semantics by modeling the temporal relationship of adjacent shot features. In this way, we can determine whether the end of a shot is the end of a scene story. + +![](images/9e82dbd7e2e83d69c5b8c26856608c901ef67f25716c0212fedf62fa245b5453.jpg) +(a) Boundary based model +(b) Boundary free model +Figure 5. The illustration of boundary based model (a) and boundary free model (b) for Video Scene Segmentation. + +Boundary free model. While the previous downstream task of Video Scene Segmentation is concluded to a shot boundary modeling based approach, as shown in Fig. 5 (a), we introduce a vanilla boundary-free model. As shown in Fig. 5 (b), the proposed model covers the long-term + +dependence of shot representations based on sequence-to-sequence learning. Compared with boundary based model in Fig. 5 (a) that introduces inductive bias for the shot boundary modeling with the sliding windows, the suggested model (b) takes the shot features as the basic temporal input unit, enabling the model to explore both local and global semantic relations. + +# 4. Experiments + +# 4.1. Experimental Setup + +Dataset. MovieNet [31] consists of 1,100 movies with a large amount of multi-modal data and annotations, and the total duration of all movies is about 3000 hours, it is the largest dataset for movie understanding analysis by far. Besides, MovieNet [31] is split into a training set with 660 movies, a validation set with 220 movies and a testing set with 220 movies. Currently, for the task of Video Scene Segmentation, 190, 64 and 64 videos are labeled with scene boundaries for the training, validation and test sets, respectively. More importantly, movies in the MovieScene [6] are all included in MovieNet [31]. + +It is worth noting that there are two versions of annotation about Video Scene Segmentation task associated with MovieNet, one with only 150 annotations (called MovieScenes in [1, 6], used in earlier methods [6] but it is no longer available), and one with a total of 318 annotations (abbreviated as MovieScenes-318 in this work). Since the small scale of BBC [10] and OVSD [32] datasets and unavailability of AdCuepoints [1] dataset, we instead adopt MovieNet [31] dataset to evaluate the related approaches, more details are in the Supplementary Materials. + +Representation Learning Stage. For visual modality, each shot consists of 3 keyframes and ResNet50 [38] is chosen as the default backbone to learn the shot representations. The audio backbone used in [6] is applied for audio modality, more details about the backbone encoders can be found in Supplementary Materials. + +For pretraining data, (i) training set (660 movies) in MovieNet [31] is used to learn the shot representations, while we also conduct experiments with (ii) all data (1,100 movies) [1] for a fair comparison. In particular, although test data without the scene boundary labels are used for representation learning in setting (ii), it is not recommended to use all the data for pretraining because we usually have no prior access to test data in real scenarios. Moreover, for the most of Self-Supervised benchmarks [11-18], representation learning is performed only on the training set, rather than all of the data. + +Video Scene Segmentation Stage. For existing Self-Supervised methods on images and videos, a simple downstream model is frequently used to evaluate the representation quality of the frozen encoders. For instance, a linear + +Table 1. Results of supervised methods w/o SSL for the task of Video Scene Segmentation on MovieNet. + +
MethodsDatasetAPF1
SCSA [9]M.S.14.7-
Story Graph [35]M.S.25.1-
Siamese [10]M.S.28.1-
ImageNet [36]M.S.41.26-
Places [37]M.S.43.23-
LGSS [6]M.S.47.1-
LGSS w/o DP [6]M.S.44.9-
LGSS w/o DP [6]*M.S-31844.938.52
+ +* Our implementations based on official public codebase,² while DP (Dynamic Programming) isn't public available. + +Table 2. Results of methods w/ SSL for the task of Video Scene Segmentation on MovieNet. + +
MethodsPretrain DataEval.ProtocolAPF1
ShotCoL [1]Train.+Test.+Val.M.SMLP [1]52.83-
ShotCoL [1]Train.+Test.+Val.M.S-318MLP [1]53.37-
ShotCoL [1]*Train.+Test.+Val.M.S-318MLP [1]52.8949.17
SCRL (ours)Train.+Test.+Val.M.S-318MLP [1]54.8251.43
ShotCoL [1]*Train. onlyM.S-318MLP [1]46.7745.78
SCRL (ours)Train. onlyM.S-318MLP [1]53.7450.40
ShotCoL [1]*Train. onlyM.S-318Bi-LSTM48.2146.52
SCRL (ours)Train. onlyM.S-318Bi-LSTM54.5551.39
+ +* Our implementations. + +fully-connected layer is widely used for evaluation. However, for the Video Scene Segmentation task, we cannot determine whether the ending position of a single shot is the scene boundary or not. Consequently, a boundary-based non-temporal model (MLP-based protocol, followed by [1]) and a boundary-free temporal model (Bi-LSTM [19]-based protocol, proposed by us) are employed to evaluate the capability of the encoder for local-to-global modeling. + +Metrics. We use the mean of Average Precision (AP) [6] [1] specified to ground truth scene boundaries of each movie, as well as F1-score for the evaluation. + +Implementation Details. During the learning stage of Self-Supervised representation, the batch size is set to 1,024 (shots), initial learning rate is set to 0.03 and the training epoch is 100. The parameters of the visual and audio encoders are randomly initialized. Besides, we perform naive $K$ -Means algorithm [39, 40] for online clustering and the cluster number #class is set to 24, while the clip length, i.e. $\rho$ of Scene Agnostic Clip Shuffling is set to 16. MoCov2 [14] with the queue size of 65,536, momentum value of 0.999, temperature of 0.07 and cosine learning rate decay, are used as our SSL framework setting. For the Video Scene Segmentation task, num-of-shot [1] is set to 4 and 40 for the MLP [1] and Bi-LSTM protocols, respectively. Each pretraining trial is conducted on the server with 8 NVIDIA V100 GPUs for approximate 24 hours in visual modality and 10 hours in audio modality. The dimensions of visual and audio features used for both pretraining and evaluation are 2,048 and 512, respectively. More details, e.g., the choice of hyperparameter, are presented in Supplementary Materials. + +# 4.2. Comparison with Existing Methods + +Tables 1 and 2 present an overall performance of methods w/ or w/o SSL for the Video Scene Segmentation task, where M.S. stands for MovieScenes dataset with 150 annotated movies, and Eval. means the dataset used for super + +vised evaluation stage after the pretraining. Besides, Train., Test., and Val. represent training, testing and validation sets of MovieNet [31]. + +We have reproduced the performance of ShotCoL [1] on the entire dataset (1,100 movies) for comparison, although it is suggested to conduct the pretraining stage only on the training set. Compared with ShotCoL [1] that has a decline of 6.12 in terms of AP, our method can achieve competitive performance with less training data, with only a decline of 1.08 in terms of AP. The proposed method outperforms the supervised state-of-the-art method, i.e., LGSS [6] by margins of 9.65 in terms of AP and 12.87 in terms of F1. + +# 4.3. Ablation Study + +We perform all the ablation experiments using only the training data of MovieNet in SSL stage, and evaluate the performance on downstream task based on MLP protocol for fairness. + +Positive Sample Selection. We first conduct ablation experiments on the four different selection methods of positive pairs, i.e., Self-Augmented Selection, Random Selection, Nearest Neighborhood (NN) Selection and Scene Consistency (SC) Selection. Tab. 3 shows that Scene Consistency Selection method achieves better performance than the other selection methods, which outperforms the state-of-the-art algorithm [1] by a margin of 2.95 in terms of AP. Meanwhile, the loss evolution curves of above methods are shown in Fig. 6. We can find that Self-Augmented Selection reaches the lowest loss value, while obtaining the worst performance on the task of Video Scene Segmentation. Due to the trivial objective introduced by NN Selection that is discussed in Section 3.1.2, it achieves the fastest convergence rate during the early training, while stagnating to a mediocre performance. By contrast, SC Selection has a relatively moderate convergence rate, and achieves the best performance among all the selection strategies. + +Table 3. Ablation results of Positive Sample Selection. + +
MethodsSelection StrategyAP
MoCo [14]Self-Augmented42.51
-Random (n = 1)43.24
ShotCol [1]NN (m = 8)46.77
SCScene Consistency49.71
+ +Table 4. Ablation results of SSL methods w/ and w/o Scene Agnostic Clip-Shuffling. + +
Methodsw/ow/AP
NN✓×46.77
NN×✓48.63
SC✓×49.71
SC×✓52.17
+ +Table 5. Ablation results of Multiple Positive Samples (MPS). + +
MethodsPositive Sample(s)AP
SCCenter52.17
MPS-SCSelf and Center51.20
Soft-SCEq. 6 (γ = 0.5)53.74
+ +![](images/37fcc37b8a7a1407f5ff1c5a6c13d0fdbe6972660863ed45c50e44e6f3125cd7.jpg) +Figure 6. Loss evolution curves and AP results of the training with different selection strategies. + +Scene Agnostic Clip-Shuffling. The results of ablation study specific to the Scene Agnostic Clip-Shuffling are presented in Tab. 4. Tab. 4 shows that the proposed ClipShuffling achieves improvements of 1.85 and 2.46 in terms of AP for $NN$ and $SC$ methods, respectively. These results verify the advantage of the proposed positive sample selection discussed in Section 3.1.2 that $SC$ is free to the shot order in a video. + +Multiple Positive Samples (MPS). Moreover, we study the performance of multiple positive samples in Tab. 5. As shown in Tab. 5, Soft-SC achieves the best performance of 53.74 in terms of AP. Although single positive sample is employed in SC, it still achieves better performance than MPS-SC that employ multiple positive samples. + +# 4.4. Analysis of the Proposed Method + +Generalizability to the large-scale supervised approach. To study the generalizability of the proposed method, we equip our trained models with LGSS [6], where LGSS is a large-scale supervised method and utilizes various pretrained models with multi-modality. As is Shown in Tab. 6, our trained model, trained only on the unlabeled training set, and based on the same backbone, i.e. ResNet-50 [38], achieves an improvement of 4.0 in terms of AP over the approach without our trained model. + +Table 6. Generalizability to the large-scale supervised approach. + +
MethodsModalitiesAP
LGSS [6] w/o SSLVisual(Place, ResNet50) +Action+Actor+Audio44.9
LGSS [6] w/ SSLVisualSSL, ResNet50) +Action+Actor+Audio48.9
+ +Performance on different Self-Supervised Learning (SSL) frameworks. Four popular SSL frameworks are used for evaluating our method, i.e., SimCLR [12], MoCo [14], BYOL [17] and SimSiam [16]. Tab. 7 shows that the SSL framework with momentum updates and negative samples achieves the best performance for the Video Scene Segmentation task. Due to the momentum update mechanism, the proposed method embedded in the framework of BYOL [17] achieves an improvement of 10.53 over that in SimSiam [16], and a similar conclusion is reached in [27]. + +Table 7. Results of the proposed method based on various Self-Supervised Frameworks. + +
MethodsSSL Fra-meworksw/ negative samplesw/ momen-tum updateAP
SCRLSimSiam [16]××39.82
SCRLSimCLR [12]✓×45.32
SCRLBYOL [17]×✓50.35
ShotCoL [1]MoCo [14]✓✓46.77
SCRLMoCo [14]✓✓53.74
+ +Boundary free model for evaluation. To study the performance of the introduced boundary free model, the proposed method under MLP and Bi-LSTM protocols for the scene segmentation task is evaluated in Tab. 8. Since BiLSTM protocol has less inductive bias than sliding window based MLP protocol, it is able to model representations of longer shot, hence achieves better performance on the task of Video Scene Segmentation. More specifically, the performance of Bi-LSTM protocol increases as the length of the shots increases, while the performance of MLP protocol decreases instead. More details can be found in Supplementary Materials. + +![](images/fd6a668a2a20bcaf95ddafbfd22ceced232079d5e050c75c32499a4603103abc.jpg) +Figure 7. The visualization results of shot retrieval. Overall, $NN$ tends to select adjacent shots, Self shows less relevance to the query and ImageNet retrieves many kinds of boats. Compared with the other methods, the results of $SC$ are more consistent in the semantic information, i.e., there is a man staying in the boat, and $SC$ achieves a larger span (i.e., from 641 to 850) than $NN$ according to shot IDs. Meanwhile, $SC$ shows better robustness against the interference of pink smoke in the 994-th shot as the results are more pure. + +Table 8. Results of Video Scene Segmentation using the proposed method under MLP and Bi-LSTM protocols. + +
ProtocolsShot-LenAPF1#Param
MLP [1]453.7450.4037.75 M
MLP [1]1049.61 ↓44.04 ↓88.09 M ↑
Bi-LSTM1043.9442.1215.22 M
Bi-LSTM4054.55 ↑51.39 ↑15.22 M
+ +Visualization of Shot Retrieval. To get more intuition for the proposed selection, we conduct retrieval experiments using four selection methods, i.e., SC, NN, Self-Augmented and ImageNet selections, and present the results in Fig. 7. More specifically, for a given shot, we calculate the similarities between it and the other shots in the entire movie, then visualize the TOP-5 most similar shots in Fig. 7. + +# 4.5. Limitations + +Multi-modal Pretraining. In order to test the performance of the proposed algorithm generalizing to multimodal data, we also conduct experiments with audio and visual modalities in the SSL stage, the joint multi-modal learning scheme follows [41]. However, we did not achieve any improvement and were confronted with the same concern that is mentioned in [1], as shown in Table. 9. Possible reasons are that (i) the publicly available audio data of each shot are incomplete, (ii) the raw audio data are not available yet due to copyright restrictions [31] and (iii) LGSS [6] utilizes various pretrained models on the other datasets, while the methods in the comparison are trained from scratch. Therefore, it is meaningful to shed light on how to pretrain + +better multi-modal representations on the MovieNet [31]. + +Table 9. AP results of the multi-modal experiment on MovieNet. Backbones of following methods for each modality are the same. + +
MethodsVisualAudioVisual+Audio
LGSS [6]39.017.543.4
ShotCoL [1]46.7727.9244.32
SCRL53.7429.3950.80
+ +# 5. Conclusion + +We present a Self-Supervised Learning (SSL) scheme based on Scene Consistency to obtain better shot representations for the unlabeled long-term videos. The proposed method achieves the state-of-the-art performance on the task of Video Scene Segmentation under various protocols, and significant better generalization performance when it is equipped with large-scale supervised approach. Besides, we introduce a fair pretraining protocol and a more comprehensive evaluation metric for the task of Video Scene Segmentation, to make the assessment of the SSL more meaningful in practice. + +Acknowledgment The work was supported by the National Natural Science Foundation of China under grants no. 61602315, 91959108, the Science and Technology Project of Guangdong Province under grant no. 2020A1515010707, the Science and Technology Innovation Commission of Shenzhen under grant no. JCYJ20190808165203670. + +# References + +[1] Shixing Chen, Xiaohan Nie, David Fan, Dongqing Zhang, Vimal Bhat, and Raffay Hamid. Shot contrastive self-supervised learning for scene boundary detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9796-9805, 2021. 1, 2, 3, 4, 5, 6, 7, 8 +[2] Tianwei Lin, Xu Zhao, Haisheng Su, Chongjing Wang, and Ming Yang. Bsn: Boundary sensitive network for temporal action proposal generation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 3-19, 2018. 2 +[3] Jing Tan, Jiaqi Tang, Limin Wang, and Gangshan Wu. Relaxed transformer decoders for direct action proposal generation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 13526-13535, 2021. 2 +[4] Anthony Cioppa, Adrien Deliege, Silvio Giancola, Bernard Ghanem, Marc Van Droogenbroeck, Rikke Gade, and Thomas B Moeslund. A context-aware loss function for action spotting in soccer videos. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13126-13136, 2020. 2 +[5] Silvio Giancola, Mohieddine Amine, Tarek Dghaily, and Bernard Ghanem. Soccertnet: A scalable dataset for action spotting in soccer videos. In Proceedings of the IEEE conference on computer vision and pattern recognition workshops, pages 1711-1721, 2018. 2 +[6] 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 Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10146-10155, 2020. 2, 5, 6, 7, 8 +[7] Panagiotis Sidiropoulos, Vasileios Mezaris, Ioannis Kompat-siaris, Hugo Meinedo, Miguel Bugalho, and Isabel Trancoso. Temporal video segmentation to scenes using high-level audiovisual features. IEEE Transactions on Circuits and Systems for Video Technology, 21(8):1163-1177, 2011. 2 +[8] Jakub Lokoc, Gregor Kovalcik, Tomáš Souček, Jaroslav Moravec, and Přemysl Čech. A framework for effective known-item search in video. In Proceedings of the 27th ACM International Conference on Multimedia, pages 1777-1785, 2019. 2 +[9] Vasileios T Chasanis, Aristidis C Likas, and Nikolaos P Galatsanos. Scene detection in videos using shot clustering and sequence alignment. IEEE transactions on multimedia, 11(1):89-100, 2008. 2, 6 +[10] Lorenzo Baraldi, Costantino Grana, and Rita Cucchiara. A deep siamese network for scene detection in broadcast videos. In Proceedings of the 23rd ACM international conference on Multimedia, pages 1199-1202, 2015. 2, 3, 5, 6 +[11] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Con- + +ference on Computer Vision and Pattern Recognition, pages 9729-9738, 2020. 2, 5 +[12] 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. 2, 4, 5, 7 +[13] Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey E Hinton. Big self-supervised models are strong semi-supervised learners. Advances in Neural Information Processing Systems, 33:22243-22255, 2020. 2, 5 +[14] Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020. 2, 3, 4, 5, 6, 7 +[15] Xinlei Chen, Saining Xie, and Kaiming He. An empirical study of training self-supervised vision transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9640-9649, 2021. 2, 5 +[16] Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 15750-15758, 2021. 2, 4, 5, 7 +[17] Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent-a new approach to self-supervised learning. Advances in Neural Information Processing Systems, 33:21271-21284, 2020. 2, 4, 5, 7 +[18] Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. In Thirty-fourth Conference on Neural Information Processing Systems (NeurIPS), 2020. 2, 5 +[19] Zhiheng Huang, Wei Xu, and Kai Yu. Bidirectional LSTM-crf models for sequence tagging. arXiv preprint arXiv:1508.01991, 2015. 3, 6 +[20] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. In ICLR 2018, 2018. 2 +[21] Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A Efros. Context encoders: Feature learning by inpainting. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2536-2544, 2016. 2 +[22] Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In European conference on computer vision, pages 649-666. Springer, 2016. 2 +[23] Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In European conference on computer vision, pages 69-84. Springer, 2016. 2 +[24] Rui Qian, Tianjian Meng, Boqing Gong, Ming-Hsuan Yang, Huisheng Wang, Serge Belongie, and Yin Cui. Spatiotemporal contrastive video representation learning. In Proceedings + +of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6964-6974, 2021. 2, 3 +[25] Ali Diba, Vivek Sharma, Reza Safdari, Dariush Lotfi, Saqib Sarfraz, Rainer Stiefelhagen, and Luc Van Gool. Vi2clr: Video and image for visual contrastive learning of representation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1502-1512, 2021. 2, 3 +[26] Haofei Kuang, Yi Zhu, Zhi Zhang, Xinyu Li, Joseph Tighe, Soren Schwertfeger, Cyrill Stachniss, and Mu Li. Video contrastive learning with global context. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3195-3204, 2021. 2 +[27] Christoph Feichtenhofer, Haoqi Fan, Bo Xiong, Ross Girshick, and Kaiming He. A large-scale study on unsupervised spatiotemporal representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3299-3309, 2021. 2, 3, 7 +[28] Jiahao Xie, Xiaohang Zhan, Ziwei Liu, Yew Ong, and Chen Change Loy. Unsupervised object-level representation learning from scene images. Advances in Neural Information Processing Systems, 34, 2021. 2 +[29] 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. 2, 4 +[30] Adria Recasens, Pauline Luc, Jean-Baptiste Alayrac, Luyu Wang, Florian Strub, Corentin Tallec, Mateusz Malinowski, Viorica Pătrăucean, Florent Altché, Michal Valko, et al. Broaden your views for self-supervised video learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1255–1265, 2021. 2 +[31] Qingqiu Huang, Yu Xiong, Anyi Rao, Jiaze Wang, and Dahua Lin. Movienet: A holistic dataset for movie understanding. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part IV 16, pages 709-727. Springer, 2020. 2, 3, 5, 6, 8 +[32] Daniel Rotman, Dror Porat, and Gal Ashour. Optimal sequential grouping for robust video scene detection using multiple modalities. International Journal of Semantic Computing, 11(02):193-208, 2017. 3, 5 +[33] Jiarui Xu and Xiaolong Wang. Rethinking self-supervised correspondence learning: A video frame-level similarity perspective. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 10075-10085, 2021. 4 +[34] Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3733-3742, 2018. 5 +[35] Makarand Tapaswi, Martin Bauml, and Rainer Stiefelhagen. Storygraphs: visualizing character interactions as a timeline. + +In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 827-834, 2014. 6 +[36] 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 +[37] Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE transactions on pattern analysis and machine intelligence, 40(6):1452-1464, 2017. 6 +[38] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 5, 7 +[39] Stuart Lloyd. Least squares quantization in lcm. IEEE transactions on information theory, 28(2):129-137, 1982. 6 +[40] Haozhe Liu, Haoqian Wu, Weicheng Xie, Feng Liu, and Linlin Shen. Group-wise inhibition based feature regularization for robust classification. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 478-486, 2021. 6 +[41] 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. 8 \ No newline at end of file diff --git a/sceneconsistencyrepresentationlearningforvideoscenesegmentation/images.zip b/sceneconsistencyrepresentationlearningforvideoscenesegmentation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..353b6824f834542184ee4a21d335707495f70240 --- /dev/null +++ b/sceneconsistencyrepresentationlearningforvideoscenesegmentation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:902ca1dbb63ef9ad22a5531b238611e5b9864ff08ba90b7c7624be82a87703ca +size 528629 diff --git a/sceneconsistencyrepresentationlearningforvideoscenesegmentation/layout.json b/sceneconsistencyrepresentationlearningforvideoscenesegmentation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..143d42a4e21df0f076edf16f5c48a7a8d8247d08 --- /dev/null +++ b/sceneconsistencyrepresentationlearningforvideoscenesegmentation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f7825265569baa63e723210086ae7e5cc450170fb7d80ad39472692a5c2adc8 +size 378700 diff --git a/scenegraphexpansionforsemanticsguidedimageoutpainting/9f0599ee-257e-43b1-94d5-3cbc1bb46153_content_list.json b/scenegraphexpansionforsemanticsguidedimageoutpainting/9f0599ee-257e-43b1-94d5-3cbc1bb46153_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..20059f6eb8a60c927e983f939af031286d3ef937 --- /dev/null +++ b/scenegraphexpansionforsemanticsguidedimageoutpainting/9f0599ee-257e-43b1-94d5-3cbc1bb46153_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c733fc59f48649d1f830ce14de2d4866505fc4b86195dedc950269d72080402 +size 70426 diff --git a/scenegraphexpansionforsemanticsguidedimageoutpainting/9f0599ee-257e-43b1-94d5-3cbc1bb46153_model.json b/scenegraphexpansionforsemanticsguidedimageoutpainting/9f0599ee-257e-43b1-94d5-3cbc1bb46153_model.json new file mode 100644 index 0000000000000000000000000000000000000000..62854d0aeb073edd3419298e4b19a8a95d9a7161 --- /dev/null +++ b/scenegraphexpansionforsemanticsguidedimageoutpainting/9f0599ee-257e-43b1-94d5-3cbc1bb46153_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60cab38bada194cd8a1d66400240834438e7d4a06711b1f49d5cf557a4ea220c +size 85841 diff --git a/scenegraphexpansionforsemanticsguidedimageoutpainting/9f0599ee-257e-43b1-94d5-3cbc1bb46153_origin.pdf b/scenegraphexpansionforsemanticsguidedimageoutpainting/9f0599ee-257e-43b1-94d5-3cbc1bb46153_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1eaa88271fac2c1e47638d0c4eff1709f9576737 --- /dev/null +++ b/scenegraphexpansionforsemanticsguidedimageoutpainting/9f0599ee-257e-43b1-94d5-3cbc1bb46153_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff8ad572f9ca4e21086bf7a9683d81cac5f95e7aba2c8c40328b15b1f419cda1 +size 6109393 diff --git a/scenegraphexpansionforsemanticsguidedimageoutpainting/full.md b/scenegraphexpansionforsemanticsguidedimageoutpainting/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d0f683799227684b36c6f0aac8c148ca96f45025 --- /dev/null +++ b/scenegraphexpansionforsemanticsguidedimageoutpainting/full.md @@ -0,0 +1,266 @@ +# Scene Graph Expansion for Semantics-Guided Image Outpainting + +Chiao-An Yang $^{1}$ , Cheng-Yo Tan $^{1}$ , Wan-Cyuan Fan $^{1}$ , Cheng-Fu Yang $^{1}$ , Meng-Lin Wu $^{2}$ , Yu-Chiang Frank Wang $^{1}$ + +$^{1}$ National Taiwan University, $^{2}$ Qualcomm Technologies, Inc. + +joeyang@ntu.edu.tw, {cy.ugo.tan, christine5200312, joeyy5588}@gmail.com + +menglinw@qty=qualcomm.com, ycwang@ntu.edu.tw + +# Abstract + +In this paper, we address the task of semantics-guided image outpainting, which is to complete an image by generating semantically practical content. Different from most existing image outpainting works, we approach the above task by understanding and completing image semantics at the scene graph level. In particular, we propose a novel network of Scene Graph Transformer (SGT), which is designed to take node and edge features as inputs for modeling the associated structural information. To better understand and process graph-based inputs, our SGT uniquely performs feature attention at both node and edge levels. While the former views edges as relationship regularization, the latter observes the co-occurrence of nodes for guiding the attention process. We demonstrate that, given a partial input image with its layout and scene graph, our SGT can be applied for scene graph expansion and its conversion to a complete layout. Following state-of-the-art layout-to-image conversions works, the task of image outpainting can be completed with sufficient and practical semantics introduced. Extensive experiments are conducted on the datasets of MS-COCO and Visual Genome, which quantitatively and qualitatively confirm the effectiveness of our proposed SGT and outpainting frameworks. + +# 1. Introduction + +Given an incomplete image or a partial image input, humans generally are able to picture the context of the corresponding complete version. Such reasoning skill is largely based on our prior experience and knowledge observed from diverse images and their semantics. In the scope of machine learning, the objective is typically applied for the task of image completion, aiming to generate or predict reasonable missing image regions based on the observed input. In the areas of computer vision and image processing, several content creation applications such as object removal editing [21], image panorama creation [30], texture cre + +![](images/d9c8d746be8f81358369f026b9888b79c14939c31cf5694ff36e04c1d0568f77.jpg) +Figure 1. Illustration of semantics-guided image outpainting. Our work can be divided into stages of (a) Scene Graph Expansion (SGE), (b) Scene Graph to Layout (G2L), and (c) Layout to Image (L2I) conversions. The blue node and red edges in the scene graph indicate the generated objects and relationship, respectively. + +ation [24], and view expansion [29] are closely related to the aforementioned task. + +Depending on where the missing parts are to be recovered, the task of image completion is typically divided into two categories, image inpainting (also known as image hole-filling) and outpainting (also known as image extrapolation). Compared to image inpainting, image outpainting needs to synthesize unknown regions in single-sided fashions and thus is considered to be more challenging. Based on image inpainting works [8,16,18,27,31], researchers advance local and global GAN [8], Partial Convolution [16], Gated Convolution [31] and edge information [18] for outpainting tasks [11, 17, 20, 23, 26, 29]. However, despite impressive performances, most existing approaches are not designed to predict novel semantic regions in the output images. That is, they mainly focus on extending the surrounding texture or completing the fractional objects, resulting in extrapolated image regions with repeating structures or patterns. It is not clear how to introduce novel semantics with reasonable relationships with the existing ones during outpainting. As a result, we choose to approach this chal + +lenging semantics-oriented image outpainting problem by modeling and manipulating images at the semantic level. + +In order to tackle the above task, a scene graph would be a desirable representation due to their ability in describing the presence of semantic objects and their relationships in an image. Thus, based on recent works such as [9], [6] and [19], one can describe and categorize a given image into three levels. The first level is the image level, containing pixel-level information. The second one is the layout level, which describes the locations/sizes of the objects of interest, including their corresponding category labels. The final level is the scene graph level, which describes semantic objects and their relationships (e.g., right of, throw) in an image. The higher the level is, the more abstract and semantic information it would contain. + +In this paper, we choose to decompose the semantics-guided image outpainting task into three stages, as depicted in Figure 1. Given the scene graph extracted from the partial image and its layout, the first stage of scene graph expansion (SGE) utilizes the proposed Scene Graph Transformer (SGT), which uniquely performs node and edge-level attention, for expanding the input scene graph. The following stage of G2L further transforms such an expanded scene graph into a complete layout. Finally, layout-to-image (L2I) models can be applied for producing the final image output. We note that both SGE and G2L stages utilize our proposed SGT module, taking scene graph data as inputs with unique objectives introduced to enforce the desirable object/relationship properties, as later discussed in Sect. 3. + +The contributions of our work are highlighted as follows: + +- We approach the task of semantics-guided image outpainting, which is able to synthesize novel yet semantically practical objects with associated relationships for completing an image output. +- We propose a Scene Graph Transformer (SGT), which takes node and edge features with unique node-level and edge-level attention mechanisms for modeling the associated structural information. +- Expecting the sparsity of the object relationships in a scene graph, our SGT is designed to exploit the converse relationships between objects, so that semantically practical nodes and their corresponding edges can be properly recovered or expanded. + +# 2. Related Work + +# 2.1. Image Outpainting + +Adversarial learning [20] has been applied for image outpainting, generating image regions toward horizontal directions. By adopting a recurrent neural network, [29] extends the output image in a single direction with varying + +lengths. As for [17], it fills in the intermediate gap between left and right partial image inputs for outpainting purposes. Although the method of [26] allows outpainting in all four directions, they require extra information (i.e., the image margins) during both training and testings. While such requirements are later alleviated by [22], most existing works are only capable of extending background textural regions or mending fractional objects. It is not clear whether novel yet semantically practical image regions can be added to the output image. Recently, [11] proposes to outpaint images based on the extrapolated segmentation map, serving as guidance for generating novel object instances. + +# 2.2. From Scene Graphs to Images + +As noted in [10], scene graph is a data structure with each node encoding an object in the image, and each edge describing the associated relationship. Scene graph generation can be viewed as a task of image-to-text conversion. However, generating an image from a scene graph is a more challenging task, and is first tackled by [9] in an end-to-end learning fashion. Taking the image layout as an intermediate representation, one typically converts a scene graph to an image layout, followed by a layout-to-image conversion task. For scene graph to layout, [6] leverages the converse and transition property of relationships. [19] proposes Spade, an architecture for describing image semantic layouts. [6] extends Spade for manipulating the attributes of the generated objects. + +With the recent advances of the Transformer [25], recent approaches like [2, 28, 32] utilize Transformer based architectures for handling scene graph data, either for scene graph generation or scene graph to layout generation. However, these methods cannot be easily applied for scene graph expansion, which is critical in our focus on semantics-guided image outpainting. Nevertheless, since the Transformer deals with sequential data, one needs to convert the input scene graph to a sequence of triplets, each consisting of a subject, a predicate, and an object. Moreover, since "no relation" would be also viewed as a predicate, describing a scene graph from an image would inevitably result in a large number of triplets. This would result in long triplet sequences, making the learning of the Transformer inefficient. Another potential problem for triplet representations is that if one object node has multiple relationship edges, the object node will appear in multiple triplets, which might result in redundant representations with inconsistent semantic outputs. In this paper, we propose an alternative yet novel architecture, Scene Graph Transformer (SGT). As detailed in the following section, our SGT would alleviate the aforementioned problems and can be applied for both scene graph expansion and scene graph to layout generation. + +![](images/0cabe71d7b4f2be221be9bb45068a28601c4a5cf712199d84677bd9c3efa564c.jpg) +(a) Node-level Attention + +![](images/50449dd623bf520f9e709c2d78ef8f5d5abc0c0372be010105d9528eb0ab2850.jpg) +(b) Edge-level Attention +Figure 2. Scene Graph Transformer. (a) Node-level attention: attention across nodes under guidance of the associated edges. (b) Edge-level attention: attention across edges conditioned on the sharing nodes. Note that $W_{v}^{n}, W_{s}^{n}, W_{v}^{e}W_{s}^{e}$ denote the MLP transformation layers for the corresponding feature modalities. + +# 3. Methodology + +# 3.1. Notations and Algorithmic Overview + +Image outpainting. Given an incomplete image $\mathbf{I}^{in}$ of $h_1 \times w_1$ pixels, image outpainting is to generate an extrapolated image $\mathbf{I}^{op}$ of $h_2 \times w_2$ pixels with $h_2 > h_1$ and $w_2 > w_1$ . During training, we have $\mathbf{I}^{in}$ partially cropped out from a complete image $\mathbf{I}^{gt}$ (of $h_2 \times w_2$ pixels), aiming at producing $\mathbf{I}^{op}$ to recover $\mathbf{I}^{gt}$ . + +Scene graph and layout. To describe semantic information in an image, a scene graph $S = (O, R)$ consists of a list of $N$ objects (nodes) $O = \{o_i\}_{i=1:N}$ and the associated relationship (edge) matrix $R = (r_{ij}) \in \mathbb{R}^{N \times N}$ , where $o_i$ is the object label, and $r_{ij}$ indicates the edge label between objects $o_i$ and $o_j$ . Note that $r_{ij}$ belongs to $\{y_1^R, y_2^R, \dots, y_M^R\} \cup \{0\}$ , where each $y_i^R$ denotes the relation label (e.g., riding, wear, on, etc.), and $M$ is its label number. And, $r_{ij} = 0$ indicates no relationship between the corresponding object pair. On the other hand, a layout is a list of bounding boxes of each object in an image, i.e., $\mathbf{B} = \{b_i\}_{i=1:N}$ with each $b_i = (b_i^x, b_i^y, b_i^w, b_i^h)$ describing the center coordinates and the size of the bounding box. We also compute the bounding box disparity for + +each relationship $\mathbf{D} = (\pmb{d}_{ij})\in \mathbb{R}^{N\times N\times 4}$ , where each $\pmb{d}_{ij} = \{b_i^x -b_j^x,b_i^y -b_j^y,\log (b_i^w /b_j^w),\log (b_i^h) / \log (b_j^h)\}$ describes the spatial displacement between the bounding boxes of each subject-object pair. + +Algorithmic overview. To perform semantic-guided image outpainting, our model would introduce novel object instances with realistic relationships with semantic practicality, which can be decomposed into the following three stages: The scene graph expansion (SGE) stage deploys the Scene Graph Transformer based on incomplete images $I^{in}$ with their layouts $L^{in} = (B^{in}, D^{in})$ and scene graphs $S^{in} = (O^{in}, R^{in})$ , so that the model $T_{SGE}$ would expand $S^{in}$ into $S^{op} = (O^{op}, R^{op})$ . In the stage of scene graph to layout (G2L), we learn a second SGT-based model $T_{G2L}$ which converts the expanded scene graph into layout $L^{op}$ under the guidance of $I^{in}$ . Finally, for the layout to image (L2I) stage, we produce the final outpainted image $I^{op}$ via the model $G_{L2I}$ . While not being the main focus of this work, our model $G_{L2I}$ is based on SPADE [19] reset blocks and consists of an image encoder and a generator. + +# 3.2. Scene Graph Transformer + +In this paper, we propose a novel architecture of Scene Graph Transformer (SGT), which is particularly designed to handle graph-structured data. With the ability to describe the nodes and their relationships in an image scene graph, our SGT performs separate yet mutually related self-attention between node levels and edge levels. That is, SGT views edges in scene graphs as regularization during the self-attention between different nodes, while the co-occurrence of nodes would guide the self-attention across different edges. Since both stages of SGE and G2L in our outpainting task take scene graph data as the inputs, our SGT will be utilized in both stages with objectives properly introduced and enforced. + +For the sake of completeness, we briefly review the standard Transformer and explain how it can be applied to handle graph-structured data with $N$ nodes. As a sequence-to-sequence model, the Transformer consists of multiple transformation layers mapping an input sequence $\pmb{H} = \{\pmb{h}_i\}_{i=1:3N^2}$ to the output $\hat{\pmb{H}} = \{\hat{\pmb{h}}_i\}_{i=1:3N^2}$ . Note that, with $N$ nodes and $N^2 = N \times N$ edges in the input graph, the Transformer in [2, 28, 32] needs to convert such input data into a sequence, whose length is at least $3N^2$ due to the triplet representation "subject-predicate-object". For each transformer layer, the input vector $\pmb{h}$ is first converted into the query vector $\pmb{q}$ , the key vector $\pmb{k}$ , and the value vector $\pmb{v}$ through an MLP layer. The output vector $\hat{\pmb{h}}$ is computed as the weighting sum of the value vector $\pmb{v}_j$ , i.e., $\hat{\pmb{h}}_i = \sum_j s_{ij} \pmb{v}_j$ , with the weight $s_{ij} = \text{softmax}(\pmb{q}_i \cdot \pmb{k}_j / \sqrt{d_{\mathbf{k}}})$ , where $d_{\mathbf{k}}$ is the dimension of $\pmb{k}$ , and $\cdot$ stands for the inner product operation. + +Instead of viewing the scene graph as a single sequence + +of triplets, the transformation layers in our SGT consider node (object) and edge (relationship) features as distinct yet mutually related data modalities. Thus, we have input and output of node feature sequences denoted as $\pmb{H}^{n} = \{\pmb{h}_{i}^{n}\}_{i=1:N}$ and $\hat{\pmb{H}}^{n} = \{\hat{\pmb{h}}_{i}^{n}\}_{i=1:N}$ , respectively. As for those of the edge feature matrices, they are denoted as $\pmb{H}^{e} = \{\pmb{h}_{ij}^{e}\}_{i,j=1:N}$ and $\hat{\pmb{H}}^{e} = \{\hat{\pmb{h}}_{ij}^{e}\}_{i,j=1:N}$ . For each modality, we deploy unique attention mechanisms based on the scene graph structure, as we present below. + +# 3.2.1 Node-level attention + +The first type of attention in our SGT is performed at the node level, while the cross-attention between nodes is enforced by the edge relationships observed. Recall that, for the standard Transformer, it simply "flattens" the scene graph as a sequence of $(\text{node}_i - \text{edge}_{ij} - \text{node}_j)$ triplets with its attention mechanism not distinguishing between data modalities, nor considering the intrinsic graph structure. + +With the scene graph nodes as the inputs, our SGT calculates the similarity between node features $\pmb{h}_i^n$ and $\pmb{h}_j^n$ under the guidance of the associated edge feature $\pmb{h}_{ij}^e$ , with the output for that node $\hat{\pmb{h}}_i^n$ as the weighted summation of the values across each node $j$ . Thus, we have + +$$ +\hat {\boldsymbol {h}} _ {i} ^ {n} = \sum_ {j} \boldsymbol {s} _ {i j} ^ {n} \odot \boldsymbol {v} _ {j} ^ {n}, \tag {1} +$$ + +where $\pmb{v}_j^n$ is the value features for node $j$ , $\pmb{s}_{ij}^n$ indicates the attention weight derived from each triplet with node $i$ (i.e., node $i$ , edge $i_j$ , and node $j$ ), and $\odot$ denotes an element-wise multiplication. + +As depicted in Figure 2(a), the above calculation allows the edges associated with the node of interest to be incorporated into the attention process, which effectively regularizes the attention across nodes based on their corresponding relationships. To provide additional details, we calculate the value vector $\boldsymbol{v}_i^n$ for each node $\boldsymbol{h}_i^n$ through a single MLP $W_v^n$ . Instead of utilizing query or key vectors for calculating the attention weight $s_{ij}^n$ , we take the triplet features of node $i$ -edge $ij$ -node $j$ by concatenating their representations as $t_{ij}^n = h_i^n \oplus h_j^n \oplus h_{ij}^e$ . With another MLP $W_s^n$ taking $t_{ij}^n$ as the input, the output weight vector $s_{ij}^n$ thus attends across $h_i^n$ and $h_j^n$ , i.e. $s_{ij}^n = W_s^n (t_{ij}^n)$ . + +As a final remark, we do not follow the standard Transformer for using inner-product followed by softmax to produce the attention weight. This is because our edge-regularized attention mechanism provides guidance of structural information, and the use of inner-product operation would dilute such information. Thus, we have the output vector $\hat{h}_i^n$ as the summation of element-wise multiplication between $s_{ij}^n$ and $v_j^n$ , as shown in Equation (1). + +# 3.2.2 Edge-level attention + +For the edge features $\pmb{H}^{e}$ in a scene graph, only $\pmb{h}_{ij}^{e}$ contributes to the computation of $\pmb{t}_{ij}^{n} = \pmb{h}_{i}^{n} \oplus \pmb{h}_{j}^{n} \oplus \pmb{h}_{ij}^{e}$ . If one simply performs cross-attention on $\pmb{t}_{ij}^{n}$ , similar nodes would imply and result in the same $\hat{\pmb{h}}_{ij}^{e}$ , which is viewed as the edge collapse problem, i.e., resulting in repeating or redundant edges related to the same node $i$ . For example, it is possible that, for node $j$ and node $k$ both linking to node $i$ , the same $\hat{\pmb{h}}_{ij}^{e}$ and $\hat{\pmb{h}}_{ik}^{e}$ are produced (e.g., two men hold the same tennis racket). + +To tackle the above problem, we propose edge-level attention in our SGT, while the cross-attention between edges is regularized by the nodes sharing the edge of interest, as illustrated in Figure 2(b). To exploit inter-edge information and to take the shared nodes into consideration, we have an input edge feature $\pmb{h}_{ij}^{e}$ with the node pair $i,j$ , and we consider edges linking to either node $i$ or $j$ for attention. Thus, we have the features $\pmb{h}_{kl}^{e}$ for such edges expressed as $\{\pmb{h}_{kl}^{e}|k = i\lor l = j\}$ . And, the triplet feature for edge-level attention is computed as follows: + +$$ +\boldsymbol {t} _ {i j, k l} ^ {e} = \boldsymbol {h} _ {i j} ^ {e} \oplus \boldsymbol {h} _ {k l} ^ {e} \oplus \left\{ \begin{array}{l} \boldsymbol {h} _ {i} ^ {n}, \text {i f} k = i \\ \boldsymbol {h} _ {j} ^ {n}, \text {i f} l = j. \end{array} \right. \tag {2} +$$ + +Instead of having the resulting edge-level attention matrix as $N^2 \times N^2 = N^4$ , only $N^2$ (edge number) $\times 2N$ ( $N$ subjects + $N$ objects) $= 2N^3$ edge pairs need to be considered. This greatly reduces the computation load when comparing to the use of the standard Transformer to perform attention across all edges in a graph. + +The remaining attention mechanism follows that of node-level attention discussed earlier. As depicted in Figure 2(b), the above calculation allows the nodes associated with the edge of interest to be incorporated into the attention process, which effectively regularizes attention across edges based on their shared nodes. To provide further details, we calculate the value vector $\boldsymbol{v}_{kl}^{e}$ for each edge $\boldsymbol{h}_{kl}^{e}$ through a single MLP $W_{v}^{e}$ . The "edge triplet feature" of edge $ij$ -shared node-edge $_{kl}$ is obtained by concatenating their representations as shown by Equation 2. With an MLP $W_{s}^{e}$ taking $\boldsymbol{t}_{ij,kl}^{e}$ as the input, the output weight vector $\boldsymbol{s}_{ij,kl}^{e}$ thus attends across $h_{ij}^{e}$ and $h_{kl}^{e}$ , i.e. $\boldsymbol{s}_{ij,kl}^{e} = W_{s}^{e}(\boldsymbol{t}_{ij,kl}^{e})$ . + +# 3.3. Semantic-Guided Image Outpainting + +# 3.3.1 Scene Graph Expansion + +Aiming at expanding the scene graph extracted from the input image, our SGT-based SGE model $T_{SGE}$ learns to append novel object nodes with the associated and necessary relationship edges introduced. Inspired by masked language model [4], we train this model by observing a complete scene graph $S^{gt} = (O^{gt}, R^{gt})$ , with a number of objects in $O^{gt}$ being masked with a special token [MASK] assigned. + +![](images/0ae6c3266b3b97386a949977f3eb567cbbe4c93e511108df56831541ffe3ca30.jpg) +Figure 3. Flowcharts for (a) SGE and (b) G2L. Note that the colors for the feature cubes indicate their data modalities, and those in gray and dark-color denote the masked and generated ones. For SGE, the object and relationship classes are used as node and edge inputs, respectively. For G2L, we have the concatenated features of object class, bounding box, and the associated visual features as the node input, while the concatenated relationship label and its bounding box disparity as the edge inputs. + +Subsequently, the relationships in $\pmb{R}$ linking to the masked node (either a subject or a object) will also be masked. This results in the partial input scene graph $S^{in} = (O^{in}, R^{in})$ . + +In order to perform node and edge-level attention, our SGE model $T_{SGE}$ contains object and relationship embedding encoders $E_O$ and $E_R$ to extract features from nodes and edges, object and relationship classifiers $C_O$ and $C_R$ for recognizing the derived output features, as shown in Fig. 3(a). That is, $T_{SGE}$ takes the object category word embeddings $f_i^O = E_O(o_i^{in})$ as the node inputs $h_i^n$ , and the relationship category word embedding $f_{ij}^R = E_R(r_{ij}^{in})$ as the relationship matrix input $h_{ij}^e$ . $C_O$ learns to predict the object class $o_i^{op} = C_O(\hat{h}_i^n)$ , and the relationship classifier $C_R$ predicts the relationship label $r_{ij}^{op} = C_R(\hat{h}_{ij}^e)$ . From the above process, the objective of training $T_{SGE}$ is to recover the complete scene graph $S^{op} = (O^{op}, R^{op})$ from $S^{in}$ . Thus, the objective can be summarized below: + +$$ +\mathcal {L} _ {S G E} = \sum_ {i} \mathcal {L} _ {C E} \left(o _ {i} ^ {o p}, o _ {i} ^ {g t}\right) + \sum_ {i, j} \mathcal {L} _ {C E} \left(r _ {i j} ^ {o p}, r _ {i j} ^ {g t}\right), \tag {3} +$$ + +where $\mathcal{L}_{CE}$ indicates the cross-entropy classification loss. + +Exploitation of converse relationships. As noted in Sect. 3.1, $\pmb{R} = (r_{ij})\in \mathbb{R}^{N\times N}$ denotes the relationships between each object pair in the scene graph. However, this matrix is not necessarily expected to be a symmetric matrix, since $r_{ij} = y^R$ and $r_{ji} = \tilde{y}^R$ are viewed as relational antonyms and thus with converse relationships, even both edges are connected to the same node pair. Given an input + +scene graph, typically only one of such relationship pairs would be observed. Thus, the above converse relationship can be implicitly inferred when either $r_{ij}$ or $r_{ji}$ is presented, resulting in the relationship matrix towards skew-symmetric (i.e., $r_{ji} = \tilde{r}_{ij}$ ). In practice, only a limited number of relationships would be specified in a scene graph, one thus observes a sparse ground truth relationship matrix $R^{gt}$ , lacking converse relationship pairs. Also, one of the attention mechanisms introduced in our SGT is node-level attention, which is specifically guided by the relationship between the nodes of interest. Without properly generating and observing the aforementioned converse relationship pairs, the attention would be partially biased and result in undesirable outputs. The above challenges make the learning of the SGE model $T_{SGE}$ very difficult. + +To tackle the above problem, we choose to process $\pmb{R}^{gt}$ as follows. For each non-empty $r_{ij}^{gt} = y^R$ , we manually assign the converse label $\tilde{y}^R$ to the associated empty $r_{ji}^{gt}$ . (e.g., converse-riding vs. riding, and converse-on vs. on). It is worth noting that, the above label processing is for training $T_{SGE}$ only, not for later G2L and L2I training purposes. + +Furthermore, to enforce the one-to-one mapping between a relationship and its converse version, we deploy an additional feature converter $E_{C}$ which takes the input relationship $E_{R}(y^{R})$ and produces its converse version. This allows the classifier $C_R$ to predict its lalel $\tilde{y}^R$ . Thus, $E_{C}$ is trained with the classification loss: $\mathcal{L}_{conv} = \sum_{i}\mathcal{L}_{CE}(C_{R}\circ E_{C}\circ E_{R}(y_{i}^{R}),\tilde{y}_{i}^{R})$ . + +With converse relationship enforced, the skew-symmetry property of the SGE model can be expected, which can be + +![](images/d2085622af1370bf7d2795e86cf440a1d530dc0c2b65b36e385ea7a510165ecd.jpg) +Figure 4. Illustration of our L2I Model $G_{L2I}$ . Based on AttSpade [6], the decoder of $G_{L2I}$ (i.e., $G_{SPADE}$ ) takes semantic maps as guidance for producing image outputs. + +calculated by the following loss function: + +$$ +\mathcal {L} _ {s y m} = \sum_ {i j} \mathcal {L} _ {C E} \left(C _ {R} \circ E _ {C} \circ E _ {R} \left(r _ {i j} ^ {o p}\right), r _ {j i} ^ {g t}\right). \tag {4} +$$ + +Note that $r_{ij}^{op} = C_R(\hat{h}_{ij}^e)$ denotes the relationship label derived from the output relationship $\pmb{h}_{ij}^{e}$ . Finally, our $T_{SGE}$ is trained with the combination of Equations (3) and (4). + +# 3.3.2 Scene Graph to Layout (G2L) + +Given a partial input image $\pmb{I}^{in}$ with the corresponding layout $\pmb{L}^{in}$ , together with the expanded scene graph $S^{op}$ , the second stage of our work is to learn a G2L model $T_{G2L}$ for generating the plausible layout $\pmb{L}^{op}$ . Based on the architecture of SGT but different from $T_{SGE}$ , our $T_{G2L}$ considers a bounding box encoder $E_B$ with a regressor $R_B$ , and a disparity encoder $E_D$ with a regressor $R_D$ . Moreover, as shown in Figure 3(b), an image encoder $E_I$ is deployed to distinguish whether a non-masked object is with missing parts. For example, it is possible the $I_{in}$ consists of a horse with its legs cropped out of the image, thus with a smaller incomplete $L_{in}$ . By feeding $T_{G2L}$ with the visual feature of $I_{in}$ , it is expected to attend the partial horse and thus expand its incomplete bounding boxes accordingly. + +Utilizing SGT, the input layout for $T_{G2L}$ is also described as a graph $(H^n, H^e)$ . Each node $h_i^n$ is obtained by concatenating the object category embedding $f_i^O = E_O(o_i)$ , bounding box feature $f_i^B = E_B(b_i)$ , and the visual feature $f_i^I$ , i.e. $h_i^n = f_i^O \oplus f_i^B \oplus f_i^I$ . Note that $f_i^I$ can be directly obtained by cropping out the associated region from the input feature map $f^I = E_I(I)$ . As for the edges in $H^e$ , each edge input $h_{ij}^e$ is obtained by concatenating the relationship category embedding $f_{ij}^R = E_R(r_{ij})$ and the disparity feature $f_{ij}^D = E_D(d_{ij})$ , i.e. $h_{ij}^e = f_{ij}^R \oplus f_{ij}^D$ . + +We note that the regressor $R_{B}$ in $T_{G2L}$ predicts bounding box information. If node $i$ denotes a novel/masked object, the regressor is trained to predict the bounding boxes $\boldsymbol{b}_{i}^{op}$ , under the supervision of ground truth $\boldsymbol{b}_{i}^{gt}$ . Otherwise, it would predict the boundary offset $\boldsymbol{b}_{i}^{off} = \boldsymbol{b}_{i}^{gt} - \boldsymbol{b}_{i}^{in}$ (i.e., top, bottom, left, and right) between the input object and the ground truth one. As for the regressor $R_{D}$ , it is deployed to maintain the consistency between the node outputs and edge + +outputs, and is trained to predict the bounding box disparities $\pmb{d}_{ij}^{op}$ under the supervision of ground truth $\pmb{d}_{ij}^{gt}$ . With the above definitions, we train $T_{G2L}$ with the following loss: + +$$ +\begin{array}{l} \mathcal{L}_{G2L} = \sum_{i,\text{if} o_{i}^{in}\neq \text{mask}}\mathcal{L}_{cIoU}(\boldsymbol{b}_{i}^{off} + \boldsymbol{b}_{i}^{in},\boldsymbol{b}_{i}^{qt}) \\ + \sum_ {i, \text {i f} o _ {i} ^ {i n} = \text {m a s k}} \mathcal {L} _ {c I o U} \left(\boldsymbol {b} _ {i} ^ {o p}, \boldsymbol {b} _ {i} ^ {g t}\right) + \sum_ {i, j} \left| \boldsymbol {d} _ {i j} ^ {o p} - \boldsymbol {d} _ {i j} ^ {g t} \right|, \tag {5} \\ \end{array} +$$ + +where $\mathcal{L}_{cIoU}(\cdot)$ is the complete-IoU loss utilized in [34]. + +# 3.3.3 Layout to Image (L2I) + +With the expanded scene graph and layout, our final stage is to perform layout to image conversion. Adapted from AttSpade [6], our L2I model $G_{L2I}$ learns to outpaint the partial input image into $I^{op}$ , conditioned on $S^{op}$ and $L^{op}$ . To enforce visual consistency, we choose to concatenate the image feature $f^I = E_I(I^{in})$ with the layout feature map $f^L$ to form the semantic information map $f^S$ . This allows our model to generate a realistic output image with the guidance of $f^S$ through layers of SPADE blocks. Since the ground truth images are available during training, in addition to the adversarial loss, we are able to train $G^{L2I}$ with the reconstruction loss between $I^{op}$ and $I^{gt}$ . + +It is worth repeating that, since we focus on the design of SGT (and its use for SGE and G2L), producing high-quality image outputs is not within the main scope of this work. Thus, AttSpade-based designs can be replaced with state-of-the-art image conversion models if desirable. + +# 4. Experiments + +# 4.1. Datasets + +We evaluate our proposed methods on scene-level image datasets with bounding box annotation, namely COCO-stuff [1, 15], VG-MSDN [13, 14] and CityScapes [11]. Please see the supplementary materials for more details. + +# 4.2. Evaluation and Analysis + +Scene graph expansion. To compare the output expanded scene graph $\mathbb{S}^{op}$ to the ground truth $\mathbb{S}^{gt}$ , we report the metrics of the averaged rank of correct prediction (rAVG) and the top- $k$ accuracy (Hits@ $k$ ) for both object and relationship predictions, respectively. Note that We ignore the "empty" relationship in $\mathcal{S}^{gt}$ for accuracy calculation due to the sparsity expected for scene graphs. + +To assess that, compared to the training of masked language models (MLM), whether our proposed SGT learning + +Table 1. Quantitative evaluation on scene graph expansion. Note that masking strategies of M and E denote uses of standard MLM and our expansion-based learning schemes, as described in Sect. 4.2. + +
Masking strategyVG-MSDNCOCO-stuff
ObjectRelationObjectRelation
rAVG ↓Hit@ 1 / 5 ↑rAVG ↓Hit@ 1 / 5 ↑rAVG ↓Hit@ 1 / 5 ↑rAVG ↓Hit@ 1 / 3 ↑
TransformerM28.969.55 / 29.75.3237.4 / 70.131.1411.1 / 29.72.4128.7 / 78.2
LTNetM24.729.86 / 36.44.6242.7 / 74.830.7612.0 / 30.32.4027.9 / 77.8
GTwEM10.9328.3 / 58.85.2634.9 / 73.112.2524.6 / 54.12.9220.1 / 61.9
SGTM9.4034.7 / 64.53.9248.7 / 81.711.3226.0 / 58.52.2036.4 / 81.5
TransformerE33.7710.6 / 28.95.3035.3 / 65.822.3514.7 / 37.82.3729.4 / 78.5
LTNetE24.4513.9 / 34.84.7034.8 / 74.617.2220.1 / 45.82.3629.1 / 78.4
GTwEE11.9127.0 / 57.25.3635.8 / 72.511.8128.4 / 57.22.8920.4 / 63.3
SGTE8.3839.7 / 68.93.4355.3 / 84.311.0329.6 / 59.02.1945.5 / 82.2
+ +Table 2. Quantitative Results on scene graph to layout. The $(\checkmark/$ $X)$ indicates whether the method is trained and test with or without input image and layout guidance. + +
\( L^{in} \)VG-MSDNCOCO-stuff
mIoUmIoU
Sg2Im✘16.829.0
Canonical✘18.041.9
LTNet✘18.349.0
SGT✘25.354.6
Transformer✓5.1 / 71.2 / 51.910.4 / 75.7 / 61.2
GCN✓11.4 / 70.6 / 50.021.1 / 72.3 / 60.8
GTwE✓12.3 / 79.9 / 62.121.3 / 73.2 / 64.8
SGT✓14.5 / 81.1 / 62.428.2 / 85.1 / 74.9
+ +strategy would favor the task of SGE, we consider/compare the following two training schemes. First (and as our proposed one), one object randomly is removed during training (including its corresponding edges). For the second case, we follow an existing MLM work [32] to randomly mask $\alpha = 30\%$ of the total objects and relationships for training the SGE model. + +In addition to the standard transformer, we apply LT-Net [28] and GTwE (Graph Transformer with Edge features [5]) for comparison purposes, and the results are listed in Table 1. From this table, it can be seen that our $T_{SGE}$ performed against baseline and state-of-the-art models on both VG-MSDN and COCO with clear margins, for both object generation and relationship prediction. More specifically, between the two training schemes, we found that the setting with a single object (and its edges) intentionally and randomly removed resulted in more effective performance. Since this setting is consistent with the expansion task for scene graphs, the use of SGT-based $T_{SGE}$ can be verified. Selected visualization examples of SGE are shown and compared in Fig. 5(a). + +Scene graph to layout. To evaluate the performance for this stage, we measure the mIoU between the output layout $L^{op}$ and the ground truth $L^{gt}$ . We note that depending on the object is an introduced or an existing one, we show their mIoU separately, with the total mIoU as their weighted average. We compare our SGT-based $T_{G2L}$ with two other models: Transformer [25], GCN [6, 12] and GTwE [5]. Table 2 lists the performances of the above methods, and we see that our model consistently performed against GCN and Transformer across different settings. From the visual examples shown in Figure 5, it can be observed that our model better comprehends the expanded scene graph and the given partial input, so that the predicted layout would be more semantically practical. + +Furthermore, we demonstrate the robustness of our model which is trained without any input image or layout guidance. This is thus consistent with the setting used in Sg2Im [9], Canonical [6], and LTNet [28]. With no input guidance except for our expanded scene graphs, all objects would be considered masked(new) and thus only one mIoU score is reported. From the results shown in Table 2, one can see that our model still achieved the highest mIoU and thus would be preferable in such scenarios. + +Semantic-guided image outpainting. Finally, we evaluate the performance for semantics-guided image outpainting. From the visual examples shown in Figure 5(c) and (d). We see that, under the guidance of the expanded scene graph and completed layout, our model better generates novel object instances at the pixel level, e.g., a grassland (second row of Fig. 5(c)), sky (first row of Fig. 5(d)), or expands an existing object to a reasonable size, e.g., the jaw of the bear (first row of Fig. 5(c)). Additional visualization results are provided in the supplementary materials. + +We note that, most image outpainting works consider images in restrained scenes (e.g., Cityscapes [11] and ADE20K [11]) or those with single category object (e.g., CUB [26], CelebA [26, 33] or DeepFashion [26]). And, + +![](images/c1a3dc584f44ab9addd9feb299b3c311e6bf8eda66e58240d1fa91a17f2e922a.jpg) +(a) SGE on VGMSDN + +![](images/26b490b8dac0fdf52e57513a438c53e671aea548945c3a761804b4ed326473a2.jpg) +(b) G2L on VGMSDN + +![](images/9aaefcfa8c41d7a129d0389f61e5fc490adf9af7eeeaf9da005c1a86029bf58f.jpg) +(c) Outpaint on VGMSDN + +![](images/ff75d94337d04067a28d52cc04ca154fc9fb0dce5c30b21d82c78d4bf87b0742.jpg) +(d) Outpaint on COCO-stuff +Figure 5. Visualization examples of SGE, G2L, and image outpainting. From left to right: (a) input scene graph $S^{in}$ , output scene graphs $S^{op}$ from LTNet, GTwE, and ours. Nodes and edges in green denote correct predictions, while those in blue are semantically practical but differ from the ground truth ones. Finally, those in red denote incorrect predictions. (b) input layout $L^{in}$ , input scene graph $S^{gt}$ , output layouts $L^{op}$ from GCN and Ours, and ground truth $L^{gt}$ . Bounding boxes from novel (generated) objects are denoted in blue, while the existing ones are shown in green. (c) and (d): input image $I^{in}$ , output images $I^{op}$ from Boundless, AttSpade, and ours. Note that we also highlight selected nodes and their bounding boxes following the protocol in (b). + +to the best of our knowledge, we are the first outpaint image data in the wild with rich interaction between various categories of objects (e.g., VG-MSDN and COCO-stuff). Therefore, only limited quantitative comparisons can be conducted. Specifically, we consider Cityscapes [3] and take the Fréchet inception distance (FID) [7] as the metric. Our model reported FID of 60.99, which surpassed Outpainting-SRN [26] at 66.89, Boundless [23] at 77.86, and a modified AttSpade [6] at 68.91 (equivalent to our $G_{L2I}$ only). While a recent work of SemIE [11] reported an improved FID score of 47.67, it is designed for restrained street-view (Cityscapes) or indoor scenes (ADE20K [35]), and cannot be easily applied to outpaint image data in the wild as ours does. Another requirement of SemIE is the use of segmentation masks as learning guidance, while we only require guidance at scene graph levels. Thus, the effectiveness and practicality of our proposed model can be verified. + +Ablation studies. To assess the design of our SGT, we consider VG-MSDN and report the performance on SGE. For Hits@1, the baseline SGT with only node-level attention reported 35.7/46.1 on object/relationship prediction while adding edge-level attention and regularization of skew-symmetry result in 38.7/48.6 and 38.2/52.0, respectively. Finally, our SGT with full objectives achieved 39.7/55.3, which confirms its design and learning schemes. More details can be found in the supplementary materials. + +# 5. Conclusions + +We address the task of semantics-guided image outpainting by proposing a novel Scene Graph Transformer (SGT). By decomposing the task into the stages SGE, G2L, and L2I, our proposed model leverages information observed from the nodes and edges in the partial input scene graph, inferring plausible object co-occurrences, and thus producing the final image output. Our SGT uniquely performs attention at both node and edge levels for modeling input structural information. In addition, for completing a semantically practical image, our SGT exploits converse relationships between edges for scene graph expansion. Our experiments confirmed that our proposed SGT performs favorably against state-of-the-art transformer-based models on both SGE and G2L. With novel objects and their relationships introduced, satisfactory image outputs can be achieved. + +Acknowledgement This work is supported in part by the Ministry of Science and Technology of Taiwan under grant MOST 110-2634-F-002-036 and in part by Qualcomm Technologies, Inc. through a Taiwan University Research Collaboration Project. We also thank to National Center for High-performance Computing (NCHC) for providing computational and storage resources. + +# References + +[1] Holger Caesar, Jasper Uijlings, and Vittorio Ferrari. Cocostuff: Thing and stuff classes in context. In CVPR, 2018. 6 +[2] Yuren Cong, Wentong Liao, Hanno Ackermann, Michael Ying Yang, and Bodo Rosenhahn. Spatial-temporal transformer for dynamic scene graph generation. CoRR, 2021. 2, 3 +[3] 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. 8 +[4] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In NAACL-HLT, 2019. 4 +[5] Vijay Prakash Dwivedi and Xavier Bresson. A generalization of transformer networks to graphs. CoRR, 2020. 7 +[6] Roei Herzig, Amir Bar, Huijuan Xu, Gal Chechik, Trevor Darrell, and Amir Globerson. Learning canonical representations for scene graph to image generation. In ECCV, 2020. 2, 6, 7, 8 +[7] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In NIPS, 2017. 8 +[8] Satoshi Iizuka, Edgar Simo-Serra, and Hiroshi Ishikawa. Globally and locally consistent image completion. 2017. 1 +[9] Justin Johnson, Agrim Gupta, and Li Fei-Fei. Image generation from scene graphs. In CVPR, 2018. 2, 7 +[10] Justin Johnson, Ranjay Krishna, Michael Stark, Li-Jia Li, David Shamma, Michael Bernstein, and Li Fei-Fei. Image retrieval using scene graphs. In CVPR, 2015. 2 +[11] Bholeshwar Khurana, Soumya Ranjan Dash, Abhishek Bhatia, Aniruddha Mahapatra, Hrituraj Singh, and Kuldeep Kulkarni. Semie: Semantically-aware image extrapolation. In ICCV, 2021. 1, 2, 6, 7, 8 +[12] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017. 7 +[13] Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A Shamma, et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. 2017. 6 +[14] Yikang Li, Wanli Ouyang, Bolei Zhou, Kun Wang, and Xiaogang Wang. Scene graph generation from objects, phrases and region captions. In ICCV, 2017. 6 +[15] 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. 6 +[16] Guilin Liu, Fitsum A Reda, Kevin J Shih, Ting-Chun Wang, Andrew Tao, and Bryan Catanzaro. Image inpainting for irregular holes using partial convolutions. In ECCV, 2018. 1 + +[17] Chia-Ni Lu, Ya-Chu Chang, and Wei-Chen Chiu. Bridging the visual gap: Wide-range image blending. In CVPR, 2021. 1, 2 +[18] Kamyar Nazeri, Eric Ng, Tony Joseph, Faisal Qureshi, and Mehran Ebrahimi. Edgeconnect: Structure guided image inpainting using edge prediction. In ICCV Workshops, 2019. 1 +[19] Taesung Park, Ming-Yu Liu, Ting-Chun Wang, and Jun-Yan Zhu. Semantic image synthesis with spatially-adaptive normalization. In CVPR, 2019. 2, 3 +[20] Mark Sabini and Gili Rusak. Painting outside the box: Image outpainting with gans. CoRR, 2018. 1, 2 +[21] Roman Suvorov, Elizaveta Logacheva, Anton Mashikhin, Anastasia Remizova, Arsenii Ashukha, Aleksei Silvestrov, Naejin Kong, Harshith Goka, Kiwoong Park, and Victor Lempitsky. Resolution-robust large mask inpainting with fourier convolutions. In WACV, 2022. 1 +[22] Cheng-Yo Tan, Chiao-An Yang, Shang-Fu Chen, Meng-Lin Wu, and Yu-Chiang Frank Wang. Robust image outpainting with learnable image margins. In ICIP, 2021. 2 +[23] Piotr Teterwak, Aaron Sarna, Dilip Krishnan, Aaron Maschinot, David Belanger, Ce Liu, and William T Freeman. Boundless: Generative adversarial networks for image extension. In ICCV, 2019. 1, 8 +[24] Dmitry Ulyanov, Vadim Lebedev, Andrea Vedaldi, and Victor S Lempitsky. Texture networks: Feed-forward synthesis of textures and stylized images. In ICML, 2016. 1 +[25] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NIPS, 2017. 2, 7 +[26] Yi Wang, Xin Tao, Xiaoyong Shen, and Jiaya Jia. Wide-context semantic image extrapolation. In CVPR, 2019. 1, 2, 7, 8 +[27] Wei Xiong, Jiahui Yu, Zhe Lin, Jimei Yang, Xin Lu, Connelly Barnes, and Jiebo Luo. Foreground-aware image inpainting. In CVPR, 2019. 1 +[28] Cheng-Fu Yang, Wan-Cyuan Fan, Fu-En Yang, and Yu-Chiang Frank Wang. Layouttransformer: Scene layout generation with conceptual and spatial diversity. In CVPR, 2021. 2, 3, 7 +[29] Zongxin Yang, Jian Dong, Ping Liu, Yi Yang, and Shuicheng Yan. Very long natural scenery image prediction by outpainting. In ICCV, 2019. 1, 2 +[30] Zhenqiang Ying and Alan C. Bovik. 180-degree outpainting from a single image. CoRR, 2020. 1 +[31] Jiahui Yu, Zhe Lin, Jimei Yang, Xiaohui Shen, Xin Lu, and Thomas S Huang. Free-form image inpainting with gated convolution. In ICCV, 2019. 1 +[32] Alireza Zareian, Zhecan Wang, Haoxuan You, and Shih-Fu Chang. Learning visual commonsense for robust scene graph generation. In ECCV, 2020. 2, 3, 7 +[33] Lingzhi Zhang, Jiancong Wang, Yinshuang Xu, Jie Min, Tarmily Wen, James C Gee, and Jianbo Shi. Nested scale-editing for conditional image synthesis. In CVPR, 2020. 7 +[34] Zhaohui Zheng, Ping Wang, Wei Liu, Jinze Li, Rongguang Ye, and Dongwei Ren. Distance-iou loss: Faster and better learning for bounding box regression. In AAAI, 2020. 6 + +[35] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ade20k dataset. In CVPR, 2017. 8 \ No newline at end of file diff --git a/scenegraphexpansionforsemanticsguidedimageoutpainting/images.zip b/scenegraphexpansionforsemanticsguidedimageoutpainting/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..34f5889eb6db31ff06cb8c6309dc41ad109bd150 --- /dev/null +++ b/scenegraphexpansionforsemanticsguidedimageoutpainting/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a24ad608d0f62a28fefba0ffb61ba7474b4c8d8b3b6741d0fcd75624f62f0c6f +size 505746 diff --git a/scenegraphexpansionforsemanticsguidedimageoutpainting/layout.json b/scenegraphexpansionforsemanticsguidedimageoutpainting/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4bca1e961cee0ff6542531ce0f75a0283a4b5f2b --- /dev/null +++ b/scenegraphexpansionforsemanticsguidedimageoutpainting/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fdc79f3649b156e4b4efb47f3b694380caa8286d7d8542d6f2e823010a5b038 +size 482690 diff --git a/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/0c914e30-f819-4e21-aa5f-16662b195480_content_list.json b/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/0c914e30-f819-4e21-aa5f-16662b195480_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0266e40bd22a7ea23453843748e9cf63b7ba88c4 --- /dev/null +++ b/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/0c914e30-f819-4e21-aa5f-16662b195480_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8801ca1a78fa569b2916ef37ecb7d42915b35181036625a1dd2aa20a4993266c +size 80704 diff --git a/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/0c914e30-f819-4e21-aa5f-16662b195480_model.json b/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/0c914e30-f819-4e21-aa5f-16662b195480_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7b01a50f5afff4e6beff708f00d55b516a861f92 --- /dev/null +++ b/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/0c914e30-f819-4e21-aa5f-16662b195480_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d709af5240bc39da8e62fdab70e15f18b5dcf0d5972634f78bc2af4789727f4 +size 99239 diff --git a/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/0c914e30-f819-4e21-aa5f-16662b195480_origin.pdf b/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/0c914e30-f819-4e21-aa5f-16662b195480_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..dd17828c619d0ed09c706d9e280482776b98c1f3 --- /dev/null +++ b/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/0c914e30-f819-4e21-aa5f-16662b195480_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfb97ccc302ee193c1e9f8aaf3895a2864d81361f5eacb3d7e78fcb3cf52888b +size 1875605 diff --git a/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/full.md b/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/full.md new file mode 100644 index 0000000000000000000000000000000000000000..54e53d57abddba6b7c8f65fdbb56079340db1615 --- /dev/null +++ b/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/full.md @@ -0,0 +1,335 @@ +# Scene Representation Transformer: Geometry-Free Novel View Synthesis Through Set-Latent Scene Representations + +Mehdi S. M. Sajjadi Henning Meyer Etienne Pot Urs Bergmann Klaus Greff Noha Radwan Suhani Vora Mario Lučić Daniel Duckworth Alexey Dosovitskiy* Jakob Uszkoreit* Thomas Funkhouser Andrea Tagliaasacchi†* + +Google Research ‡ Simon Fraser University + +# Abstract + +A classical problem in computer vision is to infer a 3D scene representation from few images that can be used to render novel views at interactive rates. Previous work focuses on reconstructing pre-defined 3D representations, e.g. textured meshes, or implicit representations, e.g. radiance fields, and often requires input images with precise camera poses and long processing times for each novel scene. + +In this work, we propose the Scene Representation Transformer (SRT), a method which processes posed or unposed RGB images of a new area, infers a "set-latent scene representation", and synthesises novel views, all in a single feed-forward pass. To calculate the scene representation, we propose a generalization of the Vision Transformer to sets of images, enabling global information integration, and hence 3D reasoning. An efficient decoder transformer parameterizes the light field by attending into the scene representation to render novel views. Learning is supervised end-to-end by minimizing a novel-view reconstruction error. + +We show that this method outperforms recent baselines in terms of PSNR and speed on synthetic datasets, including a new dataset created for the paper. Further, we demonstrate that SRT scales to support interactive visualization and semantic segmentation of real-world outdoor environments using Street View imagery. + +![](images/2d7d5f9842660534db5cd897fda36da243ec805524725ad11d40762987bc0d97.jpg) +Figure 1. Model overview - SRT encodes a collection of images into the scene representation: a set of latent features. Novel views are rendered in real-time by attending into the latent representation with light field rays, see Fig. 2 for details. + +# 1. Introduction + +The goal of our work is interactive novel view synthesis: given few RGB images of a previously unseen scene, we synthesize novel views of the same scene at interactive rates and without expensive per-scene processing. Such a system can be useful for virtual exploration of urban spaces [26], as well as other mapping, visualization, and AR/VR applications [27]. The main challenge here is to infer a scene representation that encodes enough 3D information to render novel views with correct parallax and occlusions. + +Traditional methods build explicit 3D representations, such as colored point clouds [1], meshes [31], voxels [36], octrees [42], and multi-plane images [52]. These representations enable interactive rendering, but they usually require expensive and fragile reconstruction processes. + +More recent work has investigated representing scenes with purely implicit representations [39]. Notably, NeRF represents the scene as a 3D volume parameterized by an MLP [25], and has been demonstrated to scale to challenging real-world settings [23]. However, it typically requires hundreds of MLP evaluations for the volumetric rendering of each ray, relies on accurate camera poses, and requires an expensive training procedure to onboard new scenes, as no parameters are shared across different scenes. + +Follow-ups that address these shortcomings include reprojection based methods which still rely on accurate camera poses due to their explicit use of geometry, and latent models which are usually geometry-free and able to reason globally, an advantage for the sparse input view setting. However, those methods generally fail to scale to complex real-world datasets. As shown in Tab. 1, interactive novel view synthesis on complex real-world data remains a challenge. + +We tackle this challenge by employing an encoder-decoder model built on transformers, learning a scalable implicit representation, and replacing explicit geometric operations with learned attention mechanisms. Different from a number of prior works that learn the latent scene representations through an auto-decoder optimization procedure [38, 16], we specifically rely on an encoder architecture to allow for instant inference on novel scenes. At the same time, we do not rely on explicit locally-conditioned geometry [49, 41] to instead allow the model to reason globally. This not only comes with the advantage of stronger generalization abilities (e.g., for rendering novel cameras further away from the input views, see Fig. 4), but also enables the model to be more efficient, as global information is processed once per scene (e.g., to reconstruct 3D geometry and to resolve occlusions) in our model, rather than once or hundreds of times per rendered pixel, as in previous methods [49, 41, 44]. + +We evaluate the proposed model on several datasets of increasing complexity against relevant prior art, and see that it strikes a unique balance between scalability to complex scenes (Sec. 4), robustness to noisy camera poses (or no poses at all, Fig. 6), and efficiency in interactive applications (Tab. 3). Further, we show a proof-of-concept for the downstream task of semantic segmentation using the learned representation on a challenging real-world dataset (Fig. 7). + +# 2. Related Work + +There is a long history of prior work on novel view synthesis from multiple RGB images based on neural representations (see Tab. 1 and [40]). Recent work has demonstrated that novel views can be synthesized using deep networks trained to compute radiance values for a given 3D position and direction. In particular, NeRF [25] trains an MLP to store radiance and density used in a volume rendering system and produces novel views with remarkably fine details. Several extensions have been proposed to mitigate some its shortcomings, including ones to accelerate rendering [12, 30, 48], handle color variations [23], optimize camera poses [21], and perform well with few images [15]. However, these methods generally still require an expensive optimization of an MLP for each novel scene, and thus are impractical for deployment at large scale. + +NeRF with Re-projection. Several NeRF extensions have been proposed that do not always require to be trained indi + +
NeRF et al.Re-projectionLatentOtherOurs
NeRF [25]FastNeRF [9]NeRF-W [23]BARF [21]DietNeRF [15]GRF [41]IBRNet [44]PixInNeRF [49]MVSNeRF [5]CodeNeRF [16]NeRF-VAE [20]LFN [38]NRW [24]GFVS [32]SRT
1) Real-world data✓✓✓✓✓✓✓✓×××✓✓✓
2) Temp. consistent✓✓✓✓✓✓✓✓✓✓✓××✓
3) Real-time×✓××××××××✓××✓
4) Appearance enc.××✓××××××××××✓
5) Pose-free×××✓××××✓××××✓
6) Few images×××✓××✓✓✓✓✓✓✓✓
7) Generalization××××✓✓✓✓✓✓✓×✓✓
8) Instant new scene××××✓✓✓✓×✓××✓✓
9) Global latent××××××××✓✓✓××✓
+ +Table 1. Comparison of features with prior methods. The rows indicate whether each method: 1) has been demonstrated on real world data, 2) is designed to provide coherence between nearby views, 3) performs inference in real-time, 4) handles images with varying appearance in the same scene, 5) works without known camera poses at test time, 6) works with very sparse input images, 7) generalizes from a training set to novel scenes, 8) captures novel scenes in a feed-forward step, and 9) learns a global latent scene representation. + +vidually for each novel scene. These methods rely on explicit 3D-to-2D projections of samples along the rays to gather features extracted from CNNs, which are then aggregated by a neural network for each point [41, 44, 49], or into a voxel grid [5]. As a result, these networks can be pre-trained, and then applied to novel scenes either without any optimization, or with additional per-scene fine-tuning. However, reliance on explicit camera projections requires precise camera poses, and direct projections cannot take occlusions of objects between samples and input features into account. + +Light Fields. Other methods learn to represent a scene with a latent vector from which novel views can be synthesized [7]. More recently, LFN [38] use an auto-decoder to infer a latent code from input images, which then conditions an MLP for computing radiance values for rays of novel views. This method is several times faster than volumetric rendering due to the fact that the network is only queried once per pixel, rather than hundreds of times for volumetric rendering. However, it does not scale beyond simple controlled settings, requires an expensive optimization to produce a latent code for a novel scene, and therefore also relies upon accurate input camera poses. In contrast, we utilize an encoder to infer the scene representation, which executes nearly instantly in comparison (see Tab. 3), and can leverage, but does not require, camera poses (see Sec. 4.4). + +Transformers. Originally proposed for seq-to-seq tasks in natural language processing, transformers [43] drop the recurrent memory of prior methods, and instead use a multi-head attention mechanism to gather information from the most relevant portions of the input. The vision community has deeply researched applications thereof in image + +![](images/aa4ee7ad948c7970a89efb80ec3c1df617d56f1930f96db573c8e085d5074434.jpg) +Figure 2. Network architecture - Given a set of posed (SRT) or unposed (UpSRT) RGB images, a CNN extracts patch features, which are processed by an encoder transformer, leading to the set-latent scene representation. Novel views are then rendered by attending into the scene representation for a given ray pose, from which an image can then be rendered. Details in Sec. 3 and Appendix A.2. + +and video processing, where they have meanwhile achieved state of the art in several tasks [18], including inherently geometric applications such as depth estimation [29], point cloud processing [51], and generative geometry-free view synthesis [32]. The latter work uses transformers to learn a sequence of VQ-GAN embeddings [8] to sample realistic views given a single image. While results are of high-quality, this method is slow due to its auto-regressive nature, and cannot be used for video rendering, as each frame is sampled independently, creating strong flickering artifacts. ViT [6] has been proposed for very large-scale classification tasks: local features are extracted from patches of the input image, and fed to a transformer network. We will demonstrate that this architecture is well-suited for learning 3D scene representations by building on top of this idea, extending it to ingest patches from multiple images, and generalizing it to 3D by adding a transformer decoder queried with rays. + +# 3. Method + +Our model receives as input an unordered collection of optionally posed images $\{\mathbf{I}_i\in \mathbb{R}^{H\times W\times 3},\mathbf{c}_i\in \mathrm{SE}(3),K_i\in$ $\mathbb{R}^{3\times 3}\}$ of the same scene, with extrinsic camera matrix $\mathbf{c}_i =$ $[R_i|t_i]$ and intrinsic camera matrix $K_{i}$ . The model encodes this collection into a set representation of cardinality $Z$ via an encoder $\mathcal{E}$ with trainable parameters $\theta_{\mathcal{E}}$ .. + +$$ +\left\{\mathbf {z} _ {z} \in \mathbb {R} ^ {d} \right\} = \mathcal {E} _ {\theta_ {\varepsilon}} \left(\operatorname {C N N} _ {\theta_ {\mathrm {C N N}}} \left(\left\{\mathbf {I} _ {i}, \mathbf {c} _ {i}, K _ {i} \right\}\right)\right) \tag {1} +$$ + +In more details, our encoder first processes the images via a shared CNN backbone (Fig. 2, left), and then aggregates + +features into a set of flat patch embeddings. This set of embeddings is then processed by the encoder transformer that generates the codes $\{\mathbf{z}_z\}$ as output. Note that $\{\mathbf{z}_z\}$ fully encodes a specific 3D scene as observed by the corresponding set of images, hence it is our set-latent scene representation. + +This representation is queried by the decoder transformer $\mathcal{D}$ with trainable parameters $\theta_{\mathcal{D}}$ to generate the pixel color for a view ray $\mathbf{r} = (\mathbf{o},\mathbf{d})$ with origin $\mathbf{o}$ and direction $\mathbf{d}$ : + +$$ +C (\mathbf {r}) = \mathcal {D} _ {\theta_ {\mathcal {D}}} (\mathbf {r} \mid \left\{\mathbf {z} _ {z} \right\}) \tag {2} +$$ + +By convention, we assume $\mathbf{I}_0$ to be the canonical image, hence queries $\mathbf{r}$ are expressed in the coordinates of $\mathbf{c}_0$ , and, whenever camera information is not available, we assume the canonical camera pose to be identity. If pose information is known, images within a scene are randomly shuffled, hence the reference frame is randomly chosen both at train and test time. Given a collection of images $\{\mathbf{I}_{s,i}\}$ from different scenes indexed by $s$ , we train all parameters end-to-end via a reconstruction loss on novel-view synthesis: + +$$ +\underset {\theta = \left[ \theta_ {\mathrm {C N N}}, \theta_ {\mathcal {E}}, \theta_ {\mathcal {D}} \right]} {\arg \min } \sum_ {s} \mathbb {E} _ {\mathbf {r} \sim \mathbf {I} _ {s, i} ^ {\mathrm {g t}}} \| C (\mathbf {r}) - \mathbf {I} _ {s, i} ^ {\mathrm {g t}} (\mathbf {r}) \| _ {2} ^ {2} \tag {3} +$$ + +As both inputs and outputs of the model during training are 2D images, there is no explicit 3D supervision. We now describe the internals of our architecture in details, as illustrated in Fig. 2. + +Pose information. We start by concatenating along the channel dimension the positional encoding $\gamma$ [43, 25] of camera origin with $L_{\mathrm{o}}$ octaves and camera direction with + +
NMRMulti-ShapeNet
↑PSNR↑SSIM↓LPIPS↑PSNR↑SSIM↓LPIPS
LFN [38]24.950.870-14.770.3280.582
PN [49]26.800.9100.10821.970.6890.332
SRT (Ours)27.870.9120.06623.410.6970.369
+ +$L_{\mathbf{d}}$ octaves, as seen from the currently selected canonical camera $\mathbf{c}_0$ to produce: + +$$ +\gamma (\mathbf {r}) = \gamma \left(\mathbf {c} _ {0} ^ {- 1} \cdot \mathbf {o}, L _ {\mathbf {o}}\right) \oplus \gamma \left(\mathbf {c} _ {0} ^ {- 1} \cdot \mathbf {d}, L _ {\mathbf {d}}\right) \tag {4} +$$ + +$$ +\mathbf {F} _ {i} ^ {\gamma} (\mathbf {r}) = \mathbf {I} _ {i} (\mathbf {r}) \oplus \gamma (\mathbf {r}) \tag {5} +$$ + +Overall, the output of this stage will have dimensionality $|\mathbf{F}_i^\gamma | = (H,W,C)$ where $C = (3 + 6L_{o} + 6L_{d})$ or $C = 3$ , depending on whether camera pose information is provided or not. Following [25], we perform sine and cosine encoding independently for each of the 3D dimensions (i.e., $6L$ ). + +CNN - Fig. 2 (left). A shared convolutional neural network extracts patch features while scaling the spatial dimensions of the input images by a factor of $K = 16$ , hence mapping the shape from $(H, W, C)$ to $(h = H / K, w = W / K, c)$ : + +$$ +\mathbf {F} _ {i} ^ {\mathrm {C N N}} = \operatorname {C N N} _ {\theta_ {\mathrm {C N N}}} \left(\mathbf {F} _ {i} ^ {\gamma}\right) + \mathcal {B} (\theta) \tag {6} +$$ + +We add a single globally learned 2D position embedding $\mathcal{B}(\theta) \in \mathbb{R}^{h \times w \times c}$ to all patches of all images, to allow the model to retain the position of each patch in the corresponding image. The spatial dimensions are then flattened to obtain $\hat{\mathbf{F}}_i^{\mathrm{CNN}} \in \mathbb{R}^{hw,\mathrm{c}}$ . Further, one of two learned camera id embeddings $\mathcal{B}_{i=0}(\theta)$ , $\mathcal{B}_{i \neq 0}(\theta) \in \mathbb{R}^{\mathrm{c}}$ are added to all patches of the canonical camera, and all remaining cameras, respectively. This is to allow the model to distinguish the reference camera from all others: + +$$ +\mathbf {F} _ {i, n} = \hat {\mathbf {F}} _ {i, n} ^ {\mathrm {C N N}} + \left\{ \begin{array}{l} \mathcal {B} _ {i = 0} (\theta), \text {i f} i = 0, \\ \mathcal {B} _ {i \neq 0} (\theta), \text {i f} i \neq 0, \end{array} \forall n \in \{1,.., h w \} \right. \tag {7} +$$ + +All features together form (unsorted) sets of patch embeddings of cardinality $|\{\mathbf{f}_f\}| = Ihw$ , each of size $\mathbb{R}^C$ : + +$$ +\left\{\mathbf {f} _ {f} \right\} = \bigcup_ {i = 1} ^ {I} \bigcup_ {n = 1} ^ {h w} \mathbf {F} _ {i, n} \tag {8} +$$ + +Encoder Transformer - Fig. 2 (center). We pass the patch embeddings through a standard transformer [43] that alternates between attention to all tokens, and small MLP blocks: + +$$ +\left\{\mathbf {z} _ {z} \right\} = \mathcal {E} _ {\theta_ {\varepsilon}} \left(\left\{\mathbf {f} _ {f} \right\}\right) \tag {9} +$$ + +This network integrates information of the scene at a global scale by attending across patches and input images to infer a 3D scene representation. Note that crucially, the set-latent + +Table 2. Quantitative results - Evaluation of new scene novel-view synthesis on simple and challenging datasets. NMR baselines provided by the authors (LPIPS for LFN not available). SRT is best across datasets and metrics, with the exception of LPIPS on MSN. + +
Model size (# parameters)LFN [38]PN [49]SRT
105 M28 M74 M
a) Scene encoding time~ 100 s0.005 s0.010 s
b) Image rendering speed192 fps1.3 fps121 fps
c) New-scene video rendering~ 100 s75.5 s0.182 s
+ +Table 3. Computational performance – Model size, and a) time required to encode a scene, b) frame rate for individually rendering 100 frames after encoding, c) application: total time to encode a novel scene and render a video of 100 frames. SRT is orders of magnitudes faster for real-world use. See Appendix A.2 for details. + +scene representation scales in size with the amount of input information rather than being fixed-size [16, 20, 38]. + +Decoder Transformer - Fig. 2 (right). The decoder $\mathcal{D}$ is also a transformer. The main difference with respect to the encoder is that the ray corresponding to the pixel to be rendered is used as the query for the multi-head attention mechanism, while key and value are computed from the scene representation $\{\mathbf{z}_z\}$ in all layers. In other words, the decoder learns to attend to the most relevant subset of features in the scene representation to calculate the output color. Note that the query ray position is encoded as in Eq. (4). The output of the decoder is finally passed to a small 2-layer MLP to compute the pixel color. + +# 3.1. Training and Inference + +During training, all components are simply trained end-to-end using an L2 reconstruction loss on novel views, see Eq. (3). We provide further training details in the Appendix A.2. For inference, input images are encoded into a scene representation once, which can then be used to render an arbitrary number of novel views (e.g., for a video). Note that this methodology is designed to maximize inference efficiency, as the 3D reasoning is executed only once in the encoder transformer, independent of the number of novel views to be rendered. For downstream tasks, the encoder for the scene representation can be pre-trained and either frozen, or fine-tuned along with a new decoder for a novel task (e.g. semantic segmentation - Sec. 4.5). + +# 4. Experimental Results + +We run a series of experiments to evaluate how well SRT performs novel view synthesis in comparison to previous works and to study how each component of the network architecture contributes to the results. In all experiments, all methods are pre-trained on a dataset of images from one set of scenes and then tested on images from novel scenes. Unless stated otherwise, we train SRT with the same model architecture, hyper parameters, and training protocols for all experiments across all datasets. Synthesized images are evaluated with PSNR, SSIM [46], and LPIPS [50] (VGG). + +# 4.1. Datasets + +Neural 3D Mesh Renderer Dataset (NMR) [17]. NMR has been used in several previous studies. It consists of ShapeNet [4] objects rendered at 24 fixed views. The dataset is very simple, and likely does not provide good evidence for the applicability in real-world settings. + +MultiShapeNet (MSN). We therefore propose this significantly more challenging dataset rendered using photorealistic ray tracing [11]. Each scene has 16-31 ShapeNet objects dropped at random locations within an invisible bounding box. We further sample from 382 complex HDR backgrounds and environment maps. Viewpoints are selected by uniformly sampling within a half-sphere shell. + +This dataset is significantly more difficult than NMR for several reasons: 1) images are rendered photorealistically, 2) scenes contain many different types of objects in complex, tightly-packed configurations, 3) the nontrivial background maps hamper the model's abilities to segment the objects (just like in the real world), and 4) the randomly sampled viewpoints prevent models from overfitting, unlike NMR where the same cameras and canonically oriented objects are used. The dataset is available at srt-paper.github.io. + +Street View. This is a new dataset created from real-world Street View data [10]. The training dataset contains $5.5\mathrm{M}$ scenes from San Francisco, each with 10 viewpoints. This dataset is very challenging, since the input viewpoints are typically several meters from the reference viewpoints, the cameras are often arranged in straight lines (along the car trajectory, meaning there is not a lot of diversity in viewing angles), the scenes contain challenging geometry (e.g., trees and thin poles) and dynamic elements (e.g., moving vehicles and pedestrians), the cameras have fisheye distortion and rolling shutter (making reprojection-based methods such as [49, 41, 44] inapplicable), and finally, different images often contain different exposure and white-balance settings. + +# 4.2. Comparisons to Baselines + +In the first set of experiments, we compare the results of SRT to previous methods for novel view synthesis. For these experiments, we restrict our tests to the NMR and MSN datasets, since they provide an opportunity for direct comparisons to recently published methods in a synthetic setting with known ground truth. We run SRT with the same parameters on both datasets. + +Baselines. We provide comparisons to two baselines that share aspects of our approach. The first baseline is PixelNeRF [49], which also pretrains a network to produce features from images. The second baseline is Light Field Networks (LFN) [38], which like our method uses a light field formulation rather than volumetric rendering. These methods have demonstrated favorable quantitative and qualitative results in comparison to other previous work [41, 37, 28, 22]. + +Input LFN [38] PN [49] SRT (Ours) Target + +![](images/1acf0f0e8099601c9131e746b0c5157acb3c89d102ef0d980d6fda03a6345aea.jpg) +Figure 3. Qualitative NMR results – While PixelNeRF has high-quality for target views close to the input (middle), results quickly degrade when further away (bottom). The quality of SRT renders is much more consistent and outperforms both baselines. More results are available at srt-paper.github.io. + +Quantitative Results - Tabs. 2 and 3. SRT provides the best image quality on NMR, outperforming LFN and PixelNeRF. In terms of computational performance (Tab. 3), both PixelNeRF and SRT are fast to encode new scenes, while LFN requires slow optimization of the scene embedding. Once a scene is encoded, both LFN and SRT render new frames at interactive rates, while PixelNeRF is significantly slower due to the volumetric rendering. SRT is the only method fast at both scene encoding and novel-view generation, making it suitable for the practical application of rendering videos of novel scenes at interactive rates. See Appendix A.2 further details. We note that SRT is comparably small for a transformer: its $74\mathrm{M}$ parameters consist of $23\mathrm{M}$ for CNN, $47\mathrm{M}$ for Encoder, and $4\mathrm{M}$ for Decoder. For comparison, ViT [6] has $86 - 632\mathrm{M}$ parameters. + +On the MSN dataset, SRT outperforms LFN and PixelNeRF in terms of PSNR and SSIM. In terms of LPIPS, PixelNeRF outperforms SRT, which we attribute to the fact that SRT tends to blur regions of uncertainty. In a separate experiment, we tried increasing the latent dimension of LFN (from 256 to 1024) to account for more complex scenes, but this did not increase PSNR on novel scenes. + +Qualitative Results - Figs. 3 and 4. The results show that our method outperforms both baselines on the NMR dataset. While all methods are able to synthesize high quality images for nearby views (Fig. 3, center), PixelNeRF renders degrade particularly quickly as the camera moves away from the input views (Fig. 3, bottom). LFN render quality degrades similarly, and it is also blurry for more complex objects. In contrast, SRT provides similar performance for a wide range of views. The MSN dataset (Fig. 4) with its complex scenes clearly demonstrates the limits of LFN's single-latent scene representation. While PixelNeRF results in detailed reconstructions for target views close to the inputs (Fig. 4 middle), SRT is the only method that allows for good reconstructions of far-away target views (Fig. 4 bottom). + +Model Inspection - Fig. 5. Further insight can be gleaned + +![](images/5306afe531879562c31238c1d954473cdc1dbb72afd081b827cc3d33cfb92b85.jpg) + +![](images/176bdcaffba7342f4983619e9d1fec734eed1f0ef9176b3a750f1a73ca20fa92.jpg) +Figure 4. Qualitative results on MultiShapeNet - LFN does not scale to this demanding dataset due to its global latent conditioning. With perfect input camera poses, PixelNeRF resolves details in the center of the scene more sharply for target views nearby the inputs (middle). This quickly changes for views further away (bottom), where PixelNeRF produces projection artifacts even with perfect pose, while SRT's results are more coherent. PixelNeRF further has trouble compensating for noisy cameras, where SRT only experiences a mild drop in quality. Finally, UpSRT is the only model that can be run without input camera poses at all (see Sec. 4.4). + +![](images/f1e05e1f80b562ca43c11c11917a5c747579f0f6c21e1d90755a3742fa1d9b87.jpg) +LFN[38] +PN [49] +SRT + +![](images/c520ee41fb1e2907de0b1c8b38950b6af995cd25fa2c3b8da86d718d735d3b0d.jpg) + +![](images/1592363bc185636205013fcfc849936f83d6deeb66324d3c4a5f1a1dcb7835ea.jpg) +PN [49] +SRT + +![](images/825e37bbe8ad02aee6109ddf5879aaed0fab3cbd8d499f562b46919acbe1b939.jpg) + +![](images/d3ce00d9a9c999376e0b659ab2ed74fc338d1ec0a20b6af4f28945a6ce5072b0.jpg) +UpSRT + +![](images/5dee79c82b4b0ae735cfba849b0d4e8b2c66086781e3dcbed6f3c4fe8594135d.jpg) + +by investigating the attention weights of the encoder and decoder transformers. We can see from Fig. 5 (top) that the patch with the small chair (marked with a green box) mostly attends into the same chair in the other input images, even when the chair is facing different directions. We further noticed that all patches additionally attend into a subset of patches positioned along the edges of the images (bottom corners of the first input image). We believe that the encoder learns to store global information in those specific patches. + +A glance at the decoder supports this conjecture. When rendering a ray of the chair from a novel direction, the first attention layer only attends into the bottom edge of all input views, while the second layer attends into similar patches as the encoder, and into the bottom corners of the first input image. This learned 2-stage inference in the decoder appears to be crucial, as we noticed in prior experiments that a 1-layer decoder is significantly worse, while more than two layers do not lead to significant gains. The model appears to have learned a hybrid global/local conditioning pattern through back propagation, without explicit geometric projections. + +# 4.3. Ablation Studies + +We now perform a series of ablation studies on the MSN dataset, where we remove or substitute the main components of SRT and measure the change in performance to evaluate individual contributions of different design decisions. + +No Encoder Transformer. Retraining the system without an encoder transformer (i.e., the decoder attends directly into the output of the CNN) provides a significant drop from 23.41 to 21.64 PSNR. This suggests that the encoder transformer adds crucial capacity for inference, and that the choice to move compute from the decoder (which should be as small and fast as possible) to the encoder is a feasi- + +ble design decision. Note that its computational overhead is negligible in most practical settings, as it is only a single feed-forward step, and only run once per novel scene, independent of the number of rendered frames. + +Flat Latent Scene Representation. One of the main novelties of SRT is the set-latent scene representation. We investigate the more commonly used flat latent by feeding the mean patch embedding of the encoder transformer into a large 8-layer MLP and dropping the decoder transformer. This architecture leads to a significant drop from 23.41 down to 20.88 in PSNR, showing the strength of a large set scene representation along with an attention-decoder. + +Volumetric Rendering. As an alternative to the light field formulation, we also investigate a volumetric parametrization. To this end, we simply query the decoder not with rays, but rather with 3D points, followed by the volumetric rendering [25]. For simplicity, we do not inject viewing directions, and only use a single coarse network. We call this variation V-SRT. While this variation leads to an explicit 3D volume with easy-to-visualize depth maps, and results are visually comparable to SRT, it is to be mentioned that the V-SRT's decoding is slower by a theoretical factor of $192 \times$ , the number of samples per ray, making inference time of this variation more similar to existing volumetric methods [49]. It is notable that our model architecture can be trained in both setups without further changes to architecture or hyper-parameters. See details in Appendix A.3. + +# 4.4. Robustness Study + +While perfect pose information is available in synthetic setups, real-world applications often depend on estimated camera poses (e.g., [35]), which is slow and often contains errors [21]. We therefore study SRT and baselines in a + +![](images/252ce1e0557035016bcd5e66392d93e2ed5332cc6c10c61443fdac2c0226f4a2.jpg) +Figure 5. Attention visualization - Input patches that the green input patch attends into in the encoder, and the first & second decoder layers attend into when rendering the marked query ray at the intersection of the green lines. The model learns to attend into the same 3D positions, and to store global information into specific tokens (along the bottom edge). The decoder first attends into the global patches, then into relevant 3D positions of the scene. + +noisy camera pose regime. To this end, we follow [21] and synthetically perturb all input camera poses $\mathbf{c}_i$ for $i \neq 0$ (all but the reference camera, see Sec. 3) with additive noise $\delta \mathbf{c}_i = \mathcal{N}(0, \sigma)$ to various degrees. For each value of $\sigma$ , we retrain all models from scratch to allow them to adjust to the noise. To allow PixelNeRF to distinguish the reference input camera $\mathbf{c}_0$ from the others, we add learned camera identity embeddings to the output of the CNN, see Sec. 3. + +PixelNeRF heavily relies on accurate camera poses to perform projections from 3D volumes into 2D images during rendering. As expected, Fig. 6 shows that the performance of this method degrades sharply even with small amounts of noise. LFN does not scale to the MSN dataset (see Fig. 4), and we note that minor amounts of noise actually increase PSNR due to a regularization effect. As LFN depends on test-time optimization for the scene latent, it is not robust to noisy camera positions. + +In contrast, SRT handles noisy poses much more gracefully. Taking it to the extreme, our method even works with fully un-posed imagery, still outperforming both baselines. We call this model variation without test-time poses UpSRT. Further inspection shows that UpSRT is not only trivially using the first input image (for which the pose is known by definition, see Sec. 3) but the model is in fact learning to use all input cameras, even the un-posed ones. This is evidenced by inspection of attention patterns, and by the fact that UpSRT significantly outperforms SRT with a single input view only, see Appendix A.3. + +# 4.5. Applications + +In this section, we investigate the use of SRT in applications. For these experiments, we use the Street View dataset, which contains images of real-world outdoor environments. To compensate for variations in appearance and exposure + +![](images/18df35985823a5f52af2f0c7545d56640d2ae4613c2d0bae933a2cee2187c68b.jpg) +Figure 6. Robustness - PixelNeRF [49] quality drops quickly even for minor amounts of noise despite being trained for this setting. LFN [38] fails to scale to MSN even with perfect cameras - some noise regularizes the model and actually leads to a small increase in quality. SRT handles camera noise gracefully, outperforming competing methods even without any camera parameters (UpSRT). + +present in this dataset, we augment the network with an appearance encoder, see Appendix A.2 for details. + +View Interpolation. The goal in this application is to interpolate images captured in Street View panoramas to provide smooth video transitions between them. This application requires not only accurate view synthesis, but also temporal coherence between nearby views. We show a representative sample of interpolated views in Fig. 7. Although the renders are blurrier than the input views, our results demonstrate that SRT scales to complex real-world scenes with nontrivial camera pose distributions. It also shows that the model learns enough 3D scene information to render novel views far away from the inputs (last column). We provide videos and further results showing temporal coherence in render videos in Appendix A.3. + +Semantic Segmentation. Our goal in this application is to predict dense semantics for novel views of outdoor scenes. Rather than synthesizing the color images for novel views and then employing a 2D image segmentation network on them, we show that SRT's scene representation trained on RGB can be leveraged more directly in new domains. Once SRT has been trained for the RGB reconstruction task, we freeze the encoder, and train a new decoder transformer to synthesize semantic segmentation images from the frozen scene representation directly. The semantic decoder has the same network architecture as the color decoder, except for the final output layer that is changed from 3 RGB channels to 46 semantic classes. We train the semantic decoder using the standard multi-class cross-entropy loss in a semi-supervised setup, see Appendix A.2. + +Example semantic segmentation results are shown in Fig. 7. These results suggest that the scene representation learned through a color reconstruction loss contains enough information about the scene to allow semantic reasoning. + +![](images/bb4608ba4510c16a42e7aa28c0b2f1165601887fd4870a6b2ab01acc47ebd115.jpg) +Input Views + +![](images/f10fd77b55f6f6631041387423684fdfb201ee3cb1ca9c0b121fe0dcc277cb85.jpg) +Nearby SRT Predictions + +![](images/d6c4223a7a5edb8413f9c0c33ccc5de06fad33df2b000106d050a0a20bd33659.jpg) +Far SRT Predictions + +![](images/ba15f49b0019b5be034530181a9b0c94884e75e079eaf78787140e55fb17d8fe.jpg) + +![](images/42352716b5cd828119a528481cc43260d636aabe63c714743210c7217417989d.jpg) + +![](images/4aa8e344673d610bdf907f72dc423e4d5509148b92e8d900000445da34c93aaa.jpg) + +![](images/eb4c572b6c01ca815549db0079e8b3cbd6705a11c2cf09bcef41f01850fe222d.jpg) +Figure 7. Qualitative results on Street View - SRT performs reasonably on highly challenging real-world data with small and large changes in camera perspective. Furthermore, the scene representation contains enough information for 3D semantic scene inference. A comparison with NeRF-based optimization methods is provided in Appendix A.3. + +![](images/7f030bd775a1c66090d9e0539bb7ad8ed37d8e310d812db4ef06ce955266e8f3.jpg) + +![](images/a2e88e80452a81845486d7dfa32a0c927d05eb9f5f43965d2bb2701ffd42c7d5.jpg) + +Though this is just one example of many possible downstream tasks, it is a significant finding that SRT has learned a scene representation useful for a non-trivial application. + +# 5. Limitations + +This project investigates whether transformers can learn scalable scene representations from only images without explicit geometry processing. We here identify a few limitations, which we believe to be tackled by follow up works. + +First, our results show some blurriness in images on the complex datasets, even for views close to the input cameras. This is expected, as the model needs to learn pixel-accurate light ray transformations, which leads to uncertainty about exact positions, known to result in blurriness under an L2 loss [33]. + +Second, SRT is a geometry-free learning-based method, and hence will not work as well on very small datasets compared to methods with explicit geometric inductive biases. In practice, we find that our model converges at rates similar to others, but even more training usually results in better performance. In particular, when trained on the standard datasets reported in this paper, SRT outperforms LFN and PixelNeRF. Further investigation is required to better understand the best training protocols. + +Finally, in comparisons to prior art, our model is best when input views are sparse or when camera poses are noisy or missing. When novel views are reliably close to input views, and perfect poses are known, explicit geometric meth + +ods such as [49] often provide better results, albeit with much longer inference times. While SRT has been specifically designed for the sparse input scenario, future work could investigate how to better leverage nearby input views at inference time when they are available. + +# 6. Conclusion + +We propose Scene Representation Transformer, a model for learning scalable neural scene representations using only self-supervision from color images. The novel encoder-decoder transformer architecture learns to render novel views without explicit geometric reasoning, and optionally without 3D image poses, yet surpassing the quality of prior art on standard benchmarks and a novel, more challenging dataset that we propose. At the same time, SRT is orders of magnitudes faster than prior methods for the realistic settings such as novel-scene video generation. This unique combination of flexibility, generality, and efficiency is well-suited for real world applications with very large datasets, and we believe that this work will inspire the community towards similar more implicit, yet scalable methods. + +# 7. Acknowledgments + +We thank Adam Kosiorek, Alex Yu, Alexander A. Kolesnikov, Aravindh Mahendran, Luke Barrington, Konstantinos Rematas, Sebastian Ebert, Srinadh Bhojanapalli Vickie Ye, and Vincent Sitzmann for their help and fruitful discussions. + +# References + +[1] Sameer Agarwal, Yasutaka Furukawa, Noah Snavely, Ian Simon, Brian Curless, Steven M Seitz, and Richard Szeliski. Building rome in a day. Communications of the ACM, 2011. +[2] PixelNeRF authors. Official code. https://github.com/sxyu/pixel-nerf, 2021. +[3] Jonathan Barron, Ben Mildenhall, Matthew Tancik, Peter Hedman, Ricardo Martin-Brualla, and Pratul Srinivasan. MipNeRF: A Multiscale Representation for Anti-Aliasing Neural Radiance Fields. In ICCV, 2021. +[4] Angel X Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, et al. Shapenet: An information-rich 3d model repository. arXiv preprint arXiv:1512.03012, 2015. +[5] Anpei Chen and Zexiang Xu. MVSNeRF: Fast Generalizable Radiance Field Reconstruction From Multi-View Stereo. In ICCV, 2021. +[6] 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. +[7] SM Ali Eslami, Danilo Jimenez Rezende, Frederic Besse, Fabio Viola, Ari S Morcos, Marta Garnelo, Avraham Ruderman, Andrei A Rusu, Ivo Danihelka, Karol Gregor, et al. Neural scene representation and rendering. Science, 2018. +[8] Patrick Esser, Robin Rombach, and Bjorn Ommer. Taming transformers for high-resolution image synthesis. In CVPR, 2021. +[9] Stephan Garbin and Marek Kowalski. FastNeRF: High-Fidelity Neural Rendering at 200FPS. In ICCV, 2021. +[10] Google. Street view, 2007. URL www.google.com/streetview/. +[11] Klaus Greff, Francois Belletti, Lucas Beyer, Carl Doersch, Yilun Du, Daniel Duckworth, David J Fleet, Dan Gnanapragasam, Florian Golemo, Charles Herrmann, Thomas Kipf, Abhijit Kundu, Dmitry Lagun, Issam Laradji, Hsueh-Ti (Derek) Liu, Henning Meyer, Yishu Miao, Derek Nowrouzezahrai, Cengiz Oztireli, Etienne Pot, Noha Radwan, Daniel Rebain, Sara Sabour, Mehdi S. M. Sajjadi, Matan Sela, Vincent Sitzmann, Austin Stone, Deqing Sun, Suhani Vora, Ziyu Wang, Tianhao Wu, Kwang Moo Yi, Fangcheng Zhong, and Andrea Tagliasacchi. Kubric: A Scalable Dataset Generator. In CVPR, 2022. +[12] Peter Hedman, Pratul Srinivasan, Ben Mildenhall, Jonathan Barron, and Paul Debevec. Baking Neural Radiance Fields for Real-Time View Synthesis. In ICCV, 2021. + +[13] Dan Hendrycks and Kevin Gimpel. Gaussian error linear units (gelus). arXiv preprint arXiv:1606.08415, 2016. +[14] Hosted by Niemeyer et al. NMR Dataset, 2021. URL https://s3.eu-central-1.amazon.com/avg-projects/differentiable_volumetric_rendering/data/NMR_Dataset.zip. +[15] Ajay Jain, Matthew Tancik, and Pieter Abbeel. Putting NeRF on a Diet: Semantically Consistent Few-Shot View Synthesis. In ICCV, 2021. +[16] Wongbong Jang and Lourdes Agapito. CodeNeRF: Disentangled Neural Radiance Fields for Object Categories. In ICCV, 2021. +[17] Hiroharu Kato, Yoshitaka Ushiku, and Tatsuya Harada. Neural 3d mesh renderer. In CVPR, 2018. +[18] Salman H. Khan, Muzammal Naseer, Munawar Hayat, Syed Waqas Zamir, Fahad Shahbaz Khan, and Mubarak Shah. Transformers in vision: A survey. In CoRR, 2021. +[19] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. +[20] Adam Kosiorek, Heiko Strathmann, Daniel Zoran, Pol Moreno, Rosalia Schneider, Sona Mokrá, and Danilo Rezende. NeRF-VAE: A Geometry Aware 3D Scene Generative Model. In ICML, 2021. +[21] Chen-Hsuan Lin, Wei-Chiu Ma, Antonio Torralba, and Simon Lucey. BARF: Bundle-Adjusting Neural Radiance Fields. In ICCV, 2021. +[22] Shichen Liu, Tianye Li, Weikai Chen, and Hao Li. Soft rasterizer: A differentiable renderer for image-based 3d reasoning. In ICCV, 2019. +[23] Ricardo Martin-Brualla, Noha Radwan, Mehdi S. M. Sajjadi, Jonathan Barron, Alexey Dosovitskiy, and Daniel Duckworth. NeRF in the Wild: Neural Radiance Fields for Unconstrained Photo Collections. In CVPR, 2021. +[24] Moustafa Meshry, Dan B Goldman, Sameh Khamis, Hugues Hoppe, Rohit Pandey, Noah Snavely, and Ricardo Martin-Brualla. Neural rerendering in the wild. In CVPR, 2019. +[25] Ben Mildenhall, Pratul Srinivasan, Matthew Tancik, Jonathan Barron, Ravi Ramamoorthi, and Ren Ng. NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis. In ECCV, 2020. +[26] Piotr Mirowski, Matt Grimes, Mateusz Malinowski, Karl Moritz Hermann, Keith Anderson, Denis Teplyashin, Karen Simonyan, Andrew Zisserman, Raia Hadsell, et al. Learning to navigate in cities without a map. NeurIPS, 2018. +[27] Przemyslaw Musialski, Peter Wonka, Daniel G Aliaga, Michael Wimmer, Luc Van Gool, and Werner Purgathofer. A survey of urban reconstruction. In Comput. Graph. Forum, 2013. + +[28] Michael Niemeyer, Lars Mescheder, Michael Oechsle, and Andreas Geiger. Differentiable Volumetric Rendering: Learning Implicit 3D Representations without 3D Supervision. In CVPR, 2020. +[29] René Ranftl, Alexey Bochkovskiy, and Vladlen Koltun. Vision transformers for dense prediction. In ICCV, 2021. +[30] Christian Reiser, Songyou Peng, Yiyi Liao, and Andreas Geiger. KiloNeRF: Speeding Up Neural Radiance Fields With Thousands of Tiny MLPs. In ICCV, 2021. +[31] Andrea Romanoni, Daniele Fiorenti, and Matteo Matteucci. Mesh-based 3d textured urban mapping. In IROS, 2017. +[32] Robin Rombach, Patrick Esser, and Björn Ommer. Geometry-free view synthesis: Transformers and no 3d priors. In ICCV, 2021. +[33] Mehdi S. M. Sajjadi, Bernhard Scholkopf, and Michael Hirsch. Enhancenet: Single image super-resolution through automated texture synthesis. In ICCV, 2017. +[34] Mehdi SM Sajjadi, Rolf Kohler, Bernhard Schölkopf, and Michael Hirsch. Depth estimation through a generative model of light field synthesis. In German Conference on Pattern Recognition, 2016. +[35] Johannes Lutz Schonberger and Jan-Michael Frahm. Structure-from-motion revisited. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. +[36] Inwook Shim, Yungeun Choe, and Myung Jin Chung. 3d mapping in urban environment using geometric featured voxel. In URAI, 2011. +[37] Vincent Sitzmann, Michael Zollhöfer, and Gordon Wetzstein. Scene Representation Networks: Continuous 3D-Structure-Aware Neural Scene Representations. In NeurIPS, 2019. +[38] Vincent Sitzmann, Semon Rezchikov, William T Freeman, Joshua B Tenenbaum, and Fredo Durand. Light field networks: Neural scene representations with single-evaluation rendering. In NeurIPS, 2021. +[39] Ayush Tewari, Vincent Sitzmann, Stephen Lombardi, Kalyan Sulkavalli, Ricardo Martin-Brualla, Tomas Simon, Matthias Nießner, Gordon Wetzstein, Christian Theobalt, Dan Goldman, and Michael Zollhöfer. State of the Art on Neural Rendering. In Eurographics, 2020. +[40] Ayush Tewari, Justus Thies, Ben Mildenhall, Pratul Srinivasan, Edgar Tretschk, Yifan Wang, Christoph Lassner, Vincent Sitzmann, Ricardo Martin-Brualla, Stephen Lombardi, et al. Advances in neural rendering. arXiv preprint arXiv:2111.05849, 2021. +[41] Alex Trevithick and Bo Yang. GRF: Learning a General Radiance Field for 3D Scene Representation and Rendering. In ICCV, 2021. + +[42] Linh Truong-Hong and Debra F Laefer. Octree-based, automatic building facade generation from lidar data. In Computer-Aided Design, 2014. +[43] 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. +[44] Qianqian Wang, Zhicheng Wang, Kyle Genova, Pratul Srinivasan, Howard Zhou, Jonathan Barron, Ricardo MartinBrualla, Noah Snavely, and Thomas Funkhouser. IBRNet: Learning Multi-View Image-Based Rendering. In $CVPR$ , 2021. +[45] Ting-Chun Wang, Alexei A Efros, and Ravi Ramamoorthi. Occlusion-aware depth estimation using light-field cameras. In ICCV, 2015. +[46] Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. Image quality assessment: from error visibility to structural similarity. In IEEE TIP, 2004. +[47] Tao Yan, Fan Zhang, Yiming Mao, Hongbin Yu, Xiaohua Qian, and Rynson WH Lau. Depth estimation from a light field image pair with a generative model. IEEE Access, 2019. +[48] Alex Yu, Ruilong Li, Matthew Tancik, Hao Li, Ren Ng, and Angjoo Kanazawa. PlenOctrees for Real-Time Rendering of Neural Radiance Fields. In ICCV, 2021. +[49] Alex Yu, Vickie Ye, Matthew Tancik, and Angjoo Kanazawa. pixelNeRF: Neural Radiance Fields from One or Few Images. In CVPR, 2021. +[50] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In CVPR, 2018. +[51] Hengshuang Zhao, Li Jiang, Jiaya Jia, Philip HS Torr, and Vladlen Koltun. Point transformer. In ICCV, 2021. +[52] Tinghui Zhou, Richard Tucker, John Flynn, Graham Fyffe, and Noah Snavely. Stereo Magnification: Learning View Synthesis using Multiplane Images. In Siggraph, 2018. \ No newline at end of file diff --git a/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/images.zip b/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e278d055169d89d5469e24cb8f15bc967bc81afa --- /dev/null +++ b/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fc836673520ea144235bb46c7e20f9cf1b6813766f15ba04ed64994834f0152 +size 527021 diff --git a/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/layout.json b/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..277fe2a8d4d3b5e7bfad371a09dc3e9c04eaa65a --- /dev/null +++ b/scenerepresentationtransformergeometryfreenovelviewsynthesisthroughsetlatentscenerepresentations/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43ed8df6eb4c323ee4868b94c652a0e7cb3eb595b50087a44bb1882ed8c14031 +size 373871 diff --git a/scenesqueezerlearningtocompresssceneforcamerarelocalization/cb691de4-8938-4758-9271-56a26043abe4_content_list.json b/scenesqueezerlearningtocompresssceneforcamerarelocalization/cb691de4-8938-4758-9271-56a26043abe4_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f69c55b6c5f8c1a0a269263df0cd994e655af77b --- /dev/null +++ b/scenesqueezerlearningtocompresssceneforcamerarelocalization/cb691de4-8938-4758-9271-56a26043abe4_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd45f11e08606b57864e9d45e6463fbe1c830181c92a70a5d8eb4897c87997ac +size 79375 diff --git a/scenesqueezerlearningtocompresssceneforcamerarelocalization/cb691de4-8938-4758-9271-56a26043abe4_model.json b/scenesqueezerlearningtocompresssceneforcamerarelocalization/cb691de4-8938-4758-9271-56a26043abe4_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4495971164e43849fd4482fbf2b12c46e19a0b7c --- /dev/null +++ b/scenesqueezerlearningtocompresssceneforcamerarelocalization/cb691de4-8938-4758-9271-56a26043abe4_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e7a5faead35564ab3c5bd7625c09f633f2169d4512ebe173b9efb3593c28011 +size 97532 diff --git a/scenesqueezerlearningtocompresssceneforcamerarelocalization/cb691de4-8938-4758-9271-56a26043abe4_origin.pdf b/scenesqueezerlearningtocompresssceneforcamerarelocalization/cb691de4-8938-4758-9271-56a26043abe4_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6dba0ac31bef1a10be3d1e46f505bea5ab82e6c1 --- /dev/null +++ b/scenesqueezerlearningtocompresssceneforcamerarelocalization/cb691de4-8938-4758-9271-56a26043abe4_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a575613c11798e0d176a80f103230210f54f2f48d3711e58736ddf3068ed7a1 +size 4282628 diff --git a/scenesqueezerlearningtocompresssceneforcamerarelocalization/full.md b/scenesqueezerlearningtocompresssceneforcamerarelocalization/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0a0c195fcd540a13b78bb76717db7ec1dfe432b3 --- /dev/null +++ b/scenesqueezerlearningtocompresssceneforcamerarelocalization/full.md @@ -0,0 +1,311 @@ +# SceneSqueezeer: Learning to Compress Scene for Camera Relocalization + +Luwei Yang $^{1*}$ Rakesh Shrestha $^{1*}$ Wenbo Li $^{2}$ Shuaicheng Liu $^{3}$ Guofeng Zhang $^{2}$ Zhaopeng Cui $^{2\dagger}$ Ping Tan $^{1,4\dagger}$ + +$^{1}$ Simon Fraser University $^{2}$ State Key Lab of CAD & CG, Zhejiang University $^{3}$ University of Electronic Science and Technology of China $^{4}$ Alibaba XR Lab {luweiy, rakeshs, pingtan}@sfu.ca, {wenboli, zhangguofeng, zhpcui}@zju.edu.cn, liushuaicheng@uestc.edu.cn + +# Abstract + +Standard visual localization methods build a priori 3D model of a scene which is used to establish correspondences against the 2D keypoints in a query image. Storing these pre-built 3D scene models can be prohibitively expensive for large-scale environments, especially on mobile devices with limited storage and communication bandwidth. We design a novel framework that compresses a scene while still maintaining localization accuracy. The scene is compressed in three stages: first, the database frames are clustered using pairwise co-visibility information. Then, a learned point selection module prunes the points in each cluster taking into account the final pose estimation accuracy. In the final stage, the features of the selected points are further compressed using learned quantization. Query image registration is done using only the compressed scene points. To the best of our knowledge, we are the first to propose learned scene compression for visual localization. We also demonstrate the effectiveness and efficiency of our method on various outdoor datasets where it can perform accurate localization with low memory consumption. + +# 1. Introduction + +Visual localization aims to estimate the camera pose (i.e., position and rotation) of an RGB query image with respect to a known 3D scene. This is a fundamental problem in 3D computer vision with various applications such as autonomous driving, augmented reality, indoor navigation, etc. Classical visual localization methods build 3D point cloud models of the scene beforehand, where each point is associated with one or more image descriptors, which are used to match against the 2D points detected in the query + +image. Once the 2D-3D correspondences are established, robust pose estimation [11, 19] can be applied to recover the camera pose. Retaining the pre-built 3D scene models costs expensive memory usage for large-scale environments, especially when deploying on mobile devices with limited storage. Thus, many methods have been proposed to compress 3D scene models to improve scalability while maintaining localization accuracy. + +Previous 3D scene compression methods can be roughly divided into three categories. The first category [7, 39] compresses the descriptors of 3D points using quantization, inevitably sacrificing the distinctiveness of the features while offering only a limited amount of compression. The second are learning-based visual localization methods [14, 16, 49]. Without explicitly storing a 3D scene model, they directly regress the camera pose or scene coordinates of each pixel via deep neural networks, which can be considered as a special type of scene compression as the network weights encode the 3D scene information. However, these methods either have low accuracy or generalize poorly. The third and the most common category compresses the 3D models by carefully selecting a subset of 3D points based on certain handcrafted criteria which generally include spatial coverage and visual distinctiveness of the selected points [6,23,27]. However, these criteria fail to directly consider the impact of the compression on the final pose estimation. Manually designing rules to select points is known to be a challenging problem for both absolute and relative pose estimation [13]. + +Motivated by the latest hierarchical localization methods [36, 38] which lead the benchmarks for visual localization, we propose a novel hierarchical strategy for 3D scene compression. Specifically, we compress the 3D scene model in three levels. At the coarse level, we conduct database image clustering and divide the scene into multiple clusters, enabling us to compress the clusters individually. This also speeds up localization by limiting the matching + +of the query keypoints to a smaller set of 3D points. For the middle level, we solve a QP problem [27] to select 3D points from each cluster. However, different from [27], we design a novel differentiable point selection method that enables us to learn to select 3D points based on their 2D observations and influence on the final pose estimation. To this end, we design a new multi-view observation fuser which learns to extract and aggregate features for each 3D point based on their ability to yield correct matches. With the extracted multi-view features we can learn the distinctiveness scores and pairwise proximity of the points which are used to select a subset of points via a differentiable QP solver [1]. Our experiments show that our learned point selection performs better than the heuristic methods. At the finest level, we exploit the latest differentiable quantization method [12] to further compress the feature descriptors. With these three levels of compression, our system outperforms existing compression-based localization methods. + +The contributions of our paper can be summarized as follows. At first, we propose a novel hierarchical pipeline for scene compression taking inspiration from the latest visual hierarchical localization methods. Secondly, we propose a novel differentiable point selection that learns distinctiveness scores and pairwise proximity of scene points. We train it alongside the feature matching and pose estimation, which enables the point selection to be based on the pose estimation accuracy instead of heuristic criteria. Extensive experiments show that our method outperforms previous methods on various benchmark datasets. + +# 2. Related Work + +Camera Localization: Conventionally, the problem of camera pose estimation has been tackled by generating 2D-3D correspondences from handcrafted keypoint descriptors [22, 24, 39-41, 45] followed by Perspective-n-Point (PnP) algorithm [11, 19]. Despite impressive performance, these methods are limited to well textured scenes due to the handcrafted features. + +Deep learning has been proposed as an alternative to the traditional methods. PoseNet [16] and its follow-up works [14,49] directly regress the absolute camera pose of a query image using CNN and LSTM. However, these methods are more akin to image retrieval than to structure-based pose estimation in terms of performance [43]. More robust learning-based methods [2-4,20,21] instead learn to regress the dense absolute scene coordinates of query images in a scene-specific manner. Despite of some success, they perform poorly on larger scenes and require costly retraining to adapt to novel scenes. Scene-agnostic regression [47,50] alleviate the generalization limitation but are costly in terms of memory as they need to store scene coordinate maps of the entire database. + +Many recent methods [9, 35, 46] exploit deep learning to + +obtain better feature descriptors and matchers. HLoc [36] achieves impressive results by exploiting the SuperGlue matcher [37] along with a hierarchical, coarse-to-fine approach for pose estimation. PixelLoc [38] learns to extract dense image features to align a query image to database images while also following the hierarchical localization strategy of [37]. All of these methods still require explicit 3D model with large amounts of points to achieve good performance. + +Scene Compression: K-cover is a popular technique to reduce the number of 3D scene points. Li et al. [23] use K-cover to find a subset of points with even spatial distribution and high visibility. Cao and Snavely [6] extend it and propose a probabilistic K-cover solution to maximize the visual distinctiveness (expressed in terms of descriptor distance) and the spatial coverage of the points. Camposeco et al. [5] present a K-cover based hybrid compression algorithm with two sets of points at different descriptor resolutions. Sun et al. [8] proposes an adaptive weighted K-cover solution to maximize the selected points' visibility. These K-cover variants are NP-hard and can only be solved approximately. + +Another common formulation for scene compression is quadratic programming (QP). Chen et al. [44] formulate a mixed-integer QP problem to optimize visibility and spatial distribution. Dymczyk et al. [10] improve the scalability of [44] by partitioning the problem into co-visible subgraphs that are solved individually. Mixed-integer QP is non-convex and therefore do not guarantee optimal solution despite being memory/time intensive. Mera-Trujillo et al. [27] propose a convex QP formulation and design an efficient solver for their problem formulation. These methods use handcrafted heuristics to encode the visual distinctiveness which generally need to be tuned or changed altogether based on the dataset. + +A different approach to scene compression is feature quantization. Cheng et al. [7] propose a cascaded parallel filter to compresses descriptors to compact binary representation. Sattler et al. [39] compress scene features into quantized vocabularies. + +Learned Point Cloud Sampling: While not always aimed for localization, point cloud subsampling is a related topic. Earlier methods use farthest point sampling which has been extended to differentiable form and used in various neural network architectures [31, 33, 51]. SampleNet [18] proposes a learned sampling method specific to the downstream tasks. + +Our method aims to overcome the weaknesses of existing works while preserving their strengths. We borrow the convex QP problem formulation of [27] and implement a differentiable solution to learn to select points directly based on the pose estimation accuracy and eliminate the need of handcrafted heuristics. + +![](images/746ac472ca4f39c2a072d9cb9fa1f3d38a26a24cc992a5980b66ba896355886c.jpg) +Figure 1. Pipeline of our system. A scene is compressed in 3 stages: co-visible frames clustering, 3D scene points selection and feature quantization. The compressed scene is then used for query frame registration. + +# 3. Method + +Our objective is to generate a compressed scene representation suitable for estimating absolute camera pose $\pmb{\xi}_{Q}$ of a calibrated query image $\mathbf{I}_Q$ w.r.t the scene. The input is a scene database consisting of image frames $\{\mathbf{I}_R\}$ (known as reference frames) and 3D points $\{\mathbf{X}_R\}$ , and their observed 2D keypoints $\mathbf{P}_R = \{(\mathbf{x}_R, \mathbf{F}_R)\}$ , where $\mathbf{x}_R \in \mathbb{R}^2$ is position of a keypoint in the image plane and $\tilde{\mathbf{F}}_R \in \mathbb{R}^{256}$ is its corresponding SuperPoint [9] descriptor. + +Figure 1 shows our scene compression pipeline. It can be divided into 3 stages: 1) Coarse-Level: Co-visible Frames Clustering where co-visible frames in the database are grouped using hierarchical clustering [28] and only a sparse set of frames are kept for localization (Section 3.1); 2) Middle-Level: Differentiable Point Selection, a point selection network for compressing point clouds from each cluster by taking into account the 2D-3D correspondences and high-level features of the 3D points (Section 3.2); 3) Fine-Level: Feature Quantization where the selected points' descriptors are encoded and compressed for storage such that they can be decompressed during runtime for feature matching (Section 3.3). + +# 3.1. Co-visible Frames Clustering + +Since compression of large-scale point clouds with millions of points is not feasible due to memory constraints of our point selection network, we divide the scene into multiple clusters and compress each cluster individually. Additionally, we can reduce the number of database frames required for coarse, image retrieval based localization by selecting fewer images that cover most of the observed points from each cluster. We use the hierarchical clustering [28] approach where the distance between the two frames $i$ and $j$ is a co-visibility distance $\psi (i,j)$ formulated as the log of inverse of Intersection over Union (IoU) of their observed + +3D points $\{\mathbf{X}_i\}$ and $\{\mathbf{X}_j\}$ : + +$$ +\psi (i, j) = \log \left(\frac {\left| \left\{\mathbf {X} _ {i} \right\} \cup \left\{\mathbf {X} _ {j} \right\} \right|}{\left| \left\{\mathbf {X} _ {i} \right\} \cap \left\{\mathbf {X} _ {j} \right\} \right|}\right). \tag {1} +$$ + +From each cluster we keep up to 20 frames that observe the largest number of 3D points as co-visible frames. + +# 3.2. Learning to Select Points + +We will further compress each cluster by reducing the number of 3D points while minimizing the loss of localization quality. It is well-known that accurate pose estimation not only depends on correct 2D-3D correspondences which is related to the points' distinctiveness, but also on good feature distribution. However, there is no golden standard to explicitly evaluate the distinctiveness and distribution of the points for the final pose estimation [13]. + +To this end, we design a differentiable point selection module that can be trained together with the final pose estimation, through which we can learn to evaluate the distinctiveness and distribution from the training data. + +Specifically, given $m$ 3D points $\mathbf{X}_A = \{\mathbf{X}_i\in \mathbb{R}^3|i = 1,\dots,m\}$ , we estimate a distribution $\alpha \in \mathbb{R}^{m}$ over the points where higher $\alpha_{i}$ means higher likelihood of selecting the point $\mathbf{X}_i$ . Similar to [27], we compute $\alpha$ by optimizing the following QP problem: + +$$ +\underset {\alpha} {\text {m i n i m i z e}} \quad \boldsymbol {\alpha} ^ {\mathsf {T}} \mathbf {K} \boldsymbol {\alpha} - \tau \mathbf {d} ^ {\mathsf {T}} \boldsymbol {\alpha} +$$ + +$$ +\text {s u b j e c t} \quad \sum_ {i} ^ {m} \alpha_ {i} = 1, \tag {2} +$$ + +$$ +0 \leq \alpha_ {i} \leq \frac {1}{\nu m}; \quad i = 1, \dots , m +$$ + +where $\mathbf{d} \in \mathbb{R}^m$ is the distinctiveness score vector of the 3D points, $\mathbf{K} \in \mathbb{R}^{m \times m}$ is the symmetric pairwise proximity matrix between the points, $\nu \in (0,1]$ is the compression factor with $\nu = 1$ meaning no compression and lowering + +![](images/4d31517018c8a8b54cb5f66940ccfd3c753bf224a656db6d4a3f7a5fc2e69739.jpg) +Figure 2. Anchor-Verification fusion between verification frame $V_{n}$ and anchor set $\mathbf{A}$ . + +$\nu$ increases the compression (i.e. selects fewer points). $\tau$ is the scalar weight balancing the two costs. Unlike [27] which adopts heuristic rules, we propose to calculate both $\mathbf{d}$ and $\mathbf{K}$ from learned 3D point features. We therefore solve the QP problem in a differentiable way [1], enabling us to learn $\mathbf{d}$ and $\mathbf{K}$ . The points corresponding to top- $\nu m$ $\alpha$ are selected and the rest discarded. We explain how we obtain $\mathbf{d}$ and $\mathbf{K}$ from the learned point features in the following sections. + +# 3.2.1 Multi-view Observation Fuser + +In order to better estimate the visual distinctiveness of 3D points, we first extract features of the points by using their 2D observations across multiple views. Instead of naively aggregating the SuperPoint features of the corresponding 2D keypoints, we consider the similarity between a 3D point and all possible 2D observations. The similarity is defined in terms of the correlation matrix between the 2D-3D pairs produced by a pre-trained SuperGlue matcher [37] along with the reprojection distance of the 3D points from the 2D keypoints positions. These respectively encode appearance and geometry similarity between 3D points and 2D observations. + +Anchor-Verification Split: Exhaustively iterating over all 3D points with their paired 2D keypoints in multiple frames is expensive, we therefore split a co-visible cluster into two sets: anchor frames, which cover most of the 3D points, and the rest are verification frames. The 2D-3D pairs are then limited to 3D points from the anchor frames and 2D keypoints from the verification frames. Only the 3D points contained within the anchor frames are considered for subsequent compression. + +Specifically, let $\mathbf{A} = \{A_k\}$ be the anchor frames with $m_A$ 3D points $\{\mathbf{X}_i \in \mathbb{R}^3 \mid i = 1, \dots, m_A\}$ and their features $\mathbf{F}_A \in \mathbb{R}^{m_A \times C}$ . The 3D point features $\mathbf{F}_A$ are generated by aggregating the corresponding 2D keypoints' features using mean pooling. Let $\{V_n\}$ be the set of verification frames and $\mathbf{F}_{V_n} \in \mathbb{R}^{l_n \times C}$ be the features of $l_n$ 2D keypoints in the verification frame $V_n$ . Features of each keypoints is obtained by using SuperGlue's Keypoint Encoder which takes as input the SuperPoint descriptor/confidence of the keypoints along with the normalized keypoints position and outputs a $C = 256$ dimensional feature. + +Anchor-Verification Fusion: We then fuse anchor and verification sets based on their appearance and geometry similarity. Figure 2 depicts the fusion of verification frame $V_{n}$ with the anchor points. The appearance similarity matrix between keypoints of verification frame $V_{n}$ and the anchor points is represented by $\mathbf{E}_{V_n\to A}\in \mathbb{R}^{m_A\times l_n}$ . Here, we use the score matrix from SuperGlue before the optimal transport layer (Sinkhorn Algorithm [30]) in order to obtain continuous similarity values instead of hard assignments. Let $\mathbf{M}_{V_n\to A}\in \mathbb{R}^{m_A\times l_n}$ be the pairwise geometry similarity defined as the inverse of the reprojection distance between the 2D keypoints in $V_{n}$ and 2D projections of the anchor points $\{\mathbf{X}_i\}$ on the verification frame. + +The subsequent verification features $\mathbf{G}_{V_n\to A}\in \mathbb{R}^{m_A\times C}$ and $\mathbf{H}_{V_n\to A}\in \mathbb{R}^{m_A\times C}$ are the weighted sum of the verification keypoint features $\mathbf{F}_{V_n}$ based on the appearance and geometry similarity to the 3D points: + +$$ +\begin{array}{l} \mathbf {H} _ {V _ {n} \rightarrow A} = \theta (\mathbf {E} _ {V _ {n} \rightarrow A}) \mathbf {F} _ {V _ {n}} \\ \mathbf {G} _ {V _ {n} \rightarrow A} = \theta (\mathbf {M} _ {V _ {n} \rightarrow A}) \mathbf {F} _ {V _ {n}}, \tag {3} \\ \end{array} +$$ + +where $\theta$ denotes row-wise normalization using softmax. The concatenated $\mathbf{G}_{V_n\to A}$ and $\mathbf{H}_{V_n\to A}$ is then fed into MLP( $\beta$ ) to obtain aggregated verification features $\mathbf{O}_{V_n\to A}$ which account for appearance and geometric similarities. + +Finally, the fused feature $\mathbf{F}_A^{agg} \in \mathbb{R}^{m_A \times C}$ combines the aggregated verification features $\{\mathbf{O}_{V_n \to A}\}$ from all the verification frames $\{V_n\}$ with the anchor features $\mathbf{F}_A$ . This is done using scaled dot-product attention [48]: + +$$ +\mathbf {F} _ {A} ^ {\text {a g g}} = \operatorname {A t t e n t i o n} \left(\mathbf {O} _ {V _ {1} \rightarrow A}, \dots , \mathbf {O} _ {V _ {n} \rightarrow A}, \mathbf {F} _ {A}\right), \tag {4} +$$ + +where $\mathbf{F}_A$ acts as Key and $\{\mathbf{O}_{V_n\to A}\}$ as Query for the attention mechanism. Please refer to the supplementary document for more detail. + +# 3.2.2 Learning Distinctiveness and Proximity + +With the fused features $\mathbf{F}_A^{agg}$ of the anchor set $\mathbf{A}$ , we estimate the distinctiveness $\mathbf{d}$ of the 3D points and their pairwise proximity $\mathbf{K}$ , which are utilized to solve the point distribution $\alpha$ using Equation (2). As shown in Figure 1, the $\mathbf{d}$ and $\mathbf{K}$ are obtained using two identical Point Transformer [52] networks. We choose Point Transformer instead of other point-based architectures [32, 33] because of their superior self-attention based information aggregation mechanism and impressive performance in various 3D tasks. Please refer to our supplementary materials for more details on the network architecture. The fused verification features $\mathbf{F}_A^{agg}$ along with their anchor feature $\mathbf{F}_A$ and 3D coordinates $\mathbf{X}_A$ are fed into the two point transformers to generate the distinctiveness scores $\mathbf{d}$ and point features $\mathbf{f} \in \mathbb{R}^{64}$ of each 3D point that are used to calculate the pairwise proximity matrix $\mathbf{K}$ . + +The pairwise proximity $\mathbf{K}$ is conventionally set to $\mathbf{K}^{\mathrm{spatial}}$ [27] where each entry is a (Gaussian) radial basis + +function of spatial distance between pairs of points $(i,j)$ i.e. $\mathbf{K}_{ij}^{\mathrm{spatial}} = \mathrm{RBF}(\| \mathbf{X}_i - \mathbf{X}_j\| ,\sigma_{\mathrm{RBF}})$ with + +$$ +\operatorname {R B F} (x, \sigma_ {\mathrm {R B F}}) = \exp \left(- \frac {x ^ {2}}{2 \sigma_ {\mathrm {R B F}} ^ {2}}\right). \tag {5} +$$ + +Instead of only using the spatial distance for $\mathbf{K}$ , we add a learned matrix $\Delta \mathbf{K}$ to obtain $\mathbf{K} = \frac{1}{2} (\mathbf{K}^{\mathrm{spatial}} + \Delta \mathbf{K})$ . Let $\hat{\mathbf{f}}$ denote the normalized features of $\mathbf{f}$ . We generate $\Delta \mathbf{K}$ using RBF of pairwise feature distance: $\Delta \mathbf{K}_{ij} = \mathrm{RBF}(\| \hat{\mathbf{f}}_i - \hat{\mathbf{f}}_j \|)$ for each pair of points $(i,j)$ . This allows us to not only get a good spatial coverage, but also to potentially reduce visual redundancies and avoid pose estimation degeneracies with the selected points. + +After generating $\mathbf{d}$ and $\mathbf{K}$ , we optimize $\alpha$ in Equation (2) with a differentiable QP solver [1] in order to backpropagate the error gradients to $\mathbf{K}$ , $\mathbf{d}$ and $\tau$ during training. + +# 3.3. Fine-Level Feature Quantization + +For each selected point $\mathbf{X}_S$ we need its feature $\mathbf{F}_S$ , a 256 dimensional vector of 32-bit floating-point numbers, in order to perform query frame registration. We compress these descriptors using an auto-encoder network. + +Our encoder contains a 2-layered MLP that reduces the dimensions of the input descriptor $\mathbf{F}_S$ by half, and a Differentiable Soft Quantization (DSQ) [12] layer that quantizes the MLP output from 32-bit floats to 8-bit unsigned integers. Let $\hat{\mathbf{F}}_S$ denote the resulting quantized features. A decoder consisting of MLP identical to the encoder then tries to recover the original descriptor in the form of $\mathbf{F}'_S$ of same dimensions and data type as $\mathbf{F}_S$ . The network is trained using L2-loss: $L_{Q} = \| \mathbf{F}'_{S} - \mathbf{F}_{S}\|_{2}$ . + +After the scene compression, we only store the lower dimensional quantized descriptors $\hat{\mathbf{F}}_S$ generated by the encoder network, resulting in an eight-fold reduction in memory. During runtime localization the decoder network outputs $\mathbf{F}'_S$ which can be used for feature matching. + +# 3.4. Training Losses + +We use two losses $L_{d}$ and $L_{\xi}$ to train our network to produce appropriate $\mathbf{d}$ , $\mathbf{K}$ and subsequently $\alpha$ . $L_{d}$ encourages the network to assigned high $\mathbf{d}$ values to points that are easier to track across multiple frames and is implemented as follows: + +$$ +\begin{array}{l} L _ {d} = \sum_ {j \in \mathbf {A}} \frac {1}{2 \sigma_ {j} ^ {2}} \sum_ {(j, i), i \in Q} \| \pi_ {Q} (\pmb {\xi} _ {g t}, \mathbf {X} _ {j}) - \mathbf {x} _ {i} \| \\ + \sum_ {j \in \mathbf {A}} \frac {1}{2} \log \left(\sigma_ {j} ^ {2}\right), \tag {6} \\ \end{array} +$$ + +where $\sigma_{j}$ represents the uncertainty of the 3D point $\mathbf{X}_j$ in the anchor set $\mathbf{A}$ , $Q$ is a query frame with ground truth pose $\xi_{gt}$ , $\mathbf{x}_i\in \mathbb{R}^2$ is the 2D image coordinates of the keypoint + +![](images/909c5a167fc7cca9f11b1060daab0ade41985cac3e0ac0c90c153ce4315421ce.jpg) +Figure 3. Visualization of the learned distinctiveness scores $\mathbf{d}$ . Our system learns to assign high scores to strong features that can be accurately matched with the query images + +![](images/4dd9d982286de44d57942a7b1baadee31a8c613d47d73e9d3ca5135b5d8742e0.jpg) + +![](images/d2772cd3b43ac0efb28fc90416c52692f153048d214ec11976328cb4d3331fc7.jpg) + +in query frame corresponding to the point $\mathbf{X}_j$ . $\pi_Q$ is the projection function mapping a 3D points in world coordinate frame to 2D image coordinates given the camera pose and intrinsics. The $(j,i)$ correspondences between reference and query points are predicted by a pre-trained SuperGlue matcher. + +The above loss function takes inspiration from Bayesian deep learning [15]. The first term is the weighted errors of the predicted 2D-3D matches $(j,i)$ while the second term serves as regularizer to prevent all the points from degenerating to high uncertainty. Finally, the distinctiveness score of the point $\mathbf{X}_j$ is set to $\mathbf{d}_j = \frac{1}{2\sigma_j^2}$ meaning lower uncertainty in matching the 3D point with its 2D keypoint leads to higher distinctiveness score. + +Figure 3 shows the learned distinctiveness scores $\mathbf{d}$ for 2 example images from the Cambridge Landmarks dataset [16]. In the figure we can see that the distinct features like corners and edges receive high scores. Since both 2D and 3D information are used for computation of $\mathbf{d}$ , the scores can take into account the 3D structure along with the appearance information. + +Another loss term $L_{\xi}$ tries to maximize the accuracy of the camera pose estimated using the points sampled from the distribution $\alpha$ : + +$$ +\begin{array}{l} L _ {\xi} = \sum_ {h = 1} ^ {H} \left(\left(\prod_ {i = 1} ^ {4} \boldsymbol {\alpha} _ {i} ^ {h}\right) \| \pi_ {Q} (\boldsymbol {\xi} _ {h}, \mathbf {X} ^ {R}) - \pi_ {Q} (\boldsymbol {\xi} _ {g t}, \mathbf {X} ^ {R}) \| \right. \\ \left. + \sum_ {i = 1} ^ {4} \boldsymbol {\alpha} _ {i} ^ {h} \left\| \mathbf {x} _ {i} ^ {Q} - \pi_ {Q} \left(\boldsymbol {\xi} _ {g t}, \mathbf {X} _ {i} ^ {R}\right) \right\|\right), \tag {7} \\ \end{array} +$$ + +where we randomly sample $h = 1,\dots,H$ hypotheses, with each hypothesis $h$ consisting of 4 points with distinctiveness scores $\{\pmb {\alpha}_i^h |i = 1,\dots,4\}$ randomly selected from the set of 3D points $\mathbf{X}^R\in \mathbb{R}^{k\times 3}$ . $\mathbf{x}_i^Q\in \mathbb{R}^{k\times 2}$ represents the 2D keypoint positions in query frame $Q$ corresponding to $\mathbf{X}^R$ obtained from the SuperGlue matcher. $\xi_{h}$ is the estimated pose of the hypothesis $h$ using 4 points solution of PnP [19] and $\pmb{\xi}_{gt}$ is the ground truth pose of the query frame. + +The first term inside the summation in Equation (7) updates the $\alpha_{i}$ of all 4 points in a hypothesis based on the pose error. Since a higher pose error does not necessarily mean all 4 points led to incorrect matches, we add the second term + +which updates the exact $\alpha_{i}$ based on the reprojection error of predicted 2D-3D correspondence between $\mathbf{x}_i^Q$ and $\mathbf{X}_i^R$ . By doing this we can encourage the point selection to make sure that any combination of 4 selected points will lead to good localization while also learning the distinctiveness of individual points. + +# 3.5. Runtime Localization + +After our network is trained, we compress the point clouds of each cluster using a custom implementation of the Sequential Minimal Optimization (SMO) based quadratic programming solver proposed in [27]. This allows us to compress large point clouds efficiently using the predicted $\mathbf{d}$ , $\mathbf{K}$ and $\tau$ . We also compress the AP-GeM [34] global descriptor of the frame with the most observed 3D points from each co-visible cluster. The same technique of Section 3.3 is used to quantize the 2048 dimensional, floating-point AP-GeM descriptors to 1024 8-bit unsigned integer descriptors. Only the compressed point clouds and quantized features are kept for localization. + +For runtime query frame registration, we use a strategy similar to HLoc [36]. First, image retrieval [34] is used to find nearest co-visible clusters similar to the query frame $\mathbf{I}_Q$ . We then register the query frame against each of the compressed point cloud clusters corresponding to the image retrieval results using $\mathrm{PnP} + \mathrm{RANSAC}$ [19]. The final camera pose $\xi_{Q}$ is obtained by running $\mathrm{PnP} + \mathrm{RANSAC}$ again on all the 2D-3D correspondences from the clusters that led to successful registration. More details about the global descriptor quantization and localization process can be found in the supplementary document. + +# 4. Experiments + +Datasets: We use the training set of the RobotCar Seasons [26] dataset to train our network and evaluate the trained network on the Cambridge Landmarks [16] and Aachen Day-Night [42] datasets. All of the datasets are city-scale capturing small/medium (Cambridge Landmarks) to large (Aachen Day-Night, RobotCar Seasons) scale scenes. Although SIFT [25] based 3D reconstructions are available for the datasets, since our network is based on SuperPoint features, we perform re-triangulation of the scene using the ground truth camera poses in a similar fashion to [36]. + +Training Dataset: The RobotCar Seasons dataset consists of 5.7K training images under various weather conditions such as dawn, dusk, night etc. It also contains an additional set of 26K images called overcast-reference which are used to generate the 3D scene point cloud and the co-visible clusters (Subsection 3.1). There are in total 4.1K co-visible clusters, $20\%$ of which are used as validation set. + +In one training iteration we take a set of co-visible frames from which $30\%$ frames are selected as anchor frames and another $30\%$ as verification frames. Frames within 10 me + +ters and $45^{\circ}$ of the cluster center are used as query frames from the remaining $40\%$ . + +Testing Dataset: Following [5,27] we select 4 scenes from the Cambridge Landmarks dataset, viz., Shop Facade, King's College, Old Hospital and St. Mary Church for evaluation, which cover small to medium-scale scenarios. We also use the Aachen Day-Night dataset to evaluate our method on large-scale scene and more challenging nighttime conditions. Their training sets are used as reference frames and the test sets are used for evaluation. No fine-tuning is performed on our network using these datasets. + +Similar to [36], we select top-15 image retrieval matches of a query frame for Cambridge Landmarks dataset and top-50 for the larger Aachen Day-Night to find the potential clusters where the query image could belong to and then perform finer pose estimation (Subsection 3.5). + +Implementation Details: Our network is implemented in PyTorch [29]. The training is performed on NVIDIA A5000 GPU with 24 GB memory. We use Adam optimizer [17] with an initial learning rate $5 \times 10^{-4}$ and a batch size of 1. + +Due to memory constraints we do not optimize the weights of the SuperGlue network and limit the size of the point cloud input to the QP solver to 1000 by random selection during training. Although the QP input is truncated, we use all the points for calculating the losses in Equations 6 and 7. The RBF bandwidth $(\sigma_{\mathrm{RBF}})$ for both spatial and feature distance kernels are fixed to 1.0 while the learned weight $\tau$ is initialized with 0.5. The compression ratio $\nu$ is fixed to $1.5\%$ during training while during testing it is $1.5\%$ as long as the number of compressed points in the cluster is at least 100. Otherwise, an adaptive compression ratio is applied such that the number of points is 100 in order to be able to accurately localize query images belonging to those clusters. Please refer to our supplementary document for further details. + +# 4.1. Quantitative Comparisons + +Cambridge Landmarks dataset: We perform quantitative comparison against various localization methods in Table 1. QP+RootSIFT [27], Hybrid [5], KP [23], KCP [6] are compression-based methods. We also include uncompressed methods for references in our comparison. DSAC++ [3] and PoseNet(Geo.) [14] are scene-specific methods that implicitly encode a scene in their deep network weights. The scene-agnostic SANet [50] on the other hand stores the RGBD images of the entire training set. Active Search (AS) [41] and HLoc [41] are sparse feature-based methods where a scene is stored as uncompressed 3D point cloud along with their 2D keypoint descriptors. Our method and HLoc perform hierarchical, coarse-to-fine localization while the rest do not. + +Along with the median translation error in meters and median rotation error in degrees, we also report the size + +
MethodShop FacadeOld HospitalKing's CollegeSt. Mary's Church
Size (MB)Trans. Err (m)Rot. Err (°)Size (MB)Trans. Err (m)Rot. Err (°)Size (MB)Trans. Err (m)Rot. Err (°)Size (MB)Trans. Err (m)Rot. Err (°)
Compression-based methods
Ours0.130.110.380.530.370.530.30.270.380.950.150.37
QP+RootSIFT [27]0.410.721.41.10.92.172.21.531.093.30.560.89
Hybrid [5]0.160.190.540.620.751.011.010.810.591.340.50.49
KC [23]0.850.510.8761.351.063.11.481.23180.460.69
KCP [6]1.300.440.88.21.1915.90.990.86240.40.61
Uncompressed methods
PoseNet(Geo.) [14]500.883.78503.23.29500.881.04501.573.32
AS [41]38.70.120.411400.521.122750.570.73590.220.62
SANet [50]270.10.471050.320.531430.320.541740.160.57
DSAC++ [3]2070.060.32070.20.32070.180.32070.130.4
HLoc [36]3160.040.213350.150.318770.120.220090.070.21
+ +Table 1. Cambridge Landmarks quantitative comparison. We report the size of the scene representation in MB, the median translation error in meters(m) and median rotation error in degrees(°) for each method. + +
MethodSize (MB)Aachen Day 0.25m, 2° / 0.5m, 5° / 5m, 10°Aachen Night 0.25m, 2° / 0.5m, 5° / 5m, 10°
Compression-based methods
Ours3175.5 / 89.7 / 96.250.0 / 67.3 / 78.6
Cascaded [7]14076.7 / 88.6 / 95.833.7 / 48.0 / 62.2
QP+R.Sift* [27]3162.6 / 76.3 / 84.716.3 / 18.4 / 24.5
Uncompressed methods
PixLoc(E2E) [38]218961.7 / 67.6 / 74.846.9 / 53.1 / 64.3
ESAC(50) [4]131542.6 / 59.6 / 75.56.1 / 10.2 / 18.4
AS [41]75057.3 / 83.7 / 96.628.6 / 37.8 / 51.0
HLoc [36]782889.6 / 95.4 / 98.886.7 / 93.9 / 100.0
+ +Table 2. Aachen Day-Night quantitative comparison. We report the size of the scene representation in MB and percentage(%) of query frames successfully localized within the given translation and rotation errors in meters and degrees respectively. + +of scene representation in MB stored by each method. Our method outperforms all the existing compression-based methods while also keeping a lower memory footprint. + +As for the uncompressed methods, our method outperforms Active Search (AS) [41] and is also on par with SANet [50]. Although DSAC++ [3] and HLoc [36] yield better localization performance, they come with considerably high cost in memory compared with our method. + +Aachen Day-Night dataset: We compare our method against existing methods on the Aachen Day-Night dataset in Table 2. The method " Cascaded" [7] compresses the descriptor directly without reducing the number of 3D points. Since [27] has no source code available, we use our implementation of their method but keep our image retrieval module (denoted by $\mathrm{QP + RootSift^{*}}$ ). We include the uncompressed method ESAC(50) [4] which extends DSAC++ [3] along with the end-to-end method PixLoc(E2E) [38]. + +Our method performs better than or on par with all the other methods, for all the thresholds with HLoc being a notable exception. However, the higher performance of HLoc comes at a steep memory cost. The compression-based method "Cascaded" [7] performs similar to ours for the daytime images but our method significantly outperforms theirs for the nighttime images while only using $20\%$ of + +![](images/798f2cbeee3ff09ab5b4e8478f2bd4a6713306905ba163280c2b3fa3efade3eb.jpg) +Percentage of points under 10px reprojection err. +Figure 4. Performance of Differentiable Point Selection with different inputs. 3D points are selected based on a threshold on the distinctiveness scores $\mathbf{d}$ (shown in x-axis) and the percentage of selected points that have less than 10 pixel re-projection error against their 2D correspondences are reported in y-axis. + +their memory. + +# 4.2. Ablation Study + +Effectiveness of using verification set: In this experiment we use the 4 scenes of Cambridge Landmarks dataset and select three different types of input to feed to our Differentiable Point Selection (DPS) module and examine how it affects the distinctiveness score $\mathbf{d}$ : 1) the anchor and verification frame features are aggregated using appearance and geometric similarities (Equation (3)), denoted by $\text{Appear. + Geo.}$ ; 2) using only the appearance similarity (referred to as $\text{Appear.}$ ) for aggregating the anchor and verification features; 3) SuperPoint features of the anchor frames are directly used without fusing with verification frames, denoted by SuperPoint feat. Figure 4 shows the predicted distinctiveness score (normalized) of the 3D scene points against the percentage of correct 2D-3D matches in the query frames. Here we select the subset of scene points with distinctiveness score higher than a given threshold ( $x$ -axis). After reprojecting those 3D points to the query image planes using ground-truth camera poses, we then evaluate the percentage of the points where the re + +![](images/65cc0a0888fca1423ddc17d8ba777ba298c6b006957b75a49a0f425a93933458.jpg) +Figure 5. Performance of our system when using learned kernel vs fixed spatial kernel. We report the localization recall under the translation and rotation error thresholds $(0.5\mathrm{m}, 5^{\circ})$ . The random selection and naive selection of the top distinct points (Top-k dist.) baselines are also included in the comparison. projection distance against their matched query keypoints is under 10 pixels (y-axis). + +Learned vs Fixed Kernel: We evaluate the localization performance when using fixed spatial distance kernel $\mathbf{K}^{\mathrm{spatial}}$ instead of the learned kernel $\mathbf{K}$ when solving Equation (2) to find the selected point. For comparison, we also show the accuracy when we randomly select the points and when we directly choose the points with highest distinctiveness score $\mathbf{d}$ (Top-k dist.). We select the Kings College scene for our experiment and the results are shown in Figure 5. The gap between random selection and other methods is large indicating that our learned distinctiveness score $\mathbf{d}$ correspond to the ability to correctly match the 3D points with query image keypoints. Using $\mathbf{K}^{\mathrm{spatial}}$ along with $\mathbf{d}$ performs better than Top-k dist. and the learned $\mathbf{K}$ performs the best, especially at higher compression (corresponding to lower compression ratio). The difference in accuracy between learned kernel, fixed kernel and top distinctiveness score gets lower when compression ratio is increased. This is because a larger number of points will be used for localization which increases the number of correct 2D-3D matches and the PnP with RANSAC [19] scheme becomes more robust against outliers. + +Figure 6 shows the points selection on two frame in a co-visible cluster using the fixed and learned kernels respectively. Both use a compression ratio of $1.5\%$ . The fixed kernel only uses the 3D position information while the learned kernel considers 2D position and feature information as well. The learned kernel therefore leads to better feature distribution, in the image coordinates and not just the 3D coordinates. This can explain why the learned kernel performs better than the fixed spatial kernel in Figure 5. Compression Time: In Table 3 we report the time required for scene compression by our system (compression ratio $1.5\%$ ), $\mathrm{QP + R.Sift}$ [27], KC [23] and KCP [6] on the St.Marys Church scene from the Cambridge Landmarks dataset. For $\mathrm{QP + R.Sift}$ , KC and KCP, we present the compression time reported by [27]. Our compression time is similar to KC and lower than KCP, but it is significantly + +![](images/3bbd441084457d9c49f205be101080f1f2e16dde097a8c4708a8980b4e10e4a8.jpg) +Figure 6. Visualization of the points selected using fixed and learned kernels. The selected 3D points are reprojected to the image plane and shown as Green dots. +Table 3. Compression time (seconds) of different methods. higher than $\mathrm{QP + R}$ .Sift since our computation of $\mathbf{d}$ and $\mathbf{K}$ is more involved than $\mathrm{QP + R}$ .Sift. + +
OurQP+R.Sift [27]KC [23]KCP [6]
48418328798
+ +# 5. Limitations + +There are several limitations of our system: 1) Our visible clusters consist of maximum 20 frames, $30\%$ of which are anchor frames. Although we select the frames with the most observed points, some points are still ignored. A smarter strategy that takes both efficiency and wider coverage into account could be used for improvement; 2) Due to the limited capacity of the existing point transformer, we can only process one cluster at a time. This may cause unnecessary costs for processing overlapping clusters; 3) Multiple retrieval candidates are required to get an accurate registration of a query image. With larger scenes such as Aachen Day-Night [42], a larger number of candidates are needed to tackle ambiguous retrievals. This can be too expensive for real-time applications, especially for mobile platforms where the computational resources are limited. + +# 6. Conclusion + +We present a novel method for compressing a scene while retaining visual localization accuracy. Our scene compression is done in three stages: co-visible frames clustering, learned point selection and learned feature quantization. Unlike existing methods [5, 6, 23, 27], we do not use handcrafted heuristics but learn to select a subset of scene points that can maintain pose estimation accuracy. Experiments on various datasets corroborate our method's ability to perform accurate localization with low memory footprint. Acknowledgement. This work is supported by the Canada NSERC Discovery Project (611664), the National Natural Science Foundation of China (No. 61872067, No. 62102356), and the Zhejiang Lab (2021PE0AC01). + +# References + +[1] Akshay Agrawal, Brandon Amos, Shane Barratt, Stephen Boyd, Steven Diamond, and J Zico Kolter. Differentiable convex optimization layers. In NeurIPS, 2019. 2, 4, 5 +[2] Eric Brachmann, Alexander Krull, Sebastian Nowozin, Jamie Shotton, Frank Michel, Stefan Gumhold, and Carsten Rother. Ijcv ransac for camera localization. In CVPR, 2017. 2 +[3] Eric Brachmann and Carsten Rother. Learning less is more-6d camera localization via 3d surface regression. In CVPR, 2018. 2, 6, 7 +[4] Eric Brachmann and Carsten Rother. Expert sample consensus applied to camera re-localization. In ICCV, 2019. 2, 7 +[5] Federico Camposeco, Andrea Cohen, Marc Pollefeys, and Torsten Sattler. Hybrid scene compression for visual localization. In CVPR, 2019. 2, 6, 7, 8 +[6] Song Cao and Noah Snavely. Minimal scene descriptions from structure from motion models. In CVPR, 2014. 1, 2, 6, 7, 8 +[7] Wentao Cheng, Weisi Lin, Kan Chen, and Xinfeng Zhang. Cascaded parallel filtering for memory-efficient image-based localization. In ICCV, 2019. 1, 2, 7 +[8] Wentao Cheng, Weisi Lin, Xinfeng Zhang, Michael Goesele, and Ming-Ting Sun. A data-driven point cloud simplification framework for city-scale image-based localization. TIP, 26(1):262-275, 2016. 2 +[9] Daniel DeTone, Tomasz Malisiewicz, and Andrew Rabinovich. Superpoint: Self-supervised interest point detection and description. In CVPRW, 2018. 2, 3 +[10] Marcin Dymczyk, Simon Lynen, Michael Bosse, and Roland Siegwart. Keep it brief: Scalable creation of compressed localization maps. In IROS, 2015. 2 +[11] Xiao-Shan Gao, Xiao-Rong Hou, Jianliang Tang, and Hang-Fei Cheng. Complete solution classification for the perspective-three-point problem. T-PAMI, 25(8):930–943, 2003. 1, 2 +[12] Ruihao Gong, Xianglong Liu, Shenghu Jiang, Tianxiang Li, Peng Hu, Jiazhen Lin, Fengwei Yu, and Junjie Yan. Differentiable soft quantization: Bridging full-precision and low-bit neural networks. In CVPR, 2019. 2, 5 +[13] You-Yi Jau, Rui Zhu, Hao Su, and Manmohan Chandraker. Deep keypoint-based camera pose estimation with geometric constraints. In IROS, 2020. 1, 3 +[14] Alex Kendall and Roberto Cipolla. Geometric loss functions for camera pose regression with deep learning. In CVPR, 2017. 1, 2, 6, 7 +[15] Alex Kendall and Yarin Gal. What uncertainties do we need in bayesian deep learning for computer vision? In NeurIPS, 2017. 5 +[16] Alex Kendall, Matthew Grimes, and Roberto Cipolla. Posenet: A convolutional network for real-time 6-dof camera relocalization. In ICCV, 2015. 1, 2, 5, 6 +[17] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[18] Itai Lang, Asaf Manor, and Shai Avidan. Samplenet: Differentiable point cloud sampling. In CVPR, 2020. 2 + +[19] Vincent Lepetit, Francesc Moreno-Noguer, and Pascal Fua. Epnp: An accurate o (n) solution to the pnp problem. IJCV, 81(2):155-166, 2009. 1, 2, 5, 6, 8 +[20] Xiaotian Li, Shuzhe Wang, Yi Zhao, Jakob Verbeek, and Juho Kannala. Hierarchical scene coordinate classification and regression for visual localization. In CVPR, 2020. 2 +[21] Xiaotian Li, Juha Ylioinas, and Juho Kannala. Full-frame scene coordinate regression for image-based localization. arXiv preprint arXiv:1802.03237, 2018. 2 +[22] Yunpeng Li, Noah Snavely, Dan Huttenlocher, and Pascal Fua. Worldwide pose estimation using 3d point clouds. In ECCV, 2012. 2 +[23] Yunpeng Li, Noah Snavely, and Daniel P Huttenlocher. Location recognition using prioritized feature matching. In ECCV, 2010. 1, 2, 6, 7, 8 +[24] Hyon Lim, Sudipta N Sinha, Michael F Cohen, and Matthew Uyttendaele. Real-time image-based 6-dof localization in large-scale environments. In CVPR, 2012. 2 +[25] David G Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91-110, 2004. 6 +[26] Will Maddern, Geoffrey Pascoe, Chris Linegar, and Paul Newman. 1 year, $1000\mathrm{km}$ : The oxford robotcar dataset. The International Journal of Robotics Research, 36(1):3-15, 2017. 6 +[27] Marcela Mera-Trujillo, Benjamin Smith, and Victor Fragoso. Efficient scene compression for visual-based localization. In 3DV, 2020. 1, 2, 3, 4, 6, 7, 8 +[28] Daniel Mullner. Modern hierarchical, agglomerative clustering algorithms. arXiv preprint arXiv:1109.2378, 2011. 3 +[29] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NeurIPSW, 2017. 6 +[30] Gabriel Peyré, Marco Cuturi, et al. Computational optimal transport: With applications to data science. Foundations and Trends® in Machine Learning, 11(5-6):355-607, 2019. 4 +[31] Charles R Qi, Or Litany, Kaiming He, and Leonidas J Guibas. Deep hough voting for 3d object detection in point clouds. In ICCV, 2019. 2 +[32] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In CVPR, 2017. 4 +[33] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In NeurIPS, 2017. 2, 4 +[34] Jerome Revaud, Jon Almazán, Rafael S Rezende, and Cesar Roberto de Souza. Learning with average precision: Training image retrieval with a listwise loss. In ICCV, 2019. 6 +[35] Jerome Revaud, Philippe Weinzaepfel, Cesar Roberto de Souza, and Martin Humenberger. R2D2: repeatable and reliable detector and descriptor. In NeurIPS, 2019. 2 +[36] Paul-Edouard Sarlin, Cesar Cadena, Roland Siegwart, and Marcin Dymczyk. From coarse to fine: Robust hierarchical localization at large scale. In CVPR, 2019. 1, 2, 6, 7 +[37] Paul-Edouard Sarlin, Daniel DeTone, Tomasz Malisiewicz, and Andrew Rabinovich. Superglue: Learning feature + +matching with graph neural networks. In CVPR, 2020. 2, 4 +[38] Paul-Edouard Sarlin, Ajaykumar Unagar, Måns Larsson, Hugo Germain, Carl Toft, Viktor Larsson, Marc Pollefeys, Vincent Lepetit, Lars Hammarstrand, Fredrik Kahl, and Torsten Sattler. Back to the Feature: Learning robust camera localization from pixels to pose. In CVPR, 2021. 1, 2, 7 +[39] Torsten Sattler, Michal Havlena, Filip Radenovic, Konrad Schindler, and Marc Pollefeys. Hyperpoints and fine vocabularies for large-scale location recognition. In ICCV, 2015. 1, 2 +[40] Torsten Sattler, Michal Havlena, Konrad Schindler, and Marc Pollefeys. Large-scale location recognition and the geometric burstiness problem. In CVPR, 2016. 2 +[41] Torsten Sattler, Bastian Leibe, and Leif Kobbelt. Efficient & effective prioritized matching for large-scale image-based localization. T-PAMI, 39(9):1744-1756, 2016. 2, 6, 7 +[42] Torsten Sattler, Tobias Weyand, Bastian Leibe, and Leif Kobbelt. Image retrieval for image-based localization revisited. In BMVC, 2012. 6, 8 +[43] Torsten Sattler, Qunjie Zhou, Marc Pollefeys, and Laura Leal-Taixe. Understanding the limitations of cnn-based absolute camera pose regression. In CVPR, 2019. 2 +[44] Hyun Soo Park, Yu Wang, Eriko Nurvitadhi, James C Hoe, Yaser Sheikh, and Mei Chen. 3d point cloud reduction using mixed-integer quadratic programming. In CVPRW, 2013. 2 +[45] Linus Svarm, Olof Enqvist, Magnus Oskarsson, and Fredrik Kahl. Accurate localization and pose estimation for large 3d models. In CVPR, 2014. 2 +[46] Hajime Taira, Masatoshi Okutomi, Torsten Sattler, Mircea Cimpoi, Marc Pollefeys, Josef Sivic, Tomas Pajdla, and Akihiko Torii. Inloc: Indoor visual localization with dense matching and view synthesis. In CVPR, 2018. 2 +[47] Shitao Tang, Chengzhou Tang, Rui Huang, Siyu Zhu, and Ping Tan. Learning camera localization via dense scene matching. In CVPR, 2021. 2 +[48] 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 +[49] Florian Walch, Caner Hazirbas, Laura Leal-Taixe, Torsten Sattler, Sebastian Hilsenbeck, and Daniel Cremers. Image-based localization using lstms for structured feature correlation. In ICCV, 2017. 1, 2 +[50] Luwei Yang, Ziqian Bai, Chengzhou Tang, Honghua Li, Yasutaka Furukawa, and Ping Tan. Sanet: Scene agnostic network for camera localization. In ICCV, 2019. 2, 6, 7 +[51] Kangxue Yin, Zhiqin Chen, Hui Huang, Daniel Cohen-Or, and Hao Zhang. Logan: Unpaired shape transform in latent overcomplete space. TOG, 38(6):1-13, 2019. 2 +[52] Hengshuang Zhao, Li Jiang, Jiaya Jia, Philip HS Torr, and Vladlen Koltun. Point transformer. In ICCV, 2021. 4 \ No newline at end of file diff --git a/scenesqueezerlearningtocompresssceneforcamerarelocalization/images.zip b/scenesqueezerlearningtocompresssceneforcamerarelocalization/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c95fd30e9d5e0b25d70d807eb919718721627ae3 --- /dev/null +++ b/scenesqueezerlearningtocompresssceneforcamerarelocalization/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1fa884bde6a5d33b4332d510e125f92a9c5b6726784a12cf6773e1d7474d628 +size 469277 diff --git a/scenesqueezerlearningtocompresssceneforcamerarelocalization/layout.json b/scenesqueezerlearningtocompresssceneforcamerarelocalization/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e6a9fa4ee2d28f3921c13002d93a319788b46eec --- /dev/null +++ b/scenesqueezerlearningtocompresssceneforcamerarelocalization/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f95873dffe84ec87991f6a8c9e37fd5bd398bd90e5e5a8a3014cd4764b97648 +size 466691 diff --git a/scenicajaxlibraryforcomputervisionresearchandbeyond/7006b176-f8df-4a8d-9902-172bdc6e7263_content_list.json b/scenicajaxlibraryforcomputervisionresearchandbeyond/7006b176-f8df-4a8d-9902-172bdc6e7263_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..cd48d49269e0ee208e8ffa87c285dccde69d9d3c --- /dev/null +++ b/scenicajaxlibraryforcomputervisionresearchandbeyond/7006b176-f8df-4a8d-9902-172bdc6e7263_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5deda4375e6a6c03e8b2f75eef0789fbc7c2ebebe1102e77461350931feae9eb +size 37237 diff --git a/scenicajaxlibraryforcomputervisionresearchandbeyond/7006b176-f8df-4a8d-9902-172bdc6e7263_model.json b/scenicajaxlibraryforcomputervisionresearchandbeyond/7006b176-f8df-4a8d-9902-172bdc6e7263_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a09a128819186caf2b6519aef99c538b04c3e3f8 --- /dev/null +++ b/scenicajaxlibraryforcomputervisionresearchandbeyond/7006b176-f8df-4a8d-9902-172bdc6e7263_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:029fea93d8ca2a69bab95c66f64bc29abe1bb960a2d5760b2f976a64ccc14654 +size 47970 diff --git a/scenicajaxlibraryforcomputervisionresearchandbeyond/7006b176-f8df-4a8d-9902-172bdc6e7263_origin.pdf b/scenicajaxlibraryforcomputervisionresearchandbeyond/7006b176-f8df-4a8d-9902-172bdc6e7263_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c9f7da4506f1f7bea85f995f948b6c58901d80bb --- /dev/null +++ b/scenicajaxlibraryforcomputervisionresearchandbeyond/7006b176-f8df-4a8d-9902-172bdc6e7263_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14b9956b499451b2cb2d06f8b39fae5132f8edc57511e0d24250d079ec2b1098 +size 155868 diff --git a/scenicajaxlibraryforcomputervisionresearchandbeyond/full.md b/scenicajaxlibraryforcomputervisionresearchandbeyond/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3ac7c14b4f5ffebd1bb70e3dab13b94c0281effd --- /dev/null +++ b/scenicajaxlibraryforcomputervisionresearchandbeyond/full.md @@ -0,0 +1,198 @@ +# SCENIC: A JAX Library for Computer Vision Research and Beyond + +Mostafa Dehghani Google Brain + +dehghani@google.com + +Alexey Gritsenko +Google Brain + +agritsenko@google.com + +Anurag Arnab +Google Research + +aarnab@google.com + +Matthias Minderer Google Brain + +mjlm@google.com + +Yi Tay +Google Research + +yitay@google.com + +# Abstract + +SCENIC is an open-source $^{1}$ JAX library with a focus on transformer-based models for computer vision research and beyond. The goal of this toolkit is to facilitate rapid experimentation, prototyping, and research of new architectures and models. SCENIC supports a diverse range of tasks (e.g., classification, segmentation, detection) and facilitates working on multi-modal problems, along with GPU/TPU support for large-scale, multi-host and multi-device training. SCENIC also offers optimized implementations of state-of-the-art research models spanning a wide range of modalities. SCENIC has been successfully used for numerous projects and published papers and continues serving as the library of choice for rapid prototyping and publication of new research ideas. + +# 1. Introduction + +It is an exciting time for research in computer vision using attention based models. With new architectures like ViT [12] taking the world by storm, there exists a clear demand for software and machine learning infrastructure to support easy and extensible neural network architecture research. As attention models [6, 12, 19, 28] and MLP-only [30] architectures become more popular, we expect to see even more research in the coming years pushing the field forward. + +We introduce SCENIC, an open-source JAX library for fast and extensible research in vision and beyond. SCENIC has been successfully used to develop classification, segmentation, and detection models for images, videos, and audio among other modalities, including multi-modal setups. + +SCENIC offers an efficient and easy to use setup for transfer learning by providing pipelines required for upstream pretraining, e.g., using large scale data and/or self-supervised training objectives, as well as downstream evaluation, e.g., zero-shot learning, few-shot learning, linear probe, and full fine-tuning on several tasks and datasets. + +SCENIC strives to be a unified, all-in-one codebase for modeling needs, currently offering implementations of state-of-the-art models in various tasks like ViT [12], DETR [8], CLIP [22], MLP Mixer [30], T5 [23], BERT [11] ResNet [13], and U-Net [24]. On top of that, SCENIC has been used in numerous Google projects and research papers such as ViViT [6], OmniNet [28], TokenLearner [25], MBT [21], PolyViT [19], MTV [31], studies on scaling behaviour [5, 10, 29] and efficiency [9] of various models among others [15-18, 20]. We anticipate more research projects, with diverse flavors, to be open-sourced in the SCENIC repository in the near future. + +SCENIC is developed in JAX [7] and uses Flax [14] as the neural network library, relies on TFDS [4] and DMVR [2] for implementing the input pipeline of most of the tasks and datasets, and makes use of for common training loop functionalities offered by CLU [1]. JAX is an ultra-simple to use library that enables automatic differentiation of native Python and NumPy functions. Moreover, it supports multi-host and multi-device training on accelerators including GPUs and TPUs, making it ideal for large-scale machine learning research. + +In a nutshell, SCENIC is a (i) set of shared light-weight libraries solving commonly encountered tasks when training large-scale (i.e. multi-device, multi-host) models in vision and beyond; and (ii) a number of projects containing fully fleshed out problem-specific training and evaluation loops using these libraries. + +SCENIC is designed to propose different levels of ab + +![](images/fafc607807ff5ca9d589c335c85ec8adf9106c648a97986f5715c3b03e9a0206.jpg) +Figure 1. The code in ScENIC is organized in project-level part, that is customized code for specific projects or baselines or library-level part, that implements common functionalities and general patterns that are adapted by the majority of projects. + +striction. It supports projects from those that only require changing hyper-parameters, to those that need customization on the input pipeline, model architecture, losses and metrics, and the training loop. To make this happen, the code in ScENIC is organized as either project-level code, which refers to customized code for specific projects or baselines, or library-level code, which refers to common functionalities and general patterns that are adapted by the majority of projects (Fig. 1). The project-level code lives in the projects directory. + +Philosophy SCENIC aims to facilitate the rapid prototyping of large-scale models. To keep the code simple to understand and extend, SCENIC design prefers forking and copy-pasting over adding complexity or increasing abstraction. We only upstream functionality to the library-level when it proves to be widely useful across multiple models and tasks. + +Minimizing support for various use-cases in the library-level code helps us to avoid accumulating generalizations that result in the code being complex and difficult to understand. Note that complexity or abstractions of any level can be added to project-level code. + +# 2. A Brief Primer on JAX and Flax + +Before we give into the design of SCENIC, we provide a quick background on JAX [7]. JAX provides composable transformations of Python and NumPy programs that offer differentiation (e.g., jax.grad), vectorization (e.g., jax.vmap), JIT-compiler to GPU/TPU (e.g., jax jit), and more. JAX is designed to operate on pure and statically + +composed (PSC) functions. That means JAX transformations are only applicable to functions that (1) make no use of a global state, (2) are deterministic, and (3) are representable as a static data dependency graph on a set of primitives (e.g., Accelerated Linear Algebra (XLA) operators). Many machine learning systems can be implemented as a set of PSC Python functions and using JAX transformation, we can easily benefit high efficiency of XLA for running compute-heavy parts of these systems. + +While JAX offers the building blocks needed for developing machine learning systems in the form of function transformations, there are other libraries on top of it to address the higher-level needs of researchers. Most notably Flax [14] which is a neural network library for JAX, providing neural network layers as well as utilities and patterns. ScENIC uses JAX and Flax underneath to develop a highly efficient framework for agile development of research ideas, in the large-scale, yet flexible setup. + +# 3. SCENIC Design + +SCENIC offers a unified framework that is sufficiently flexible to support projects in a wide range of needs without having to write complex code. SCENIC contains optimized implementations of a set of research models operating on a wide range of modalities (video, image, audio, and text), and supports several datasets. This again is made possible by its flexible and low-overhead design. In this section, we go over different parts and discuss the structure that is used to organize projects and library code. + +# 3.1. Library-level code + +The goal is to keep the library-level code minimal and well-tested and to avoid introducing extra abstractions to support minor use-cases. Shared libraries provided by SCENIC are split into: + +- dataset_lib: Implements IO pipelines for loading and pre-processing data for common tasks and benchmarks. All pipelines are designed to be scalable and support multi-host and multi-device setups, taking care of dividing data among multiple hosts, incomplete batches, caching, pre-fetching, etc. +- model_lib : Provides several abstract model interfaces (e.g., ClassificationModel or SegmentationModel in model_lib/base_models) with task-specific losses and metrics; neural network layers in model_lib/layers, focusing on efficient implementation of attention and transformer primitives; and finally accelerator-friendly implementations of bipartite matching algorithms [3] in model_lib/matchers. +- train_lib: Provides tools for constructing training loops and implements several optimized trainers (e.g., classification trainer and segmentation trainer) that can be forked for customization. +- common_lib: General utilities, such as logging and debugging modules, and functionalities for processing raw data. + +# 3.2. Project-level code + +SCENIC supports the development of customized solutions for specialized tasks and data via the concept of the "project". There is no one-fits-all recipe for how much code should be re-used by a project. + +Projects can consist of only configuration files and use the common models, trainers, tasks/data that live in library-level code, or they can simply fork any of the mentioned functionalities and redefine, layers, losses, metrics, logging methods, tasks, architectures, as well as training and evaluation loops. The modularity of library-level code makes it flexible enough to support projects falling anywhere on the "run-as-is" to "fully-customized" spectrum. + +Common baselines such as a Vision Transformer (ViT), DETR, CLIP, T5, BERT, MLP-Mixer, ResNet, UNet, etc., are implemented in the projects/baselines. Forking models in this directory is a good starting point for new projects. + +# 3.3. SCENIC BaseModel + +A solution usually has several parts: data/task pipeline, model architecture, losses and metrics, training and evaluation, etc. Given that much of the research done in SCENIC + +is trying out different architectures, SCENIC introduces the concept of a "model", to facilitate "plug-in/plug-out" experiments. A SCENIC model is defined as the network architecture, the losses that are used to update the weights of the network during training, and metrics that are used to evaluate the output of the network. This is implemented as BaseModel. + +BaseModel is an abstract class with three members: a build_flax_model, a loss_fn, and a get_metric_fn. + +build_FLAX_MODEL function returns a flax_model. A typical usage pattern is depicted below: + +```python +Get model class: +model_CLs = model_lib.models.get_model_CLs("fullyConnected_classification") +# Build the model, metrics, and losses +model = model_CLs(config, dataset.meta_data) +# Initialize the model parameters +flax_model = model.build_flax_model +dummy_input = jnp.zeros(input_shape, model_inputdtype) +model_state, params = flax_model.init(rng, dummy_input, train=False).pop("params") +``` + +And this is how to call the model: + +```txt +variables $=$ { # Trainable parameters "params": params, # Model state # (e.g., batch statistics from BatchNorm) \*\*model_state } logits, new_model_state $=$ flax_model.apply( variables, inputs, ...) +``` + +Abstract classes for defining SCENIC models are declared in model_lib/base_models. These include the BaseModel that all models inherit from, as well as ClassificationModel, MultiLabelClassificationModel, + +EncoderDecoderModel and SegmentationModel that respectively define losses and metrics for classification, sequence-to-sequence, and segmentation tasks. Depending on its needs, a SCENIC project can define new base class or override an existing one for its specific tasks, losses and metrics. + +A typical model loss function in ScENIC expects predictions and a batch of data: + +```txt +Loss function: loss_fn( logits: jnp.ndarray, batch: Dict[str, jnp.ndarray] ) -> float +``` + +Finally, a typical get.metrics_fn returns a callable, metric_fn, that calculates appropriate metrics and returns them as a Python dictionary. The metric function, for each metric, computes $f(x_{i},y_{i})$ on a mini-batch, where $x_{i}$ and $y_{i}$ are inputs and labels of $i$ th example, and returns a dictionary from the metric name to a tuple of metric value and the metric normalizer (typically, the number of examples in the mini-batch). It has the API: + +```txt +Metric function: +metric_fn( logits: jnp.ndarry, label: jnp.ndarry, ) -> Dict[str, Tuple[float, int]] +``` + +Given metric and normalizer values collected from examples processed by all devices in all hosts, the model trainer is then responsible for aggregating and computing the normalized metric value for the evaluated examples. + +Importantly, while the design pattern above is recommended and has been found to work well for a range of projects, it is not forced, and there is no issue deviating from the above structure within a project. + +# 4. Applications + +SCENIC has been used in various applications and tasks. SCENIC provides not only different metrics to evaluate quality of different methods on task at hand, like accuracy in classification, but also unified tools to assess efficiency of methods in terms of training and inference throughput, parameter size, and FLOPs. + +In this Section, we present some imperial results showcasing some of the baselines in SCENIC. + +Table 1. Image classification models implemented in SCENIC. + +
ModelPretrain datasetImageNet Top-1GFLOPsParams(M)
ResNet-50 [13]-77.083.9725.5
MLP-Mixer-B/16 [30]-76.1412.759.8
ViT-B/16 [26]-79.7317.686.5
MLP-Mixer-L/16ImageNet21K80.2312.759.8
ViT-L/16ImageNet21K84.3017.686.5
+ +Table 1 presents example baseline models for image classification task that are implemented in SCENIC. The + +full end-to-end upstream training and downstream finetuning/evaluation code with support for data parallelism on multi-host/multi-device is available for all SCENIC baselines. Note that for each of these baseline models, checkpoints for different variants, in terms of size and configurations, are publically available. + +SCENIC contains many state-of-the-art models, along with training/evaluation code as well as checkpoints for tasks beyond classification and image modality. Table 2 provides a few examples showcasing the diversity of tasks and modalities. These models are either originally developed in SCENIC and became the de facto baseline for the task they address (e.g., ViViT), or carefully ported to SCENIC to not only reproduce the original results but also be efficient on different accelerators using JAX. + +This has already enabled many researchers to build on top of the existing SOTA models and try out new ideas on different setups and modalities, which is one of the main missions of SCENIC. + +Table 2. Other models available in SCENIC. Full training and evaluation code which reproduces the original results is publicly available for all these models. + +
ModelModalitiesTask
DeTR [8]ImageObject detection
BERT [11]TextSelf-supervised pre-training, GLUE/SuperGLUE benchmark
ViViT [6]VideoVideo classification
TokenLearner [25]Image, VideoImage/Video classification
OmniNet [28]ImageImage classification
PolyViT [19]Image, Audio, VideoImage/Audio/Video classification
+ +For each of the above methods as well as others implemented in SCENIC, there is a dedicated README in the GitHub repo of SCENIC, containing information about the detailed configurations, experimental results, how to train, how to evaluate, along with brief explanation of the methods and references. + +# 5. Conclusion + +Machine Learning (ML) infrastructure is a cornerstone of ML research. Enabling researchers to quickly try out new ideas, and to rapidly scale them up when they show promise, accelerates research. Furthermore, history suggests that methods that leverage the computation available at the time are often the most effective [27]. SCENIC embodies our experience of developing the best research infrastructure, and we are excited to share it with the broader community. We hope to see many more brilliant ideas being developed using SCENIC, contributing to the amazing progress made by the ML community for improving lives through AI. + +# Acknowledgment + +SCENIC has been developed and improved with the help of many amazing contributors. We would like to especially thank Dirk Weissenborn, Andreas Steiner, Marvin Ritter, Aravindh Mahendran, Samira Abnar, Sunayana Rane, Josip Djolonga, Lucas Beyer, Alexander Kolesnikov, Xiaohua Zhai, Rob Romijnders, Rianne van den Berg, Jonathan Heek, Olivier Teboul, Marco Cuturi, Lu Jiang, Mario Lučić, and Neil Houlsby for their direct or indirect contributions to SCENIC. + +# References + +[1] CLU - common loop utils. http://github.com/google/CommonLoopUtils.1 +[2] DMVR: Deepmind video readers. https://github.com/deepmind/dmvr.1 +[3] Optimal Transport Tools (OTT), a toolbox for everything Wasserstein. https://github.com/google-research/ott.3 +[4] TensorFlow Datasets, a collection of ready-to-use datasets. https://www.tensorflow.org/datasets.1 +[5] Samira Abnar, Mostafa Dehghani, Behnam Neyshabur, and Hanie Sedghi. Exploring the limits of large scale pretraining. arXiv preprint arXiv:2110.02095, 2021. 1 +[6] Anurag Arnab, Mostafa Dehghani, Georg Heigold, Chen Sun, Mario Lucic, and Cordelia Schmid. ViViT: A video vision transformer. arXiv preprint arXiv:2103.15691, 2021. 1, 4 +[7] James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. 1, 2 +[8] 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, 4 +[9] Mostafa Dehghani, Anurag Arnab, Lucas Beyer, Ashish Vaswani, and Yi Tay. The efficiency misnomer. arXiv preprint arXiv:2110.12894, 2021. 1 +[10] Mostafa Dehghani, Yi Tay, Alexey A Gritsenko, Zhe Zhao, Neil Houlsby, Fernando Diaz, Donald Metzler, and Oriol Vinyals. The benchmark lottery. arXiv preprint arXiv:2107.07002, 2021. 1 +[11] 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. 1, 4 +[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. arXiv preprint arXiv:2010.11929, 2020. 1 + +[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 1, 4 +[14] 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. 1, 2 +[15] Charles Herrmann, Kyle Sargent, Lu Jiang, Ramin Zabih, Huiwen Chang, Ce Liu, Dilip Krishnan, and Deqing Sun. Pyramid adversarial training improves vit performance. arXiv preprint arXiv:2111.15121, 2021. 1 +[16] Ajay Jain, Ben Mildenhall, Jonathan T Barron, Pieter Abbeel, and Ben Poole. Zero-shot text-guided object generation with dream fields. arXiv preprint arXiv:2112.01455, 2021. 1 +[17] Gang Li, Gilles Baechler, Manuel Tragut, and Yang Li. Learning to denoise raw mobile ui layouts for improving-datasets at scale. arXiv preprint arXiv:2201.04100, 2022. 1 +[18] Yang Li, Gang Li, Xin Zhou, Mostafa Dehghani, and Alexey Gritsenko. Vut: Versatile ui transformer for multimodal multi-task user interface modeling. arXiv preprint arXiv:2112.05692, 2021. 1 +[19] Valerii Likhosherstov, Anurag Arnab, Krzysztof Choromanski, Mario Lucic, Yi Tay, Adrian Weller, and Mostafa Dehghani. Polyvit: Co-training vision transformers on images, videos and audio. arXiv preprint arXiv:2111.12993, 2021. 1, 4 +[20] Chengzhi Mao, Lu Jiang, Mostafa Dehghani, Carl Vondrick, Rahul Sukthankar, and Irfan Essa. Discrete representations strengthen vision transformer robustness. arXiv preprint arXiv:2111.10493, 2021. 1 +[21] Arsha Nagrani, Shan Yang, Anurag Arnab, Aren Jansen, Cordelia Schmid, and Chen Sun. Attention bottlenecks for multimodal fusion. arXiv preprint arXiv:2107.00135, 2021. 1 +[22] 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. 1 +[23] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv preprint arXiv:1910.10683, 2019. 1 +[24] 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. 1 +[25] Michael S Ryoo, AJ Piergiovanni, Anurag Arnab, Mostafa Dehghani, and Anelia Angelova. TokenLearner: What can 8 learned tokens do for images and videos? arXiv preprint arXiv:2106.11297, 2021. 1, 4 +[26] Andreas Steiner, Alexander Kolesnikov, Xiaohua Zhai, Ross Wightman, Jakob Uszkoreit, and Lucas Beyer. How to train your vit? data, augmentation, and regularization in vision transformers. arXiv preprint arXiv:2106.10270, 2021. 4 + +[27] Richard S Sutton. The bitter lesson, march 2019. URL http://www.incompleteideas.net/IncIdeas/BitterLesson.html, 1.4 +[28] Yi Tay, Mostafa Dehghani, Vamsi Aribandi, Jai Gupta, Philip Pham, Zhen Qin, Dara Bahri, Da-Cheng Juan, and Donald Metzler. OmniNet: Omnidirectional representations from transformers. arXiv preprint arXiv:2103.01075, 2021. 1, 4 +[29] Yi Tay, Mostafa Dehghani, Jinfeng Rao, William Fedus, Samira Abnar, Hyung Won Chung, Sharan Narang, Dani Yogatama, Ashish Vaswani, and Donald Metzler. Scale efficiently: Insights from pre-training and fine-tuning transformers. arXiv preprint arXiv:2109.10686, 2021. 1 +[30] Ilya Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Thomas Unterthiner, Jessica Yung, Daniel Keysers, Jakob Uszkoreit, Mario Lucic, et al. MLP-Mixer: An all-MLP architecture for vision. arXiv preprint arXiv:2105.01601, 2021. 1, 4 +[31] Shen Yan, Xuehan Xiong, Anurag Arnab, Zhichao Lu, Mi Zhang, Chen Sun, and Cordelia Schmid. Multiview transformers for video recognition. arXiv preprint arXiv:2201.04288, 2022. 1 \ No newline at end of file diff --git a/scenicajaxlibraryforcomputervisionresearchandbeyond/images.zip b/scenicajaxlibraryforcomputervisionresearchandbeyond/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..356c84a8dbe1f5b4964df2d1b4093901eb9c27a9 --- /dev/null +++ b/scenicajaxlibraryforcomputervisionresearchandbeyond/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d47c2c08e6ed46c564f55ef01f9db8f35d8d42725022553006e7228bf4d085cc +size 143988 diff --git a/scenicajaxlibraryforcomputervisionresearchandbeyond/layout.json b/scenicajaxlibraryforcomputervisionresearchandbeyond/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c5f5ec737a16b5f9ad6aed64714fb7027f09a46b --- /dev/null +++ b/scenicajaxlibraryforcomputervisionresearchandbeyond/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:feb3a19742b4b1324937973384bd4422cfd619192efa86cff09af161eaaaf8a7 +size 167617 diff --git a/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/53281a85-6184-4b1b-a5dd-52abe9a7ce54_content_list.json b/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/53281a85-6184-4b1b-a5dd-52abe9a7ce54_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..70c8df7a0f53b5ca9e127609b71c8e56420dc79f --- /dev/null +++ b/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/53281a85-6184-4b1b-a5dd-52abe9a7ce54_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc21c01ae730428c4733f33a1b6fc4a589eb7fc7c48fc3cb99de86cf4c50a743 +size 83741 diff --git a/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/53281a85-6184-4b1b-a5dd-52abe9a7ce54_model.json b/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/53281a85-6184-4b1b-a5dd-52abe9a7ce54_model.json new file mode 100644 index 0000000000000000000000000000000000000000..07a40ea68e8fd9ea18732f2b952cec31df034992 --- /dev/null +++ b/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/53281a85-6184-4b1b-a5dd-52abe9a7ce54_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eac6c15440aba581fb8b86ee25efcd6820b237099fe08008e4bbcec3fb425a00 +size 101663 diff --git a/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/53281a85-6184-4b1b-a5dd-52abe9a7ce54_origin.pdf b/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/53281a85-6184-4b1b-a5dd-52abe9a7ce54_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..50c90cdc39ab9617a784915d995a00c3657518ce --- /dev/null +++ b/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/53281a85-6184-4b1b-a5dd-52abe9a7ce54_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:864416571be46910ee59c6c14ba41162930dbb9fdc4c74a39076366cf471ac52 +size 7820096 diff --git a/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/full.md b/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b5268746e55df2d467eb509e389ac0417f78bda4 --- /dev/null +++ b/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/full.md @@ -0,0 +1,337 @@ +# ScePT: Scene-consistent, Policy-based Trajectory Predictions for Planning + +Yuxiao Chen $^{1}$ Boris Ivanovic $^{1}$ Marco Pavone $^{1,2}$ + +$^{1}$ NVIDIA Research Stanford University + +{yuxiaoc, bivanovic, mpavone}@nvidia.com, pavone@stanford.edu + +# Abstract + +Trajectory prediction is a critical functionality of autonomous systems that share environments with uncontrolled agents, one prominent example being self-driving vehicles. Currently, most prediction methods do not enforce scene consistency, i.e., there are a substantial amount of self-collisions between predicted trajectories of different agents in the scene. Moreover, many approaches generate individual trajectory predictions per agent instead of joint trajectory predictions of the whole scene, which makes downstream planning difficult. In this work, we present ScePT, a policy planning-based trajectory prediction model that generates accurate, scene-consistent trajectory predictions suitable for autonomous system motion planning. It explicitly enforces scene consistency and learns an agent interaction policy that can be used for conditional prediction. Experiments on multiple real-world pedestrians and autonomous vehicle datasets show that ScePT matches current state-of-the-art prediction accuracy with significantly improved scene consistency. We also demonstrate ScePT's ability to work with a downstream contingency planner. + +# 1. Introduction + +Predicting the future motion of uncontrolled agents is critical to the safety of autonomous systems that interact with them. A prominent example is self-driving cars, where the ego-vehicle shares the road with other road users such as vehicles, pedestrians, and cyclists. The prediction task is difficult as humans are notoriously uncertain and inconsistent. For example, it is well-known that humans demonstrate multimodal behaviors in the context of driving, such as being simultaneously able to maintain their current lane, change lanes, yield, or overtake in the future. As a result, early works on human driving behavior prediction [37] were not accurate enough to be used in an autonomous vehicle's motion planning stack. To remedy this, many researchers have been developing phenomenological methods, i.e., methods that learn the behavior of agents from a wealth of data (e.g., [2, 28, 29, 44]), to great effect. + +In a typical autonomy stack, the trajectory prediction module is followed by a planning module which takes the + +![](images/beff9c98c7f0266c1027f7036903904e5f245b5aa2242451947e33d827f4a673.jpg) +Figure 1. An illustration of ScePT's output, comprised of multimodal trajectory predictions for each agent. Different stroke type (solid, dashed, dotted) represents the different modes of the scene-consistent joint trajectory prediction. Agents in a scene are partitioned into highly-interacting cliques, an example of which is visualized with yellow dashed lines. + +predicted trajectories of surrounding agents and plans the ego-motion accordingly. With this downstream planner in mind, several requirements, in addition to prediction accuracy, emerge, and are discussed in detail below. + +# 1.1. Desiderata + +Typical features desired for a trajectory prediction model include high prediction accuracy, fast inference speed, and calibrated uncertainties. When predictions are subsequently consumed by a downstream planner, the following features are also critical for overall system performance: + +Compatibility: Trajectory predictions for different agents in a scene should be compatible with each other within a single joint prediction. In particular, collisions among predicted trajectories should be rare, as collisions are themselves rare in reality. + +Tractable Joint Trajectory Prediction: As mentioned previously, the future motion of the agents can be multimodal. In a scene consisting of multiple agents, if the multimodal predictions are generated for individual nodes, a downstream motion planner needs to consider all combinations of these trajectory predictions. Since the number of modes grows exponentially with the number of agents, the planner + +is quickly overwhelmed. Alternatively, the motion planner could take a conservative approach and avoid all predicted trajectories, yet often at the price of compromised planning performance (e.g., bringing the robot to a standstill if all plans seem to collide). As a result, we desire multimodal, joint predictions of all agents with a limited, but fully-representative number of modes such that a downstream planner can perform contingency planning. + +Time Consistency: With a downstream planner, the motion plan heavily depends on the prediction results. To ensure smooth motion plans, predictions should not change significantly between subsequent time steps if the scene itself has not changed drastically in the meantime. As a result, sampling should be avoided as predictions may change significantly between time steps, causing discontinuity in the resulting motion plans which may hurt planning performance and safety. + +Conditioning: Conditioning is the operation of fixing one or multiple agents' future trajectories and predicting the resulting distribution of other agents' future trajectories. Conditional prediction is useful for motion planning (conditioned on the ego agent's motion plan) and for understanding interactions between agents. Conditioning is available in several existing works such as [42], yet requires explicit modeling. Ideally, conditional distributions would be generated without requiring structural changes to the model. + +# 1.2. Contributions + +In this work we present ScePT, a trajectory forecasting method that generates joint trajectory predictions for multiple interacting agents. Our contributions are threefold: First, we propose predicting the futures of cliques of agents rather than individuals or the scene graph as a whole (Sec. 3.1), and present a neural network architecture to do so (Sec. 3.2). Second, we leverage insights from motion planning and propose a policy network that autoregressively rolls out closed-loop trajectory predictions via a GNN that models agent-to-agent interactions and maps them to control inputs (Sec. 3.3). Finally, we improve output sample diversity by augmenting our loss function with a tunable risk measure that determines weights between trajectory samples during training (Sec. 3.6). + +When evaluated on large-scale, real-world pedestrian and driving datasets, ScePT reduces the dimensionality necessary to capture scene-level multimodality (Sec. 4.1); achieves significant improvements in the scene consistency of its predictions, as measured by collision rate (Sec. 4.2); and easily enables counterfactual analyses (Sec. 4.3); all of which are critical for simulation (Sec. 4.3), downstream planning (Sec. 4.4), and verification of autonomous vehicle performance. + +# 2. Related Work + +Early trajectory prediction works were predominantly ontological, positing structure about an agent's decision- + +making process, exemplified by social force models [22, 33], hidden Markov models [27], and the intelligent driver model [45]. However, limited by their expressibility, these models cannot scale to complicated scenarios despite extensive tuning. To remedy this, many researchers have been developing phenomenological methods, i.e., methods that focus on learning the behavior of agents from a wealth of data. Several notable works include the Social LSTM [2], GAIL [28], MFP [44], and DESIRE [29]. Since the trajectory prediction problem is intrinsically a sequence-to-sequence modeling task, recent works commonly apply Recurrent Neural Networks (RNNs) [10,21,29,40,42,44] and Transformers [31,34,50], achieving strong results. + +Another core facet of trajectory prediction is accounting for the interactions between agents and the scene geometry. Two common choices to model agent interactions are Graph Neural Networks (GNNs) and Convolutional Neural Networks (CNNs). GNN-based methods [10, 42, 48, 52] construct scene graphs with agents as nodes and their interaction as edges, performing message passing to congregate information. CNN-based methods [4, 16, 19, 26, 34, 36, 51] typically rasterize scene information into layers of images such as Birds Eye View (BEV) images and velocity images to encode information. In general, CNN-based methods have a fixed computation complexity (usually being faster than GNN-based methods) and preserve geometric information about the scene. GNN-based methods can be viewed as a "sparse" representation of the scene and allow for more complicated features, yet their computation complexity scales at least linearly with the number of agents, and geometric information may be lost without the use of special structures [9]. + +Once scene information is gathered and encoded, generative models such as GANs [21,40] and CVAEs [18,29,42] are typically used to produce multimodal trajectory predictions. Of these, CVAE models are the most common choice due to their performance and ease of training. CVAEs with continuous latent spaces [10,48,52] enjoy stronger expressivity, but require sampling to obtain predictions, removing any time consistency in sequential outputs. On the other hand, a discrete latent space [42,44] does not require sampling, but is less expressive and more likely to suffer from mode collapse. + +Since trajectory prediction usually concerns multiple agents in a scene, the issue of scene consistency emerges, i.e., predictions of different agents should not collide with each other or with static obstacles. For models that pursue only high prediction accuracy, especially agent-centric models, scene consistency is usually poor. To remedy this, [17, 21] use pooling to model interaction between agents in the encoder, [52] introduces a group-level encoder with clustered agents sharing a group mode, and [10] learns a scene interaction model via message passing. Comparing to the encoder, coupled decoding is more difficult as the future trajectories are not known. [32] uses fictitious play to + +roll out predictions and gradually improve prediction quality, [44] performs autoregressive decoding, building subsequent predictions on prior steps of prediction. [9] uses a message-passing procedure to search for most likely joint trajectories, yet only predicts a single mode. To the best of our knowledge, most existing methods do not model the agents as policy planners with observations, cost functions, and actuation inputs, all while explicitly enforcing scene consistency. + +For autonomous vehicles which involve a downstream planner, it is also important to consider multimodality, i.e., the possibility for multiple distinct futures. However, the number of modes cannot be too large so as not to overwhelm the downstream planner. [12] generates a set of motion primitives that are deemed possible and constrain the planner to avoid them. [24] represents multimodal predictions as mixtures of linear dynamics (as opposed to tracklets), simplifying incorporation in downstream planning. To achieve a wide coverage of modes with a limited computational budget, several diversity sampling techniques have been proposed. [49] proposes using determinantal point processes for diverse latent sampling, [23] uses the farthest point sampling algorithm, and [15] apply a reparameterization trick with coefficients given by a GNN. Overall, most existing diversity sampling techniques are designed for continuous latent spaces. In this work, we introduce a new risk-based loss modification that yields output diversity for a discrete latent space with only a small number of samples. + +# 3. ScePT + +ScePT $^{1}$ is a discrete CVAE model that outputs joint trajectory predictions for multiple agents in a scene, ensuring high scene consistency in its predictions by reasoning about each agent's motion policy and the influence of their neighbors. + +Nomenclature. Throughout the paper, we use the terms node and agent interchangeably, which may be a vehicle, a pedestrian, a cyclist, or other kinds of road users. We use $s$ to denote an agent's state and $e$ an edge between two nodes. Since our model is a CVAE, we follow standard terminology in the CVAE literature, i.e., $x$ denotes the conditioning variable, $y$ the observed variable, and $z$ the hidden latent variable. We use bold font to denote variables associated with a group of nodes, e.g., a clique. For example, for a clique consisting of nodes 1 through $N$ , $z_{1}, \ldots, z_{N}$ are the latent variables of each of the nodes and $\mathbf{z} = [z_{1}, \ldots, z_{N}]$ is the latent variable of the clique. + +# 3.1. Preprocessing + +To maintain scene consistency, ScePT is a scene-centric model, i.e., its output predictions are the joint trajectories of multiple nodes in a scene. Given a scene with multiple nodes, a spatiotemporal scene graph is generated where + +nodes represent agents and edges represent their interactions. We use agents' closest future distance as a proxy for interaction, propagating forward each node according to a constant velocity model $\Phi_{a_i = 0}^{0:T}(s_i)$ , where $\Phi_{a_i = 0}^t$ is the flow operator that maps the initial state to the future states $t$ time steps ahead with the action $a_i$ of node $i$ set to 0 and $T$ is the prediction horizon. The closest future distance between two agents is defined as + +$$ +d _ {i j} = \min _ {t \in [ 0, T ]} \operatorname {D i s} \left(\Phi_ {a _ {i} = 0} ^ {t} (s _ {i}), \Phi_ {a _ {i} = 0} ^ {t} (s _ {j})\right), \tag {1} +$$ + +where Dis is the Euclidean distance between the two agents. We then define the scene graph adjacency matrix as + +$$ +A _ {i j} = \left\{ \begin{array}{c c} 0, & d _ {i j} > d _ {0} (\eta_ {i}, \eta_ {j}) \\ \frac {d _ {0} (\eta_ {i} , \eta_ {j})}{d _ {i j}} & d _ {i j} \leq d _ {0} (\eta_ {i}, \eta_ {j}) \end{array} \right., +$$ + +where $\eta_{i}$ is the type of node $i$ (e.g., vehicle, cyclist, pedestrian) and $d_0$ is a distance threshold which is fixed for each edge type. + +With the scene graph determined by the adjacency matrix, in contrast to models that keep all nodes in a single graph [10,44], we partition the scene graph into cliques with a maximum size (fixed as a parameter). We do this to reduce the dimensionality of the product latent space, which scales exponentially with the size of the graph, causing prediction accuracy to deteriorate if too large (see Sec. 4.5 for further discussion). While weighted graph partitioning is NP-hard, there are many off-the-shelf algorithms, and we use the well-known Louvain algorithm due to its strong performance [6]. After partitioning, every pair of nodes within a clique is connected (despite the distance threshold) to form a clique. Node histories are then collected and fed to ScePT. Node states and dynamics are explained in detail in Appendix A.2. When available, we also utilize the map information and the relative position to the closest lane. + +# 3.2.Encoder + +With cliques in hand, agents' state and edge (relative states between agents) histories are encoded into feature vectors via LSTMs. Instead of associating each node with a latent variable distribution that is independent of its neighbors, our encoder models the joint latent distribution. Specifically, each agent is equipped with a discrete latent variable $z_{i}$ with cardinality $N$ , making the joint latent variable of the clique simply $\mathbf{z} = [z_1,z_2,\dots z_n]$ . This means that the cardinality of the joint latent space grows exponentially with the number of nodes in the clique, and is the reason why we limit clique size. + +ScePT represents the distribution of the joint latent variable as a Gibbs distribution consisting of node factors and edge factors, + +$$ +\log \mathbb {P} (\mathbf {z}) \propto \sum_ {i} f _ {i} \left(x _ {i}, z _ {i}\right) + \sum_ {e _ {i j} \in \mathcal {E}} f _ {i j} \left(x _ {i}, x _ {j}, z _ {i}, z _ {j}\right), \tag {2} +$$ + +![](images/8a03d7a8aa5b1bf99ee6ccdbaf3b4911e3533eb663d98e594545910d2e56b94c.jpg) +Figure 2. Factor graph with individual agent latent variables as variable nodes and factor nodes which are functions of the connected variable nodes. Factor nodes are comprised of individual agent and agent-agent interaction factors, e.g., $f_{1}$ is a function of $z_{1}$ while $f_{12}$ is a function of $z_{1}$ and $z_{2}$ . All factor nodes are summed to obtain the log likelihood. + +where $x_{i}$ is the state history of node $i$ and $f_{i}$ is the node factor of node $i$ , which is a feedforward neural network mapping $x_{i}$ and $z_{i}$ to a real number. $f_{ij}$ is the edge factor of the node pair $i, j$ , also a feedforward network, and $\mathcal{E}$ is the set of edges. The log-likelihood can be computed by constructing a factor graph [1], which is a bipartite graph with variable nodes and factor nodes. An example factor graph is shown in Fig. 2. Normalization is done by summing up all possible valuations of $\mathbf{z}$ (since $\mathcal{Z}$ is discrete). + +While the joint latent space's cardinality scales exponentially with clique size, we found that probability mass typically concentrates on only a few $(< 10)$ modes. + +# 3.3. Decoder + +Our decoder design is inspired by the motion planning process, i.e., we view each agent as a motion planner and emulate their planning process to output trajectory predictions. A typical motion planner takes a reference trajectory, i.e., the desired motion, and adjusts it to satisfy constraints (e.g., collision avoidance) and minimize a specified cost function. Inspired by this process, the structure of our policy net is visualized in Fig. 3. + +The inputs to the policy net are the current states of the clique nodes, their reference trajectories $\mathbf{s}_{\mathrm{des}}$ , and the clique latent $\mathbf{z}$ . Reference trajectories are generated via Gated Recurrent Unit (GRU) networks that take the state history encoding, map encoding, and latent variable $z$ as input. The current node states are then compared with the reference trajectories to obtain the tracking error $\Delta s$ and the next waypoint in the local coordinate frame $\Delta s^{+}$ . + +To model an edge, we pair its two node states together and feed the state pair into a pre-encoding network (fully connected) and then an LSTM cell. For each node, depending on the graph structure, there may be a varying number of neighbors. To encode a variable number of neighbors, all of a node's edges are condensed into a single observation encoding via an attention network [14]. The observation encoding, latent variable, and tracking error are then concatenated and fed to a fully connected action network to obtain the node's control action prediction $a$ . Here, we assume that the node's dynamics are differentiable functions of the state and control input, which is true for common agent types + +![](images/f17bfb48226ad4720692f224fb0f0b206b167fcc2d77976da68b2422aee731ef.jpg) +Figure 3. Our autoregressive policy network architecture. For each node, neighboring node states are pooled with an attention mechanism, the resulting encoding then generates control inputs together with the reference trajectory. The control inputs pass through the agent dynamics to produce position predictions and the process repeats for subsequent timesteps. + +![](images/9a5d211e1329afe1d939fbd7989eb1bebd457f1da0f21bb3868d800224c6ff7e.jpg) +Figure 4. Overview of ScePT: Node history and map information are collected for all nodes within a clique and passed through a Gibbs distribution to generate the discrete joint latent distribution. The policy net (decoder) then generates closed-loop trajectory predictions given latent samples. + +such as vehicles (e.g., Dubin's car model [20]) and pedestrians (single or double integrators). The state prediction is then fed back to the state vector and this process repeats. + +The overall structure of ScePT is shown in Fig. 4. The encoder takes the LSTM-encoded state and edge history as well as the CNN-encoded local map, and generates a discrete Gibbs distribution over the clique latent variable. The latent variable, together with the state history and map encodings, is used to generate the desired trajectory for each node via GRUs. The desired trajectories and latent variable are then passed to the policy net to obtain closed-loop trajectory predictions. + +# 3.4. Conditioning via policy learning + +As mentioned in Sec. 1.1, conditioned prediction is an important capability. Conditioning was performed in previous works [25,42] by explicitly encoding the ego future + +trajectory in the encoder. However, assuming that only one agent can be conditioned on makes use cases such as driving simulation difficult, as one would need to train explicit conditioning models for each pair of agents. By comparison, PRECOG [38] simply needs to set the latent variable of the robot to produce future-conditional predictions. Similarly, ScePT does not require any structural change to produce conditional predictions since it learns agents' interaction policies. Conditional predictions are generated by simply fixing the trajectory roll-outs of conditioned agents and outputting the trajectory predictions of the rest of the agents in the clique. Since a fixed future trajectory does not fall into any latent mode, we remove any factors concerning conditioned nodes from the Gibbs distribution factor graph. + +# 3.5. Training + +Following standard CVAE training [43], our objective is the Evidence Lower Bound (ELBO) loss: + +$$ +\begin{array}{l} E L B O = \mathbb {E} _ {\mathbf {z} \sim Q (\mathbf {z} | \mathbf {x}, \mathbf {y})} [ \log (P (\mathbf {y} | \mathbf {x}, \mathbf {z})) ] \\ - \beta D _ {K L} (Q (\mathbf {z} | \mathbf {x}, \mathbf {y}) | | P (\mathbf {z} | \mathbf {x})), \tag {3} \\ \end{array} +$$ + +where $\mathbf{z}$ is the clique latent variable, $\mathbf{y}$ is the future trajectories of all nodes, and $\mathbf{x}$ is the conditional variable, consisting of node and edge history, map encoding, and lane information for all nodes in the clique. For the likelihood cost, we assume Gaussian noise around the predicted trajectory for each mode, resulting in a 2-norm loss, + +$$ +\begin{array}{l} \mathbb {E} _ {\mathbf {z} \sim Q (\mathbf {z} | \mathbf {x}, \mathbf {y})} [ \log (P (\mathbf {y} | \mathbf {x}, \mathbf {z})) ] \\ = \sum_ {\mathbf {z} \in \mathcal {Z}} Q (\mathbf {z} | \mathbf {x}, \mathbf {y}) \| f _ {\mathbf {y}} (\mathbf {x}, \mathbf {z}) - \mathbf {y} _ {G T} (\mathbf {x}) \| ^ {2}, \tag {4} \\ \end{array} +$$ + +where $f_{\mathbf{y}}(\mathbf{x}, \mathbf{z})$ is the trajectory prediction from the decoder and $\mathbf{y}_{GT}(\mathbf{x})$ is the ground truth. + +We also add a collision penalty, specified in detail in Appendix A.3, as a regularization term to penalize incompatible predictions, the influence of which will be further discussed in Sec. 4.5. Other types of regularization, e.g., ride comfort, can also be added since the node dynamics are explicitly included in the policy net. + +Sampling the Latent Space. While our discrete latent space is enumerable, the cardinality of $\mathcal{Z}$ grows exponentially with the clique size. Thus, it is sometimes not tractable to decode all modes. To remedy this, we apply diversity sampling. Specifically, we take the $N_{g}$ highest probability modes and randomly sample $N_{r}$ modes from the rest. When the total cardinality of $\mathcal{Z}$ is less than $N_{g} + N_{r}$ , all modes are selected. The sample probabilities are then normalized so that the expected loss does not collapse to 0. + +# 3.6. Mode Collapse and Diverse Sampling + +Discrete CVAEs for trajectory prediction are prone to mode collapse, i.e., the decoder tends to predict similar trajectories under different modes since the likelihood cost is a + +weighted sum of 2-norm errors and the average prediction is likely to be a local minimum. Mode collapse has been discussed in previous works and tackled by methods such as Multiple-Trajectory Prediction (MTP) loss [16], using prior knowledge [11, 19], and assigning modes by classifying the ground truth into categories [31]. Our approach maintains the expected loss function, but introduces CVaR as a new way to avoid mode collapse. + +Conditional Value at Risk (CVaR) [39] is a risk measure commonly used in finance and optimization, defined as + +$$ +\begin{array}{l} \mathrm {C V a R} _ {1 - \alpha} (X) = \inf _ {\eta \in \mathbb {R}} \left\{\eta + \frac {1}{\alpha} \int_ {- \infty} ^ {\infty} [ x - \eta ] _ {+} P (x) \right\} \tag {5} \\ = \min _ {0 \leq P ^ {\prime} (x) \leq \frac {1}{\alpha} P (x), \int P ^ {\prime} (x) d x = 1} \mathbb {E} _ {P ^ {\prime}} [ X ], \\ \end{array} +$$ + +where $P$ is the probability distribution of $X$ and $\alpha$ tunes the level of risk-averseness. CVaR is the mean of the lowest $\alpha$ -percentile values of $x$ under $P$ . At the limits of $\alpha$ , $\alpha \rightarrow 0$ yields the essential infimum of $X$ and $\alpha = 1$ yields $\mathbb{E}[X]$ . + +The second line in (5) is the dual form of CVaR, which can be understood as shifting the distribution $P$ to $P'$ under the constraint that $P'$ has to be a proper distribution and for all $x$ , $P'(x) \leq \frac{1}{\alpha} P(x)$ . Inspired by the dual form, we modify the expectation loss in (4) to + +$$ +\min _ {0 \leq Q ^ {\prime} (z) \leq \frac {1}{\alpha} Q (z | x, y), \sum Q ^ {\prime} (z) = 1} \mathbb {E} _ {z \sim Q ^ {\prime}} [ \| f _ {y} (x, z) - y _ {G T} (x) \| ^ {2} ], \tag {6} +$$ + +which is the best $\alpha$ -percentile loss value among the discrete modes. This CVaR loss does not force all modes to match the ground truth, only those that are already close, directly preventing mode collapse. Compared to common usages of risk measures which typically focus on the worst outcomes, we use CVaR to focus on the best predictions to maintain output diversity. During training, $\alpha$ is used to trade-off the model's focus on encoder accuracy vs diversity, see Appendix A.4 for details. In addition to incorporating CVaR, we also use a greedy algorithm to diversely sample the product latent space, see Appendix A.5 for further details. + +# 4. Experiments + +We evaluate the performance of ScePT on the tasks of pedestrian and vehicle motion prediction. In particular, we make use of the well-known ETH [35], UCY [30], and nuScenes [7] datasets. + +Metrics. We use the common Average and Final Displacement Error (ADE/FDE) metrics to measure the quality of trajectory predictions. Since our outputs are multimodal, we adopt the Best-of-N (BoN) extension and take the $N$ highest probability modes from the encoder to compute BoN ADE/FDE values. The sampling process in ScePT is different from prior works with continuous latent spaces as we do not randomly sample from the latent distribution, but rather pick the $N$ modes deemed most likely by the encoder. As a result, when the number of samples is larger than the + +![](images/74a4e7de2ebab0feadbaf24f8f6f1b370922b1aa0d403290f7dfc48c71277c54.jpg) +Figure 5. FDE of the ETH dataset under varying numbers of samples, the most significant improvement is seen at 3 samples. + +number of possible clique modes (i.e., $N > |\mathcal{Z}|$ ), we take only $|\mathcal{Z}|$ samples. + +# 4.1. Pedestrian Motion Prediction + +The ETH (containing ETH and Hotel scenes) [35] and UCY (containing Univ, Zara1 and Zara2 scenes) [30] datasets are widely-used benchmarks for pedestrian motion prediction. Together, they contain 9,514 unique pedestrians in many challenging, interactive real-world scenarios. + +For all pedestrian datasets, the maximum clique size is 5 and each node's latent space cardinality is 6. The ADE/FDE results are shown in Tables 1 (deterministic) and 2 (multimodal). While ScePT is designed mainly for autonomous driving, it performs remarkably well on pedestrian datasets, achieving the best or second-best performance among state-of-the-art models in the field. In particular, ScePT outperforms prior methods on most datasets in ADE, yet performs slightly worse in UCY scenes in terms of FDE. The likely reason is that the UCY datasets are much denser than ETH, forcing ScePT to partition the large scene graph into small cliques. Once partitioned, interactions between cliques are ignored, hurting prediction accuracy. Using a larger maximum clique size, however, would cause the joint latent cardinality to be too large and further deteriorate performance. Even in these cases, ScePT still performs on par with state-of-the-art prediction methods. + +Fig. 5 shows the FDE of the ETH dataset under different numbers of samples, Due to our use of CVaR in the loss function, ScePT is able to generate diverse modes. After only 3 samples, our method's predictions are already very accurate. We observe this phenomenon across all datasets, and find that sampling 3 to 5 modes achieves a good balance of prediction quality and runtime complexity. + +# 4.2. Vehicle Motion Prediction + +The nuScenes dataset [8] consists of 1000 driving scenes, each 20 seconds long and containing up to 23 object classes. To match the nuScenes prediction challenge set, only vehicles and pedestrians are predicted during training and evaluation. Tab. 3 summarizes the prediction accuracy of our method alongside a set of state-of-the-art approaches. Despite ScePT discarding edges between + +![](images/1677990ba9b4b5aedc2ac405ff73866ed6e4722815db86362c8e0b9b678cec16.jpg) +Figure 6. ScePT achieves a better collision rate than Trajectory++ [42] without collision cost regularization. With collision cost regularization, the collision rate becomes virtually zero. + +cliques, the prediction accuracy is near the state-of-the-art, especially in later timesteps. Furthermore, thanks to our diversity-promoting design, prediction accuracy can be significantly improved by adding only 1 or 2 extra modes. + +As mentioned in the introduction, scene consistency in trajectory predictions is critical for planning, even more so when simulating and verifying the performance of autonomous vehicles. Fig. 6 compares the collision rate achieved by Trajectory++ [42] and ScePT at different prediction horizons. The collision rate is averaged over all vehicles whose trajectories are predicted by the two models, including vehicle-to-vehicle and vehicle-to-pedestrian collisions. The result shows that ScePT's predictions have much less collisions than Trajectory++, even without collision cost regularization; becoming virtually zero with regularization. Moreover, the collision rate tends to decrease with the horizon, implying that collisions at earlier timesteps may be due to poor initial conditions and that the learned policy net is able to resolve conflicts in later timesteps. + +# 4.3. Conditioning and Counterfactual Analyses + +Conditioning is an important capability, enabling a downstream planner to obtain trajectory predictions conditioned on ego motion. It is also useful for performing counterfactual, "what if?" analyses. Fig. 7 demonstrates ScePT's ability to perform conditional prediction, where the left and right figures show unconditioned and conditioned predictions, respectively. In the top right, we condition on vehicle A and C braking at $-4m / s^2$ to a full stop. Accordingly, our method predicts that (1) vehicle B will brake to avoid a collision, and (2) vehicle D will perform a lane change to avoid vehicle C. In the bottom right, we condition on vehicle C accelerating at $4m / s^2$ . This causes a chain reaction, making vehicle B's prediction swerve to avoid a collision, which then subsequently affects vehicle A and the two pedestrians on the bottom left, showing that nodes within a clique are influenced by all other nodes in that clique. + +Interestingly, the policy learned from the nuScenes dataset is quite robust to clique size. Our model is currently trained with a maximum clique size of 4, but we evaluated it with sizes as large as 8. Even in such cases, the model + +
DatasetS-LSTM [2]S-ATTN [46]Trajectory++ [42]ScePT
ETH1.09/2.350.39/3.740.71/1.660.19/1.33
Hotel0.79/1.760.29/2.640.22/0.460.18/1.12
Univ0.67/1.400.33/3.920.44/1.170.19/1.19
Zara10.47/1.000.20/0.520.30/0.790.18/1.10
Zara20.56/1.170.30/2.130.23/0.590.19/1.20
Average0.71/1.540.30/2.590.38/0.930.19/1.19
+ +Table 1. ADE/FDE in meters, using the most likely mode. Bold/italic font indicates the best/second-best value. Lower is better. + +
DatasetS-GAN [21]SoPhie [40]MATF [51]Trajectory++ [42]ScePT
ETH0.81/1.520.70/1.431.01/1.750.39/0.830.10/0.65
Hotel0.72/1.610.76/1.670.43/0.800.12/0.210.13/0.77
Univ0.60/1.260.54/1.240.44/0.910.20/0.440.12/0.65
Zara10.34/0.690.30/0.630.26/0.450.15/0.330.13/0.77
Zara20.42/0.840.38/0.780.26/0.570.11/0.250.14/0.81
Average0.58/1.180.54/1.150.48/0.900.19/0.410.12/0.73
+ +Table 2. Best-of-20 ADE/FDE in meters. Bold/italic font indicates the best/second-best value. Lower is better. + +
Method@1s@2s@3s@4s
S-LSTM [2,9]0.47-1.61-
CSP [9,18]0.46-1.50-
CAR-Net [9,41]0.38-1.35-
SpAGNN [9]0.35-1.23-
Trajectory++ [42]0.070.451.142.20
Ours0.440.931.632.58
Ours (Best-of-2)0.410.831.442.20
Ours (Best-of-3)0.400.801.362.14
+ +Table 3. ScePT's prediction accuracy on nuScenes vehicles nearly matches state-of-the-art methods. Furthermore, thanks to its diversity-promoting design, ScePT's prediction accuracy can be drastically improved by adding only 1 or 2 extra modes. + +![](images/03b6ace6b7031c8e59b557a5169956445ae7f341520d49a7f03d194eec1e583f.jpg) + +![](images/dea6a7d89d8ea93c6d841020150d1287ceb372e6c6f20d5b9db25e769fc895a8.jpg) + +![](images/8742655692ae2452d284cbba46c8b5b6fefad0c01ad69e0ecbba37d00ba03586.jpg) +Figure 7. By design, scePT can produce predictions that are conditioned on any number of agents. Left: Original, unconditioned predictions. Top Right: Predictions conditioned on vehicles A and C braking. Bottom Right: Predictions conditioned on vehicle C accelerating. + +![](images/ac3069845c6d3d05079ee059786478580512b0ac7d664c2d490672a9d1beb5c2.jpg) + +is still able to produce reasonable conditioned predictions, verifying the efficacy of the policy net's attention network. + +# 4.4. Integration with a Downstream Planner + +To demonstrate ScePT's performance when integrated with a downstream planner, we feed its predictions to a downstream model predictive control (MPC)-based planner. The MPC planner takes the multimodal trajectory predictions into account and performs contingency planning via branching [3, 13]. Given $M$ joint trajectory predictions, the MPC plans $M$ corresponding ego trajectories with the additional constraint that the first control inputs for all $M$ ego trajectories must be the same. Formally, + +$$ +\begin{array}{l} \min_{\{a_{0:T - 1}^{i},s_{0:T}^{i}\}_{i = 1}^{M}}\sum_{i}\pi_{i}\mathcal{J}(a_{0:T - 1}^{i},s_{1:T}^{i}) \\ s. t. s _ {t + 1} ^ {i} = \operatorname {D y n} \left(s _ {t} ^ {i}, a _ {t} ^ {i}\right), \forall i, t, a _ {t} ^ {i} \in \mathcal {A}, x _ {t} ^ {i} \in \mathcal {S}, \\ \mathcal {C} (s _ {1: T} ^ {i}, y _ {1: T} ^ {i}) \leq 0, i = 1 \dots , M, \\ s _ {0} ^ {i} = s _ {0}, a _ {0} ^ {1} = a _ {0} ^ {2} = \dots a _ {0} ^ {M}, \tag {7} \\ \end{array} +$$ + +where $\pi_{i}$ is the probability of prediction mode $i$ , $s^{i}$ and $u^{i}$ are the planned state and input sequences of the ego vehicle under the $i$ -th mode, $\mathcal{J}$ is the cost function, and $\mathcal{C}$ is a constraint (e.g. collision avoidance). Eq. (7) is a nonlinear optimization problem and is solved with IPOPT [47]. As an example of runtime, when $M = 3$ , our unoptimized PyTorch prediction code executes in less than 240ms and MPC planning takes less than 60 ms, all on a CPU. Fig. 8 shows the result of combining ScePT's predictions with this downstream MPC planner, visualizing prediction modes and their resulting ego motion plans. + +# 4.5. Ablation study + +Collision Cost Regularization and Accuracy. As we have seen in Sec. 4.2, the collision rate of ScePT without the collision penalty already outperforms prior works. When collision penalty is added, the collision rate of ScePT drops + +![](images/f6fb5b90c7c6a526d2a8a69318b97652f8e595700e1805cb2327b468cbfb613a.jpg) +Figure 8. The integration of prediction and planning. Black vehicle: ego vehicle; blue vehicles: adjacent vehicles outside the ego clique; cyan trajectory: planned trajectory (3 modes); green and brown vehicles: adjacent vehicles within the ego clique; green and brown trajectories: predicted trajectories (top 3 modes); magenta circle: pedestrians; red lines: connected nodes within the ego's clique. + +![](images/7197f3334e7289f70a70adee50325cb1cf77868dc7d6ca30a61efc2ebf096b56.jpg) + +
@1s@2s@3s@4s
With collision penalty0.440.931.632.58
Without collision penalty0.400.921.702.71
+ +Table 4. Influence of including collision penalty regularization on nuScenes vehicle prediction accuracy. + +
Loss Ablation@1s@2s@3s@4s
With CVaR0.440.931.632.58
Without CVaR0.450.971.742.79
+ +to virtually zero. Tab. 4 summarizes the effect of including the collision penalty on prediction accuracy. We can see that prediction accuracies are either the same or better after the collision penalty is added, indicating that avoiding collisions also produces more accurate outputs. + +We also assess conditional predictions without the collision penalty, and collisions are much more likely when some nodes are assigned errant behavior. For example, the situation in Fig. 7 (top) results in vehicles B and D hitting their lead vehicles when predicted by a model trained without collision penalty regularization. This phenomenon implies that, without collision penalty regularization, ScePT is not able to maintain scene consistency in out-of-distribution scenarios. Overall, this regularization term forces the model to maintain scene consistency, making it more robust to out-of-distribution scenarios. + +Effect of $\alpha$ . To study the utility of using CVaR in Eq. (4), we conduct an ablation study over different values of $\alpha$ . Our baseline model uses a varying $\alpha$ (initialized at 0.2 and gradually increasing to 1.0 during training). We also train a version with constant $\alpha = 1.0$ , in which case the CVaR loss function is equivalent to the original expectation. Tab. 5 summarizes the results, showing that using CVaR outperforms expectation in the original loss function. + +Effect of Clique Formation. To assess the sensitivity of ScePT to the clique forming process, we change the distance criteria described in Sec. 3.1 to the Euclidean distance between nodes at the current time. Tab. 6 summarizes the + +Table 5. Influence of CVaR loss on nuScenes prediction FDE. + +
Distance Ablation@1s@2s@3s@4s
Flow0.440.931.632.58
t=0 Euclidean0.430.951.702.71
+ +Table 6. Influence of distance criteria for clique forming on nuScenes prediction accuracy (FDE). + +
Clique Size Ablation@1s@2s@3s@4s
Max clique size 20.410.901.632.68
Max clique size 40.440.931.632.58
Max clique size 60.641.271.902.90
+ +Table 7. Effect of maximum clique size on nuScenes prediction accuracy (FDE). + +results, which shows that the flow distance partition leads to better performance, yet using a simple Euclidean distance leads to decent performance. + +Another important parameter is the maximum clique size. Since a node only considers neighbors within its clique, a small clique size leads to the nodes overlooking some nearby neighbors that were not partitioned into the same clique. On the other hand, if a clique gets too big, the cardinality of the clique's product latent space becomes too large, causing problems when sampling greedily. After experimenting, we found that a maximum clique size of 4 leads to the best result. Tab. 7 summarizes this ablation. + +# 5. Conclusion and Future Work + +Summary. This paper presents ScePT, a CVAE-based model that generates multimodal joint trajectory predictions with high scene consistency. The encoder uses a Gibbs distribution to capture interactions between agents and outputs prediction mode probabilities for a whole clique instead of individual nodes. The decoder learns agent interaction policies to generate closed-loop trajectory predictions with high scene consistency, thanks to an explicit collision penalty used as regularization during training. Experiments on the ETH, UCY, and nuScenes datasets show that ScePT is able to achieve state-of-the-art prediction accuracy with significantly improved scene consistency. We also demonstrate its capability to integrate with a downstream contingency planner and to generate human-like behaviors via conditioning. + +Limitations and Future Work. One important limitation (and area of future work) of ScePT is its loss of sparsity. Since the decoder generates predictions concurrently for all nodes in a clique, one cannot utilize the sparsity of the interaction graph to only consider neighbors for each node. This causes the exponential cardinality of the joint latent space and forces the size of cliques to be limited. Subsequently, interactions between nodes in different cliques are ignored, leading to compromises in accuracy especially when there are large numbers of crowded agents, such as in the UCY dataset. Another limitation is the computation time due to the autoregressive policy net, which could be further improved by more efficient coding and parallelization. + +# References + +[1] Pieter Abbeel, Daphne Koller, and Andrew Y Ng. Learning factor graphs in polynomial time and sample complexity. The Journal of Machine Learning Research, 7:1743-1788, 2006. +[2] Alexandre Alahi, Kratarth Goel, Vignesh Ramanathan, Alexandre Robicquet, Li Fei-Fei, and Silvio Savarese. Social lstm: Human trajectory prediction in crowded spaces. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 961–971, 2016. +[3] John P Alsterda, Matthew Brown, and J Christian Gerdes. Contingency model predictive control for automated vehicles. In 2019 American Control Conference (ACC), pages 717-722. IEEE, 2019. +[4] Mayank Bansal, Alex Krizhevsky, and Abhijit Ogale. Chauffeurnet: Learning to drive by imitating the best and synthesizing the worst. arXiv preprint arXiv:1812.03079, 2018. +[5] Dhruv Batra, Payman Yadollahpour, Abner Guzman-Rivera, and Gregory Shakhnarovich. Diverse m-best solutions in markov random fields. In European Conference on Computer Vision, pages 1-16. Springer, 2012. +[6] Vincent D Blondel, Jean-Loup Guillaume, Renaud Lambiotte, and Etienne Lefebvre. Fast unfolding of communities in large networks. Journal of statistical mechanics: theory and experiment, 2008(10):P10008, 2008. +[7] Holger Caesar, Varun Bankiti, Alex H Lang, Sourabh Vora, Venice Erin Liong, Qiang Xu, Anush Krishnan, Yu Pan, Giacarlo Baldan, and Oscar Beijbom. nuscenes: A multimodal dataset for autonomous driving. In IEEE/CVF conference on computer vision and pattern recognition (CVPR), pages 11621-11631, 2020. +[8] 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 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 11621-11631, 2020. +[9] Sergio Casas, Cole Gulino, Renjie Liao, and Raquel Urtasun. Spagnn: Spatially-aware graph neural networks for relational behavior forecasting from sensor data. In 2020 IEEE International Conference on Robotics and Automation (ICRA), pages 9491-9497. IEEE, 2020. +[10] Sergio Casas, Cole Gulino, Simon Suo, Katie Luo, Renjie Liao, and Raquel Urtasun. Implicit latent variable model for scene-consistent motion forecasting. In European Conference on Computer Vision (ECCV), pages 624-641. Springer, 2020. +[11] Sergio Casas, Cole Gulino, Simon Suo, and Raquel Urtasun. The importance of prior knowledge in precise multimodal prediction. In 2020 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 2295-2302. IEEE, 2020. +[12] Yuxiao Chen, Ugo Rosolia, Chuchu Fan, Aaron D Ames, and Richard Murray. Reactive motion planning with probabilistic safety guarantees. arXiv preprint arXiv:2011.03590, 2020. +[13] Yuxiao Chen, Ugo Rosolia, Wyatt Ubellacker, Noel Csomay-Shanklin, and Aaron D Ames. Interactive multi-modal motion planning with branch model predictive control. arXiv preprint arXiv:2109.05128, 2021. + +[14] Jan Chorowski, Dzmitry Bahdanau, Dmitriy Serdyuk, Kyunghyun Cho, and Yoshua Bengio. Attention-based models for speech recognition. arXiv preprint arXiv:1506.07503, 2015. +[15] Alexander Cui, Sergio Casas, Abbas Sadat, Renjie Liao, and Raquel Urtasun. Lookout: Diverse multi-future prediction and planning for self-driving. In IEEE/CVF International Conference on Computer Vision (ICCV), pages 16107-16116, 2021. +[16] Henggang Cui, Vladan Radosavljevic, Fang-Chieh Chou, Tsung-Han Lin, Thi Nguyen, Tzu-Kuo Huang, Jeff Schneider, and Nemanja Djuric. Multimodal trajectory predictions for autonomous driving using deep convolutional networks. In 2019 International Conference on Robotics and Automation (ICRA), pages 2090-2096. IEEE, 2019. +[17] Nachiket Deo and Mohan M Trivedi. Convolutional social pooling for vehicle trajectory prediction. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, pages 1468-1476, 2018. +[18] Nachiket Deo and Mohan M Trivedi. Multi-modal trajectory prediction of surrounding vehicles with maneuver based lstms. In 2018 IEEE Intelligent Vehicles Symposium (IV), pages 1179-1184. IEEE, 2018. +[19] Nemanja Djuric, Henggang Cui, Zhaoen Su, Shangxuan Wu, Huahua Wang, Fang-Chieh Chou, Luisa San Martin, Song Feng, Rui Hu, Yang Xu, et al. Multixnet: Multiclass multistage multimodal motion prediction. arXiv preprint arXiv:2006.02000, 2020. +[20] Lester E Dubins. On curves of minimal length with a constraint on average curvature, and with prescribed initial and terminal positions and tangents. American Journal of mathematics, 79(3):497-516, 1957. +[21] Agrim Gupta, Justin Johnson, Li Fei-Fei, Silvio Savarese, and Alexandre Alahi. Social gan: Socially acceptable trajectories with generative adversarial networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2255–2264, 2018. +[22] Dirk Helbing and Peter Molnar. Social force model for pedestrian dynamics. Physical review E, 51(5):4282, 1995. +[23] Xin Huang, Stephen G McGill, Jonathan A DeCastro, Luke Fletcher, John J Leonard, Brian C Williams, and Guy Rosman. Diversitygan: Diversity-aware vehicle motion prediction via latent semantic sampling. IEEE Robotics and Automation Letters, 5(4):5089-5096, 2020. +[24] Boris Ivanovic, Amine Elhafsi, Guy Rosman, Adrien Gaidon, and Marco Pavone. Mats: An interpretable trajectory forecasting representation for planning and control. Conference on Robot Learning (CoRL), 2020. +[25] Boris Ivanovic and Marco Pavone. The trajectory: Probabilistic multi-agent trajectory modeling with dynamic spatiotemporal graphs. In IEEE/CVF International Conference on Computer Vision (ICCV), pages 2375-2384, 2019. +[26] Alexey Kamenev, Lirui Wang, Ollin Boer Bohan, Ishwar Kulkarni, Bilal Kartal, Artem Molchanov, Stan Birchfield, David Nister, and Nikolai Smolyanskiy. Predictionnet: Realtime joint probabilistic traffic prediction for planning, control, and simulation. arXiv preprint arXiv:2109.11094, 2021. +[27] Kris M Kitani, Brian D Ziebart, James Andrew Bagnell, and Martial Hebert. Activity forecasting. In European conference on computer vision, pages 201-214. Springer, 2012. + +[28] Alex Kuefler, Jeremy Morton, Tim Wheeler, and Mykel Kochenderfer. Imitating driver behavior with generative adversarial networks. In IEEE Intelligent Vehicles Symposium (IV), pages 204-211. IEEE, 2017. +[29] Namhoon Lee, Wongun Choi, Paul Vernaza, Christopher B Choy, Philip HS Torr, and Manmohan Chandraker. Desire: Distant future prediction in dynamic scenes with interacting agents. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 336-345, 2017. +[30] Alon Lerner, Yiorgos Chrysanthou, and Dani Lischinski. Crowds by example. In Computer graphics forum, volume 26, pages 655-664. Wiley Online Library, 2007. +[31] Yicheng Liu, Jinghuai Zhang, Liangji Fang, Qinhong Jiang, and Bolei Zhou. Multimodal motion prediction with stacked transformers. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7577-7586, 2021. +[32] Wei-Chiu Ma, De-An Huang, Namhoon Lee, and Kris M Kitani. Forecasting interactive dynamics of pedestrians with fictitious play. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 774-782, 2017. +[33] Ramin Mehran, Alexis Oyama, and Mubarak Shah. Abnormal crowd behavior detection using social force model. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 935-942. IEEE, 2009. +[34] Jiquan Ngiam, Benjamin Caine, Vijay Vasudevan, Zhengdong Zhang, Hao-Tien Lewis Chiang, Jeffrey Ling, Rebecca Roelofs, Alex Bewley, Chenxi Liu, Ashish Venugopal, et al. Scene transformer: A unified multi-task model for behavior prediction and planning. arXiv preprint arXiv:2106.08417, 2021. +[35] Stefano Pellegrini, Andreas Ess, Konrad Schindler, and Luc Van Gool. You'll never walk alone: Modeling social behavior for multi-target tracking. In 2009 IEEE 12th International Conference on Computer Vision, pages 261-268. IEEE, 2009. +[36] Tung Phan-Minh, Elena Corina Grigore, Freddy A Boulton, Oscar Beijbom, and Eric M Wolff. Covernet: Multimodal behavior prediction using trajectory sets. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 14074-14083, 2020. +[37] Thomas A Ranney. Models of driving behavior: a review of their evolution. Accident analysis & prevention, 26(6):733-750, 1994. +[38] Nicholas Rhinehart, Rowan McAllister, Kris Kitani, and Sergey Levine. Precog: Prediction conditioned on goals in visual multi-agent settings. In IEEE/CVF International Conference on Computer Vision (ICCV), pages 2821-2830, 2019. +[39] R Tyrrell Rockafellar, Stanislav Uryasev, et al. Optimization of conditional value-at-risk. Journal of risk, 2:21-42, 2000. +[40] Amir Sadeghian, Vineet Kosaraju, Ali Sadeghian, Noriaki Hirose, Hamid Rezatofighi, and Silvio Savarese. Sophie: An attentive gan for predicting paths compliant to social and physical constraints. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 1349-1358, 2019. +[41] Amir Sadeghian, Ferdinand Legros, Maxime Voisin, Ricky Vesel, Alexandre Alahi, and Silvio Savarese. Car-net: Clairvoyant attentive recurrent network. In European Conference on Computer Vision (ECCV), pages 151-167, 2018. + +[42] Tim Salzmann, Boris Ivanovic, Punarjay Chakravarty, and Marco Pavone. Trajectory++: Dynamically-feasible trajectory forecasting with heterogeneous data. In European Conference on Computer Vision (ECCV), pages 683-700. Springer, 2020. +[43] 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. +[44] Charlie Tang and Russ R Salakhutdinov. Multiple futures prediction. Advances in Neural Information Processing Systems, 32:15424-15434, 2019. +[45] Martin Treiber, Ansgar Hennecke, and Dirk Helbing. Congested traffic states in empirical observations and microscopic simulations. Physical review E, 62(2):1805, 2000. +[46] A. Vemula, K. Muelling, and J. Oh. Social attention: Modeling attention in human crowds. In International Conference on Robotics and Automation (ICRA), 2018. +[47] Andreas Wächter and Lorenz T Biegler. On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Mathematical programming, 106(1):25-57, 2006. +[48] Xinshuo Weng, Ye Yuan, and Kris Kitani. Ptp: Parallelized tracking and prediction with graph neural networks and diversity sampling. IEEE Robotics and Automation Letters, 6(3):4640-4647, 2021. +[49] Ye Yuan and Kris Kitani. Diverse trajectory forecasting with determinantal point processes. arXiv preprint arXiv:1907.04967, 2019. +[50] Ye Yuan, Xinshuo Weng, Yanglan Ou, and Kris Kitani. Agentformer: Agent-aware transformers for socio-temporal multi-agent forecasting. IEEE/CVF International Conference on Computer Vision (ICCV), 2021. +[51] Tianyang Zhao, Yifei Xu, Mathew Monfort, Wongun Choi, Chris Baker, Yibiao Zhao, Yizhou Wang, and Ying Nian Wu. Multi-agent tensor fusion for contextual trajectory prediction. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 12126-12134, 2019. +[52] Rui Zhou, Hongyu Zhou, Masayoshi Tomizuka, Jiachen Li, and Zhuo Xu. Grouptron: Dynamic multi-scale graph convolutional networks for group-aware dense crowd trajectory forecasting. arXiv preprint arXiv:2109.14128, 2021. \ No newline at end of file diff --git a/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/images.zip b/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..157a9cb710b5ccf0689f496ce2c5e7b50a6bd8d7 --- /dev/null +++ b/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01689665798dd353cb568667b089f9d2b99f32c4eddbcadc928c6189246266df +size 475994 diff --git a/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/layout.json b/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5fb9aad75aaceb864582c9a1ece4e3b84254a823 --- /dev/null +++ b/sceptsceneconsistentpolicybasedtrajectorypredictionsforplanning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b174b59b88c6d0dcd189948840c77394cbb348714247d78592a54050afcdddd2 +size 402463 diff --git a/scribblesupervisedlidarsemanticsegmentation/3b9fa338-347e-4ec7-b712-f68fc2ff7782_content_list.json b/scribblesupervisedlidarsemanticsegmentation/3b9fa338-347e-4ec7-b712-f68fc2ff7782_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5989383d3cfe5eef9e6247c9781826d9f9e6db56 --- /dev/null +++ b/scribblesupervisedlidarsemanticsegmentation/3b9fa338-347e-4ec7-b712-f68fc2ff7782_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:185725b09fc8a1514b8a8d58cd5f2f8a970f22c04264fb5888c515be337bb32f +size 86357 diff --git a/scribblesupervisedlidarsemanticsegmentation/3b9fa338-347e-4ec7-b712-f68fc2ff7782_model.json b/scribblesupervisedlidarsemanticsegmentation/3b9fa338-347e-4ec7-b712-f68fc2ff7782_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d214f845cedbb86aeff59542f2affdb0d9a37056 --- /dev/null +++ b/scribblesupervisedlidarsemanticsegmentation/3b9fa338-347e-4ec7-b712-f68fc2ff7782_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b28a0928741c832e6b2dfd26cd40a83e4598a3f6403de4c7df5a98dc92fbc2e +size 107141 diff --git a/scribblesupervisedlidarsemanticsegmentation/3b9fa338-347e-4ec7-b712-f68fc2ff7782_origin.pdf b/scribblesupervisedlidarsemanticsegmentation/3b9fa338-347e-4ec7-b712-f68fc2ff7782_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..68d595fd2d4f3930e873beefb1ea4e2a6d8b2373 --- /dev/null +++ b/scribblesupervisedlidarsemanticsegmentation/3b9fa338-347e-4ec7-b712-f68fc2ff7782_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b6988f849f776d53e63745532cbad27cc3cfb5b6fbd553c2b73ec2d0abb4f38 +size 7519472 diff --git a/scribblesupervisedlidarsemanticsegmentation/full.md b/scribblesupervisedlidarsemanticsegmentation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5e40e51ba87ae8fdf628efa157e184513f52285b --- /dev/null +++ b/scribblesupervisedlidarsemanticsegmentation/full.md @@ -0,0 +1,363 @@ +# Scribble-Supervised LiDAR Semantic Segmentation + +Ozan Unal $^{1}$ Dengxin Dai $^{1,2}$ Luc Van Gool $^{1,3}$ $^{1}$ ETH Zurich, $^{2}$ MPI for Informatics, $^{3}$ KU Leuven +{ozan.unal, dai, vangool}@vision.ee.ethz.ch + +# Abstract + +Densely annotating LiDAR point clouds remains too expensive and time-consuming to keep up with the ever-growing volume of data. While current literature focuses on fully-supervised performance, developing efficient methods that take advantage of realistic weak supervision have yet to be explored. In this paper, we propose using scribbles to annotate LiDAR point clouds and release ScribbleKITTI, the first scribble-annotated dataset for LiDAR semantic segmentation. Furthermore, we present a pipeline to reduce the performance gap that arises when using such weak annotations. Our pipeline comprises of three stand-alone contributions that can be combined with any LiDAR semantic segmentation model to achieve up to $95.7\%$ of the fully-supervised performance while using only $8\%$ labeled points. Our scribble annotations and code are available at github.com/ouenal/scribblekitti. + +# 1. Introduction + +With the increase of LiDAR's popularity on autonomous vehicles, data acquisition has significantly ramped up. However, it is very hard to keep pace with the volume of data, as the dense data annotation process is very expensive and time-consuming for large scale datasets, especially in 3D where the navigation of the annotation tool is not trivial. Even with powerful annotation tools [5] that allow labeling of superimposed LiDAR frames, a single $100\mathrm{m}$ by $100\mathrm{m}$ tile can take up to 4.5 hours for an experienced annotator [5]. + +In stark contrast to the 2D cases [1,14,24,31], current efforts in 3D semantic segmentation mainly focus on designing networks for densely annotated data (e.g. [41,45,57]), as opposed to developing efficient methods for creating more labels or learning from cheap/weak supervision. It is clear that only by doing the latter, the scaling of 3D semantic segmentation can keep up with the growth of applications and data volume. In this paper, we present a method for this very purpose, by firstly introducing a new annotation strategy and later developing a pipeline to directly exploit such annotations. + +![](images/4b900bdaa6f3b45551777f7a973a5b366bea01f9485a98f03a9f824442590763.jpg) +Figure 1. Example of scribble-annotated LiDAR point cloud scenes of a single frame (top) and superimposed frames (bottom). Compared are the proposed ScribbleKITTI (left) with the fully labeled counterpart from SemanticKITTI [5] (right). + +![](images/206fe172896f01bb32d08348560da3353f04371183d1c54d15b9fcc3b73d116d.jpg) + +Using scribbles as annotations has proven to be a popular and effective method for 2D semantic segmentation [7, 22, 24]. The weak annotation method allows annotators to simply mark object centers, avoiding the time consuming task of determining class boundaries. + +We adopt this idea for LiDAR point clouds to supervise 3D semantic segmentation. As opposed to 2D images, 3D point clouds preserve the metric space and therefore things and stuff follow highly geometric structures. To accompany this, we propose using the more geometric line-scribble to annotate LiDAR point clouds. Compared to free-formed scribbles, annotators only need to determine the start and end points of a line annotation. This allows faster labeling of classes that span large distances (e.g. roads, buildings, fences), while also providing as sufficient information for smaller object classes (e.g. cars, trucks), as short lines and free-formed scribbles become less distinguishable. + +We provide scribble-annotations for the train-split of SemanticKITTI [5] for 19 classes. The resulting scribble-annotated data, which we call ScribbleKITTI, contains 189 million labeled points corresponding to $8.06\%$ of the total + +point count. Fig. 1 shows an example from ScribbleKITTI. + +Furthermore, in this paper we develop a novel learning method for 3D semantic segmentation that directly exploits scribble annotated LiDAR data. Learning from scribble annotations provides a unique challenge as no supervision/regularization is available from unlabeled points, which form the majority of the training data. A performance gap between scribble-supervised and fully supervised training could be very large if no special methods are designed for the former. To tackle this issue, we introduce three stand-alone contributions that can be combined with any 3D LiDAR segmentation model: a teacher-student consistency loss on unlabeled points, a self-training scheme designed for outdoor LiDAR scenes, and a novel descriptor that improves pseudo-label quality. + +Specifically, we first introduce a weak form of supervision from unlabeled points via a consistency loss. Secondly, we strengthen this supervision by fixing the confident predictions of our model on the unlabeled points and employing self-training with pseudo-labels. The standard self-training strategy is however very prone to confirmation bias due to the long-tailed distribution of classes inherent in autonomous driving scenes and the large variation of point density across different ranges inherent in LiDAR data. To combat these, we develop a class-range-balanced pseudolabeling strategy to uniformly sample target labels across all classes and ranges. Finally, to improve the quality of our pseudo-labels, we augment the input point cloud by using a novel descriptor that provides each point with the semantic prior about its local surrounding at multiple resolutions. + +In summary, our contributions are as follows: + +- We present ScribbleKITTI, the first scribble-annotated LiDAR semantic segmentation dataset. +- We propose class-range-balanced self-training to combat the inherent bias towards dominant classes and close ranged dense regions in pseudo-labels. +- We further improve the pseudo-labeling quality by augmenting the input point cloud with a pyramid local semantic-context descriptor. +- Putting these two contributions along with the mean teacher framework, our scribble-based pipeline achieves up to $95.7\%$ relative performance of fully supervised training while using only $8\%$ labeled points. + +Our contributions remain orthogonal to the development of better neural network architectures and can be combined with any 3D LiDAR segmentation model. + +# 2. Related Work + +LiDAR Semantic Segmentation: As point clouds are irregular geometric data structures, current literature for 3D semantic segmentation mainly focuses on identifying and understanding various representation strategies amongst: operating directly on point coordinates [17, 20, 35, 36, 44, + +45], projecting the LiDAR scene onto images and employ 2D architectures [3, 12, 30, 47, 48, 50], utilizing sparse 3D voxel grids [11,25,41,53,57], or utilizing multiple representations [2, 51, 55]. All of these models are developed under the fully-supervised framework, which requires densely annotated LiDAR point clouds that are time-consuming and tedious to acquire. In this work, our focus is different and our contributions are complementary. Our developed pipeline can be used with any such network in order to reduce the performance gap between fully-supervised and scribble-supervised training. + +2D Scribble-supervised Semantic Segmentation: To alleviate the strenuous task of dense data annotation, two training methods can be used: weakly-supervised [21, 22, 24, 29, 32, 37], where only a subset of points are labeled on every frame, and semi-supervised [13, 16, 23, 33], where only a subset of frames are labeled within the dataset. Scribbles have been adopted as a user-friendly form of weak supervision [24]. The common approach when dealing with such weak annotations is to either employ online labeling through a consistency check using mean teacher [9, 26, 40, 43, 54], or to employ a self-training scheme where data is iteratively processed by generating offline target pseudolabels and retraining [7, 22, 24, 38]. However, the naive approach of self-training on all predictions can introduce confirmation bias [4]. To combat this, threshold-based filtering can help reduce possible errors by only sampling confident predictions [8, 49, 58]. When facing long tailed distributions, CB-ST [59] uses class-balanced sampling to avoid the domination of head classes in the pseudo labels. DARS [16] extends CB-ST by re-distributing biased pseudo labels after thresholding. We extend the previously available methods to also include balancing against range to avoid undersampling points from distant, sparser regions of the LiDAR point cloud. + +Incomplete Supervision in 3D Semantic Segmentation: In contrast to 2D, incomplete supervision for point clouds have remained underexplored. When tackling semi-supervised segmentation on LiDAR point clouds, Semisup [18] implements a pseudo-label guided point contrastive loss to extend supervision to unlabeled frames. Li et al. [23] and SSPC [10] employ self-training to achieve the same goal. Xu et al. [52] compares semi-supervised training to weakly-supervised on point clouds and argues that under a fixed labelling budget, weak supervision performs better for semantic segmentation. PSD [56] uses consistency check across perturbed branches to utilize unlabeled points in weakly supervised learning. However, the weak labels from existing methods [52, 56] are generated through offline uniform sampling from dense annotations which cannot be easily adopted during the dense labeling itself. In this work, we tackle a form of weakly-supervised segmentation based on line-scribbles. Instead of using simulated + +![](images/ea4b71077f4149dfa2b7bf07f95a764270187e2ef97fc67281c428e7e55f6c43.jpg) +Figure 2. Number of points labeled in ScribbleKITTI ( $\alpha = 1$ ) visualized against SemanticKITTI ( $\alpha = 0.5$ ) in log-scale. + +weak labels, we provide a human annotated dataset to realistically validate our method. Compared to uniform sampled labels, scribbles vitally do not provide any information on class boundaries and appear only in scribble-clusters, i.e. are much less spatially distributed within a scene. + +# 3. The ScribbleKITTI Dataset + +While LiDAR point cloud semantic segmentation has gained popularity over the past years, the number of large-scale datasets still remains low due to the complexity and time consumption of the data annotation process. Inspired by 2D scribble annotations [24] that are efficient and easy to generate, we propose using line-scribbles to annotate LiDAR point clouds for semantic segmentation and release ScribbleKITTI, the first scribble-annotated LiDAR point cloud dataset. + +We annotate the train-split of SemanticKITTI [5] based on KITTI [15] which consists of 10 sequences, 19130 scans, 2349 million points. ScribbleKITTI contains 189 million labeled points corresponding to only $8.06\%$ of the total point count. We choose SemanticKITTI for its current wide use and established benchmark. We retain the same 19 classes to encourage easy transitioning towards research into scribble-supervised LiDAR semantic segmentation. The class-wise label distribution is visualized in Fig. 2. + +When annotating, we use line-scribbles rather than free-forming scribbles. LiDAR point clouds preserve the metric space and therefore things (e.g. car, truck) and stuff (e.g. terrain, road) mostly follow highly geometric structures. While both drawings are valid approaches, we found that line scribbles allow faster labeling of such geometric classes that span large distances (e.g. roads, sidewalks, buildings, fences), as annotators only need to provide two clicks (start and end) to annotate an entire segment. We illustrate this by showcasing an example annotated tile in Fig. 3. + +Data Annotation: We use the help of student annotators. Following Behley et al. [5], we initially screen the annotators until they are comfortable navigating within the 3D space to ensure good results. We subdivide a sequence of superimposed point clouds into $100\mathrm{m}$ by $100\mathrm{m}$ tiles and label on a per-tile basis. We generate scribble annotations through line drawings using an adapted point labeling + +![](images/fa664719866160f0b2102c6b6c3b6fba2b8c30a81eaaaa382864a863a8052a2e.jpg) +Figure 3. Line-annotation process illustrated on a $100\mathrm{m}$ by $100\mathrm{m}$ tile. Classes that span large distances such as building (yellow) and road (pink) can be annotated with only two clicks. As the tile is annotated using 2D lines projected onto the 3D surface, scribbles may become indistinguishable once the viewing angle changes (e.g. bottom right). + +tool1 [5]. We overlap neighboring tiles to allow labeling consistency across the entire sequence. Finally, we do a comparison to SemanticKITTI to stay consistent with their class definitions. We provide further information in the supplementary materials on the labeling process. + +An annotator needs on average 10-25 minutes per tile depending on the contents (e.g. highway vs. city) as opposed to the reported 1.5-4.5 hours for full annotations [5]. This corresponds to roughly a $90\%$ time saving, which can account to over a thousands hours for large scale datasets [5]. + +# 4. Scribble-Supervised LiDAR Segmentation + +The naive approach of tackling scribble-supervised semantic segmentation is to treat the problem similarly to any fully supervised task and employ a loss $H$ (typically cross-entropy) on the available labeled points. + +We define a LiDAR point cloud $P$ as the set of points $P = \{p \mid p = (x, y, z, I) \in \mathbb{R}^4\}$ with $(x, y, z)$ denoting the 3D coordinates and $I$ the reflectance intensity. We further define $S \subseteq P$ as the set of labeled points. The objective function over $F$ frames can therefore be formulated as: + +$$ +\min _ {\theta} \sum_ {f = 1} ^ {F} \sum_ {i = 1} ^ {| P _ {f} |} \mathbb {1} \left(p _ {f, i} \in S\right) H \left(\hat {y} _ {f, i} \mid_ {\theta}, y _ {f, i}\right) \tag {1} +$$ + +with $\hat{y}_{f,i}|_{\theta}$ denoting the predicted class distribution for the point $p_{f,i} \in P_f$ of frame $f$ given the network parameters $\theta$ , and $y_{f,i}$ denoting the ground truth label. + +![](images/df3346f0d941de8de4c285f66ed1c9b9a11adca09a07a2fb21c2c37f404311a6.jpg) +Figure 4. Illustration of the proposed pipeline for scribble-supervised LiDAR semantic segmentation comprising of three steps: training, pseudo-labeling, distillation. During training, we preform pyramid local semantic-context (PLS) augmentation before training the mean teacher model on the available scribble-annotations. During pseudo-labeling, we generate target labels in a class-range-balanced (CRB) manner. Finally during distillation, we retrain the mean teacher on the generated pseudo-labels. $\mathcal{L}_S$ and $\mathcal{L}_U$ denote the losses applied to the supervised- and unsupervised set of points respectively. Gray arrows propagate label information. + +In this baseline approach the unlabeled points which contain vital boundary information are not used. Furthermore due to the sheer lack of labeled data points, performance degradation is unavoidable, as confidence on long tailed object classes suffer due to the reduced supervision. + +In the following sections, we address these issues by introducing three stand-alone methods that utilize unlabeled points and expand the annotated dataset: partial consistency loss with mean teacher (Sec. 4.1), class-range-balanced self-training (Sec. 4.2), and pyramid local semantic-context (Sec. 4.3). Our overall pipeline can be seen in Fig. 4. + +# 4.1. Partial Consistency Loss with Mean Teacher + +Firstly, we introduce further weak supervision to the unlabeled set of points via a consistency loss applied using mean teacher. The mean teacher framework is formed of two models, namely the student, parametrized by $\theta$ , and the teacher, parametrized by $\theta^{\mathrm{EMA}}$ [43]. Unlike the student network, which is traditionally trained using gradient descent, the teacher weights are computed as the exponential moving average (EMA) of successive student weights, resulting in the update function: + +$$ +\theta_ {t} ^ {\mathrm {E M A}} = \alpha \theta_ {t - 1} ^ {\mathrm {E M A}} + (1 - \alpha) \theta_ {t} \tag {2} +$$ + +for time step $t$ , with $\alpha$ denoting the smoothing coefficient which determines the update speed. Stochastic averaging of weights has been shown to yield more accurate models than using the final training weights directly [34, 43], allowing the teacher predictions to be used as a form of weak supervision for the student under varying small perturbations. + +We further define $U$ as the set of unlabeled points, i.e. $P \setminus S$ . We introduce a consistency loss between the student and teacher networks, but unlike Tan et al. [40], we restrict the consistency loss to only unlabeled points $p \in U$ . This + +allows a sharper supervision on labeled points in $S$ by eliminating the teacher injected uncertainties, while retaining the unlabeled supervision that takes advantage of the more accurate teacher predictions. This restriction is more in alignment with the applications of the mean teacher framework in semi-supervised tasks [19, 43, 46]. + +We extend our objective function (Eq. 1) to include supervision on unlabeled points as: + +$$ +\min _ {\theta} \sum_ {f = 1} ^ {F} \sum_ {i = 1} ^ {| P _ {f} |} G _ {i, f} = \left\{ \begin{array}{l l} H \left(\hat {\mathcal {Y}} _ {f, i} \mid_ {\theta}, \mathcal {Y} _ {f, i}\right) & \text {i f} p _ {f, i} \in S \\ \log \left(\hat {\mathcal {Y}} _ {f, i} \mid_ {\theta}\right) \hat {\mathcal {Y}} _ {f, i} \mid_ {\theta^ {\mathrm {E M A}}} & \text {i f} p _ {f, i} \in U \end{array} \right. \tag {3} +$$ + +with $\hat{y}_{f,i}|_{\theta}$ denoting the predicted class distribution for the point $p_{f,i}$ given the network parameters $\theta$ , $y$ denoting the ground truth label. To reduce the Shannon mutual information, i.e. to increase the training signal from the consistency loss, we apply a heavier augmentation the student input in the form of global rotation, translation, random flip and white Gaussian noise [6,28,39]. + +While mean teacher introduces supervision on unlabeled points, the information gain is limited by the teachers performance. Even if the teacher predicts the correct label for a point, due to the soft pseudo-labeling, the confidences on other classes will continue to guide the student's output. + +# 4.2. Class-range-balanced Self-training (CRB-ST) + +To combat this uncertainty injection and more directly utilize the confident predictions of unlabeled points, we expand the annotated dataset and employ self-training. Our goal by introducing self-training alongside mean teacher, is to keep the soft pseudo-label guidance of the mean teacher for uncertain predictions while hardening the pseudo-labels of certain predictions. Using the teacher's most confident + +predictions, we generate target labels for a subset of unlabeled points. We define this set of pseudo-labeled points as $L$ and later retrain our network on $S \cup L$ . + +Formally, we extend our objective function (Eq. 3) to also learn target labels as hidden variables: + +$$ +\min _ {\theta , \hat {\mathbf {y}}} \sum_ {f = 1} ^ {F} \sum_ {i = 1} ^ {| P _ {f} |} \left[ G _ {i, f} - \left(\log \left(\hat {\mathbf {y}} _ {f, i} \mid_ {\theta^ {\mathrm {E M A}}}\right) + k\right) \hat {\mathbf {y}} _ {f, i} \right] \tag {4} +$$ + +$$ +G _ {i, f} = \left\{ \begin{array}{l l} H (\hat {y} _ {f, i} | _ {\theta}, y _ {f, i}) & \text {i f} p _ {f, i} \in S \cup L \\ \log (\hat {y} _ {f, i} | _ {\theta}) \hat {y} _ {f, i} | _ {\theta^ {\mathrm {E M A}}} & \text {i f} p _ {f, i} \in U \setminus L \end{array} \right. +$$ + +where $\hat{\pmb{y}}_{f,i} = [\hat{y}_{f,i}^{(1)},\dots ,\hat{y}_{f,i}^{(C)}]\in \{\{\mathbf{e}|\mathbf{e}\in \mathbb{R}^C\} \cup \mathbf{0}\}$ is the pseudo-label vector, $\mathbf{e}$ denoting a one-shot vector, $C$ denoting the number of classes and $k$ denoting the negative log-confidence threshold. The generated pseudo-label set is given by $L = \{p_{f,i}\mid \hat{\pmb{y}}_{f,i}\neq 0,\forall f,i\}$ . To exploit the increased performance generated from stochastic weight averaging, we sample labels from the teacher's output ( $\theta_{\mathrm{EMA}}$ ). + +We initialize the optimization of Eq. 4 by setting the latent variable $\hat{\pmb{y}} = \mathbf{0}$ for all points, i.e. by only selecting the scribble-annotation $(L = \emptyset)$ . The self-training protocol from pseudo-labels can then be summarised in two steps: + +1. Training: We fix $\hat{\pmb{y}}$ and optimize the objective function with respect to $\theta$ . +2. Pseudo-labeling: We fix $\theta$ (and effectively $\theta^{\mathrm{EMA}}$ ) and optimize the objective function with respect to $\hat{y}$ . We update $L$ given $\hat{y}$ . + +The two steps can be repeated to take advantage of the improved representation capability of the model through pseudo-labeling. + +While self-training with pseudo-labels has been proven to be an effective strategy in scribble-supervised semantic segmentation [24,38], the class distribution in autonomous driving scenes are inherently long tailed, which may result in the gradual dominance of large and easy-to-learn classes on generated pseudo-labels. CB-ST [59] proposes to sample labels while retaining the overall class distribution by setting thresholds in a class-wise manner. While this is sufficient in the 2D setting, we observe that 3D LiDAR data presents an additional unique challenge. + +Due to the nature of the LiDAR sensor, the local point density varies based on the beam radius, as sparsity increases with distance. This results in sampling of pseudolabels mainly from denser regions, which tend to show a higher estimation confidence. To reduce this bias in the pseudo-label generation, we propose a revised self-training scheme that not only balances based on the overall class-wise distribution, but also on range. We call our method class-range-balanced (CRB) pseudo-labeling and provide a visual sample in Fig. 5 comparing it to CB-ST. + +We initially coarsely divide the transverse plane into $R$ annuli of width $B$ centered around the ego-vehicle. In + +![](images/2b7a5b83c5233d7d83814c2259df045ac6ae6daabff805784e4b275d89d49dfe.jpg) +Figure 5. Visual comparison of $(50\%)$ (a) class-balanced pseudolabeling [59] and (b) proposed CRB. As seen right, generated pseudo-labels lack distant sparse region representation when balancing solely on class. Red lines For the quantitative analysis, see Tab. 4. + +Fig. 5.b we illustrate the first three in red dashed lines. Each annulus contains points that fall between a range of distances, from which we pseudo-label the globally highest confident predictions on a per-class basis. This ensures that we obtain reliable labels while distributing them proportionally across varying ranges and across all classes. + +We redefine the self-training objective function (Eq.4) to include CRB as: + +$$ +\begin{array}{l} \min _ {\theta , \hat {\mathbf {y}}} \sum_ {f = 1} ^ {F} \sum_ {i = 1} ^ {| P _ {f} |} \left[ G _ {i, f} - \sum_ {c = 1} ^ {C} \sum_ {r = 1} ^ {R} F _ {i, f, c, r} \right] \\ F _ {i, f, c, r} = \left\{ \begin{array}{l} \left(\log \left(\hat {\mathcal {Y}} _ {f, i} ^ {(c)} \right| _ {\theta^ {\mathrm {E M A}}}\right) + k ^ {(c, r)}) \hat {\mathcal {Y}} _ {f, i} ^ {(c)}, \\ \text {i f} r = \lfloor | | (p _ {x, y}) _ {f, i} | | / B \rfloor \\ 0, \text {o t h e r w i s e} \end{array} \right. \tag {5} \\ \end{array} +$$ + +with $k^{(c,r)}$ denoting the negative log-threshold for a class-annulus pairing. To solve the nonlinear integer optimization task, we employ the following solver: + +$$ +\hat {y} _ {f, i} ^ {(c) *} = \left\{ \begin{array}{l} 1, \text {i f} c = \operatorname {a r g m a x} \hat {y} _ {f, i} | _ {\theta^ {\mathrm {E M A}}}, \\ \quad \hat {y} _ {f, i} | _ {\theta} > \exp (- k ^ {(c, r)}) \\ \text {w i t h} r = \lfloor | | (p _ {x, y}) _ {f, i} | | / B \rfloor \\ 0, \text {o t h e r w i s e} \end{array} \right. \tag {6} +$$ + +When determining $k^{(c,r)}$ , we take the maximum output probability of each point, i.e. the networks confidence for the predicted label, and store the confidence values of all points in all frames for each class-annulus pairing in a global vector. Each vector is then sorted in descending order. We define a hyperparameter $\beta$ which determines the percentage of pseudo-labels to be sampled, and find a threshold confidence for each vector by taking the value at index $\beta$ times the vectors length. $k^{(c,r)}$ is set as the negative logarithm of the threshold confidence. The process is summarized in Algorithm 1. + +Algorithm 1: Determination of $k$ in CRB +Input: Dataset containing $F$ point clouds, trained neural network $\phi$ , annulus count $R$ , portion $\beta$ of selected pseudo-labels +1 for $f = 1:F$ do +2 value, class = max $(\phi(P_f), \text{axis} = 0)$ +3 B = max $(\sqrt{P_f[(:,0]^2 + P_f[(:,1]^2)} / R)$ +4 range = $\sqrt{P_f[(:,0]^2 + P_f[(:,1]^2)} // B$ +5 for $c = 1:C$ do +6 mask_c = (class == c) +7 for $r = 1:R$ do +8 mask_r = (range == r) +9 M(c,r,f) = value[mask_c & mask_r] +10 M(c,r) = [M(c,r), M(c,r,f)] +11 for $c = 1:C$ do +12 for $r = 1:R$ do +13 M(c,r) = sort(M(c,r), order=descending) +14 thresh = $\beta\cdot$ length(M(c,r)) +15 k(c,r) = -log(M(c,r)[:thresh]) +Return: $k = [k^{(0,0)}, \ldots, k^{(c,r)}]$ + +# 4.3. Pyramid Local Semantic-context (PLS) + +With self-training, the performance of the final network (Sec. 4.2, training) is highly reliant on the pseudo-label quality. To ensure higher quality pseudo-labels, we further introduce a novel descriptor to enrich the features of the initial points by utilizing available scribbles. + +We make the following two observations for the distribution of semantic classes in 3D space: (1) There exists a spatial smoothness constraint, i.e. a point in space is likely have the same class label as at least one of its neighbors since objects have nonzero dimensions; (2) There exists a semantic pattern constraint, i.e. a set of complex high-level rules governing inter-class spatial relations. For example, in outdoor autonomous driving scenes, vehicles lie on ground classes such as roads and parking areas, pedestrians often appear on sidewalks, buildings and vegetation outline roads. + +We therefore argue that a local semantic prior can be used as a rich point descriptor to encapsulate the two stated cues. We propose using local semantic-context at scaling resolutions to reduce the ambiguity when propagating information between the labeled-unlabeled point sets and to improve pseudo-labeling quality. We identify that the distribution of class labels over global coordinates is a robust, compact semantic descriptor, especially for unlabeled points. + +We initially discretize the space into coarse voxels. This step is crucial as to avoid over-descriptive features that cause the network to overfit to the scribble annotations, reducing its capability to generalize well and understand + +![](images/05e787937cc21e2b576aec3a9b7e76b5de7bfc40ebf215fdb68aeca3f6833e10.jpg) +Figure 6. Illustration of pyramid local semantic-context (PLS) augmentation based on scribble ground-truth (not to scale). As seen, the semantic-context can provide highly descriptive information about the local neighborhood of a point at scaling resolutions. + +meaningful geometric relations. We use multiple sizes of bins in cylindrical coordinates in order to follow the inherent point distribution of the LiDAR sensor at different resolutions. For each bin $b_{i}$ we compute a coarse histogram: + +$$ +\mathbf {h} _ {i} = \left[ h _ {i} ^ {(1)}, \dots , h _ {i} ^ {(C)} \right] \in \mathbb {R} ^ {C} +$$ + +$$ +h _ {i} ^ {(c)} = \# \left\{y _ {j} = c \forall j \mid p _ {j} \in b _ {i} \right\} +$$ + +as illustrated in Fig. 6. The pyramid local semantic-context (PLS) of all points $p_j \in b_i$ is then defined as the concatenation of the normalized histograms: + +$$ +\mathrm {P L S} = \left[ \mathbf {h} _ {i} ^ {1} / \operatorname * {m a x} \left(\mathbf {h} _ {i} ^ {1}\right), \dots , \mathbf {h} _ {i} ^ {s} / \operatorname * {m a x} \left(\mathbf {h} _ {i} ^ {s}\right) \right] \in \mathbb {R} ^ {s C} \tag {8} +$$ + +for $s$ resolutions. We append PLS to the input features and redefine the input LiDAR point cloud as the augmented set of points $P_{aug} = \{p\mid p = (x,y,z,I,\mathrm{PLS})\in \mathbb{R}^{4 + sC}\}$ . When optimizing Eq. 5, during the training step (Sec. 4.2) we substitute $P$ with $P_{aug}$ such that we generate better quality pseudo-labels during pseudo-labeling. + +At the end of the self-training pipeline, we require one extra distillation stage because PLS augmentation cannot be used during test-time as the scribble-information is not available. During distillation, we again set the input point cloud to $P$ . The resulting three stages of the overall pipeline is illustrated in Fig. 4. + +# 5. Experiments + +We carry out our experiments using Cylinder3D [57] but forego the applied test-time-augmentation (TTA) and test the performance on the fully annotated SemanticKITTI [5] valid-set unless stated otherwise. Alongside the mean-Intersection-over-Union (mIoU), we also provide the relative performance of scribble-supervised (SS) training to the fully supervised upper-bound (FS) in percentages (SS/FS). + +Implementation Details: For MT we set $\alpha = 0.99$ . For CRB, we define $R = 10$ annuli. For PLS, we divide $(r,\phi)$ into (20,40), (40,80) and (80,120) voxels. We only apply one iteration of self-training $(\beta = 50\%)$ as we don't observe a significant increase in performance in consecutive steps. + +# 5.1. Results + +We present the 3D semantic segmentation results from the SemanticKITTI valid-set in Tab. 1 for three state-of-the-art networks (Cylinder3D [57], MinkowskiNet [11], SPVCNN [41]) to demonstrate the model independence of our approach. For the training schedule and architecture details, please refer to the respective publications. In Fig. 7 we present visual results using Cylinder3D. + +Due to the lack of available supervision, the three presented models trained on scribble-annotations show a relative performances (SS/FS) of $88.6\%$ , $90.0\%$ and $89.2\%$ compared to their respective fully supervised upper-bound. While the reduction in the number of supervised points reduce the class-wise performance across the board, this effect is further amplified for long tailed classes such as bicycle, truck and other-vehicle. + +By applying our proposed pipeline for scribblesupervised LiDAR semantic segmentation, we are able to reduce the gap between the two training strategies significantly, reaching $95.3\%$ $95.7\%$ $95.3\%$ relative performance for all three models. As observed, the major performance gains originate from the same long tailed classes that initially show a deficit against their respective baselines. + +# 5.2. Ablation Studies + +Scribbles as Annotations: We compare our proposed labeling strategy of weakly labeling all frames to fully labeling partial frames under a fixed labeling budget in Tab. 2 and present the results for both Cylinder3D [57] and Sup-only, the baseline U-Net model employed in Semi-sup [18]. As seen, both models perform significantly better using scribble annotations compared to having full annotations on $10\%$ of the train-set by up to $+10.2\%$ and $+11.1\%$ mIoU. + +Furthermore in Tab. 2, we also compare the current state-of-the-art on semi-supervised LiDAR semantic segmentation with our proposed scribble-supervised approach. Semi-sup [18] which further makes use of the $90\%$ unlabeled frames still shows a $5.1\%$ lower mIoU performance than a its baseline Semi-sup trained on scribble-annotations. Moreover, the same baseline model trained with our proposed pipeline further increases the gap to $8.6\%$ . + +Effects of Network Components: We perform ablation studies to investigate the effects of the different components of our proposed pipeline for scribble-supervised LiDAR semantic segmentation. We report the performance on the SemanticKITTI train-set for intermediate steps, as this metric provides an indication of the pseudo-labeling quality, and + +![](images/59737c30c50493abc8d8e97d83d208a2567a9e9c7a7b66b9317ad7ca47a181f9.jpg) + +![](images/335ee0f62a9078a131c4f78408c51e401d5177e95a6be2bb0cc38fbb39849e71.jpg) +Figure 7. Example results from the SemanticKITTI valid-set comparing (a) the ground truth frame; to Cylinder3D [57] trained (b) scribble-supervised, and (c) scribble-supervised using our proposed pipeline. + +![](images/821f2eca6bb0012cd252a912607732d3feafc3fb5c9bb584084b172077fc5625.jpg) + +![](images/a18c74f3e1162213537ef3128e08e88062512bed09ae171a76f65caf96c7c8c8.jpg) + +![](images/584a31b5c3de12cbec179e9561ca1098193d11361044d2d3827f03e2f2b1690f.jpg) + +![](images/b295529c2ac0cb24c10bd70fa43e0c1a6f0c77a76a44fd0f65fd34981f76dca7.jpg) + +on the valid-set to assess the performance benefits of each individual component. + +As seen in Tab. 3, by adding a weak form of supervision to the unlabeled point set via MT, we observe a $2.3\%$ increase in mIoU, which alone reduces the relative performance drop of scribble-supervised training below $10\%$ . However the fully labeled training performance does not increase significantly. Applying CRB-ST at this point yields an mIoU of $60.6\%$ . Using PLS, we can further increase the training mIoU by $8.0\%$ , which has the benefit of boosting pseudo-labeling accuracy from $98.1\%$ to $99.0\%$ and improving mIoU performance in the subsequent step of the self-training protocol. Self-training with CRB pseudolabeling now yields a further $0.6\%$ increase in mIoU. + +Pseudo-label Filtering for Self-training: We perform further ablation studies on the pseudo-labeling strategy used in the proposed self-training (ST) protocol and report the results in Tab. 4. We replace our proposed CRB pseudolabeling module with naive sampling (where all predictions are taken as pseudo-labels), threshold-based sampling [8, 49, 58], class-balanced sampling (CB) [59] and DARS [16]. For all given strategies we use the same input predictions generated from the PLS augmented MT. + +Due to the long-tailed nature of outdoor LiDAR scenes for semantic segmentation, CB and DARS show great improvements over naive and threshold based sampling strategies with improvements of up to $+1.7\%$ . Here we observe that in 3D semantic segmentation, the confidence overlapping is not as prevalent as in 2D. Applying DARS on CB generated pseudo-labels results in a reduction of only $1.8\%$ data points on the entire train-set with $\beta = 50\%$ (at most $2.4\%$ for head classes). Therefore both CB and DARS per + +
ModelSupervisionOursmIoUSS/FFcarbicyclemotorcycletruckother vehiclepersonbicyclistmotorcyclistroadparkingsidewalkother groundbuildingfencevegetationtrunkterrainpoletraffic sign
Cylinder3D [57]fully64.3-96.349.869.484.350.671.988.00.094.439.480.90.190.558.988.168.175.563.250.2
scribble57.088.688.539.958.058.448.168.677.00.584.430.472.22.589.448.481.964.659.861.248.7
scribble✓61.395.391.041.158.185.557.171.780.90.087.235.174.63.388.851.586.368.070.763.449.5
MinkowskiNet [11]fully61.1-95.720.463.970.345.565.078.50.093.549.681.00.291.163.887.268.572.364.449.1
scribble55.090.088.113.255.172.336.961.377.10.083.432.771.00.390.050.084.166.665.861.635.2
scribble✓58.595.791.123.859.066.358.665.275.20.083.836.172.40.790.251.886.768.572.562.546.6
SPVCNN [41]fully63.8-97.135.264.672.764.369.782.50.293.550.881.00.391.163.589.266.177.264.149.4
scribble56.989.288.625.755.967.448.865.078.20.082.630.470.10.390.549.684.467.666.161.648.7
scribble✓60.895.391.135.357.271.163.870.081.30.084.637.972.90.090.054.087.471.173.064.050.5
+ +Table 1. 3D semantic segmentation results evaluated on the SemanticKITTI valid-set. Alongside the per-class metrics we show the relative performance of the scribble supervised approach against the fully supervised (SS/FS). + +
ModelLabeled VolumeTypeUnlabeled UsedValid mIoU
Cylinder3D [57]10% framesfully46.8
Cylinder3D [57]8% pointsscribbles57.0
Sup-only [18]10% framesfully43.9
Sup-only [18]8% pointsscribbles55.0
Semi-sup [18]10% framesfully✓49.9
Sup-only+Ours8% pointsscribbles✓58.5
+ +Table 2. Compared are different annotation strategies for incomplete supervision. Sup-only refers to the baseline sparse U-Net model employed by Semi-sup [18]. $10\%$ frames fully labeled correspond to $10.06\%$ annotated points. + +
MethodTrain mIoUValid mIoUSS/FS
BaselineMTCRB-STPLS
✓77.657.088.6
✓✓78.059.392.2
✓✓✓-60.694.2
✓✓✓86.0--
✓✓✓✓-61.395.3
+ +form similarly at $60.8\%$ on the valid-set. After applying further balancing on range with our proposed CRB, we observe an improvement of $+0.5\%$ over CB, reaching a relative performance of $95.3\%$ to fully-supervised. + +Consistency-loss within Mean Teacher: We perform further ablation studies on the consistency loss within the mean teacher framework and compare our partial application on unlabeled points to the application on all points [52]. + +As seen in Tab. 5, the difference between the two losses is negligible when training with scribble annotations. Scribbles only account for roughly $8\%$ of the total point count, therefore the loss is mainly dominated by the unsupervised points in either setting. However, when training on generated pseudo-labels, we observe that the teacher network + +Table 3. Ablation study on proposed methods. PLS results are given after the first iteration, while CRB-ST results are given after the last iteration. Performances are reported on the SemanticKITTI train- and valid-sets respectively, along with the relative performance against fully supervised (SS/FS). + +
Pseudo-labeling MethodLabelingValid
βAccmIoUSS/FS
Naive-86.359.492.4
Threshold-based [8, 49, 58]50%99.059.191.9
Class-balanced [59]50%99.460.894.6
DARS [16]50%99.360.894.6
CRB (Ours)50%99.061.395.3
+ +Table 4. Ablation study on the pseudo-labeling strategies comparing naive (all predictions), threshold-based, class-balanced labeling and DARS with our proposed CRB. $\beta$ determines the percentage of labeled points. Performances are reported on the SemanticKITTI valid-set. All methods use the same initial labels. + +
Consistency-lossScribbleCRB-PL (50%)
mIoUSS/FSmIoUSS/FS
All points [52]59.191.960.493.9
Partial (Ours)59.392.261.395.3
+ +Table 5. Compared is the application of the consistency-loss on all points [52] to our proposed partial application on only unlabeled points. We conduct experiments using the mean teacher pipeline with scribble annotations (8%) and CRB pseudo-labels (50%). + +can inject uncertainties to labeled points, weakening the introduced supervision from the pseudo-labels and causing a decrease in mIoU of $0.9\%$ . + +# 6. Conclusion + +We have presented a weakly-supervised pipeline for Li-DAR semantic segmentation based on scribble annotations. Our pipeline comprises of three stand-alone contributions that can be combined with any LiDAR semantic segmentation model to reduce the gap between fully-supervised and scribble-supervised training. + +Limitations: We only annotate the train-split of SemanticKITTI [5]. We haven't applied our method to different datasets and LiDAR sensors due to annotation cost. + +Acknowledgements: Special thanks to Zeynep Demirkol and Tim Brodermann for their efforts during annotation. + +# References + +[1] Jiwoon Ahn and Suha Kwak. Learning pixel-level semantic affinity with image-level supervision for weakly supervised semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 1 +[2] Yara Ali Alnaggar, Mohamed Affifi, Karim Amer, and Mohamed ElHelw. Multi projection fusion for real-time semantic segmentation of 3d lidar point clouds. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 1800-1809, 2021. 2 +[3] Inigo Alonso, Luis Riazuelo, Luis Montesano, and Ana C Murillo. 3d-mininet: Learning a 2d representation from point clouds for fast and efficient 3d lidar semantic segmentation. IEEE Robotics and Automation Letters, 5(4):5432-5439, 2020. 2 +[4] Eric Arazo, Diego Ortego, Paul Albert, Noel E O'Connor, and Kevin McGuinness. Pseudo-labeling and confirmation bias in deep semi-supervised learning. In 2020 International Joint Conference on Neural Networks (IJCNN), pages 1-8. IEEE, 2020. 2 +[5] 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/CVF International Conference on Computer Vision, pages 9297-9307, 2019. 1, 3, 6, 8 +[6] David Berthelot, Nicholas Carlini, Ian Goodfellow, Nicolas Papernot, Avital Oliver, and Colin Raffel. Mixmatch: A holistic approach to semi-supervised learning. arXiv preprint arXiv:1905.02249, 2019. 4 +[7] Yigit B Can, Krishna Chaitanya, Basil Mustafa, Lisa M Koch, Ender Konukoglu, and Christian F Baumgartner. Learning to segment medical images with scribblesupervision alone. In Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support, pages 236-244. Springer, 2018. 1, 2 +[8] Paola Cascante-Bonilla, Fuwen Tan, Yanjun Qi, and Vicente Ordonez. Curriculum labeling: Revisiting pseudolabeling for semi-supervised learning. arXiv preprint arXiv:2001.06001, 2020. 2, 7, 8 +[9] Hongjun Chen, Jinbao Wang, Hong Cai Chen, Xiantong Zhen, Feng Zheng, Rongrong Ji, and Ling Shao. Seminar learning for click-level weakly supervised semantic segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 6920-6929, October 2021. 2 +[10] Mingmei Cheng, Le Hui, Jin Xie, and Jian Yang. Sspc-net: Semi-supervised semantic 3d point cloud segmentation network. arXiv preprint arXiv:2104.07861, 2021. 2 +[11] Christopher Choy, JunYoung Gwak, and Silvio Savarese. 4d spatio-temporal convnets: Minkowski convolutional neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3075-3084, 2019. 2, 7, 8 +[12] Tiago Cortinhal, George Tzelepis, and Eren Erdal Aksoy. Salsanext: Fast, uncertainty-aware semantic segmentation of + +lidar point clouds. In International Symposium on Visual Computing, pages 207-222. Springer, 2020. 2 +[13] Wenhui Cui, Yanlin Liu, Yuxing Li, Menghao Guo, Yiming Li, Xiuli Li, Tianle Wang, Xiangzhu Zeng, and Chuyang Ye. Semi-supervised brain lesion segmentation with an adapted mean teacher model. In International Conference on Information Processing in Medical Imaging, pages 554-565. Springer, 2019. 2 +[14] Jifeng Dai, Kaiming He, and Jian Sun. Boxsup: Exploiting bounding boxes to supervise convolutional networks for semantic segmentation. In Proceedings of the IEEE international conference on computer vision, pages 1635-1643, 2015. 1 +[15] 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. 3 +[16] Ruifei He, Jihan Yang, and Xiaojuan Qi. Re-distributing biased pseudo labels for semi-supervised semantic segmentation: A baseline investigation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6930-6940, 2021. 2, 7, 8 +[17] 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. 2 +[18] Li Jiang, Shaoshuai Shi, Zhuotao Tian, Xin Lai, Shu Liu, Chi-Wing Fu, and Jiaya Jia. Guided point contrastive learning for semi-supervised point cloud semantic segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 6423-6432, October 2021. 2, 7, 8 +[19] Jongmok Kim, Jooyoung Jang, and Hyunwoo Park. Structured consistency loss for semi-supervised semantic segmentation. arXiv preprint arXiv:2001.04647, 2020. 4 +[20] Deyvid Kochanov, Fatemeh Karimi Nejadasl, and Olaf Booij. Kprnet: Improving projection-based lidar semantic segmentation. arXiv preprint arXiv:2007.12668, 2020. 2 +[21] Alexander Kolesnikov and Christoph H Lampert. Seed, expand and constrain: Three principles for weakly-supervised image segmentation. In European conference on computer vision, pages 695-711. Springer, 2016. 2 +[22] Hyeonsoo Lee and Won-Ki Jeong. Scribble2label: Scribblesupervised cell segmentation via self-generating pseudolabels with consistency. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 14-23. Springer, 2020. 1, 2 +[23] Hongyan Li, Zhengxing Sun, Yunjie Wu, and Youcheng Song. Semi-supervised point cloud segmentation using self-training with label confidence prediction. Neurocomputing, 437:227-237, 2021. 2 +[24] Di Lin, Jifeng Dai, Jiaya Jia, Kaiming He, and Jian Sun. Scribblesup: Scribble-supervised convolutional networks for semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3159-3167, 2016. 1, 2, 3, 5 + +[25] Venice Erin Liong, Thi Ngoc Tho Nguyen, Sergi Widjaja, Dhananjai Sharma, and Zhuang Jie Chong. Amvnet: Assertion-based multi-view fusion network for lidar semantic segmentation. arXiv preprint arXiv:2012.04934, 2020. 2 +[26] Xiaoming Liu, Quan Yuan, Yaozong Gao, Kelei He, Shuo Wang, Xiao Tang, Jinshan Tang, and Dinggang Shen. Weakly supervised segmentation of COVID19 infection with scribble annotation on ct images. Pattern recognition, 122:108341, 2022. 2 +[27] Yen-Cheng Liu, Chih-Yao Ma, Zijian He, Chia-Wen Kuo, Kan Chen, Peizhao Zhang, Bichen Wu, Zsolt Kira, and Peter Vajda. Unbiased teacher for semi-supervised object detection. arXiv preprint arXiv:2102.09480, 2021. 3 +[28] Luke Melas-Kyriazi and Arjun K Manrai. Pixmatch: Unsupervised domain adaptation via pixelwise consistency training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12435-12445, 2021. 4 +[29] Qinghao Meng, Wenguan Wang, Tianfei Zhou, Jianbing Shen, Luc Van Gool, and Dengxin Dai. Weakly supervised 3d object detection from lidar point cloud. In European Conference on Computer Vision (ECCV), 2020. 2 +[30] Andres Milioto, Ignacio Vizzo, Jens Behley, and Cyril Stachniss. Rangenet++: Fast and accurate lidar semantic segmentation. In 2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 4213-4220. IEEE, 2019. 2 +[31] G Papandreou, LC Chen, K Murphy, and AL Yuille. Weakly-and semi-supervised learning of a dcnn for semantic image segmentation. arxiv 2015. arXiv preprint arXiv:1502.02734. 1 +[32] Deepak Pathak, Philipp Krahenbuhl, and Trevor Darrell. Constrained convolutional neural networks for weakly supervised segmentation. In Proceedings of the IEEE international conference on computer vision, pages 1796-1804, 2015. 2 +[33] Christian S Perone and Julien Cohen-Adad. Deep semi-supervised segmentation with weight-averaged consistency targets. In Deep learning in medical image analysis and multimodal learning for clinical decision support, pages 12–19. Springer, 2018. 2 +[34] Boris T Polyak and Anatoli B Juditsky. Acceleration of stochastic approximation by averaging. SIAM journal on control and optimization, 30(4):838-855, 1992. 4 +[35] 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. 2 +[36] 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. 2 +[37] Ruobing Shen, Thomas Guthier, Hyundai Mobis, Bo Tang, and Ismail Ben Ayed. Scribble supervised annotation algorithms of panoptic segmentation for autonomous driving. In Proc. NeurIPS Workshop Mach. Learn. Auton. Driving, 2019. 2 + +[38] Zhenyu Shu, Xiaoyong Shen, Shiqing Xin, Qingjun Chang, Jieqing Feng, Ladislav Kavan, and Ligang Liu. Scribble-based 3d shape segmentation via weakly-supervised learning. IEEE Transactions on Visualization and Computer Graphics, 26(8):2671-2682, 2020. 2, 5 +[39] 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. arXiv preprint arXiv:2001.07685, 2020.4 +[40] Li Tan, WenFeng Luo, and Meng Yang. Weakly-supervised semantic segmentation with mean teacher learning. In International Conference on Intelligent Science and Big Data Engineering, pages 324-335. Springer, 2019. 2, 4 +[41] Haotian* Tang, Zhijian* Liu, Shengyu Zhao, Yujun Lin, Ji Lin, Hanrui Wang, and Song Han. Searching efficient 3d architectures with sparse point-voxel convolution. In European Conference on Computer Vision, 2020. 1, 2, 7, 8 +[42] Meng Tang, Federico Perazzi, Abdelaziz Djelouah, Ismail Ben Ayed, Christopher Schroers, and Yuri Boykov. On regularized losses for weakly-supervised cnn segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 507-522, 2018. 3 +[43] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. arXiv preprint arXiv:1703.01780, 2017. 2, 4 +[44] Hugues Thomas, Charles R Qi, Jean-Emmanuel Deschaud, Beatz Marcotegui, François Goulette, and Leonidas J Guibas. Kpconv: Flexible and deformable convolution for point clouds. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6411–6420, 2019. 2 +[45] Ozan Unal, Luc Van Gool, and Dengxin Dai. Improving point cloud semantic segmentation by learning 3d object detection. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 2950-2959, 2021. 1, 2 +[46] Xiang Wang, Shiwei Zhang, Zhiwu Qing, Yuanjie Shao, Changxin Gao, and Nong Sang. Self-supervised learning for semi-supervised temporal action proposal. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 1905-1914, June 2021. 4 +[47] 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 +[48] 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 +[49] 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. 2, 7, 8 + +[50] Chenfeng Xu, Bichen Wu, Zining Wang, Wei Zhan, Peter Vajda, Kurt Keutzer, and Masayoshi Tomizuka. Squeeze-segv3: Spatially-adaptive convolution for efficient pointcloud segmentation. In European Conference on Computer Vision, pages 1-19. Springer, 2020. 2 +[51] Jianyun Xu, Ruixiang Zhang, Jian Dou, Yushi Zhu, Jie Sun, and Shiliang Pu. Rpvnet: A deep and efficient range-point-voxel fusion network for lidar point cloud segmentation. arXiv preprint arXiv:2103.12978, 2021. 2 +[52] 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 (CVPR), June 2020. 2, 8 +[53] 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. 2 +[54] Dong Zhang, Bo Chen, Jaron Chong, and Shuo Li. Weakly-supervised teacher-student network for liver tumor segmentation from non-enhanced images. Medical Image Analysis, 70:102005, 2021. 2 +[55] Feihu Zhang, Jin Fang, Benjamin Wah, and Philip Torr. Deep fusionnet for point cloud semantic segmentation. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XXIV 16, pages 644-663. Springer, 2020. 2 +[56] Yachao Zhang, Yanyun Qu, Yuan Xie, Zonghao Li, Shanshan Zheng, and Cuihua Li. Perturbed self-distillation: Weakly supervised large-scale point cloud semantic segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 15520-15528, October 2021. 2 +[57] Xinge Zhu, Hui Zhou, Tai Wang, Fangzhou Hong, Yuexin Ma, Wei Li, Hongsheng Li, and Dahua Lin. Cylindrical and asymmetrical 3d convolution networks for lidar segmentation. arXiv preprint arXiv:2011.10033, 2020. 1, 2, 6, 7, 8 +[58] Barret Zoph, Golnaz Ghiasi, Tsung-Yi Lin, Yin Cui, Hanxiao Liu, Ekin D Cubuk, and Quoc V Le. Rethinking pre-training and self-training. arXiv preprint arXiv:2006.06882, 2020. 2, 7, 8 +[59] Yang Zou, Zhiding Yu, B.V.K. Vijaya Kumar, and Jinsong Wang. Unsupervised domain adaptation for semantic segmentation via class-balanced self-training. In Proceedings of the European Conference on Computer Vision (ECCV), September 2018. 2, 5, 7, 8 \ No newline at end of file diff --git a/scribblesupervisedlidarsemanticsegmentation/images.zip b/scribblesupervisedlidarsemanticsegmentation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..613a59bc02c589d7c7df261a0d495a77e026cdb6 --- /dev/null +++ b/scribblesupervisedlidarsemanticsegmentation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:101f451edc2409ce390b1312ffab2f463638f0041839a3f41b8ede429ea40515 +size 819021 diff --git a/scribblesupervisedlidarsemanticsegmentation/layout.json b/scribblesupervisedlidarsemanticsegmentation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3872f42e2b6429c4ba749e58322423cd6d6b1d36 --- /dev/null +++ b/scribblesupervisedlidarsemanticsegmentation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14df5b26b9eb3f97bbbbdc99e917e1b801fd2f968cf37d8f05938995efaf6978 +size 452385 diff --git a/scscoselfconsistentstylecontrastivelearningforimageharmonization/60bc627f-9bcd-46e2-84a9-6020bab5b1e3_content_list.json b/scscoselfconsistentstylecontrastivelearningforimageharmonization/60bc627f-9bcd-46e2-84a9-6020bab5b1e3_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a7425e02a3450a7da700cbc1898040db287ce5b2 --- /dev/null +++ b/scscoselfconsistentstylecontrastivelearningforimageharmonization/60bc627f-9bcd-46e2-84a9-6020bab5b1e3_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a79bc3b0b652c9c7abd716edf68ee31f78cb0b0340903e99720926d566033342 +size 88684 diff --git a/scscoselfconsistentstylecontrastivelearningforimageharmonization/60bc627f-9bcd-46e2-84a9-6020bab5b1e3_model.json b/scscoselfconsistentstylecontrastivelearningforimageharmonization/60bc627f-9bcd-46e2-84a9-6020bab5b1e3_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4795309fd40edd8f780b9b644f2653473611177c --- /dev/null +++ b/scscoselfconsistentstylecontrastivelearningforimageharmonization/60bc627f-9bcd-46e2-84a9-6020bab5b1e3_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5014cf38652d105872c8d092b762614990d158b27b4fce7f8187e3d50ab09fa0 +size 107518 diff --git a/scscoselfconsistentstylecontrastivelearningforimageharmonization/60bc627f-9bcd-46e2-84a9-6020bab5b1e3_origin.pdf b/scscoselfconsistentstylecontrastivelearningforimageharmonization/60bc627f-9bcd-46e2-84a9-6020bab5b1e3_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ad2680e4911e6dddea82dd90ddf6d75c92c2f7fa --- /dev/null +++ b/scscoselfconsistentstylecontrastivelearningforimageharmonization/60bc627f-9bcd-46e2-84a9-6020bab5b1e3_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e7472344999822e280aa5569a39ca66ee9c8655385c18c6b390661d177a27ad +size 3349453 diff --git a/scscoselfconsistentstylecontrastivelearningforimageharmonization/full.md b/scscoselfconsistentstylecontrastivelearningforimageharmonization/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f083ed534f8169ffcf65f48e1f01271c8b079bb2 --- /dev/null +++ b/scscoselfconsistentstylecontrastivelearningforimageharmonization/full.md @@ -0,0 +1,437 @@ +# SCS-Co: Self-Consistent Style Contrastive Learning for Image Harmonization + +Yucheng Hang $^{1,\ast}$ , Bin Xia $^{1,\ast}$ , Wenming Yang $^{1,2,\dagger}$ , Qingmin Liao $^{1,2}$ + +1 Shenzhen International Graduate School, Tsinghua University, China + +$^{2}$ Department of Electronic Engineering, Tsinghua University, China + +{hangyc20, xiab20}@mails.tsinghua.edu.cn, {yang.wenming, liaoqm}@sz.tsinghua.edu.cn + +![](images/4d94d1817c88c6fa1701787b4af8020a0f9516675ae7688225f49dd6d94366d8.jpg) +(a) Composite + +![](images/366655bab294b5b88cb0169d3f7e114ad36ce7b2cde92a66182e63a7b3c421e8.jpg) + +![](images/e057784531d413227ff9359e24dd05d940b1b28d420ecf246a307f8b2049ec3f.jpg) +(b) DoveNet [5] + +![](images/da3b5655dd9861c7d8ddda174396d92376e6335e8f86f5f55e15b4353b4602d5.jpg) + +![](images/352009550f56fd12068415879b826d0c1fd13cdd19b0100a3cf881b6db4410c8.jpg) +(c) iS² AM [35] +Figure 1. Comparison with other methods. Thanks to the proposed SCS-Co, our method can obtain more explicit distortion knowledge from dynamically generated negative samples, and further jointly constrain the solution space from two aspects of the foreground self-style and foreground-background style consistency. Coupled with BAIN, our method produces a more photorealistic harmonized result. + +![](images/6eae96d1a3e5f871ee5688fd9502dd7cc8372df4a38131ce9cc48df4fb5c8ff2.jpg) + +![](images/f8182413a1aa393efa0289c0871199761cb6fc4b58aa46afc9f181771f56779a.jpg) +(d) RainNet [24] + +![](images/c6a16f014c676df93c3032797c7483ab8bec46228a5cc3fd7fcdd16e475e4fe9.jpg) + +![](images/165c947f70e5b0253f5f6862b045c8afc4f1f7842f8a25f6d5684f0348431ffc.jpg) +(e) Ours + +![](images/837a6647ff620eb8a870e2bda2ab09e2b6f5bc13001b97de5411a07a85b52db8.jpg) + +![](images/0569ec2f956c0d4fdc187fe4f63fdf1f61bb7175a870a49debefd8e3ecee38e3.jpg) +(f) Real (Ground Truth) + +# Abstract + +Image harmonization aims to achieve visual consistency in composite images by adapting a foreground to make it compatible with a background. However, existing methods always only use the real image as the positive sample to guide the training, and at most introduce the corresponding composite image as a single negative sample for an auxiliary constraint, which leads to limited distortion knowledge, and further causes a too large solution space, making the generated harmonized image distorted. Besides, none of them jointly constrain from the foreground self-style and foreground-background style consistency, which exacerbates this problem. Moreover, recent region-aware adaptive instance normalization achieves great success but only considers the global background feature distribution, making the aligned foreground feature distribution biased. To address these issues, we propose a self-consistent style contrastive learning scheme (SCS-Co). By dynamically generating multiple negative samples, our SCS-Co can learn more distortion knowledge and well regularize the generated harmonized image in the style representation space from two aspects of the foreground self-style and foreground-background style consistency, leading to a + +more photorealistic visual result. In addition, we propose a background-attentional adaptive instance normalization (BAIN) to achieve an attention-weighted background feature distribution according to the foreground-background feature similarity. Experiments demonstrate the superiority of our method over other state-of-the-art methods in both quantitative comparison and visual analysis. + +# 1. Introduction + +Image composition is widely used in image editing [6, 45] and data augmentation [7, 46], which targets synthesizing a composite image by extracting the foreground of one image and pasting it on the background of another image. However, since the foreground and background appearance will be distinct due to different capture conditions, the composite image often looks unrealistic, i.e., suffers from the inharmony problem. Therefore, image harmonization, which aims to adjust the appearance of the foreground to make it compatible with the background in the composite image, is significant and challenging. + +Numerous deep learning-based methods have been proposed for image harmonization. However, most methods [6, 14, 15, 35, 39, 48] do not consider this problem from the perspective of visual style. Hence, they fail to ensure a visual style consistency between the foreground and the back + +ground [24]. Methods based on domain translation [4, 5] implicitly consider this problem from the perspective of domain-consistency, but do not directly transform the foreground feature in the generator. + +Recently, Ling et al. [24] explicitly introduce the concept of visual style and first regard image harmonization as a background-to foreground style transfer problem1. Inspired by AdaIN [18], they propose a region-aware adaptive instance normalization (RAIN) for image harmonization and achieve great success. However, as shown in Figure 1(d), the distortion still exists or even is very severe in some cases. + +We argue that two issues lead to the above dilemma: (1) Just like the problem with AdaIN, RAIN only considers the global style distribution in the background and aligns the foreground feature distribution with it. However, as a common intuition, areas in the background that feature-similar to the foreground need more attention. For example, in the first row of Figure 1, the foreground object reappears twice in the background. The model should pay more attention to the local style distributions of these two areas. (2) The second is a general issue, not limited to the style-based method, and is the core issue we want to solve. Most existing methods [6, 14, 15, 35, 39, 48] only use real images to guide the training via an $\mathcal{L}_1$ loss, which is too simple and cannot constrain the solution space well [42]. Toward this end, DoveNet [5] and RainNet [24] adopt a domain verification loss. However, it only regards the foreground-background feature similarity of the real/harmonized image as positive/negative, and the input composite image is not used, which contains important distortion knowledge. In other words, it is just a positive-orient constraint. In addition, since image harmonization aims to adjust the foreground, why not directly constrain the foreground feature? Considering the above problems, Cong et al. propose a triplet loss [4]. However, it directly pulls the foreground domain code to the background domain code, which is too strong and will be interfered by content information. One more important problem is that only using the input composite image as the negative sample, leading to limited external distortion knowledge [41, 42], and the learned feature distribution easily becomes biased [25, 41]. In summary, why not dynamically generate multiple negative samples and jointly constrain from the foreground self-style and foreground-background style consistency to obtain more distortion knowledge and reduce the solution space? + +Motivated by the observations and analyses above, we try to address these two issues. For the first issue, inspired by [26, 29], we propose a Background-attentional Adaptive Instance Normalization (BAIN). It can learn the feature similarity between the foreground and background, and cal + +![](images/bede0071b1057e9a4e22818328309eb15fc8ad1bfae13cfa43765bc2a867424f.jpg) +Figure 2. The illustration of our SCS-Co, including SCS-CR and the dynamic negative samples generation strategy. The detail of this strategy is shown in Figure 4. + +culate an attention-weighted style distribution of the background according to this feature similarity. Finally, the foreground feature distribution is aligned with this distribution. + +For the second issue, we attempt to solve it by considering the positive and negative relations simultaneously in the form of contrastive learning. Specifically, we propose a novel Self-Consistent Style Contrastive Learning Scheme (SCS-Co) (see Figure 2), including a Self-Consistent Style Contrastive Regularization (SCS-CR) and a Dynamic Negative Samples Generation Strategy (see Figure 4). For a composite image $\tilde{I}$ , we denote its corresponding harmonized image $\hat{I}$ and its ground truth real image $I$ as the anchor and positive sample, respectively. We also denote this composite image $\tilde{I}$ as the first negative sample $\tilde{I}_1^-$ . More negative samples with the same content but different distortions are achieved via our dynamic negative samples generation strategy. Then we try to pull the anchor sample closer to the positive sample and push the anchor sample away from negative samples in the style representation space. In detail, for more powerful constraint, we not only constrain from the foreground self-style representation, but also use the background style representation as guidance to constrain from the foreground-background style consistency. + +Our contributions are summarized as three-fold: + +- For the first time, we introduce contrastive learning to image harmonization. Our self-consistent style contrastive learning scheme (SCS-Co) can further improve the performance of existing image harmonization networks without any increase in model parameters. +- We develop a background-attentional adaptive instance normalization (BAIN). It learns a foreground-background feature similarity attention map and properly normalizes the foreground feature by the per-point attention-weighted background feature statistics. +- Extensive experiments prove that our method is powerful for image harmonization. Compared with other state-of-the-art methods, our method obtains superior results in both quantitative metrics and visual quality. + +![](images/3988c088226cc5a468af109fe2d36505259617e3ccc6686864c04b8358439f8e.jpg) +Figure 3. The architecture of our method, which consists of (a) image harmonization network, (b) self-consistent style contrastive regularization and (c) dynamic negative samples generation strategy. Please note that the first negative sample $\tilde{I}_1^-$ is the input composite image $\tilde{I}$ . (b) and (c) make up our self-consistent style contrastive learning scheme. + +# 2. Related Work + +Image Harmonization. Various approaches have been proposed for image harmonization. Traditional methods focus on better transferring hand-crafted low-level appearance statistics, such as color statistics [31, 32, 45], gradient information [19, 30, 37], multi-scale various statistics [36] between foreground and background regions. However, they could not address complex cases where the foreground image has a large appearance gap with the background image. With the advances of deep learning, more deep learning-based methods were proposed. To learn the differences between various low-level features in the composite images, Cun and Pun [6] design an additional spatial-separated attention module. In [39], they present an end-to-end CNN network for image harmonization and incorporate an auxiliary segmentation branch to use semantic information. Guo et al. [15] first model image harmonization based on intrinsic image theory and adopt an autoencoder to disentangle composite image into reflectance and illumination for separate harmonization. In [35], they combine pre-trained semantic segmentation models with encoder-decoder architectures for image harmonization. With the rise of Transformer, Guo et al. [14] design the first harmonization Transformer frameworks without and with disentangled representation. In [20], they propose the first self-supervised harmonization framework that needs neither human-annotated masks nor professionally created images for training. + +Arbitrary Style Transfer. Arbitrary style transfer is a technique used to render a photo with a particular visual + +style by synthesizing global and local style patterns from a given style image evenly over a content image while maintaining its original structure. Originating from nonrealistic rendering [22], earlier image style transfer methods are closely related to texture synthesis [8-10]. Adopting the success of deep learning, Gatys et al. first formulate style transfer as the matching of multi-level deep features extracted from a pre-trained deep neural network and achieve surprising performance [11]. Huang et al. create a novel way for real-time style transfer by matching the mean-variance statistics between content and style features (AdaIN) [18]. Afterwards, many methods are proposed [1, 13, 26, 43, 47]. However, as stressed in [24], these style transfer methods are not practical for our task because the style defined in our work is consistent with image realism instead of texture, and our task is region-aware, which otherwise will introduce new problems of feature shift. + +Contrastive Learning. Contrastive learning has demonstrated its effectiveness in self-supervised representation learning [3, 16, 17, 28, 33, 38, 44]. Instead of using a predefined and fixed target, contrastive learning aims to pull positive samples close to the anchor and push negative samples away in a representation space, increasing mutual information. However, different from high-level vision tasks [3, 12, 16, 17], which inherently suit for modeling the contrast between positive and negative samples, there are still few works applying contrastive learning to low-level vision tasks due to their difficulty in constructing negative samples and contrastive loss [40-42]. In this paper, specifically + +for image harmonization, we design a self-consistent style contrastive learning scheme. + +# 3. Our Method + +# 3.1. Problem Formulation + +Given a foreground image $I_{f}$ and a background image $I_{b}$ , the object composition process of the composition image can be formulated as $\tilde{I} = M \cdot I_{f} + (1 - M) \cdot I_{b}$ , where $\cdot$ is element-wise multiplication, $M$ is the foreground mask, which indicates the region to be harmonized, and therefore the background mask is $\bar{M} = 1 - M$ . Our goal is to learn a harmonization network $G$ , whose output is the harmonized image as $\hat{I} = G(\tilde{I}, M)$ and should be close to the ground truth real image $I$ by $\mathcal{L}_{rec} = \| I - \tilde{I}\|_{1}$ . + +# 3.2. Image Harmonization Network + +As shown in Figure 3(a), our network $G$ is based on U-Net with skip links from the encoder to the decoder. Their details can be found in supplementary. In addition, we propose a background-attentional adaptive instance normalization (BAIN) inserted between the encoder and decoder, which will be explained in detail in Section 3.4. + +# 3.3. Self-Consistent Style Contrastive Learning Scheme (SCS-Co) + +As shown in Figure 2, our SCS-Co contains SCS-CR and the dynamic negative samples generation strategy. In detail, SCS-CR consists of self-style contrastive regularization (SS-CR) and consistent style contrastive regularization (CSCR). We make it clear that self-style refers to the style of the foreground, and consistent style refers to the foreground-background style consistency. + +Formulation. For our SCS-Co, we need to resolve two key issues. One is to construct positive and negative samples. In our SCS-Co, we choose the harmonized image $\hat{I}$ generated by the image harmonization network $G$ and the corresponding real image $I$ as the anchor and the positive sample, respectively. The most important task is to construct negative samples. We can simply use the input composite image $\tilde{I}$ as the only negative sample. However, as emphasized in existing contrastive learning methods [3, 16], a large dictionary covering a rich set of negative samples is critical for good representation learning. Therefore, during the training process, for each input composite image $\tilde{I}$ , we generate $K$ negative samples online. Specifically, we propose a dynamic negative samples generation strategy. As shown in Figure 4, given an input composite image $\tilde{I}$ (Red box), we use it as the first negative sample $\tilde{I}_1^-$ . Then we get its corresponding real image $I$ and segment the foreground region $R_f$ according to the foreground mask $M$ . Afterwards, we sample $K - 1$ images (other than $\tilde{I}_1^-$ ) from + +![](images/27a68aa27d8401eaaaad83e4bdd24a8b50b876b57bed6f8ffe605899c139e26e.jpg) +Figure 4. The illustration of our dynamic negative samples generation strategy. Red box indicates the input composite image. Through this strategy, more negative samples with the same content but different distortions are obtained, which provide much distortion knowledge. + +the same mini-batch and segment their foreground regions. As suggested in [5, 39], we transfer the color information of these $K - 1$ foreground regions to $R_{f}$ respectively, leading to $K - 1$ negative samples. Finally, we successfully obtain $K$ negative samples, i.e., $\tilde{I}_k^-$ , $k = 1,2,3,\ldots,K$ . + +The other is to find the style representation space of these samples for contrast. We use a fixed pre-trained style representation extractor $R$ and introduce the foreground mask $M$ and the background mask $\bar{M} = 1 - M$ to obtain style representations for different regions. Specifically, we input $\hat{I}, I$ and $\tilde{I}_k^-, k = 1,2,3,\dots,K$ . Then we can obtain the anchor foreground style representation $f = R(\hat{I},M)$ , the positive foreground style representation $f^+ = R(I,M)$ , the positive background style representation $b^+ = R(I,\bar{M})$ , and negative foreground style representations $f_k^- = R(\tilde{I}_1^-,M), k = 1,2,3,\dots,K$ . + +Thus, SS-CR can be formulated as: + +$$ +\mathcal {L} _ {s s - c r} = \frac {D (f , f ^ {+})}{D (f , f ^ {+}) + \sum_ {k = 1} ^ {K} D (f , f _ {k} ^ {-})}, \tag {1} +$$ + +where $D(x,y) = \| x - y\| _1$ denotes the $\mathcal{L}_1$ distance between $x$ and $y$ . As shown in Figure 2, our SS-CR focuses on the foreground self-style, pulling $f$ closer to $f^{+}$ and pushing $f$ away from $\{f_k^-\}_{k = 1}^K$ . + +However, so far we have not used the background style representation, which is a powerful guidance for image harmonization [4]. Therefore, we further make contrastive constraints from the perspective of foreground-background style consistency. Specifically, we calculate the style consistency between $f$ and $b^{+}$ as $c = \operatorname{Gram}(f, b^{+})$ , where $\operatorname{Gram}(\cdot)$ means Gram Matrix [11]. Similarly, we can ob + +tain $c^+ = \operatorname{Gram}(f^+, b^+)$ , and $c_k^- = \operatorname{Gram}(f_k^-, b^+)$ , $k = 1, 2, 3, \ldots, K$ . + +Thus, CS-CR can be formulated as: + +$$ +\mathcal {L} _ {c s - c r} = \frac {D (c , c ^ {+})}{D (c , c ^ {+}) + \sum_ {k = 1} ^ {K} D (c , c _ {k} ^ {-})}, \tag {2} +$$ + +As shown in Figure 2, our CS-CR focuses on the foreground-background style consistency, pulling $c$ closer to $c^+$ and pushing $c$ away from $\{c_k^-\}_{k=1}^K$ . + +Finally, the total loss function for training is: + +$$ +\mathcal {L} _ {s c s - c r} = \mathcal {L} _ {s s - c r} + \mathcal {L} _ {c s - c r}, \tag {3} +$$ + +$$ +\mathcal {L} = \mathcal {L} _ {r e c} + \lambda \cdot \mathcal {L} _ {s c s - c r}. +$$ + +where $\lambda$ is a hyperparameter for balancing the reconstruction loss and SCS-CR. + +Difference with the triplet loss. Compared with the triplet loss [4], as shown in Figure 2, we use a contrastive learning framework. Our SCS-Co dynamically generates $K$ negative samples online and pushes the output harmonized image away from them. Through such multiple push operations, more powerful constraints can be performed in the representation space. In addition, our SCS-Co does not simply pull $f$ to $b^{+}$ , but constrains from the perspective of foreground-background style consistency. More experiments demonstrate our SCS-Co outperforms the triplet loss for image harmonization (see Section 4.3). + +# 3.4. Background-attentional Adaptive Instance Normalization (BAIN) + +**Formulation.** We illustrate the structure of BAIN in Figure 5. Let $F \in \mathbb{R}^{C \times H \times W}$ be the feature map produced by the encoder and $M \in \mathbb{R}^{1 \times H \times W}$ be the resized foreground mask, where $C, H, W$ indicate the number of channels, height, and width of $F$ , respectively. + +Specifically, in order to learn the foreground feature and background feature individually, we first separate the foreground feature map and background feature map with the corresponding mask: + +$$ +F _ {b} = F \cdot \bar {M}, \tag {4} +$$ + +$$ +F _ {f} = F \cdot M, +$$ + +where $F_{b}$ and $F_{f}$ are the background feature map and foreground feature map. Then, we adopt instance normalization to normalize $F_{b}$ and $F_{f}$ . The normalized foreground feature map $\bar{F}_f$ at site $(c,h,w)$ is computed by: + +$$ +\bar {F} _ {f} ^ {c, h, w} = \frac {F _ {f} ^ {c , h , w} - \mu_ {f} ^ {c}}{\sigma_ {f} ^ {c}}, \tag {5} +$$ + +where $\mu_f^c$ and $\sigma_f^c$ denote the channel-wise mean and standard variance of the foreground feature map. Similarly, we + +![](images/851fc64e28ad4756cd3b70e0a949e9366f4c62f3b669bad87b5b7ad0a2d88096.jpg) +Figure 5. Background-attentional Adaptive Instance Normalization (BAIN). + +can obtain the normalized background feature map $\bar{F}_b$ . Further, we transform $\bar{F}_f$ , $\bar{F}_b$ and $F_b$ into $Q$ (query), $K$ (key) and $V$ (value) as: + +$$ +Q = f \left(\bar {F} _ {f}\right), K = b \left(\bar {F} _ {b}\right), V = k \left(F _ {b}\right), \tag {6} +$$ + +where $f(\cdot), b(\cdot)$ and $k(\cdot)$ are $1 \times 1$ convolutions. Thus, the attention map $A \in \mathbb{R}^{HW \times HW}$ can be calculated as: + +$$ +A = \operatorname {S o f t m a x} \left(Q ^ {\top} \odot K\right), \tag {7} +$$ + +where $\odot$ indicates matrix multiplication. + +Then we calculate attention-weighted background expectation and standard variance respectively. The attention-weighted background expectation $E \in \mathbb{R}^{C \times HW}$ can be calculated as: + +$$ +E = V \odot A ^ {\top}, \tag {8} +$$ + +Since the variance of a variable equals to the expectation of its square minus the square of its expectation, we can obtain the attention-weighted background standard variance $S \in \mathbb{R}^{C \times HW}$ as: + +$$ +S = \sqrt {\left(V \cdot V\right) \odot A ^ {\top} - E \cdot E}, \tag {9} +$$ + +Finally, we reshape $E$ and $S$ to $\mathbb{R}^{C\times H\times W}$ , and align $\bar{F}_f$ with $E$ and $S$ . The aligned foreground feature map $F_{af}$ at site $(c,h,w)$ is computed by: + +$$ +F _ {a f} ^ {c, h, w} = S ^ {c, h, w} \cdot \bar {F} _ {f} ^ {c, h, w} + E ^ {c, h, w}. \tag {10} +$$ + +Difference with RAIN. Inspired by AdaIN [18], Ling et al. propose RAIN [24] for image harmonization and achieve great success. However, just like the problem with AdaIN, RAIN only considers the holistic style distribution in the background and globally aligns the foreground feature distribution with that of the background feature. Different from RAIN, inspired by [26, 29], our BAIN can pay more attention to those areas in the background that feature-similar to the foreground, and based on this attention map, the attention-weighted expectation and standard variance of the background feature are calculated to locally align the foreground feature distribution. + +Table 1. Quantitative comparison across four sub-datasets of iHarmony4 [5]. $\uparrow$ means the higher the better, and $\downarrow$ means the lower the better. Red and blue indicate the best and second best performance, respectively. + +
DatasetMetricCompositeDIH [39]\( S^2 \)AM [6]DoveNet [5]BargainNet [4]Guo et al. [15]RainNet [24]\( iS^2 \)AM [35]D-HT [14]Ours
HCOCOPSNR↑33.9434.6935.4735.8337.0337.1637.0839.1638.7639.88
MSE↓69.3751.8541.0736.7224.8424.9229.5216.4816.8913.58
fMSE↓996.59798.99542.06551.01397.85416.38501.17266.19299.30245.54
HAdobe5KPSNR↑28.1632.2833.7734.3435.3435.2036.2238.0836.8838.29
MSE↓345.5492.6563.4052.3239.9443.0243.3521.8838.5321.01
fMSE↓2051.61593.03404.62380.39279.66284.21317.55173.96265.11165.48
HFlickrPSNR↑28.3229.5530.0330.2131.3431.3431.6433.5633.1334.22
MSE↓264.35163.38143.45133.1497.32105.13110.5969.6774.5155.83
fMSE↓1574.371099.13785.65827.03698.40716.6688.40443.65515.45393.72
Hday2nightPSNR↑34.0134.6234.5035.2735.6735.9634.8337.7237.1037.83
MSE↓109.6582.3476.6151.9550.9855.5357.4040.5953.0141.75
fMSE↓1409.981129.40989.071075.71835.63797.04916.48590.97704.42606.80
AveragePSNR31.6333.4134.3534.7635.8835.9036.1238.1937.5538.75
MSE↓172.4776.7759.6752.3337.8238.7140.2924.4430.3021.33
fMSE↓1376.42773.18594.67532.62405.23400.29469.60264.96320.78248.86
+ +# 4. Experiments + +# 4.1. Experimental Settings + +Datasets. Following the same setting as previous methods [5,24], we use the benchmark dataset iHarmony4 [5] to train and evaluate, which consists of four sub-datasets: HCOCO, HAdobe5k, HFlickr, and Hday2night. We follow the same settings of iHarmony4 as DoveNet [5]. We also evaluate our method on 99 real composite images released by [39]. + +Evaluation Metrics. Following [4, 5, 24, 35], the harmonized results are evaluated with Peak Signal-to-Noise Ratio (PSNR), Mean Squared Error (MSE) and foreground MSE (fMSE) on RGB channels. fMSE is an evaluation metric that only calculates MSE in the foreground region, measuring how well the foreground is harmonized. + +Compared Methods. We compare with numerous SOTA image harmonization methods: DIH [39], DoveNet [5], RainNet [24], iS²AM [35], D-HT [14], etc. We do not compare with traditional image harmonization methods since they have been proven to perform worse than deep learning methods [4,5,24]. All the results are either provided by the authors, or produced by their officially released codes. + +Implementation Details. Our model is trained by Adam optimizer with $\beta_{1} = 0.9$ , $\beta_{2} = 0.999$ , and $\epsilon = 10^{-8}$ . We train the model for 120 epochs with input images resized to $256 \times 256$ and batch size set to 12. The initial learning rate is set to $10^{-3}$ and multiply by 0.1 in the 100th and 110th epoch. We use PyTorch to implement our models with Nvidia 2080Ti GPUs. Due to the powerful style representation ability of the VGG network [21], we choose the fixed pretrained VGG-16 [34] as the style representation extractor and use the latent feature at layer relu4-3. We set $\lambda = 0.01$ in Eq. (3). For the number of negative samples, we set $K = 5$ , and will be further explored in Section 4.3. + +# 4.2. Comparison with Existing Methods + +Performance on Synthesized iHarmony4 Dataset. Table 1 shows the quantitative results of previous state-of-the-art methods as well as our method. From Table 1, we can observe that our method outperforms other compared methods on all datasets, except for MSE and fMSE value on Hday2night. Moreover, compared with the second best method, our method achieves a huge average performance gain of $0.56\mathrm{dB}$ in PSNR, 3.11 in MSE, and 16.1 in fMSE. + +In Figure 6, we further present qualitative comparison results on iHarmony4. It can be easily observed that our method obtains a more consistent visual style in the whole composite image, achieving a more photorealistic output. For example, as shown in the third row of Figure 6, the visual style of the foreground and the background are quite different, resulting in obvious image distortion. The other three methods cannot adjust the style of the foreground, especially the overall tone and the contrast of lighting and shadows. Unlike them, our method produces a more photorealistic result and is closer to the ground-truth real image. + +Performance on Real Composite Images. Figure 7 presents some results on real composite images released by DIH [39]. Because there is no ground truth image as a reference, it is impossible to compare different methods quantitatively using PSNR, MSE or fMSE. However, we can still find that our method achieves the best visual effect. Please refer to supplementary for more visual comparison. + +We further conduct a user study. Following [4, 5, 15], we invite 60 volunteers and acquire a total of 29700 pairwise results for all 99 images, with 30 results for each pair of different methods on average. Then, we use the Bradley-Terry model (B-T model) [2, 23] to calculate the global ranking score for each method. Table 2 demonstrates that our method achieves the highest B-T score, which proves its effectiveness in real-world applications. + +![](images/32cf620c2059200c6fa23e5425d02a5d37873a45f68267148ec5f47415326858.jpg) + +![](images/ad40c99c0a0fecd7e51dc289f653e83386c612383e0d32bb153be128cca9ee56.jpg) + +![](images/c9b503b7839d7a80eab7de693774e69f35dec3ab49e054b625d8cd2fc49ad19b.jpg) + +![](images/0c1261653b75618410ed72893ef4c6ce101cfb4cbee9d019d674068886601b4b.jpg) +Input + +![](images/8fa30c308e956659c6d4e7cf0397eb6a45d5fac7cb908b19c6bf3e5d9f47a74e.jpg) + +![](images/b8cf896d099468914dedd20eb0a524f78c36bcec470f245817ff9d4bad3e5f58.jpg) + +![](images/86044c8ca4e3de41c602bd4aec59b200da8c2d39e484ac6d6134ebe982bc1566.jpg) + +![](images/2aff7fc2df19ce02ace202dcbb7cc2a69ae65d525d45eb4e4d064d1a54c6964d.jpg) +$\mathrm{iS}^2$ AM [35] + +![](images/f8e9f8c31c5b96e724b06aaec91684bac09519f42fd81cea49d1b98c3512445e.jpg) + +![](images/165811502cdabb678b4fdd2248cfbb66acce7b1dff355729ac36171e2852eba0.jpg) + +![](images/f54d2c414477b94dc77409f51488ab24b9def3776531d53b5cc8b316d3c9716f.jpg) + +![](images/732d9e4618584ecff5cbfb007f5bfe79d552491834e577762138d363f2f6d9da.jpg) +DoveNet [5] + +![](images/ac478c845d5b60a93063173730ee2b5851ea99df6b42987fe720bc9a1d6a841f.jpg) + +![](images/6724686a8ffe02666fc9333a2cf926a6d8cbcf2361326cac59cdfda192f8a6c5.jpg) + +![](images/51195ed2a6d80939a527252e6d372680a07bd1822eec7d067b7c5024f6cd1d7b.jpg) + +![](images/a69fe9c94cd63c47a45a1d5d5b28142bce6e51a1922e6354d9b59f98d5d04616.jpg) +RainNet [24] +Figure 6. Qualitative comparison on samples from the testing dataset of iHarmony4 [5]. Red boxes in composite images mark foreground. + +![](images/f0367eed4c180dc7a8dc3ae052281af909b36b69e68472460820f7e07366ff08.jpg) + +![](images/e039910c9c6eb6efce0c64c8ccf5f4c830036565cfb99fbaca860da4ddbd33c8.jpg) + +![](images/e5870505e17f9e311f2c24e9a8c8bd0c2332630fe7058d3ec9ab822ee5836031.jpg) + +![](images/1738cbf7329f4254e017c8c92b548ef93bcf3d3f852cee1f4a99645b64b1ffd8.jpg) +Ours + +![](images/aea51855effa767f3d71db4541e0d676f7623ad2c21b15aad5db85e8a687cf62.jpg) + +![](images/cbc0e4f29c2fbf2109723cb6fc836b77fa169f16cc8003f9ed977a852fe9ffbd.jpg) + +![](images/547cea9cc68d762808b830f956b84bff01bb165dfee93a6d20818d13fe679f88.jpg) + +![](images/0c33891806b9c902c0908e5e694c7cbef6a415be2e4641ac5969986edd437f0a.jpg) +Real (Ground Truth) + +Table 2. B-T scores comparison on 99 real composite images. + +
MethodCompositeDIH [39]DoveNet [5]RainNet [24]Ours
B-T score↑0.5740.8891.0751.2131.841
+ +![](images/46299d30ff79b3188795353f1cf8a77a467fb4188b9655f90f0ea9a3abaa7dc4.jpg) + +![](images/f1442e97ec55543b4bf2389f735ef3a9c74322a742af6df290ae20b2424d2f86.jpg) + +![](images/3ca9e594208c18c3d937511eddd2133a43065aacf9ba4da42c6eb97f43e9983e.jpg) +Composite +Figure 7. Example results on real composite images taken from [39]. Red boxes in composite images mark foreground. + +![](images/b16187a6b1ae7630a465a859aa70b541b7160d1bb1785567ff312d0e17d82837.jpg) + +![](images/50e76072879facd2c298fc6765be43aeb19dc8f0daab603037673eb0f44c5351.jpg) + +![](images/3197abaae3bee11832ce865ea8c14cce00440e1cace44df64265ea57eb854380.jpg) +DIH [39] + +![](images/ea5c8b49b6b110316cc2b19bfefc0f71a25287c1feec5f2c566818c73d0b2ba9.jpg) + +![](images/3506d2a82a1e7cb49c36e52b1527a7607ce7832a4d4dbb5a7fabad699278bb52.jpg) + +![](images/69edae8dad5697b1f0906399a91521935535af492db55207201538b30548f23f.jpg) +DoveNet [5] + +![](images/de7ac0e24292c414f20885ecba5b6b777f9caf4d506d55a1b6de79d801272f43.jpg) + +![](images/6fd384d025e76ffae5aec768e4c106660fd00a93f2fc21d76e037296696495f8.jpg) + +![](images/08f7b4716f2159bb61c7c28a847f3378533765b5361227126532c38444681c21.jpg) +RainNet [24] + +![](images/920f42928b98eb8a0d46708ff31e401bc8b3caffd6a2145e3f7cd17fef14835a.jpg) + +![](images/271f3fe04b32c5fb6f6f55a7b8455dc7bab314514eb88104a002265d005d42ab.jpg) + +![](images/f2279a5b632f7e79484051f5163d194fe73cbd8541b1ffcd440e332d01e0cc9c.jpg) +Ours + +# 4.3. Ablation Studies + +Effects of BAIN and SCS-Co. In Table 3, we find that when BAIN is added, the PSNR value is improved from $37.55\mathrm{dB}$ to $37.84\mathrm{dB}$ . When SCS-Co is used, the PSNR value is improved from $37.55\mathrm{dB}$ to $38.42\mathrm{dB}$ . After adopting both of them, the PSNR value is further improved to $38.75\mathrm{dB}$ . A similar phenomenon also appears on other metrics. These comparisons demonstrate the effectiveness of our BAIN and SCS-Co, and they cooperate very well to further improve the performance. In addition, to further + +illustrate the effectiveness of our BAIN and SCS-Co, we show some output results of ablation experiments in Figure 8. It can be found that compared with the distortion results produced by the baseline, after adding BAIN, the color and lighting of the output results are close to the real images, but there is still a certain degree of deviation. After the introduction of SCS-Co, the deviation is further corrected, the output results are very close to the real images. More ablation studies on BAIN can be found in supplementary. + +SS-CR and CS-CR in SCS-CR. SCS-CR is a key component of our SCS-Co and it consists of SS-CR and CS-CR. Therefore, we investigate SS-CR and CS-CR in SCS-CR. As shown in Table 4, we find that both SS-CR and CS-CR significantly improve the performance of our model, and the best result is achieved by using them all. The combination of them can strictly regularize the harmonized image in the style representation space, which significantly facilitates the generation of photorealistic visual results. + +Number of Negative Samples. We further study the effect of the number of negative samples. As shown in Figure 9, adding more negative samples achieves better performance, because the more negative samples, the more powerful constraints can be performed. However, in Figure 9, we also observe that as the number of negative samples increases, the gain brought by adding negative samples decreases. Besides, it takes longer training time when increasing the number of negative samples. Therefore, for the performance-efficiency trade-off, we finally choose to use five negative samples, i.e., we set $K = 5$ . + +Table 3. Performance of the baseline with BAIN and/or SCS-Co. The network with both BAIN and SCS-Co performs best. + +
BAINSCS-CoPSNR↑MSE↓fMSE↓
XX37.5527.81294.64
✓X37.8425.23269.05
X✓38.4222.98249.65
✓✓38.7521.33248.86
+ +![](images/1f92803220331d93d3106a7d9dbf379cb47192b4ddc700ace8aee1a213adbf20.jpg) +Composite + +![](images/59d13f337c5d1f56d3102be593fa407c82536fc2e53d1d18782fa2cefff47072.jpg) +Real + +![](images/73261979b5951f89a5bc1c0e31d657b53eb1c9d1d4981c7df3f96484d050ccac.jpg) +Baseline +Figure 8. Ablation study on BAIN and SCS-Co. Full model means baseline with both BAIN and SCS-Co. + +![](images/d32bff1712b819604597b7f576ccdaa41f0e35af07f6c15dccc7759175112eec.jpg) +w/BAIN + +![](images/7c09c8eedb1f196ab744e56f9202ff26faf5a5d16e2ef991e451a22094066de5.jpg) +Full model + +Table 4. Ablation Study on SS-CR and CS-CR in SCS-CR. + +
SS-CRCS-CRPSNR↑MSE↓fMSE↓
XX37.5527.81294.64
✓X38.0324.09258.64
X✓37.8825.06269.79
✓✓38.4222.98249.65
+ +![](images/8b23caead3c54e44215410a888ea19d4299d4b9570069a21dfbcd66507dea0e8.jpg) +(a) PSNR +Figure 9. Performance of using different numbers of negative samples in SCS-Co. We report PSNR and fMSE. + +![](images/c69edfb887a46416c5d098e4ca7719409d4ccf64394cc2bc25b7a22f4509c6fd.jpg) +(b) fMSE + +Comparison of SCS-Co and Triplet Loss. In section 3.3, we discuss the difference between our SCS-Co and the triplet loss in [4]. To further prove the effectiveness of our SCS-Co, we add the triplet loss to the baseline network and compare its result with our SCS-Co. In Table 5, we can find that compared with using the triplet loss, using our SCS-Co brings much more performance improvement, increasing $0.48\mathrm{dB}$ in PSNR. A similar phenomenon also appears on other metrics. Moreover, we set $K = 1$ , i.e., we only use the input composite image as the negative sample, which is consistent with the triplet loss. As shown in Table 5, our SCS-Co $(K = 1)$ still obtains obvious improvement over the triplet loss. It proves that the improvement of our SCS-Co is not only by introducing more dynamically generated + +Table 5. Comparison of SCS-Co and the triplet loss [4]. + +
MethodBaselinew/ Triplet Lossw/ SCS-Cow/ SCS-Co (K=1)
PSNR↑37.5537.9438.4238.13
MSE↓27.8125.4822.9823.32
fMSE↓294.64274.65249.65266.43
+ +Table 6. Results of integrating SCS-Co into SOTA methods. + +
MethodRainNet [24]DIH [39]S²AM [6]
PSNR↑37.07(↑0.95)34.09(↑0.68)35.13(↑0.78)
MSE↓34.92(↓5.37)74.72(↓2.05)53.86(↓5.81)
fMSE↓364.29(↓105.31)707.16(↓66.02)538.99(↓55.68)
+ +negative samples, but also by using a contrastive learning framework and constraining from the foreground self-style and foreground-background style consistency. + +Universality of SCS-Co. To evaluate the universality of our SCS-Co, we integrate it into three SOTA methods: RainNet [24], DIH [39] and $\mathrm{S}^2\mathrm{AM}$ [6]. As shown in Table 6, after integrating SCS-Co, the performance of each method is improved. This proves the universality of our SCS-Co, which can be easily added to different models without any increase in model parameters. + +# 5. Conclusion + +In this paper, we propose a novel self-consistent style contrastive learning scheme (SCS-Co) with a self-consistent style contrastive regularization (SCS-CR) and a dynamic negative samples generation strategy. SCS-Co is built upon contrastive learning to ensure that the output harmonized image (anchor sample) is pulled closer to the real image (positive sample) and pushed away from the composite image (the first negative sample) and other dynamically generated negative samples in the style representation space. The constraint is jointly from two aspects of the foreground self-style and foreground-background style consistency. As a result, our SCS-Co can learn more distortion knowledge and reduce the solution space well. Moreover, we propose a background-attentional adaptive instance normalization (BAIN) to pay more attention to those areas in the background that feature-similar to the foreground, and the attention-weighted background feature distribution is calculated to locally align the foreground feature distribution. Experiments demonstrate that our method is superior to other SOTA methods on both synthetic and real datasets. + +Acknowledgements. This work was partly supported by the Natural Science Foundation of Guangdong Province (No.2020A1515010711), the Natural Science Foundation of China (No.61771276) and the Special Foundation for the Development of Strategic Emerging Industries of Shenzhen (Nos.JCYJ20200109143010272 and CJGJZD20210408092804011). It is also partly supported by Overseas Cooperative Foundation. + +# References + +[1] Jie An, Siyu Huang, Yibing Song, Dejing Dou, Wei Liu, and Jiebo Luo. Artflow: Unbiased image style transfer via reversible neural flows. In CVPR, pages 862-871, 2021. 3 +[2] Ralph Allan Bradley and Milton E Terry. Rank analysis of incomplete block designs: I. the method of paired comparisons. Biometrika, 39(3/4):324-345, 1952. 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, 2020. 3, 4 +[4] Wenyan Cong, Li Niu, Jianfu Zhang, Jing Liang, and Liqing Zhang. Bargainnet: Background-guided domain translation for image harmonization. In ICME, pages 1-6, 2021. 2, 4, 5, 6, 8 +[5] Wenyan Cong, Jianfu Zhang, Li Niu, Liu Liu, Zhixin Ling, Weiyuan Li, and Liqing Zhang. Dovenet: Deep image harmonization via domain verification. In CVPR, pages 8394-8403, 2020. 1, 2, 4, 6, 7 +[6] Xiaodong Cun and Chi-Man Pun. Improving the harmony of the composite image by spatial-separated attention module. IEEE Transactions on Image Processing, 29:4759-4771, 2020. 1, 2, 3, 6, 8 +[7] Debidatta Dwibedi, Ishan Misra, and Martial Hebert. Cut, paste and learn: Surprisingly easy synthesis for instance detection. In CVPR, pages 1301-1310, 2017. 1 +[8] Alexei A Efros and Thomas K Leung. Texture synthesis by non-parametric sampling. In ICCV, volume 2, pages 1033-1038, 1999. 3 +[9] Michael Elad and Peyman Milanfar. Style transfer via texture synthesis. IEEE Transactions on Image Processing, 26(5):2338-2351, 2017. 3 +[10] Leon Gatys, Alexander S Ecker, and Matthias Bethge. Texture synthesis using convolutional neural networks. In NeurIPS, pages 262–270, 2015. 3 +[11] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In CVPR, pages 2414-2423, 2016. 3, 4 +[12] Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre H Richemond, Elena Buchatskaya, Carl Doersch, Mohammad Gheshlaghi Pires, et al. Bootstrap your own latent: A new approach to self-supervised learning. arXiv preprint arXiv:2006.07733, 2020. 3 +[13] Shuyang Gu, Congliang Chen, Jing Liao, and Lu Yuan. Arbitrary style transfer with deep feature reshuffle. In CVPR, pages 8222-8231, 2018. 3 +[14] Zonghui Guo, Dongsheng Guo, Haiyong Zheng, Zhaorui Gu, Bing Zheng, and Junyu Dong. Image harmonization with transformer. In ICCV, pages 14870-14879, October 2021. 1, 2, 3, 6 +[15] Zonghui Guo, Haiyong Zheng, Yufeng Jiang, Zhaorui Gu, and Bing Zheng. Intrinsic image harmonization. In CVPR, pages 16367-16376, 2021. 1, 2, 3, 6 +[16] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, pages 9729–9738, 2020. 3, 4 + +[17] Olivier Henaff. Data-efficient image recognition with contrastive predictive coding. In ICML, pages 4182-4192, 2020. 3 +[18] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In ICCV, pages 1501-1510, 2017. 2, 3, 5 +[19] Jiaya Jia, Jian Sun, Chi-Keung Tang, and Heung-Yeung Shum. Drag-and-drop pasting. ACM Transactions on graphics (TOG), 25(3):631-637, 2006. 3 +[20] Yifan Jiang, He Zhang, Jianming Zhang, Yilin Wang, Zhe Lin, Kalyan Sunkavalli, Simon Chen, Sohrab Amirghodsi, Sarah Kong, and Zhangyang Wang. Ssh: A self-supervised framework for image harmonization. In ICCV, pages 4832-4841, October 2021. 3 +[21] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, pages 694–711, 2016. 6 +[22] Jan Eric Kyprianidis, John Collomosse, Tinghuai Wang, and Tobias Isenberg. "State of the art": A taxonomy of artistic stylization techniques for images and video. IEEE Transactions on Visualization and Vomputer Graphics, 19(5):866-885, 2012. 3 +[23] Wei-Sheng Lai, Jia-Bin Huang, Zhe Hu, Narendra Ahuja, and Ming-Hsuan Yang. A comparative study for single image blind deblurring. In ICCV, pages 1701-1709, 2016. 6 +[24] Jun Ling, Han Xue, Li Song, Rong Xie, and Xiao Gu. Region-aware adaptive instance normalization for image harmonization. In CVPR, pages 9361-9370, 2021. 1, 2, 3, 5, 6, 7, 8 +[25] Rui Liu, Yixiao Ge, Ching Lam Choi, Xiaogang Wang, and Hongsheng Li. Divco: Diverse conditional image synthesis via contrastive generative adversarial network. In CVPR, pages 16377-16386, 2021. 2 +[26] Songhua Liu, Tianwei Lin, Dongliang He, Fu Li, Meiling Wang, Xin Li, Zhengxing Sun, Qian Li, and Errui Ding. Adaattn: Revisit attention mechanism in arbitrary neural style transfer. In ICCV, pages 6649-6658, October 2021. 2, 3, 5 +[27] Fujun Luan, Sylvain Paris, Eli Shechtman, and Kavita Bala. Deep painterly harmonization. In Computer graphics forum, pages 95–106, 2018. 2 +[28] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018. 3 +[29] Dae Young Park and Kwang Hee Lee. Arbitrary style transfer with style-attentional networks. In CVPR, pages 5880–5888, 2019. 2, 5 +[30] Patrick Pérez, Michel Gangnet, and Andrew Blake. Poisson image editing. In ACM SIGGRAPH, pages 313-318, 2003. 3 +[31] Francois Pitie, Anil C Kokaram, and Rozenn Dahyot. N-dimensional probability density function transfer and its application to color transfer. In ICCV, pages 1434-1439, 2005. 3 +[32] Erik Reinhard, Michael Adhikhmin, Bruce Gooch, and Peter Shirley. Color transfer between images. IEEE Computer graphics and applications, 21(5):34-41, 2001. 3 + +[33] 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 ICRA, pages 1134–1141, 2018. 3 +[34] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 6 +[35] Konstantin Sofiuk, Polina Popenova, and Anton Konushin. Foreground-aware semantic representations for image harmonization. In WACV, pages 1620-1629, 2021. 1, 2, 3, 6, 7 +[36] Kalyan Sunkavalli, Micah K Johnson, Wojciech Matusik, and Hanspeter Pfister. Multi-scale image harmonization. ACM Transactions on Graphics, 29(4):1-10, 2010. 3 +[37] Michael W Tao, Micah K Johnson, and Sylvain Paris. Error-tolerant image compositing. In ECCV, pages 31-44, 2010. 3 +[38] Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. In ECCV, pages 776-794, 2020. 3 +[39] Yi-Hsuan Tsai, Xiaohui Shen, Zhe Lin, Kalyan Sunkavalli, Xin Lu, and Ming-Hsuan Yang. Deep image harmonization. In CVPR, pages 3789-3797, 2017. 1, 2, 3, 4, 6, 7, 8 +[40] Longguang Wang, Yingqian Wang, Xiaoyu Dong, Qingyu Xu, Jungang Yang, Wei An, and Yulan Guo. Unsupervised degradation representation learning for blind superresolution. In CVPR, pages 10581-10590, 2021. 3 +[41] Yanbo Wang, Shaohui Lin, Yanyun Qu, Haiyan Wu, Zhizhong Zhang, Yuan Xie, and Angela Yao. Towards compact single image super-resolution via contrastive self-distillation. arXiv preprint arXiv:2105.11683, 2021. 2, 3 +[42] Haiyan Wu, Yanyun Qu, Shaohui Lin, Jian Zhou, Ruizhi Qiao, Zhizhong Zhang, Yuan Xie, and Lizhuang Ma. Contrastive learning for compact single image dehazing. In CVPR, pages 10551-10560, 2021. 2, 3 +[43] Xiaolei Wu, Zhihao Hu, Lu Sheng, and Dong Xu. Styleformer: Real-time arbitrary style transfer via parametric style composition. In ICCV, pages 14618-14627, October 2021. 3 +[44] Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, pages 3733-3742, 2018. 3 +[45] Su Xue, Aseem Agarwala, Julie Dorsey, and Holly Rushmeier. Understanding and improving the realism of image composites. ACM Transactions on graphics (TOG), 31(4):1-10, 2012. 1, 3 +[46] Lingzhi Zhang, Tarmily Wen, Jie Min, Jiancong Wang, David Han, and Jianbo Shi. Learning object placement by inpainting for compositional data augmentation. In ECCV, pages 566-581, 2020. 1 +[47] Yulun Zhang, Chen Fang, Yilin Wang, Zhaowen Wang, Zhe Lin, Yun Fu, and Jimei Yang. Multimodal style transfer via graph cuts. In ICCV, pages 5943-5951, 2019. 3 +[48] Jun-Yan Zhu, Philipp Krahenbuhl, Eli Shechtman, and Alexei A Efros. Learning a discriminative model for the perception of realism in composite images. In CVPR, pages 3943-3951, 2015. 1, 2 \ No newline at end of file diff --git a/scscoselfconsistentstylecontrastivelearningforimageharmonization/images.zip b/scscoselfconsistentstylecontrastivelearningforimageharmonization/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..125c383e56e8fe8a5d1b928183f60b52ba180275 --- /dev/null +++ b/scscoselfconsistentstylecontrastivelearningforimageharmonization/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6ca8b32640d047fd922d080eea6b2872a9c2234ce81034f3e3affd5994e50c1 +size 790516 diff --git a/scscoselfconsistentstylecontrastivelearningforimageharmonization/layout.json b/scscoselfconsistentstylecontrastivelearningforimageharmonization/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc7a9e4ab8f6697241161323add4ff01acf289e --- /dev/null +++ b/scscoselfconsistentstylecontrastivelearningforimageharmonization/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:583d77c51e003e87c6c752cb23e13731d2f95106cea8e90836c6f01d96ef584b +size 529611 diff --git a/searchingthedeployableconvolutionneuralnetworksforgpus/856f369d-d5d2-4ca0-9a74-139adc349aab_content_list.json b/searchingthedeployableconvolutionneuralnetworksforgpus/856f369d-d5d2-4ca0-9a74-139adc349aab_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..1d3e122d3aad3f9932904a154171fc1e027885f9 --- /dev/null +++ b/searchingthedeployableconvolutionneuralnetworksforgpus/856f369d-d5d2-4ca0-9a74-139adc349aab_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8be1c8bdc80bec8d1fc9b7251b3b7a889abe3293bbe3ff7c2c3ef2720ca00d8c +size 72448 diff --git a/searchingthedeployableconvolutionneuralnetworksforgpus/856f369d-d5d2-4ca0-9a74-139adc349aab_model.json b/searchingthedeployableconvolutionneuralnetworksforgpus/856f369d-d5d2-4ca0-9a74-139adc349aab_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9f1c1ea26cb1006e3b903805b38663cee87a7510 --- /dev/null +++ b/searchingthedeployableconvolutionneuralnetworksforgpus/856f369d-d5d2-4ca0-9a74-139adc349aab_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df8ca2b7f18c0127a494fa5b261e83cc7ac6e1e7d228794ff4cf01d484c86851 +size 90734 diff --git a/searchingthedeployableconvolutionneuralnetworksforgpus/856f369d-d5d2-4ca0-9a74-139adc349aab_origin.pdf b/searchingthedeployableconvolutionneuralnetworksforgpus/856f369d-d5d2-4ca0-9a74-139adc349aab_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bab96d89df89ab523ee425e43088c3411b8a0a3a --- /dev/null +++ b/searchingthedeployableconvolutionneuralnetworksforgpus/856f369d-d5d2-4ca0-9a74-139adc349aab_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:393161d186564c50bd0aa3d99004fc83a33605f20fb4dd7fde6efe2d592cc4a1 +size 676544 diff --git a/searchingthedeployableconvolutionneuralnetworksforgpus/full.md b/searchingthedeployableconvolutionneuralnetworksforgpus/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e7298e379ac38c31ff962a83078b4a1d42f4117f --- /dev/null +++ b/searchingthedeployableconvolutionneuralnetworksforgpus/full.md @@ -0,0 +1,263 @@ +# Searching the Deployable Convolution Neural Networks for GPUs + +# Linnan Wang, Chenhan Yu, Satish Salian, Slawomir Kierat, Szymon Migacz Alex Fit Florea NVIDIA + +{linnanw, chenhany, ssalian, skierat, smigacz, afitflorea}@nvidia.com + +# Abstract + +Customizing Convolution Neural Networks (CNN) for production use has been a challenging task for DL practitioners. This paper intends to expedite the model customization with a model hub that contains the optimized models tiered by their inference latency using Neural Architecture Search (NAS). To achieve this goal, we build a distributed NAS system to search on a novel search space that consists of prominent factors to impact latency and accuracy. Since we target GPU, we name the NAS optimized models as GPUNet, which establishes a new SOTA Pareto frontier in inference latency and accuracy. Within 1ms, GPUNet is $2x$ faster than EfficientNet-X and FBNetV3 with even better accuracy. We also validate GPUNet on detection tasks, and GPUNet consistently outperforms EfficientNet-X and FBNetV3 on COCO detection tasks in both latency and accuracy. All of these data validate that our NAS system is effective and generic to handle different design tasks. With this NAS system, we expand GPUNet to cover a wide range of latency targets such that DL practitioners can deploy our models directly in different scenarios. + +# 1. Introduction + +The progress of neural networks has decoupled from the actual deployment for a long time. Deep Learning (DL) researchers have been dedicated to inventing new building blocks, while DL engineers deploy these building blocks in real-world tasks, painstakingly recombine them to find architectures that meet the design requirements. Most of the time, we can simplify these requirements to find the best-performing architecture on the target device (e.g., GPUs) within a specific latency budget. Though there are many exciting advancements in the neural network designs, e.g., the residual connection [13], Inverted Residual Block (IRB) [28] and the attention [32], deploying these network designs remains challenging and laborious; and this is the problem to be addressed in this paper. + +Our solution to alleviate the gap between the DL research + +![](images/3a4f79470f2dc50d7f9ed7c2d4a98e9df099ee05358aab8982b5f6428bc109bc.jpg) +(A) Accelerate the model customization using GPUnet. + +![](images/2e17d91355e8457af1a3cbe75dcbcb3daa694bdfc949a8dda341383c72c299c5.jpg) +(B) The performance of GPUNet w.r.t SOTA networks in the inference latency and the top 1 accuracy on ImageNet. +Figure 1. GPUNet establishes the new SOTA Pareto frontier in the accuracy and inference latency. + +and the actual deployment is to propose a set of optimized Convolution Neural Networks for each type of GPUs tiered by their optimized inference latency (e.g., post-processed by TensorRT [3] or OpenVINO [2]). Specifically, we deliver a table of models, an entry of which is the result of model optimization from maximizing the accuracy subject to the limit of inference latency on a GPU. This table enables DL engineers to directly query the optimized neural architecture w.r.t the design requirements to expedite the customization process on expensive models. + +We resort to Neural Architecture Search (NAS) to design models in this table. Recently NAS has shown promising results to automate the design of network architectures in many tasks [19, 36, 37]. Therefore, NAS can be a handy tool since we need to design many models for many latency limits for different GPUs. When models are ready to de + +ploy, we measure post-processed TensorRT engine latency, i.e., including quantization, layer/tensor fusion, kernel tuning, and other system side model optimizations. Finally, we design our model toward NVIDIA enterprise GPU products for their broad adoption by the community today. + +We built a novel distributed NAS system to achieve our goal. Following the prior works, our NAS consists of 3 modules, a search space, an evaluation module, and a search method. The search space provisions networks following the predefined patterns; the search method proposes the most promising network based on the priors. The evaluation module returns the performance of the proposed network either by training or estimation from a supernet [45]. Our search space constructs a network by stacking convolution layers, IRBs, and Fused-IRBs used in EfficientNet [31]. However, our search space is the most comprehensive by far that includes filter numbers (#filters), kernel sizes, the number of layers (#layers) or IRBs (#IRBs) in a stage, and the input resolution. Within an IRB or Fused-IRB, we also search for the expansion ratio, the activation type, with or without the Squeeze-Excitation (SE) layer. All of these factors are identified as prominent factors to affect latency and accuracy. Therefore, this search space enables us to better leverage the accuracy and latency than prior works, e.g., the fixed filter pattern in NASNet [46] and the fixed activation and SE pattern in FBNetV3 [10]; and the search also enables us to find a better policy than the fixed scaling strategy in EfficientNet [18, 30]. To support such a complex search space, we choose to evaluate a network candidate by training. Although this approach is far more expensive than the supernet approach, the evaluation is more accurate in ranking the architectures [42, 45]. And we can avoid many unresolved problems in building a supernet for our search space, e.g., supporting multiple types of activation, activating/deactivating SE, and variable filter sizes. We built a client-server-style distributed system to tackle the computation challenges, and it has robustly scaled to 300 A100 GPUs (40 DGX-A100 nodes) in our experiments. Finally, we adopt the LA-MCTS guided Bayesian Optimization (BO) [35] as the search method for its superior sample efficiency demonstrated in the recent black-box optimization challenges [1]. + +We name the NAS optimized CNNs as GPUNet, and GPUNet has established a new SOTA Pareto front in the latency and accuracy in Fig. 1. We measure the latency of GPUNet using TensorRT, so GPUNet is directly reusable to DL practitioners. Particularly, GPUNet-1 is nearly $2\mathrm{x}$ faster and $0.5\%$ better in accuracy than FBNetV3-B and EfficientNet-X-B2-GPU, respectively. We also validate GPUNet on COCO detection tasks, and GPUNet still consistently outperforms EfficientNet-X and FBNetV3. All of these data validate that our NAS system is effective and generic in designing various tasks. Although this paper only + +shows a few GPUnet for comparisons, the complete model hub tiered by the inference latency is still ongoing, and we will release them with the paper. + +# 2. Related Works + +Today running DL models locally on an edge device or hosting the model as a service on the enterprise-level GPUs in data centers are two major ways for the model deployment. Edge devices, such as your smartphones or the embedded system for the self-driving, are often equipped with a small CPU, limited RAM, and slow inter-connect. Given the constrained resource, a model's #FLOPS or MACs can correlate well with the latency on such devices, driving many works to propose low FLOPS operators for the faster deployment on the edge devices [15, 26, 28], e.g., depthwise separable convolutions. Accelerating the inference on mobile devices has been a hot research topic in recent years [8, 14, 38]. + +Deploying models on the GPU requires different optimizations from the edge devices. Since GPU has a far more powerful architecture than edge devices, we need to consider the device saturation, parallelism and compute/memory-bound operators, etc., for the deployment [18]. Although GPU has dominated the MLPerf inference benchmark for years, only a few works optimize the CNN deployment on GPUs. One line of these works is to propose fast operators. RegNet [25] accelerates the inference by optimizing the search space to select simple, GPU-friendly operators. ResNetXt proposes the split attention operator to improve the accuracy and inference latency [44]. Another line of work is to optimize the structure. TResNet [27] optimizes operators in ResNet-50, including SE layers and BatchNorm, to improve the inference on GPU. At the same time, EfficientNet-X [18] proposes a latency-aware scaling method for designing the fast EfficientNet to the GPU/TPU and uses a roofline model to explain the gap between the FLOPS and latency on GPUs. Rather than using a fixed scaling policy, our work treats the model optimization as a black box, searching for the fast architectures for GPUs using the TensorRT optimized inference latency. Therefore, we can better trade-off the latency and accuracy than EfficientNet-X, and our final networks are directly deployable on GPUs. + +We use NAS to build proposed networks, and here we review the recent advances in NAS. Early works in NAS, e.g., NASNet [46], models CNN as a Direct Acycle Graph (DAG). While EfficientNet quickly gains popularity for its good performance on ImageNet [39]. This paper reuses the building blocks from EfficientNetV2 to find fast architectures. Recently transformer [21] and Multi-Layer Perception (MLP) [20] starts to emerge as promising alternatives to ConvNet; we leave the NAS on these search spaces as future work. Our paper evaluates each network independently + +by training end-to-end despite the popularity of the supernet approach. ENAS [24] proposed the supernet, which is an over-parameterized network to approximate the performance of sub-networks. Although the supernet significantly reduces the computation requirement for NAS, the rank predicted by supernet can be inaccurate [45]. Besides, training the supernet is non-trivial [41] and the construction of supernet to support variable activation, expansion ratio, and filter sizes, etc., still remains an open problem. Therefore, we perform NAS using a distributed system to avoid unresolved issues of supernet. + +# 3. Methodology + +We built a novel distributed NAS framework to automate the model design for GPUs. Our NAS system consists of a search space, a search algorithm, and an evaluation method following the existing NAS framework. First, the search algorithm selects networks from the search space, querying its performance using the evaluation method. Then the search algorithm refines its decision in the next iteration by leveraging all the evaluated network accuracy pairs. + +Our NAS consists of two stages, 1) categorizing networks by the inference latency and 2) performing NAS on networks within a latency group to optimize the accuracy. In the first stage (Fig. 2.A), we use Sobol sampling [29] to draw network candidates from the high-dimensional search space evenly, approximate the network latency by using the latency look-up table, then categorize the network into a sub-search space, e.g., networks $< 0.5\mathrm{ms}$ . We approximate the inference latency by summing up the latency of each layer from a latency lookup table. The latency table uses the input data shape and layer configurations as the key to the latency of a layer. In the second stage (Fig. 2.B), Bayesian optimization consumes a sub-space to find the best performing network within the latency range of the sub-space. We built a client-server distributed framework to perform NAS. The search algorithm runs on the server, proposing network for a client. The client will return the accuracy and network after training. The following elaborates each components and its design justifications. + +# 3.1. Search Space + +The search space prescribes the general structure of network candidates, and our search space is inspired by EfficientNet [31]. Please note our search framework is generic to support various search spaces, e.g., designing visual transformer or MLP for visual tasks. Although transformer has shown excellent performance recently [7, 21], here we focus on ConvNet due to the better support from current TensorRT that performs critical performance optimizations for the fast inference on GPUs. We leave the NAS on the transformer- or MLP-based vision models as future work. + +
StageTypeStrideKernel#LayersActE‡FiltersSE
0Conv2[3, 5]1[R,S]†[24, 32, 8]*
1Conv1[3, 5][1, 4][R,S][24, 32, 8]
2F-IRB◇2[3, 5][1, 8][R,S][2, 6][32, 80, 16][0, 1]
3F-IRB2[3, 5][1, 8][R,S][2, 6][48, 112, 16][0, 1]
4IRB2[3, 5][1, 10][R,S][2, 6][96, 192, 16][0, 1]
5IRB1[3, 5][0, 15][R,S][2, 6][112, 224, 16][0, 1]
6IRB2[3, 5][1, 15][R,S][2, 6][128, 416, 32][0, 1]
7IRB1[3, 5][0, 15][R,S][2, 6][256, 832, 64][0, 1]
8Conv1x1 & Pooling & FC1792
Res[224, 256, 288, 320, 352, 384, 416, 448, 480, 512]
+ +†: R is ReLU and S is Swish. +: F-IRB indicates Fused-Inverse-Residual-Block (Fused-IRB). +: E indicates the range of IRB expansion rate. +*: number of filters increase from 24 to 32 at the step of 8. + +Table 1. The proposed convnet search space. + +Table 1 demonstrates the details of our search space used in this paper. Our search space consists of 8 stages. Here we search for the configurations of each stage, and the layers within a stage share the same configurations. The first two stages are to search for the head configurations using convolutions. Inspired by EfficientNet-V2 [31], the 2 and 3 stages use Fused-IRB [31]. But we observed the increasing latency after replacing the rest IRB with Fused-IRB. From the stage 4 to 7, we use IRB as the basic layers. The column #Layers shows the range of # layers in the stage, e.g., [3, 10] at stage 4 means that the stage can have 3 to 10 IRBs. And the column Filters shows the range of filters for the layers in the stage (see table note for details). Our search space also tunes the expansion ratio, activation types, kernel sizes, and the Squeeze Excitation(SE) [16] layer inside the IRB/Fused-IRB. Finally, the dimensions of the input image increase from 224 to 512 at the step of 32. + +# 3.1.1 Justifications of the Search Space + +Unlike prior works, our search is guided by the accuracy and the TensorRT optimized inference latency. In a good experiment design, we should identify the most relevant factors [17] to the design targets, i.e., fast and accurate networks. Table. 1 demonstrates the several prominent factors found by us to impact the latency and accuracy. Here we provide the empirical data to support our decisions. + +- #Layers and Filters: extensive evidence from published results demonstrates that a deep or wide network can perform better than the shallow or narrow variants [13, 22] while adding layers or increasing filters slows down the inference. #Layers and Filters are essential design choices to the accuracy and latency. +- Activation: many past works have demonstrated that a good activation design can notably improve the fi + +![](images/03c016e620fc19e50a7ce7db049ef46110973c729f9e3b8e76c260722829776c.jpg) +Figure 2. The work flow of proposed NAS framework. A proposed search space is first pruned by TensorRT inference latency in (B). Then we use a black box optimizer to iteratively explore the search space in (A). We implement a distributed search framework to exploit the parallelism in (C). + +![](images/38e15184b89a70606980bf7281ad13a774dce2ac0d76ccd7e7c5e3f2dc42b562.jpg) + +![](images/0a7bff012e82d1a24c40e4e7db4ffe63e85509236960f8637e22e029d90a8fdf.jpg) + +![](images/45d4d7e1a1d6c19759129bce3d3201e3c3e4c3087b69ce6f78a436b9de58bef7.jpg) +Figure 3. The latency impact of different hyper-parameters and configurations on EfficentNet-B0. + +![](images/57c69f0a1b10999379747dd30566f618e3709bbcecbf364d7fc82efe525d1704.jpg) + +![](images/84773e391faf7e48423fb2b520461e2db9cf7b151f23f8bb3825a9110bf570d6.jpg) + +nal accuracy on ImageNet [12, 26], whereas Fig. 3.A shows a network using ReLU can be $4\mathrm{x}$ faster than using PReLU. In general, the activation is the memory-bound operation. And TensorRT supports ReLU, Sigmoid, and Tanh in the layer fusion, which explains the speed gap. Therefore, the choice of activation is an important factor in the latency and accuracy trade-off. + +- Expansion: IRB or Fused-IRB internally expands the channel size using a 1x1 convolution, and the expansion ratio controls the size of the internal channel, i.e., expansion ratio x the input channel. The MobileNet [28] paper claims that the larger channel expansion will help improve the capacity of the network and expressiveness. Our empirical results are also consistent with the claim. For example, the accuracy of a network drops 4 points on ImageNet top-1 after reducing the expansion from 6 to 2, whereas increasing the expansion incurs non-negligible costs(Fig 3.C). These data suggest the expansion ratio is an important factor to + +
StageTypeHyper-parametersLength
Resolution[Resolution]1
0Conv[#Filters]1
1Conv[Kernel, Activation, #Layers]3
2Fused-IRB[#Filters, Kernel, E, SE, Act, #Layers]6
3Fused-IRB[#Filters, Kernel, E, SE, Act, #Layers]6
4IRB[#Filters, Kernel, E, SE, Act, #Layers]6
5IRB[#Filters, Kernel, E, SE, Act, #Layers]6
6IRB[#Filters, Kernel, E, SE, Act, #Layers]6
7IRB[#Filters, Kernel, E, SE, Act, #Layers]6
total41
+ +Table 2. The encoding scheme of networks in the search space. + +search. + +- Kernel: a large convolution kernel can increase the receipt field to improve the accuracy (more details in [6]). Still, it also increases the latency (Fig. 3.D), which validates the choice of kernel size into the search space. +- SE: Squeeze-Eccitation [16] was introduced by the winning entry to ILSVRC 2017 that improved $25\%$ over the previous year. After adding SE, Fig. 3 shows the latency significantly increases. This justifies SE to be a factor in the search space. +- Image Resolution: EfficientNet [30] clearly demonstrates the accuracy improvement by increasing the resolution, and Fig. 3.B shows the latency also significantly increases. So we search for the input image resolution for better accuracy and latency trade-off. + +# 3.1.2 Network and Search Space Representations + +Now we have the general picture of search space; the next is to find the proper representation that embodies the design. We use a vector of integers to encode a network sampled from the search space described in Table. 1. The length of the vector is 41, and Table. 2 elaborates the hyperparameters represented by each digit. Stage 1 shares the same filter number as stage 0, and we only search the filter size for the first $3 \times 3$ convolution (stage 0). Because layers + +![](images/a5037ac30ec7080cdfe15df9d912b5b2c9375062fcee0dcd0228dca683165b9c.jpg) +Figure 4. The error between the actual measured TensorRT latency and the table predicted latency. + +within a stage share the configurations, we use 6 integers to represent the filter size, kernel size, expansion ratio, using SE or not, the types of activation, and the number of IRBs for the stages from 2 to 7. So a network is an instance of the vector described in Table. 2, and the range of every digit collectively define the search space in Table. 1. + +# 3.2. Stratify Networks by Inference Latency + +To design networks tiered by the inference latency, we choose to directly measure the latency of networks in the search space. Because the size of search space is exponentially large, we approximate the search space by sampling millions of networks from it. The sampling techniques is critical to capture the true distribution of search space, and here we use the Sobol sequence [5], the advantages of which is straightforward in Fig. 5. The sampling is a low cost operations that we can get millions of samples within a minute. The challenge is to measure the latency of sampled networks. Since TensorRT has dominated the MLPerf inference benchmark, we want to measure the inference latency optimized by TensorRT. Whereas, TensorRT takes minutes to build the inference engine for the measurement, which makes it infeasible to measure all the sampled networks. + +We approximate a network's latency by adding up the latency of each layer. Although the search space renders $10^{30}$ networks, the layers have limited configurations, e.g., $10^4$ in our case. Therefore we can significantly speed up the latency measurement by building a latency table with the input data shape and the layer configurations as the key. Given a network, we iterate over layers to look up the latency. If a layer does not exist in the table, we only benchmark it and record its latency in the table. Finally, the network latency is the sum of the latency of all the layers. Fig. 4 demonstrates that the table estimated latency is close to the network's actual latency, and the table estimation is on average $75\mu s$ higher than the actual end-to-end measurement. Because a whole network subjects more opportunities for the layer fusion to TensorRT than the single layer. Benchmarking $\sim 10^4$ layers is still an expensive task, and we parallelize the curation of the latency table over multi-GPUs to speed up the process from weeks to days. + +![](images/2df5ee654fd41da66a90ce98cddf4b209b5940e7efb1394198410bd8b818868d.jpg) +Figure 5. The distribution sampled by (A) the uniform random on each dimensions and (B) sobol sequence. + +![](images/d48d4be46d31c24635de075836b2cb3cf5efd9198e408fd0fa06113466caa7fe.jpg) + +# 3.3. Distributed Neural Architecture Search + +We treat the network design as a black box. Guided by the reward, e.g. the validation accuracy, the search tunes the hyper-parameters prescribed in the search space to optimize the model performance (Fig.2.A). Here we elaborate the details of search algorithms and the evaluation method. + +# 3.3.1 Search Algorithms + +We choose LA-MCTS boosted Bayesian optimization (BO) [35] as the search algorithm, which is one of the top entries to the 2020 NeurIPS black-box optimization competition [1]. Since we evaluate a network by training, the sample efficiency is critical to the overall cost. The competition results show that LA-MCTS boosted BO has demonstrated the leading sample efficiency among other BO variants and evolutionary algorithms; therefore, we adopt it in our experiments, and Fig. 2 depicts the workflow. + +Some prior works [23] define the problem as a Multi-Objective Optimization (MOO) to find the optimal Pareto frontier to the latency and accuracy. However, finding the Pareto Optimality is too fine-grained to the practice. For example, two solutions located on the Pareto frontier may have trivial differences in accuracy and latency, but finding these Pareto solutions is very expensive. Therefore, we organize the search space by latency before maximizing the accuracy. This also allows us to build a table of networks tiered by their inference latency. + +# 3.3.2 Evaluation + +We choose to evaluate each proposed network by training and apply the early-stopping if the training curve is not promising. For networks from the same search space with similar latency, we use the same training receipt, as our practical experience suggests that tuning the training receipt brings up to $1\%$ accuracy improvement at a tremendous cost. The details of our training receipts can be found at sec ?? in the supplemental material. The training will return the best validation accuracy to the search algorithm after 450 epochs. + +Rather than democratizing NAS, this paper intends to maintain a set of NAS-optimized models using hundreds of GPUs for the community. We believe the training approach is necessary, although it is far more expensive than recent supernet approaches [24]. First, extensive evidence in [42, 45] demonstrates that supernet can be inaccurate in ranking the network candidates, and training a good supernet is non-trivial [41]. Second, no supernet properly supports variable expansion ratios, image resolutions, and with/without SE. The training approach can circumvent all these problems at additional costs. + +# 3.3.3 Distributed NAS + +Now we're ready to put everything together. Fig. 2 demonstrates that we implement a client and server distributed system to run NAS. Following sec 3.2, we start with generating networks in a latency range as the search space by sampling. Then we integrate the pruned search space into the search algorithm to run on the server. The server and clients exchange data via sockets. The clients will request a network from the server to evaluate if they are free and return the network and the best validation accuracy to the server. The search algorithm can leverage this information to propose the next network candidate. To validate the framework, we test the system with a few synthetic functions to ensure the performance metric increases along with the #samples. This framework is also generic to different search problems, and we can also use the same framework to search the architecture for Transformer. + +# 4. Experiments + +This section demonstrates the details of using the proposed search space and NAS system in designing GPUNet. Compared to existing works, GPUNet significantly improves the SOTA Pareto frontier in both the accuracy and inference latency (Fig. 1). With a similar latency of $1.8\mathrm{ms}$ , the accuracy of GPUNet is $1\%$ better than the corresponding FBNet-V3 on ImageNet. With a similar 80.5 accuracy, GPUNet is $1.6\mathrm{x}$ faster than FBNet. We start with describing the experiment setup, then discuss the main results. Finally, we show that GPUNet also effectively improves the downstream tasks. + +# 4.1. Experiment Setup + +Software Setup: we perform NAS directly on ImageNet [11] that contains 1.28 million training and 50000 validation images in 1000 classes. Each network candidate is pre-trained with 300 epochs for the performance ranking with automatic mixed precision (AMP), then we fine-tune the top network for another 150 epochs. We use a modified training script from Pytorch Image Models [4] + +![](images/aad67bfee2bdc3dfc93f7a66a919fc745a12cae52aa68a41360b6ccc09d1aefd.jpg) +Figure 6. The architecture of searched GPUNet in Table. 3. For stages 2, 3, 4 and 6, only the stride of first layer is 2 and the stride of rest layers is 1. + +to train models. The training only uses random augmentation at the magnitude of 9 and a standard deviation of 0.5. The learning rate decays by .97 for every 2.4 epochs. Exponential Moving Average (EMA) is also in use with a decay rate of 0.9999. The crop percentage is set to 1, and the optimizer is RMSprop. We set NAS to focus on models with FP32+FP16 TensorRT GPU compute time $< 2ms$ , which is more relevant in practice. For latency measurement, we use TensorRT-8.0.1. We export the onnx model and measure FP16 GPU compute latency using the trtexec --fp16 command-line on a standalone PCI-E NVIDIA GV100 GPU. + +Machine Setup: we perform the training on DGX A100 with 8x A100 80 GB. Our system is flexible to allow training on preemptible (spot) instances. We launch the server at a dedicated node to propose networks and launch clients at preemptible instances. Each client checkpoints per epoch during the training in case of preemption. The server also consistently checkpoints its state for fault tolerance. + +# 4.2. Main Results + +# 4.2.1 Preparation of Baselines + +Table. 3 lists the recent SOTA baselines used in comparisons; There are two set of baselines that include and exclude distillation, respectively. The accuracy and the inference latency are two key metrics in our evaluations. Comparing the accuracy is easy to be fair but not on the inference latency, since the latency can be impacted by the software stack (e.g. runtime efficiency and system optimizations), GPUs, batch size and etc.. To ensure fairness, we transform + +Without Distillation + +
ModelsTop1 ImageNetTensorRT Latency† FP16 GV100 (ms)#Params (Million)#FLOPS (Billion)GPUNet Speedup ↑GPUNet Accuracy ↑
RegNet-X [25]77.02.069.19.1.63.3x1.9
EfficientNet-B0 [30]77.11.185.280.381.9x1.8
EfficientNetX-B0-GPU [18]77.31.057.60.911.69x1.6
FBNetV2-L1 [33]77.21.13x0.321.82x1.7
GPUNet-078.90.6211.93.25
RegNet-X80.03.9.54.3.15.2.72x0.5
EfficientNet-B280.31.869.212.26x0.2
EfficientNetX-B2-GPU80.01.61102.31.96x0.5
FBNetV3-B [10]79.81.558.6.0.461.89x0.7
ResNet-50 [13]80.31.128.094.1.34x0.2
GPUNet-180.50.8212.73.3
RegNet-X80.55.7107.31.73.24x1.7
EfficientNet-B381.62.3121.81.3x0.6
EfficientNetX-B3-GPU81.42.113.34.31.2x0.8
ResNeSt-50 [44]81.12.327.55.41.27x1.1
FBNetV3-F82.12.2613.91.181.28x0.1
GPUNet-282.21.7625.88.38
With Distillation
AlphaNet-a2 [34]79.21.1411.30.321.8x0.5
FBNetV3-A79.61.528.60.352.4x0.1
BigNAS-L [40]79.51.556.40.582.460.2
LaNet-200M77.80.955.760.241.5x1.9
GPUNet-D079.70.636.20.72
AlphaNet-a680.81.615.40.711.28x1.7
FBNetV3-D81.11.710.30.641.36x1.4
BigNAS-XL80.91.649.51.041.31x1.6
LaNet-600M80.81.298.670.241.03x1.7
GPUNet-D182.51.2510.63.66
FBNetV3-G83.22.4310.82.11.0x0.4
GPUNet-D383.62.41915.6(Only random augmentation)
+ +†: We measure the latency (FP16 GPU compute time) using an explicit-shape at batch size 1. +Table 3. Comparisons of GPUNet to SOTA results. Fig. 1 visualizes the table and shows that GPUNet-D dominates the baseline models in both the accuracy and inference latency. + +all the baseline models into ONNX models for benchmarking with TensorRT. The inference benchmark exclusively runs on an NVIDIA GV100; and the workspace of TensorRT is fixed at 10G across all runs. We benchmark the latency at the batch size $= 1$ with a explicit-shape, and report the average latency from 1000 runs. We take baseline models from either their original implementations or from PyTorch Image Models [4]. Appendix Sec. 6.1.1 provides the details. + +# 4.2.2 Results on ImageNet1K + +Table. 3 compares the performance of searched GPUNet to baselines, and Fig. 1 visualizes the Pareto frontier of different models in the inference latency and accuracy. Please note we prepare two sets of different networks GPUNet + +and GPUNet-D, for the cases of with/without distillation. Fig. 1.B clearly shows GPUNet-D dominates other models in both target objectives, and Table. 3 suggests both GPUNet and GPUNet-D are significantly faster than SOTA networks while maintaining similar accuracy. At the similar 80.5 top-1 accuracy, GPUNet-1 is nearly 2 times faster than EfficientNet-B2, EfficientNetX-B2-GPU, and FBNetV3-B. For other accuracy groups, GPUNet consistently demonstrates the speedup from $1.27 \times$ to $3.24 \times$ than baselines. + +While EfficientNet-V2 [31] shows slightly better results than GPUNet when latency $>3ms$ in Fig. 1.B, EfficientNet-V2 utilizes a far more sophisticated training scheme that includes Mixup [43] and progressive training in regularizing the network for better accuracy. These regularizations are orthogonal to NAS, and they can be an excellent future work to improve the accuracy of GPUNet further. + +Interestingly, we also note that the #FLOPS and #Parameters of GPUNet are larger than baselines, though GPUNet is significantly faster. These results indicate that low FLOPS models are not necessarily fast on GPUs. EfficientNet-X explains this with the roofline model [18], and we will provide more results in Sec. 4.2.4. + +Please note that our ultimate goal is to provide a table of models tiered by their inference latency to expedite the customization. Table. 3 and Fig. 1 only show a few models to demonstrate that our NAS system can effectively design fast and accurate networks on the proposed search space in Table. 1. We will release this table of models after the paper. + +# 4.2.3 GPUNet Architecture + +Fig. 6 shows that the architectures of NAS optimized GPUNet are too irregular to be human design. For example, the two adjacent stride $= 2$ ER (Fused-IRB) blocks in GPUNet-2 consecutively halve H and W twice, while the human-designed networks usually have multiple stride $= 1$ layer between two stride $= 2$ layers. There is no obvious pattern for the activation functions and expansions in IRB as well. However, these NAS optimized networks show one common characteristic in the filter distribution, which are skinny in the beginning/middle stages and very wide in the last few stages though the search space in Table. 1 permits large filters at the beginning and small filters in the end. For example, the filters of GPUNet-2 follow the pattern of $32 \rightarrow 32 \rightarrow 116 \rightarrow 144 \rightarrow 160 \rightarrow 224 \rightarrow 832$ ; GPUNet-0 and GPUNet-1 also follow a similar filter pattern. + +# 4.2.4 Why GPUNet Are Faster and Better? + +We also compare the architecture of FBNet and EfficientNet to GPUNet. Here are a few key differences found by us that explain the GPUNet performance. Let's use GPUNet-1 as an example. + +- Mixed types of activation: Fig.6 suggests that GPUNet switches between ReLU and Swish, but EfficientNet and FBNet use Swish across all the layers. Fig.3 suggests Swish greatly increases the latency. Some layers of GPUNet uses ReLU to reduce the latency for other opportunities to improve the accuracy, e.g., larger filters. +- Fewer expansions in IRB: Fig.3.C shows the network latency almost doubles by increasing the expansions in all IRB from 1 to 6. The expansion is part of our search space, so some GPUNet layers tend to have small expansions to save the latency. +- Wider and Deeper: the filters (wide) and the number of layers (deep) in a stage are part of our search space. Because of the latency saving from mixed activation + +
BackboneImageNet top1MethodTRT Latency(ms)mAP
GPUNet-282.2Cascade RCNN5.240.0
ResNet-5080.3Cascade RCNN5.840.4
FBNetV3-F82.1Cascade RCNN7.9026.5
EfficientNet-B381.6Cascade RCNN10.6528.40
+ +Table 4. Applying GPUNet to COCO object detection tasks. The latency was measured using the resolution of $1333 \times 800$ . + +and fewer expansions, GPUnet tends to be wider and deeper than FBNet and EfficientNet. In the same accuracy group, the filters of FBNetV3-B follow the pattern of $16 \rightarrow 24 \rightarrow 40 \rightarrow 72 \rightarrow 120 \rightarrow 183 \rightarrow 224$ , and the filter pattern of EfficientNet-B2 is $32 \rightarrow 16 \rightarrow 24 \rightarrow 48 \rightarrow 88 \rightarrow 120 \rightarrow 208 \rightarrow 352$ , but GPUnet-1 is a lot wider than FBNetV3-B and EfficientNet-B2 that has a pattern of $24 \rightarrow 64 \rightarrow 96 \rightarrow 160 \rightarrow 288 \rightarrow 448$ . Besides, GPUnet-2 has 33 layers, 2 more than FBNetV3-F and 5 more than EfficientNet-B3. It is known that deep and wide networks have better accuracy; therefore, the accuracy of GPUnet is better than baselines within each group. + +- Larger Resolution: GPUNet-(1 and 2) are 32 and 64 larger than EfficientNet-B2 and B3 in resolutions, 72 and 120 larger than FBNetV3-B and FBNetV3-F, respectively. Using large resolution generally improves the accuracy; therefore, GPUNet shows better accuracy and higher FLOPS than baselines. + +# 4.3. Evaluating on Detection tasks + +We test GPUNet on COCO detection tasks. We evaluate GPUNet, FBNetV3-F, and EfficientNet-B3 on COCO detection tasks by replacing the backbone in the cascade RCNN [9]. Table. 4 shows GPUNet-2 is not only faster, but also delivers higher mAP than baseline models. + +# 5. Conclusions + +Model customization is challenging for DL engineering. In this work, we proposes to build a model hub tiered by their inference latency to expedite model customization, which facilitates practitioners to reuse the our pretrained models with known TensorRT latency and compatibility in mind. With a novel distributed NAS system and an enhanced search space to design a set of fast and accurate GPUNet, we establish a new SOTA Pareto frontier in latency and accuracy, validating the effectiveness of our NAS system. Although this paper primarily focuses on EfficientNet search space, our NAS system is generic to support various tasks and search spaces. Ultimately we intend to maintain a hub of NAS optimized models that track the latest technology so that ML practitioners can directly reuse them. + +# References + +[1] Black box optimization challenges. http://bbochallenge.com/leaderboard/.2,5 +[2] Intel's openvino. https://www.intel.com/ content/www/us/en/developer/tools/ openvino-toolkit/overview.html.1 +[3] Nvidia's tensorrt. https://developer.nvidia.com/tensorortr.1 +[4] Pytorch image models. https://github.com/rwrightman/pytorch-image-models.6,7 +[5] The sobol sequence implemented in the pytorch. https://pytorch.org/docs/stable/generated/torch.quasirandom.SobolEngine.html.5 +[6] André Araujo, Wade Norris, and Jack Sim. Computing receptive fields of convolutional neural networks. Distill, 2019. https://distill.pub/2019/computing-receptive-fields. 4 +[7] Hangbo Bao, Li Dong, and Furu Wei. Beit: Bert pre-training of image transformers. arXiv preprint arXiv:2106.08254, 2021.3 +[8] Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. arXiv preprint arXiv:1812.00332, 2018. 2 +[9] 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. 8 +[10] Xiaoliang Dai, Alvin Wan, Peizhao Zhang, Bichen Wu, Zijian He, Zhen Wei, Kan Chen, Yuandong Tian, Matthew Yu, Peter Vajda, et al. Fbnetv3: Joint architecture-recipe search using predictor pretraining. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 16276–16285, 2021. 2, 7 +[11] 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 +[12] 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. 4 +[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 1, 3, 7 +[14] Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, et al. Searching for mobilenetv3. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1314-1324, 2019. 2 +[15] 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. 2 + +[16] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7132-7141, 2018. 3, 4 +[17] Oscar Kempthorne. The design and analysis of experiments. 1952. 3 +[18] Sheng Li, Mingxing Tan, Ruoming Pang, Andrew Li, Liquin Cheng, Quoc V Le, and Norman P Jouppi. Searching for fast model families on datacenter accelerators. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8085-8095, 2021. 2, 7, 8 +[19] Chenxi Liu, Liang-Chieh Chen, Florian Schroff, Hartwig Adam, Wei Hua, Alan L Yuille, and Li Fei-Fei. Autodeplab: Hierarchical neural architecture search for semantic image segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 82–92, 2019. 1 +[20] Hanxiao Liu, Zihang Dai, David R So, and Quoc V Le. Pay attention to mpls. arXiv preprint arXiv:2105.08050, 2021. 2 +[21] 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, 3 +[22] Zhou Lu, Hongming Pu, Feicheng Wang, Zhiqiang Hu, and Liwei Wang. The expressive power of neural networks: A view from the width. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pages 6232-6240, 2017. 3 +[23] Zhichao Lu, Ian Whalen, Vishnu Boddeti, Yashesh Dhebar, Kalyanmoy Deb, Erik Goodman, and Wolfgang Banzhaf. Nsga-net: neural architecture search using multi-objective genetic algorithm. In Proceedings of the Genetic and Evolutionary Computation Conference, pages 419-427, 2019. 5 +[24] Hieu Pham, Melody Guan, Barret Zoph, Quoc Le, and Jeff Dean. Efficient neural architecture search via parameters sharing. In International Conference on Machine Learning, pages 4095-4104. PMLR, 2018. 3, 6 +[25] Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollar. Designing network design spaces. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10428-10436, 2020. 2, 7 +[26] Prajit Ramachandran, Barret Zoph, and Quoc V Le. Searching for activation functions. arXiv preprint arXiv:1710.05941, 2017. 2, 4 +[27] Tal Ridnik, Hussam Lawen, Asaf Noy, Emanuel Ben Baruch, Gilad Sharir, and Itamar Friedman. Tresnet: High performancegpu-dedicated architecture. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 1400-1409, 2021. 2 +[28] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zh-moginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4510-4520, 2018. 1, 2, 4 +[29] Il'ya Meerovich Sobol'. On the distribution of points in a cube and the approximate evaluation of integrals. Zhurnal Vychislitel'noi Matematiki i Matematicheskoi Fiziki, 7(4):784-802, 1967. 3 + +[30] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning, pages 6105-6114. PMLR, 2019. 2, 4, 7 +[31] Mingxing Tan and Quoc V Le. Efficientnetv2: Smaller models and faster training. arXiv preprint arXiv:2104.00298, 2021. 2, 3, 7 +[32] 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 +[33] Alvin Wan, Xiaoliang Dai, Peizhao Zhang, Zijian He, Yuandong Tian, Saining Xie, Bichen Wu, Matthew Yu, Tao Xu, Kan Chen, et al. Fbnetv2: Differentiable neural architecture search for spatial and channel dimensions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12965–12974, 2020. 7 +[34] Dilin Wang, Chengyue Gong, Meng Li, Qiang Liu, and Vikas Chandra. Alphanumeric: Improved training of supernet with alpha-divergence. arXiv preprint arXiv:2102.07954, 2021. 7 +[35] Linnan Wang, Rodrigo Fonseca, and Yuandong Tian. Learning search space partition for black-box optimization using monte carlo tree search. arXiv preprint arXiv:2007.00708, 2020. 2, 5 +[36] Linnan Wang, Saining Xie, Teng Li, Rodrigo Fonseca, and Yuandong Tian. Sample-efficient neural architecture search by learning actions for monte carlo tree search. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021. 1 +[37] Linnan Wang, Yiyang Zhao, Yuu Jinnai, Yuandong Tian, and Rodrigo Fonseca. Alphax: exploring neural architectures with deep neural networks and monte carlo tree search. arXiv preprint arXiv:1903.11059, 2019. 1 +[38] Bichen Wu, Xiaoliang Dai, Peizhao Zhang, Yanghan Wang, Fei Sun, Yiming Wu, Yuandong Tian, Peter Vajda, Yangqing Jia, and Kurt Keutzer. Fbnet: Hardware-aware efficient convnet design via differentiable neural architecture search. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10734-10742, 2019. 2 +[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. 2 +[40] Jiahui Yu, Pengchong Jin, Hanxiao Liu, Gabriel Bender, Pieter-Jan Kindermans, Mingxing Tan, Thomas Huang, Xiaodan Song, Ruoming Pang, and Quoc Le. Bignas: Scaling up neural architecture search with big single-stage models. In European Conference on Computer Vision, pages 702-717. Springer, 2020. 7 +[41] Kaicheng Yu, Rene Ranftl, and Mathieu Salzmann. How to train your super-net: An analysis of training heuristics in weight-sharing nas. arXiv preprint arXiv:2003.04276, 2020. 3, 6 +[42] Kaicheng Yu, Christian Sciuto, Martin Jaggi, Claudiu Musat, and Mathieu Salzmann. Evaluating the search phase of neu + +ral architecture search. arXiv preprint arXiv:1902.08142, 2019.2,6 +[43] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017. 7 +[44] Hang Zhang, Chongruo Wu, Zhongyue Zhang, Yi Zhu, Haibin Lin, Zhi Zhang, Yue Sun, Tong He, Jonas Mueller, R Manmatha, et al. Resnest: Split-attention networks. arXiv preprint arXiv:2004.08955, 2020. 2, 7 +[45] Yiyang Zhao, Linnan Wang, Yuandong Tian, Rodrigo Fonseca, and Tian Guo. Few-shot neural architecture search. In International Conference on Machine Learning, pages 12707-12718. PMLR, 2021. 2, 3, 6 +[46] 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. 2 \ No newline at end of file diff --git a/searchingthedeployableconvolutionneuralnetworksforgpus/images.zip b/searchingthedeployableconvolutionneuralnetworksforgpus/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f4b1b43a6b7c8f0c30325487e604a3c62a139e05 --- /dev/null +++ b/searchingthedeployableconvolutionneuralnetworksforgpus/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d214c105370b0fdc5a261cbadb447c8e825bfe81ae9f2662cf4aa817ec5be01 +size 450605 diff --git a/searchingthedeployableconvolutionneuralnetworksforgpus/layout.json b/searchingthedeployableconvolutionneuralnetworksforgpus/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..bccce9f90af2c45fbe2cb8c717b9324800537a5b --- /dev/null +++ b/searchingthedeployableconvolutionneuralnetworksforgpus/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:93ea6abfad530620da1f3120205f2d414f659da7439d47f86a196931080360c2 +size 305767 diff --git a/seegsemanticenergizedcospeechgesturegeneration/3bfe1873-7f26-4f67-bdad-f5a3386d34fd_content_list.json b/seegsemanticenergizedcospeechgesturegeneration/3bfe1873-7f26-4f67-bdad-f5a3386d34fd_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..18c724a1b21c74b148cc3097fe699dc401669685 --- /dev/null +++ b/seegsemanticenergizedcospeechgesturegeneration/3bfe1873-7f26-4f67-bdad-f5a3386d34fd_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6670cd36809cd30b762f37766e10472d264dbceedd3700fadca6529ec308f6f3 +size 74711 diff --git a/seegsemanticenergizedcospeechgesturegeneration/3bfe1873-7f26-4f67-bdad-f5a3386d34fd_model.json b/seegsemanticenergizedcospeechgesturegeneration/3bfe1873-7f26-4f67-bdad-f5a3386d34fd_model.json new file mode 100644 index 0000000000000000000000000000000000000000..65b632fa3651cd021aa6b664fe203a8bcf1256e1 --- /dev/null +++ b/seegsemanticenergizedcospeechgesturegeneration/3bfe1873-7f26-4f67-bdad-f5a3386d34fd_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9bf2de93db591544c9b1bde03559ed2729cbfe70882e0b131a992f7002e97bb5 +size 88844 diff --git a/seegsemanticenergizedcospeechgesturegeneration/3bfe1873-7f26-4f67-bdad-f5a3386d34fd_origin.pdf b/seegsemanticenergizedcospeechgesturegeneration/3bfe1873-7f26-4f67-bdad-f5a3386d34fd_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f61743d120bc5c5a58cc34a1653f7c142a7b7984 --- /dev/null +++ b/seegsemanticenergizedcospeechgesturegeneration/3bfe1873-7f26-4f67-bdad-f5a3386d34fd_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71bff5d88a1edb0e301ccc8123932cb412b8bc96126f4050b662256b649cc02d +size 3052813 diff --git a/seegsemanticenergizedcospeechgesturegeneration/full.md b/seegsemanticenergizedcospeechgesturegeneration/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4c2ebc46918826e51561d7581ab1f551b7432787 --- /dev/null +++ b/seegsemanticenergizedcospeechgesturegeneration/full.md @@ -0,0 +1,277 @@ +# SEEG: Semantic Energized Co-speech Gesture Generation + +Yuanzhi Liang\*1,2, Qianyu Feng3, Linchao Zhu2, Li Hu1, Pan Pan1, and Yi Yang3 + +1Alibaba DAMO Academy, Alibaba Group + +$^{2}$ ReLER Lab, AAII, University of Technology Sydney + +3Zhejiang University + +liangyzh18@outlook.com qianyufeng718@gmail.com linchao.zhu@uts.edu.au hooks.hl@alibaba-inc.com panpan.pp@alibaba-inc.com yangyics@zju.edu.cn + +# Abstract + +Talking gesture generation is a practical yet challenging task that aims to synthesize gestures in line with speech. Gestures with meaningful signs can better convey useful information and arouse sympathy in the audience. Current works focus on aligning gestures with the speech rhythms, which are difficult to mine the semantics and model semantic gestures explicitly. This paper proposes a novel Semantic Energized Generation (SEEG) method for semantic-aware gesture generation. Our method contains two parts: DEcoupled Mining module (DEM) and Semantic Energizing Module (SEM). DEM decouples the semantic-irrelevant information from inputs and separately mines information for the beat and semantic gestures. SEM conducts semantic learning and produces semantic gestures. Apart from representational similarity, SEM requires the predictions to express the same semantics as the ground truth. Besides, a semantic prompter is designed in SEM to leverage the semantic-aware supervision to predictions. This promotes the networks to learn and generate semantic gestures. Experimental results reported in three metrics on different benchmarks prove that SEEG efficiently mines semantic cues and generates semantic gestures. SEEG outperforms other methods in all semantic-aware evaluations on different datasets. Qualitative evaluations also indicate the superiority of SEEG in semantic expressiveness. Code is available via https://github.com/akira-1/SEEG. + +# 1. Introduction + +Recently, in synthesizing digital humans, vivid gestures can primarily improve reality, naturalness, and efficient in- + +![](images/d7a576e00c3fa50a8afdc2adecfa4395d23d336c9a171cba4083865dda2b4df3.jpg) + +![](images/a7f2833ac421061c63c842be7c69c83c6795d647e61facb045a5fb8c637943c6.jpg) +(a) Diverse and expressive semantic gestures + +![](images/366efafd1affde1237c53be728da02d8aca0683cb5fac3dc3c2210469ebd0ff6.jpg) + +![](images/e89f49168728c5df855197e7d7792a124bdf3090e8bff4af993e450f6a5c5c64.jpg) + +![](images/cb0ba22b67bb758a2284cd308b8f0d84110d2f027bafb64b0389bdae8d4e07d1.jpg) + +![](images/94e62c006a4906cb6acd1f3029d838a32ec0c2276284927fa0d45c42d7ce8d52.jpg) + +![](images/f7aea8d0656c0f478e167fe2cf7ac73f763be08e08a78870f9cf27dd06c21dbb.jpg) +(b) Intuitive and semantic-irrelevant beat gestures + +![](images/5a3ea5f9083f04caae4bd6dad2eb924c42a659effc556d18bd008c93e7e8f320.jpg) +Figure 1. Co-speech gestures contain semantic-irrelevant beat and diverse semantic gestures. SEEG explores both gestures and produces better semantic gestures. + +![](images/f371e9212d59ed7e432fea02dede77aa3579afe3e61486e0b1c2acbe5d3f898a.jpg) + +![](images/26dc34e0f78d60f643285933e02897eae66864be456d3b37ee47d799fe5ca44e.jpg) + +formation expression. Especially, talking gestures provide nonverbal cues of semantic expression and emphasize highlights and attitudes woven into our daily communication. Along with digital manipulation techniques, the speech-driven gesture is an emerging application, e.g., digital human animation, visual dubbing in movies, online service, and education. The goal is to simulate artificial embodied agents to perform harmonious gestures aligned with the speech contents [14, 21, 29, 34]. Automated speech-driven gesture generation studies the generation of natural gesture sequences by exploring the relationships between speech + +and body language. It provides a new opportunity for realistic human-human interaction in virtual platforms. + +Toward vivid speech-driven gestures, an intuitive expectation is to produce gestures corresponding to the speech contents. Humans naturally respond to their speeches and produce gestures to deliver specific semantics as in human ethology. As shown in Fig. 1, most co-speech gestures are compounded by beat and semantic gestures [8, 15]. Beat gestures are irrelevant to lexical semantics. It is independent to the content of the speech and prefers to respond to the rhythms of sounds. For example, the fast-talker tends to move more frequently in speak gestures. Semantic gestures1 are apt to express certain speech content with body language, including iconic gestures, metaphoric gestures, and deictic gestures [8]. For example, speakers may raise their hands to emphasize their attitudes, corresponding to "clearly", "definitely", etc. Generating semantic gestures would lead to a vivid and reasonable content-based gesture rather than simply following the beat. However, the prior works of co-speech gestures synthesis [20, 29, 34, 35] do not explicitly produce semantic gestures and fail to model the lexical-semantic relevance between speech and gestures. For instance, when merely learning with the semantic-irrelevant cues, i.e., the rhythms of audio and speakers' identities, we achieve a comparable score with state-of-the-art methods [34]. This indicates that the current methods are hard to learn semantics explicitly and produce semantic-aware gestures. + +It is challenging to generate semantic gestures for the following two reasons. First, semantic cues for generating semantic gestures are hard to be mined. The styles and the movements of semantic gestures vary widely among speakers according to different contents. Meanwhile, beat gestures are inclined to intuitive and straightforward responses to the cues from sound, which commonly occur and are easier for the networks to mine. This difference induces semantic cues that are hard to be mined. The network may be relatively inclined to beat gestures and be slacked to investigate semantic cues. Second, semantic gestures and their corresponding texts are not well aligned temporally. As shown in Fig. 2, some gestures may be performed before or after the semantics they conveyed. This leads the network to unfavorably learn semantic gestures since it is hard to receive an explicit hint of semantic correlation via the given data. These two challenges hinder the generation and expression of semantics in gestures. + +This paper introduces a novel method to achieve semantic-aware co-speech gesture generation named Semantic Energized Generation (SEEG). SEEG efficiently mines semantic and beat cues respectively and conducts semantic-aware gesture generation. Specifically, SEEG + +contains two components, i.e., DEcoupled Mining module (DEM) and a Semantic Energized Module (SEM). DEcoupled Mining module decouples speech input cues into semantic-relevant cues (closely coupled to speech contents) and semantic-irrelevant cues (only beat information). Then, two separate encoders in DEM process Semantic-relevant cues and semantic-irrelevant cues to understand information for semantic and beat gestures. After input decomposition, one encoder focuses on the representation for beat gestures, while the other encoder exploits the diverse semantic information for semantic gestures. This process eases the learning of semantic and beat gestures with huge disparities. The networks enable explicitly mine differential information for the beat and semantic gestures. If we expect the networks to learn semantics, DEM avoids forcing the networks to learn semantics from beat gestures that do not contain semantic denotations. Semantic Energized Module aims to avoid generation degrading to beat gestures. SEM energizes semantic learning by constraining two kinds of similarities: representational similarity and semantic similarity. Representational similarity requires the generation to be similar to the ground truth in appearances. More critically, DEM pursues semantic similarity and encourages the results to present similar semantics compared with the ground truth. In DEM, we additionally introduce a semantic prompt gallery and a semantic prompter network. The prompter is trained by the gallery and fix it in gesture generation. The prompter network is responsible for representing gestures in a semantic view. By producing similar representations under the view of the prompter, the generated gestures are regularized to align semantics conveyed from the ground truth. Rather than directly connecting speech contents to gestures that may be misaligned, SEM energizes semantic learning by restraining both representational similarity and semantic similarity. + +Our main contributions can be summarized as follows: + +1. We propose a new SEmantic Energized Generation (SEEG) framework for co-speech gesture generation. SEEG is a semantic-aware gesture generation method that is adept at generating gestures with better semantic expressiveness. +2. We propose DEcoupled Mining (DEM) and Semantic Energized Module (SEM). DEM decouples semantic-irrelevant cues in inputs and eases the learning of disparate semantic and beat gestures. DEM encourages the network to learn semantics and produce semantic gestures. +3. In generating semantic gestures, the efficiency and advantages of our method are revealed by three subjective metrics on different datasets and objective human evaluations. We also find that the beat gestures may dominate the co-speech gesture generation. Visualizations show that SEEG achieves significant expressiveness in semantics. + +![](images/0a709e4df79358beb15faa71193f74789bff5ba5e3cedc7d773c987241ebcf55.jpg) +Figure 2. Examples of misalignment between semantics and gestures. Speakers may perform semantic gestures before (left) or after (right) the target contents. This leads to the semantic gestures being hard to match in temporary corresponding to the text or audio. We highlight the significant gestures with the orange shading. + +![](images/19ddbc77b33246c53ddeaa0a647952c0886df5ae488f26a0e12da71ab4433cd4.jpg) + +# 2. Related Work + +Speech-driven gesture generation is an emerging issue that aims to generate vivid gestures based on the given speech data. Generally, methods for this problem take the speech data [34, 35] (audio, text, etc.) as input and produce corresponding gestures to simulate the real speaker. This requires various knowledge understanding [33] like human ethology [7, 22, 28, 32], linguistics [19, 27, 30], robotics [11, 25], graphics [3, 17, 34], vision [20, 29, 34], etc. Proposed methods should understand multi-modal and diverse information (speech rhythm from audio, text semantics, personal style from speakers' identities, semantic conveyed from motions, etc.), then generate reasonable and expressive gestures. + +To overcome the above challenges, various works are proposed to explore. To understand the audio data and bridge the audio inputs to the gestures, Taras et al. [20] investigate the network structure to map speech acoustic and semantic features into the feature space of 3D gestures. Moreover, benefiting from an efficient modeling method MoGlow which is controllable for 3D motion synthesis, Alexanderson et al. [3] propose the style-controllable gesture generation model based on the MoGlow. The proposed method can generate diverse and plausible gestures just like the actual human. Ahuja et al. [1] propose Mix-StAGE, which disentangle the style feature with gesture features and encodes the gestures features to the style space. Mix-StAGE overcomes the challenge of style preservation and generates diverse styles of gestures for different people. As the multi-modalities involved in speech-driven gestures, Yoon et al. [34] explore the embedding and representation of multiple modalities for gesture generation. They consider the trimodal context and construct holistic modeling for all the data. This paper goes further toward semantic-aware gesture generation and produces gestures with better semantic expressiveness. + +In addition, the metrics for evaluating the generated gestures are also important and challenging. As the uncertainty of human behavior, evaluating the realistic level of generated gestures compared with the actual human maybe still an open question. Some works [1, 3, 14] rely on user stud + +ies to measure the quality of generated gestures. Rather than the subjective evaluation from an actual human, some works [1, 14, 29, 34] calculate the distances between generated gesture and the ground truth. In our work, besides the evaluations mentioned above, we further provide a measurement in semantic view. We introduce a new test set named Semantic-aware testing set (SatTED) and a new metric named Semantic-aware Accuracy (SAA). These provide better evaluations of the results in the semantic aspect. + +# 3. SEmantic Energized Generation + +We propose SEmantic Energized Generation (SEEG) to empower the learning of semantics in co-speech gesture generation. As shown in Fig. 3, SEEG contains two parts: DEcoupled Mining module (DEM) and Semantic Energized Module (SEM). DEM decouples semantics from inputs and contains two encoders for different inputs correspondingly. The two decoders are responsible for explicitly mining information for beat and semantic gestures. Moreover, SEM involves a semantic prompter and a gesture decoder. The decoder provides the final outputs for gesture generation. Then, the prompter network leverages an aligning loss for gestures which relieves the misalignment for semantics. + +# 3.1. Preliminary + +According to the speech data, co-speech gesture generation aims to generate vivid gestures as real speakers. Some works [21, 24, 29] synthesize body gestures, hand gestures, lips, or face key points by taking audio, text, and speaker identities as pre-processed inputs. In this work, we focus on generating upper body gestures by sequentially outputting the key points following [34, 35]. + +Taking the audio and text as inputs, methods are required to produce vivid speech gestures like real speakers. Generally, methods in this topic also introduce person ID and encode the ID into features. Additionally, the text is pre-processed and represented by pre-trained word vectors [6, 10, 26]. Thus, there are three parts of inputs: audio data $x_{a}$ , text data $x_{w}$ , and ID $x_{i}$ . Then, the final output is the sequential gestural data denoted as $\hat{y}$ . It contains the locations of key points for gestures in every time step. Besides, the ground truth gestures $y$ are also extracted from videos + +![](images/c28c690b00bfeb2cd8381de9de24d1ff260c760d1eb020ee654741005e62749c.jpg) +Figure 3. An overview of our semantic-aware gesture generation. It contains two parts: DEcoupled Mining Module (DEM) and Semantic Energized Module (SEM). Two encoder networks $(E_s, E_b)$ and a decoder network $(D)$ are designed to learn beat and semantic information and produce gestures comprehensively. Another prompter network $(P)$ encourages the networks to learn and generate semantic gestures. + +and pre-processed [34,35]. All $x_{a}, x_{w}, y$ , and $\hat{y}$ correspond to the time step $t$ . + +Moreover, we focus on energizing the gestures with better semantic expressiveness in this work. Instead of generating gestures resembling the ground truth, we emphasize producing semantic gestures conveying similar semantics as the ground truth. + +# 3.2. DEcoupled Mining module + +In speech gestures [4, 8, 15, 18], beat gestures are intuitive and relatively simple. Semitic gestures are diverse and demand semantic understanding. These induce that the beat cues are easier to be investigated, and the semantic gestures may be ignored in the generation. Then, the method may be trapped in the beat gestures. In our work, we first propose the DEcoupled Mining module (DEM) to learn information for semantic gestures and beat gestures separately and explicitly. + +In the speech data, text corresponds to the speech content and is related to the semantics. Meanwhile, audio data reflects the pronunciations, emotions, accents, beats, volume, etc. Some factors in audio merely support semantic expression and do not convey particular semantics. Specifically, the beat and volume of the audio correspond to the rhythm and speed of the speech. They are semantic-irrelevant, and the listener cannot realize the semantics only by the beat and volume. Thus, we decouple these factors to the semantic-irrelevant information, which leads to the beat gestures. + +Specifically, as shown in Fig. 3, we decouple the input that consists of audio amplitudes and audio onsets, which stand for volume and beat, respectively. For volume information, the audio data with large amplitude values possess large volumes. We defined the volume function as: + +$$ +\mathcal {A} \left(x _ {a}, t\right) = \left\{ \begin{array}{l l} 1 & x _ {a} (t) \geq \frac {1}{T} \sum_ {t} ^ {T} x _ {a} (t) \\ 0 & x _ {a} (t) < \frac {1}{T} \sum_ {t} ^ {T} x _ {a} (t) \end{array} \right. \tag {1} +$$ + +where $x_{a}$ is the amplitude of the audio data, $t$ is the time step, and $T$ is the overall length. We set $A(x_{a},t) = 1$ if the amplitude is larger than the average and vice versa. This is because the audio data contains noise and background sound. The amplitude larger than the average indicates that the speaker starts to speak apparently. + +Moreover, it is difficult to capture the changing of intonation or speed of the speaker only using volume signals. We introduce the onset strength envelope [12, 13, 23] to represent the beat information. Onset [12, 13] refers to the start points of the sound. The strength envelope [5] can indicate the probabilities of the onset detected in the audio signal. This can represent the beat of the speech audio. We follow [5, 23] to extract the onset strength envelope and denote it as $\mathcal{O}(x_a)$ in our work. + +In DEM, two encoders $E_{s}$ and $E_{b}$ are proposed to mine the information for semantic and beat, respectively. In detail, for beat gestures, $E_{b}$ utilizes $\mathcal{A}(x_{a},t)$ and $\mathcal{O}(x_{a})$ as inputs. For semantic gestures, $E_{s}$ is designed to learn from $x_{w}$ and $x_{a}$ . Besides, as the standard settings in [1, 34], we also add person ID $x_{i}$ as inputs for encoders. + +The procedure of DEM can be formulated as: + +$$ +\begin{array}{l} z _ {s} = E _ {s} \left(x _ {w}, x _ {a}, x _ {i}\right), \\ \begin{array}{l} z _ {b} = E _ {b} \left(\mathcal {O} \left(x _ {a}\right), \mathcal {A} \left(x _ {a}\right), x _ {i}\right) \end{array} \tag {2} \\ \end{array} +$$ + +where $z_{s}$ and $z_{b}$ are the features for semantic and beat, respectively. Moreover, both encoders possess similar network structures. They all contain three fully-connected layers to handle the inputs. Then, two additional fully-connected layers and concatenation operations are utilized to merge three kinds of inputs. Next, a four-layer GRU network is designed to learn the sequential features produced from the above fully-connected layers. More details for the networks are displayed in the supplementary. + +# 3.3. Semantic Energized Module + +After mining information for semantic and beat gestures in DEM, we designed a Semantic Energized Module (SEM) to further energize semantic learning against the problem of misalignment. First, we introduce a semantic prompt gallery from the TED dataset [35]. Then, we propose a semantic prompter to learn the gallery individually. The prompter can formulate semantic representation for gestures. Through the prompter, we further leverage supervisions to predictions. This encourages the network to pursue similar representations of semantics by prompter that avoids the network learning misaligned semantics directly. + +Semantic Prompt Gallery: The semantic prompt gallery is a small text-gesture collection. It contains five general classes from [4, 8, 9, 15, 18]. We take three noticeable semantics (Listing, emphasize, deictics) conveyed from gestures and two classes + +(negative, positive) to reflect the speakers' feelings and attitudes. The gallery is denoted as $\mathcal{G} = \{\mathcal{C}_{\text{Listing}}, \mathcal{C}_{\text{Emphasize}}, \mathcal{C}_{\text{Deictics}}, \mathcal{C}_{\text{Negative}}, \mathcal{C}_{\text{Positive}}\}$ , where $\mathcal{C}_*$ is a text-gesture set, and $\mathcal{C}_* = \{[v_1, v_2, \ldots, v_M]; [g_1, g_2, \ldots, g_N]\}$ . $v_i$ and $g_i$ denote a word and a gesture sequence, respectively. Moreover, we apply $M$ words from [4,8,9,15,18] to construct the text set for each class as $v$ . Besides, [18] presents a versatile collection and collecting method for semantically-congruent gestures. Following [18], we collect $N$ gesture sequences from the TED dataset [35] for every class to formulate $g$ . More details will be presented in supplementary. + +Semantic Prompter: We propose a semantic prompter to learn the above gallery independently. As shown in Fig. 4, the semantic prompter $P$ adopts gesture data as inputs and learns to classify gestures into five general semantic labels in the gallery. $P$ consists of two fully connected layers and a four-layer GRU network, in which the fully-connected layers are utilized to process inputs and outputs. The GRU aims to model the sequential inter-connection of gestures. In all, the prompter can reflect the semantics of gestures and represent the gestures in the semantic view. + +Semantic Energized Learning: As shown in Fig. 3, a gesture decoder $D$ is proposed to aggregate both features from $E_{s}$ and $E_{b}$ and produce gestures as the final outputs, which can be described as $\hat{y} = D(z_{s},z_{b})$ , where $\hat{y}$ denotes the final predictions. $D$ aims to decode gestures considering both information of beat and semantic. It is constructed by a single fully-connected network. Then, to energize semantic learning, SEM leverages two kinds of supervision for prediction $\hat{y}$ : representational similarity and semantic similarity. + +For representational similarity, we constrain $\mathrm{P}$ to be similar to the ground truth directly. The regression loss $\mathcal{L}_{reg}$ and adversarial loss $\mathcal{L}_{adv}$ are applied. $\mathcal{L}_{reg}$ [34] contains a smooth L1 loss to reduce the distances between $y$ and $\hat{y}$ . Meanwhile, the Kullback-Leibler (KL) divergence is included in $\mathcal{L}_{reg}$ to constrain the person ID. Besides, the same discriminator as [34] is added to perform adversarial learning for generated gestures. This also targets the representational similarity of predictions and the ground truth [34]. + +More important, for semantic similarity, we further propose the semantic aligned loss $\mathcal{L}_{\text{align}}$ . Considering the semantic misalignment, indicating or annotating semantics to particular words may not be proper. In our work, we propose to align semantics conveyed from the gestures. In other words, we encourage the generated results to perform similar semantic representations as ground truth gestures. To this end, we apply the prompter $P$ to represent gestures of predictions and the ground truth and propose a semantic aligned loss $\mathcal{L}_{\text{align}}$ to regularize: + +$$ +\mathcal {L} _ {\text {a l i g n}} (\hat {y}, y) = | P (\hat {y}) - P (y) | \tag {3} +$$ + +![](images/33473e5dae3e9ef3d777ed679f59c25c2f284a5dc4df8feb3d1e35276b34f81b.jpg) +Figure 4. Construction and training of the semantic prompter. The semantic prompter is learned from the semantic prompt gallery. FC, Concat, and GRU denotes the fully-connected layer, concatenate operation, and GRU network, respectively. $t_*$ indicates the time step of gesture data. The semantic prompter learns from the semantic prompts and bridges general correspondences between gestures and semantics. + +where $|*|$ is the smooth L1 normalization. As $P$ is fixed in training, to solve the above loss function, the output gestures $\hat{y}$ should reveal similar semantic representations with the ground truth $y$ under the view of $P$ . $\mathcal{L}_{\text{align}}$ does not regulate the predictions to be identical with the ground truth or particular gestures, and it requires similar semantics. + +In all, the final loss function $\mathcal{L}$ can be formulated as: + +$$ +\mathcal {L} = \mathcal {L} _ {r e g} + \mathcal {L} _ {a d v} + \mathcal {L} _ {a l i g n} \tag {4} +$$ + +# 4. Experiments + +In this section, we discuss the details of SEEG and evaluate SEEG with various metrics in different datasets. + +Implementation Details: Our network designs follow the structures of the generator in [34] and only change some fully-connected layers to fit the inputs. To perform a fair comparison, all the other settings, like the optimizer, learning rate, etc., are the same with [34]. Besides, for training the prompter network, we utilize random clipping, random resizing, and cutmix [36] to augment the gestures in the gallery. We train the prompter network with 100 epochs with the SDG optimizer and learning rate 0.001. + +In addition, we collect the semantic gallery with $M = 25$ and $N = 5$ . To be noticed, there are two significant differences between our semantic gallery and word-pose dictionary in previous work [21]. 1). Only general classes for semantics are defined. No specific words map particular gestures. This property avoids the misalignment between words and gestures in the gallery. 2). The gallery is only applied to train $P$ . It is not practical and not necessary to collect a comprehensive dictionary for training. The prompter network is not responsible for recognizing all possible semantics in gestures. It only needs to reflect some generally possible semantics in the gallery. + +Datasets: We test our method based on the TED dataset [35], the current largest and standard dataset for + +speech-driven gestures [34, 35]. As in [34], it is constructed based on TED videos and contains the 3D pose data extracted from the videos. The dataset also includes the speech audio and transcribed speech text [34]. + +Besides, some gestures in the TED dataset are not expressive and may not convey explicit semantics. Meanwhile, some introverted speakers may not tend to provide apparent movements in speech. To reflect the improvements in the semantic aspect, we provide a Semantic-aware test set (SatTED) based on the above dataset in [34]. Specifically, we re-rank the testing set of the TED dataset based on the confidences of $P$ and collect about the top $50\%$ data as SatTED. The original test set in [34] contains 25,930 samples. Our SatTED includes 12,000 samples and more than 7.5 hours. We compare methods in the SatTED and further discuss the superiority of our method in the semantic aspect. + +Evaluation Metrics: We evaluate our method based on three metrics: + +1) FGD: evaluating the distances between the features of predictions and the ground truth. It robustly reflects the similarity between gestures in appearances. + +2) Diversity metrics [16]: the measurement of diversity and flexibility. As expressive speakers tend to provide various gestures to support their expressions [15,18], this metric can reflect the naturalness and semantic correlation to some degree. + +3) Semantic-Aware Accuracy (SAA): we additionally propose a Semantic-Aware Accuracy (SAA) as the measurement for semantic expressiveness. With the semantic prompter, we can label the predicted gestures for semantic classes. Meanwhile, for the speech content, the semantic label can be assigned by voting. For every word in a sentence of the speech, we search the most similar description $v$ in the gallery and assign the corresponding class $C_*$ as the label of this word. After voting for every word, we select the class with the highest voting value as the label for the current sentence. Then, with the labels of gestures and sentences, we calculate the accuracy as SAA. + +It is worth noting that $\mathcal{L}_{\text{align}}$ supervised the semantic expressions of predicted gestures and the ground truth gestures, which avoid the problem of misalignment. It does NOT supervise that the gestures should correspond to the text. Meanwhile, SAA describes the text-gesture correlation. This is a higher requirement since the ground truth may also not reflect the semantics closely. SAA measures the semantic expressions in an ideal condition that all gestures are semantic gestures. + +Subjective Evaluation: We perform the user study through actual humans to evaluate the gestures. We random sample 20 pieces of speech audio, text, and the gestures of actual humans, Trimodal Context [34], and ours. Then, we publish these as the questionnaire for 50 different people to grade the gestures by three factors: naturalness, speech- + +
MethodsFGD (↓)
Seq2Seq [35]18.154
Speech2Gesture [14]19.254
Language2pose [2]22.083
Trimodal Context [34]3.729
Ours (Eb + D only)3.751
Overall SEEG6.244
+ +Table 1. The performance of different methods for co-speech gesture generation in the TED dataset. We adapt FGD as the evaluating metrics. The performances are comparable even only using encoder $E_{b}$ and decoder $D$ in our method. Note that FGD may NOT well reflect the gesture semantics. The evaluations on gesture semantics are presented in other tables. + +gesture correlation, and gesture frequency. The factors are commonly used in gesture evaluation as in [31]. The range of grades is from 0 to 10. We collect all the questionnaires and calculate the average marks in experiments. + +# 4.1.Quantitative Evaluation + +Comparisons with state-of-the-art models: We first compare the values of FGD based on the TED dataset. We train the encoder $E_{s}$ with decoder $D$ individually, generating gestures based on semantic-irrelevant data without the prompter network. This corresponds to the generation of beat gestures. As shown in Table 1, With $E_{s} + D$ only, our result compares favorably to state-of-the-art methods in FGD, which utilizes comprehensive data from speech. This indicates that the network can achieve similar FGD to the recent method without mining any semantic cues. Only by mining the semantic-irrelevant data, the network can 'pretend' to produce meaningful gestures. Though we expect the network to learn semantics and produce expressive semantic gestures, the networks can also perform well without learning any semantics. This reveals two defeats in current research: 1). The beat gestures may dominate the dataset. Meanwhile, the semantic cues are hard to be mined with the comprehensive inputs. Thus, decoupled learning is valuable. DEM separately learn cues for beats and semantics, which guide the network not to be trapped in beat gestures. Besides, rather than the method side, a new sub-set with a larger ratio of semantic gestures is also required to uncover the semantic expressiveness of results. 2). FGD may be solvable in the current dataset by merely considering beat gestures. Merely measuring the distances between predictions and the ground truth is not enough. More semantic-aware measurements should be introduced. To solve the above defeats, the SatTED dataset and SAA are proposed in our work. + +Meanwhile, our overall method in FGD also outperforms previous methods with large gaps. Though slightly lower than $E_{s} + D$ , our overall method also achieves competitive results than the current state-of-the-art. Since SEEG + +
DatasetMethodFGD (↓)Diversity (↑)SAA (↑)
EmphasizeListingDeicticsPositiveNegativeAverage
TEDReal Gesture-1.405±0.05852.13541.02865.51519.38827.25537.688
Trimodal Context [34]3.7290.759±0.02932.49643.20351.64717.02129.60030.286
SEEG6.2441.059±0.04540.43844.46566.11619.00427.24636.851
SatTEDReal Gesture-1.271±0.05654.70964.16982.58722.52229.05243.904
Trimodal Context [34]4.5050.782±0.03732.92855.61261.84412.83321.49630.956
SEEG7.4511.118±0.04944.51852.32270.46121.32227.76338.457
+ +method is energized by SEM and tends to be more expressive and diverse, it may not completely follow the ground truth and focus on semantics. + +Semantic-aware Evaluation: We compare all the metrics in two datasets as in Table 2. We also display all the semantic-aware accuracy in every class from the gallery. Results demonstrate that our method shows significant improvements in diversity and SAA than Trimodal Context [34], the current state-of-the-art in co-speech gesture generation. + +Specifically, though the values of FGD are slightly lower, the diversity of our results is far better than [34]. With the SatTED dataset, the diversity of our method even approaches the real gestures of ground truth. Meanwhile, the semantics conveyed in our results are more recognizable and significant. Almost all values of SAA in every class and the average are better than Trimodal Context [34]. All these results show that SEEG is comparable in stimulating the gestures of actual humans and capable of understanding the semantics. Besides, SEEG achieves higher results than the ground truth in some categories of SAA since the ground truth may be beat gestures and do not respond to corresponding semantics. + +In addition, the SatTED possesses a larger ratio of semantic gestures and is hard to be solved by the current method. As shown in Table 2, our method presents more significant improvements in this dataset. Results demonstrate that our method effectively boosts semantic learning for gestures and conducts a better semantic-aware generation. + +Effect of Semantic Decouple: In our work, we decouple the semantics from inputs and enforce the networks to mine information for semantic and beat gestures separately. As in method design, we expect to achieve semantic gestures with $E_{s} + \mathrm{SEM}$ , beat gestures with $E_{b} + D$ only, and the total outputs considering both sides (Overall). In this section, we experiment and verify the three parts as in Table 3. Specifically, we train $E_{b} + D$ only with $\mathcal{L}_{r}eg$ and $\mathcal{L}_{a}dv$ . $E_{s} + \mathrm{SEM}$ is trained with $E_{s} + D$ with $\mathcal{L}$ . Then, to show the interactions between $E_{s}$ and $E_{b}$ in the overall pipeline, we take the overall SEEG training from scratch + +Table 2. Comparison of all metrics in the TED dataset and SatTED dataset. Our method shows better performances significantly in some semantic-relevant metrics like diversity and SAA. Real Gestures indicate the gestures of real humans in the ground truth. $\pm$ means $95\%$ confidence interval. $\uparrow$ indicates that higher values are better, and $\downarrow$ means lower values are better. + +
DatasetMethodFGD (↓)Diversity (↑)SAA (↑)
TEDEB + D only3.7510.984±0.04430.022
ES + SEM7.8051.113±0.05137.259
OverallEB + D5.4720.901±0.04530.597
ES + D7.3201.127±0.04739.981
SatTEDEB + D only5.1140.922±0.38433.986
ES + SEM9.2911.164±0.04944.218
OverallEB + D5.4900.990±0.32634.344
ES + D6.7971.128±0.04946.533
+ +Table 3. Comparison of different training manners. $E_{b} + D$ only indicates that training individually with $E_{s}$ and $D$ without $P$ . $E_{s} + \mathrm{SEM}$ denotes only training without encoder $E_{b}$ . Overall means training with the complete method. Meanwhile, $E_{b} + D$ indicates inferring the overall method with padding features from $E_{b}$ as 0. $E_{s} + D$ is inferring with padding features from $E_{s}$ . + +with all modules and separately test each module. As Table 3, for $E_{b} + D$ overall, we test the results by padding features $z_{b}$ from $E_{b}$ with zero. Similarly, $E_{s} + D$ in overall pads features $z_{s}$ with zero. + +As shown in Table 3, $E_{b} + D$ only achieves higher performances in FDG metrics but shows significant decreases in diversity and SAA since it is unavailable to learn semantics with semantic decoupled inputs. Meanwhile, the isolated training with $E_{s}$ and $D$ tends to learn semantics only and may not perform similarly to the ground truth. This leads the results to obtain significant improvements in SAA but becomes worse in FGD. Moreover, in the overall pipeline, similar regularities also occur compared with training individually. In comparison, the learning of two parts would not be too radical. As a part of the overall pipeline, both $E_{b}$ and $E_{s}$ acquire improvements. + +Ablation Study for Semantic Prompt: SEM relies on the semantic prompter to learn semantics in gestures. The impact of the prompter network for semantic learning is explored in this section. We experiment with the SEM and overall pipeline with or without a semantic prompter, respectively. As shown in Table 4, without the semantic prompter, both semantic-aware performances like diversity and SAA degrade. Meanwhile, removing the prompter network leverages the improvements in FGD. The individual $E_{s} + D$ without a prompter network performs similarly to + +![](images/c295c7d7110e6b233c5e64d822c7b513880ea5e3b021c6dd61e9007c30016ad0.jpg) +Figure 5. Examples of generated gestures. Our method shows better semantic expressiveness and conspicuous and reasonable responses to corresponding words. We highlight the significant gestures for [34] and ours with the blue and orange shading, respectively. + +
MethodMetrics
FGD (↓)Diversity (↑)SAA (↑)
Overall w/o Ts4.9371.004±0.03730.920
Es + D w/o Ts3.9150.854±0.03730.216
+ +Table 4. Ablation study for effect of the semantic prompter. Without the semantic prompter, the performances of diversity and SAA degrade. + +the method in [34]. + +# 4.2. Qualitative Evaluation + +Subjective Evaluation by User Study: We collect questionnaires from different volunteers and compute the average scores in different factors. The factors are all regular questionnaire items as in [31]. The statistical results are shown in Fig. 6. To investigate the performances of parts in our method, we train $E_{b} + D$ only as of the beat gestures of our method (Beat), $E_{b} + \mathrm{SEM}$ as the semantic gestures of our method (Semantic), and the entire method (Overall), respectively. We compare our method with the current state-of-the-art and the ground truth. In comparison, our method shows significant improvements in all three factors. Moreover, the semantic gestures perform worse in naturalist and frequency but achieve remarkable advantages in speech-gesture correlation. This corresponds to the design of SEM, which focuses on semantic learning and may deviate from the ground truth. + +Visualization: We showcase the results of our method and compare them with the current state-of-the-art [34]. In examples of generated gestures, as shown in Fig. 5, significant responses occur corresponding to some words (e.g., + +![](images/58767c28dd91454a25e7c3f9a283709f6b2fc855245828843325bd92fef10030.jpg) +Figure 6. User study for synthesized gestures. The ground truth, current state-of-the-art, and our methods are compared based on three evaluating factors. + +clearly, at the beginning, quit a, available, easy, first step). The visualizations prove that our method learns semantics better and generates vivid gestures with semantic expressiveness. + +# 5. Conclusion + +In this paper, a novel method for semantic-aware gesture generation is proposed. The proposed method contains two parts: DEcoupled Mining module (DEM) and Semantic Energized Module (SEM). DEM decouples semantics from inputs and forces the network to mine information for semantic and beat gestures. SEM contains a semantic prompter to leverage semantic-based supervision for the networks and produces semantic gestures. Experiments in various metrics, user study, and visualizations prove that the proposed method learns semantics better and produces semantic gestures corresponding to the speech content. + +# References + +[1] Chaitanya Ahuja, Dong Won Lee, Yukiko I Nakano, and Louis-Philippe Morency. Style transfer for co-speech gesture animation: A multi-speaker conditional-mixture approach. In European Conference on Computer Vision, pages 248–265. Springer, 2020. 3, 4 +[2] Chaitanya Ahuja and Louis-Philippe Morency. Language2pose: Natural language grounded pose forecasting. In 2019 International Conference on 3D Vision (3DV), pages 719-728. IEEE, 2019. 6 +[3] Simon Alexanderson, Gustav Eje Henter, Taras Kucherenko, and Jonas Beskow. Style-controllable speech-driven gesture synthesis using normalising flows. In Computer Graphics Forum, volume 39, pages 487-496. Wiley Online Library, 2020. 3 +[4] Zeynep Azar, Ad Backus, and Ashi Özyürek. Language contact does not drive gesture transfer: Heritage speakers maintain language specific gesture patterns in each language. *Bilingualism: Language and Cognition*, 23(2):414-428, 2020. 4, 5 +[5] Sebastian Bock and Gerhard Widmer. Maximum filter vibrato suppression for onset detection. In Proc. of the 16th Int. Conf. on Digital Audio Effects (DAFx). Maynooth, Ireland (Sept 2013), volume 7, 2013. 4 +[6] Rishi Bommasani, Kelly Davis, and Claire Cardie. Bert wears gloves: Distilling static embeddings from pretrained contextual representations. 2019. 3 +[7] Diana Boxer. Social distance and speech behavior: The case of indirect complaints. Journal of pragmatics, 19(2):103-125, 1993. 3 +[8] Justine Cassell. A framework for gesture generation and interpretation. Computer vision in human-machine interaction, pages 191-215, 1998. 2, 4, 5 +[9] Lisette De Jonge-Hoekstra, Ralf FA Cox, Steffie Van der Steen, and James A Dixon. Easier said than done? task difficulty's influence on temporal alignment, semantic similarity, and complexity matching between gestures and speech. Cognitive science, 45(6):e12989, 2021. 4, 5 +[10] 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.3 +[11] Masrur Doostdar, Stefan Schiffer, and Gerhard Lakemeyer. A robust speech recognition system for service-robotics applications. In Robot Soccer World Cup, pages 1-12. Springer, 2008. 3 +[12] Daniel PW Ellis. Beat tracking by dynamic programming. Journal of New Music Research, 36(1):51-60, 2007. 4 +[13] Daniel PW Ellis and Graham E Poliner. Identifyingcover songs' with chroma features and dynamic programming beat tracking. In 2007 IEEE International Conference on Acoustics, Speech and Signal Processing-ICASSP'07, volume 4, pages IV-1429. IEEE, 2007. 4 +[14] Shiry Ginosar, Amir Bar, Gefen Kohavi, Caroline Chan, Andrew Owens, and Jitendra Malik. Learning individual styles of conversational gesture. In Proceedings of the IEEE/CVF + +Conference on Computer Vision and Pattern Recognition, pages 3497-3506, 2019. 1, 3, 6 +[15] Susan Goldin-Meadow and Martha Wagner Alibali. Gesture's role in speaking, learning, and creating language. Annual review of psychology, 64:257-283, 2013. 2, 4, 5, 6 +[16] Chuan Guo, Xinxin Zuo, Sen Wang, Shihao Zou, Qingyao Sun, Annan Deng, Minglun Gong, and Li Cheng. Action2motion: Condite0ioned generation of 3d human motions. In Proceedings of the 28th ACM International Conference on Multimedia, pages 2021–2029, 2020. 6 +[17] Gustav Eje Henter, Simon Alexanderson, and Jonas Beskow. Moglow: Probabilistic and controllable motion synthesis using normalising flows. ACM Transactions on Graphics (TOG), 39(6):1-14, 2020. 3 +[18] Sarah S Hughes-Berheim, Laura M Morett, and Raymond Bulger. Semantic relationships between representational gestures and their lexical affiliates are evaluated similarly for speech and text. Frontiers in psychology, 11:2808, 2020. 4, 5, 6 +[19] William A Kretzschmar Jr, William A Kretzschmar, and William A Kretzschmar Jr. The linguistics of speech. Cambridge University Press, 2009. 3 +[20] Taras Kucherenko, Patrik Jonell, Sanne van Waveren, Gustav Eje Henter, Simon Alexandersson, Iolanda Leite, and Hedvig Kjellström. Gesticulator: A framework for semantically-aware speech-driven gesture generation. In Proceedings of the 2020 International Conference on Multimodal Interaction, pages 242-250, 2020. 2, 3 +[21] Miao Liao, Sibo Zhang, Peng Wang, Hao Zhu, Xinxin Zuo, and Ruigang Yang. Speech2video synthesis with 3d skeleton regularization and expressive body poses. In Proceedings of the Asian Conference on Computer Vision, 2020. 1, 3, 5 +[22] Joseph D Matarazzo, Arthur N Wiens, Russell H Jackson, and Thomas S Manaugh. Interviewee speech behavior under conditions of endogenously-present and exogenously-induced motivational states. Journal of Clinical Psychology, 1970. 3 +[23] Brian McFee, Colin Raffel, Dawen Liang, Daniel PW Ellis, Matt McVicar, Eric Battenberg, and Oriol Nieto. librosa: Audio and music signal analysis in python. In Proceedings of the 14th python in science conference, volume 8, pages 18-25. CiteSeer, 2015. 4 +[24] Evonne Ng, Shiry Ginosar, Trevor Darrell, and Hanbyul Joo. Body2hands: Learning to infer 3d hands from conversational gesture body dynamics. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11865-11874, 2021. 3 +[25] Stanislav Ondáš, Jozef Juhar, Matúš Pleva, Martin Lojka, Eva Kiktová, Martin Sulír, Anton Čižmár, and Roland Holcer. Speech technologies for advanced applications in service robotics. Acta Polytechnica Hungarica, 10(5):45-61, 2013. 3 +[26] 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 + +[27] David Poeppel, William J Idsardi, and Virginie Van Wassenhove. Speech perception at the interface of neurobiology and linguistics. Philosophical Transactions of the Royal Society B: Biological Sciences, 363(1493):1071-1086, 2008. 3 +[28] Robert R Provine. Laughter punctuates speech: Linguistic, social and gender contexts of laughter. Ethology, 95(4):291-298, 1993. 3 +[29] Shenhan Qian, Zhi Tu, Yihao Zhi, Wen Liu, and Shenghua Gao. Speech drives templates: Co-speech gesture synthesis with learned templates. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 11077-11086, 2021. 1, 2, 3 +[30] Jørgen Rischel. Formal linguistics and real speech. Speech Communication, 11(4-5):379-392, 1992. 3 +[31] Pieter Wolfert, Nicole Robinson, and Tony Belpaeme. A review of evaluation practices of gesture generation in embodied conversational agents. arXiv preprint arXiv:2101.03769, 2021. 6, 8 +[32] Nessa Wolfson. The bulge: A theory of speech behavior and social distance. *Penn Working Papers in Educational Linguistics*, 2(1):55-83, 1990. 3 +[33] Yi Yang, Yueting Zhuang, and Yunhe Pan. Multiple knowledge representation for big data artificial intelligence: framework, applications, and case studies. Frontiers of Information Technology & Electronic Engineering, 22(12):1551-1558, 2021. 3 +[34] Youngwoo Yoon, Bok Cha, Joo-Haeng Lee, Minsu Jang, Jaeyeon Lee, Jaehong Kim, and Geehyuk Lee. Speech gesture generation from the trimodal context of text, audio, and speaker identity. ACM Transactions on Graphics, 39(6), 2020. 1, 2, 3, 4, 5, 6, 7, 8 +[35] Youngwoo Yoon, Woo-Ri Ko, Minsu Jang, Jaeyeon Lee, Jae-hong Kim, and Geehyuk Lee. Robots learn social skills: End-to-end learning of co-speech gesture generation for humanoid robots. In 2019 International Conference on Robotics and Automation (ICRA), pages 4303-4309. IEEE, 2019. 2, 3, 4, 5, 6 +[36] 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 Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6023-6032, 2019. 5 \ No newline at end of file diff --git a/seegsemanticenergizedcospeechgesturegeneration/images.zip b/seegsemanticenergizedcospeechgesturegeneration/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..02bde2ac4ab9f7f99663cb316d396dd807c70f53 --- /dev/null +++ b/seegsemanticenergizedcospeechgesturegeneration/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d86db14fca364ee61cbc773cd945504d3adaca1ec3636be58f80dd09b84f7e77 +size 417376 diff --git a/seegsemanticenergizedcospeechgesturegeneration/layout.json b/seegsemanticenergizedcospeechgesturegeneration/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9542e0017728df0317541566721d5f878a75b2e1 --- /dev/null +++ b/seegsemanticenergizedcospeechgesturegeneration/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cef01773682e2677193837732b31db86fdc379329c4b975b8a5d066c6b94483d +size 373942 diff --git a/sgtrendtoendscenegraphgenerationwithtransformer/12a3dfe9-bf30-46c3-b611-760d60f82a6f_content_list.json b/sgtrendtoendscenegraphgenerationwithtransformer/12a3dfe9-bf30-46c3-b611-760d60f82a6f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..1d6f06cf8c697a17d2fb3deae47fb5b77f9181e1 --- /dev/null +++ b/sgtrendtoendscenegraphgenerationwithtransformer/12a3dfe9-bf30-46c3-b611-760d60f82a6f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62e39532aad7290f54f8b5a846d6a3d76b7db87dc06cfb6c018f72e54b558f50 +size 91678 diff --git a/sgtrendtoendscenegraphgenerationwithtransformer/12a3dfe9-bf30-46c3-b611-760d60f82a6f_model.json b/sgtrendtoendscenegraphgenerationwithtransformer/12a3dfe9-bf30-46c3-b611-760d60f82a6f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7215d81746d0ff5545977ac56f17527c76c085c2 --- /dev/null +++ b/sgtrendtoendscenegraphgenerationwithtransformer/12a3dfe9-bf30-46c3-b611-760d60f82a6f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bf97dd62775895e0f56acc2754c7f7f5de9ff0a81151c7df519e66fa4ad40ba +size 112087 diff --git a/sgtrendtoendscenegraphgenerationwithtransformer/12a3dfe9-bf30-46c3-b611-760d60f82a6f_origin.pdf b/sgtrendtoendscenegraphgenerationwithtransformer/12a3dfe9-bf30-46c3-b611-760d60f82a6f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0e0386b3701cb9f3ec18b4ac450019b10e28023b --- /dev/null +++ b/sgtrendtoendscenegraphgenerationwithtransformer/12a3dfe9-bf30-46c3-b611-760d60f82a6f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7aad4d5a827c49cc7dde58e3edb8ba604f582bd13d772a29f5d2f86eb8c0edf4 +size 3713914 diff --git a/sgtrendtoendscenegraphgenerationwithtransformer/full.md b/sgtrendtoendscenegraphgenerationwithtransformer/full.md new file mode 100644 index 0000000000000000000000000000000000000000..09bfdf20a4548204da21fcea672baee727cf573b --- /dev/null +++ b/sgtrendtoendscenegraphgenerationwithtransformer/full.md @@ -0,0 +1,359 @@ +# SGTR: End-to-end Scene Graph Generation with Transformer + +Rongjie Li $^{1,3,4}$ Songyang Zhang $^{1,3,4}$ Xuming He $^{1,2}$ + +$^{1}$ School of Information Science and Technology, ShanghaiTech University + +$^{2}$ Shanghai Engineering Research Center of Intelligent Vision and Imaging + +$^{3}$ Shanghai Institute of Microsystem and Information Technology, Chinese Academy of Sciences + +4University of Chinese Academy of Sciences + +{lirj2, zhangsy1, hexm} @ shanghaiitech.edu.cn + +# Abstract + +Scene Graph Generation (SGG) remains a challenging visual understanding task due to its compositional property. Most previous works adopt a bottom-up two-stage or a point-based one-stage approach, which often suffers from high time complexity or sub-optimal designs. In this work, we propose a novel SGG method to address the aforementioned issues, formulating the task as a bipartite graph construction problem. To solve the problem, we develop a transformer-based end-to-end framework that first generates the entity and predicate proposal set, followed by inferring directed edges to form the relation triplets. In particular, we develop a new entity-aware predicate representation based on a structural predicate generator that leverages the compositional property of relationships. Moreover, we design a graph assembling module to infer the connectivity of the bipartite scene graph based on our entity-aware structure, enabling us to generate the scene graph in an end-to-end manner. Extensive experimental results show that our design is able to achieve the state-of-the-art or comparable performance on two challenging benchmarks, surpassing most of the existing approaches and enjoying higher efficiency in inference. We hope our model can serve as a strong baseline for the Transformer-based scene graph generation. + +# 1. Introduction + +Inferring structural properties of a scene, such as the relationship between entities, is a fundamental visual understanding task. The visual relationship between two entities can be typically represented by a triple $<\text{subject entity}, \text{predicate}, \text{object entity}>$ . Based on the visual relationships, a scene can be modeled as a graph structure, with entities as nodes and predicates as edges, referred to as scene graph. The scene graph provides a compact structural representation + +![](images/c32e8dc6e054f549f0babf79a6e4e22c46dd27d407aa4180d9e1d8e9b3a1b83f.jpg) +Figure 1. The illustration of SGTR pipeline paradigm. We formulate SGG as a bipartite graph construction process. First, the entity and predicate nodes are generated, respectively. Then we assemble the bipartite scene graph from two types of nodes. + +for a visual scene, which has potential applications in many vision tasks such as visual question answering [8, 25, 31], image captioning [42, 43] and image retrieval [9]. + +Different from the traditional vision tasks (e.g., object detection) that focus on entity instances, the main challenge of scene graph generation (SGG) lies in building an effective and efficient model for the relations between the entities. The compositional property of visual relationships induces high complexity in terms of their constituents, which makes it difficult to learn a compact representation of the relationship concept for localization and/or classification. + +Most previous works attempt to tackle this problem using two distinct design patterns: bottom-up two-stage [1,4,5,7, 14,18,40,44] and point-based one-stage design [6,23]. The former typically first detects $N$ entity proposals, followed by predicting the predicate categories of those entity combinations. While this strategy achieves high recalls in discovering relation instances, its $\mathcal{O}(N^2)$ predicate proposals not only incur considerable computation cost but also produce substantial noise in context modeling. In the one-stage methods, entities and predicates are often extracted separately from + +the image in order to reduce the size of relation proposal set. Nonetheless, they rely on a strong assumption of the non-overlapping property of interaction regions, which severely restricts their application in modeling complex scenes2. + +In this work, we aim to tackle the aforementioned limitation by leveraging the compositional property of scene graphs. To this end, as illustrated in Fig. 1, we first formulate the SGG task as a bipartite graph construction problem, in which each relationship triplet is represented as two types of nodes (entity and predicate) linked by directed edges. Such a bipartite graph allows us to jointly generate entity/predicate proposals and their potential associations, yielding a rich hypothesis space for inferring visual relations. More importantly, we propose a novel entity-aware predicate representation that incorporates relevant entity proposal information into each predicate node. This enriches the predicate representations and therefore enables us to produce a relatively small number of high-quality predicate proposals. Moreover, such a representation encodes potential associations between each predicate and its subject/object entities, which can facilitate predicting the graph edges and lead to efficient generation of the visual relation triplets. + +Specifically, we develop a new transformer-based end-to-end SGG model, dubbed Scene graph Generation TRansformer (SGTR), for constructing the bipartite graph. Our model consists of three main modules, including an entity node generator, a predicate node generator and a graph assembling module. Given an image, we first introduce two $\mathrm{CNN + }$ Transformer sub-networks as the entity and predicate generator to produce a set of entity and predicate nodes, respectively. To compute the entity-aware predicate representations, we design a structural predicate generator consisting of three parallel transformer decoders, which fuses the predicate feature with an entity indicator representation. After generating entity and predicate node representations, we then devise a differentiable graph assembling module to infer the directed edges of the bipartite graph, which exploits the entity indicator to predict the best grouping of the entity and predicate nodes. With end-to-end training, our SGTR learns to infer a sparse set of relation proposals from both input images and entity proposals adaptively, which can mitigate the impact of noisy object detection. + +We validate our method by extensive experiments on two SGG benchmarks: We validate our method by extensive experiments on two SGG benchmarks: Visual Genome and OpenImages-V6 datasets, with comparisons to previous state-of-the-art methods. The results show that our method outperforms or achieves comparable performance on both benchmarks and with high efficiency during inference. + +The main contribution of our work has three-folds: + +- We propose a novel transformer-based end-to-end scene + +graph generation method with a bipartite graph construction process that inherits the advantages of both two-stage and one-stage methods. + +- We develop an entity-aware structure for exploiting the compositional properties of visual relationships. +- Our method achieves the state-of-the-art or comparable performance on all metrics w.r.t the prior SGG methods and with more efficient inference. + +# 2. Related Works + +We categorize the related work of SGG/HOI according to three research directions: Two-stage Scene Graph Generation, One-stage Scene Graph Generation, and One-stage Human-Object Interaction. + +Two-stage Scene Graph Generation Two-stage SGG methods predict the relationships between densely connected entity pairs. Based on dense relationship proposals, many previous works focus on modeling contextual structure [10, 18-20, 22, 24, 30, 35-38, 41, 46-51]. Recent studies develop logit adjustment and other training strategies to address the long-tail recognition in the SGG task [1, 4, 5, 7, 13, 14, 18, 26, 29, 35, 39, 40, 44]. The two-stage design is capable of handling complex scenarios encountered in SGG. + +However, as discussed in Sec. 1, the dense relation proposal generation often leads to high time complexity and unavoidable noise in context modeling. Many two-stage works propose heuristic designs to address these issues (e.g., proposal generation [41], efficient context modeling [18, 19, 24, 30, 36, 43]). However, these sophisticated designs often rely on the specific properties of the downstream tasks, which limits the flexibility of their representation learning and is difficult to achieve end-to-end optimization. + +One-stage Scene Graph Generation Inspired by the fully convolutional one-stage object detection methods [2, 27, 33], the SGG community starts to explore the one-stage design. The fully convolutional network [23, 32] or CNN-Transformer [6] architecture is used in the one-stage methods to detect the relationship from image features directly. These one-stage frameworks typically can perform efficiently due to their sparse proposal set. Nonetheless, without explicit entity modeling, those designs may struggle to capture the complex visual relationships associated with real-world scenarios. Moreover, the majority of one-stage methods ignore entity-relation consistency as they predict each relationship independently rather than a valid graph structure with consistent node-edge constraint. + +One-stage Human-Object Interaction Our work is also related to the Human-Object Interaction (HOI) task. There has been a recent trend toward studying the one-stage framework for Human-Object Interaction [3, 11, 12, 21, 28, 34, 52, 54]. In particular, [3, 12] introduce an intriguing framework based on + +a dual decoder structure that simultaneously extracts the human, object, and interaction and then groups the components into final triplets. This decoding-grouping approach provides a divide-and-conquer strategy for detecting the human and interacted object. Inspired by this design, we propose the bipartite graph construction method in our SGTR for the more general SGG task. To further improve the association modeling between entity and predicate, we propose a predicate node generator with an entity-aware structure and a graph assembling mechanism. With such a design, the SGTR is able to handle the complex composition of relationships and achieve strong performance on SGG benchmarks. + +# 3. Preliminary + +In this section, we first introduce the problem setting of scene graph generation in Sec. 3.1, and then present an overview of our approach in Sec. 3.2. + +# 3.1. Problem Setting + +The task of scene graph generation aims to parse an input into a scene graph $\mathcal{G}_{\text{scene}} = \{\mathcal{V}_e, \mathcal{E}_r\}$ , where $\mathcal{V}_e$ is the node set denoting noun entities and $\mathcal{E}_r$ is the edge set that represents predicates between pairs of subject and object entities. Specifically, each entity $v_i \in \mathcal{V}_e$ has a category label from a set of entity classes $\mathcal{C}_e$ and a bounding box depicting its location in the image, while each edge $e_{i \to j} \in \mathcal{E}_r$ between a pair of nodes $v_i$ and $v_j$ is associated with a predicate label from a set of predicate classes $\mathcal{C}_p$ in this task. + +One possible way to generate the scene graph $\mathcal{G}_{\text{scene}}$ is by extracting the relationship triplet set from the given image. In this work, we formulate the relationship triplet generation process as a bipartite graph construction task [18]. Specifically, our graph consists of two groups of nodes $\mathcal{V}_e, \mathcal{V}_p$ , which correspond to entity representation and predicate representation, respectively. These two groups of nodes are connected by two sets of directed edges $\mathcal{E}_{e \to p}, \mathcal{E}_{p \to e}$ representing the direction from the entities to predicates and vice versa. Hence the bipartite graph has a form as $\mathcal{G}_b = \{\mathcal{V}_e, \mathcal{V}_p, \mathcal{E}_{e \to p}, \mathcal{E}_{p \to e}\}$ . + +# 3.2. Model Overview + +Our model defines a differentiable function $\mathcal{F}_{sgg}$ that takes an image $\mathbf{I}$ as the input and outputs the bipartite graph $\mathcal{G}_b$ , denoted as $\mathcal{G}_b = \mathcal{F}_{sgg}(\mathbf{I})$ , which allows end-to-end training. We propose to explicitly model the bipartite graph construction process by leveraging the compositional property of relationships. The bipartite graph construction consists of two steps: $a)$ node (entity and predicate) generation, and $b)$ directed edge connection. + +In the node generation step, we extract the entity nodes and predicate nodes from the image with an entity node generator and a predicate node generator, respectively. The predicate node generator augments the predicate proposals with entity information based on three parallel sub-decoders. + +In the directed edge connection step, we design a graph assembling module to generate the bipartite scene graph from the entity and predicate proposals. An overview of our method is illustrated in Fig. 2 and we will start with a detailed description of our model architecture below. + +# 4. Our Approach + +Our model consists of four main submodules: (1) a backbone network for generating feature representation of the scene (Sec. 4.1); (2) a transformer-based entity node generator for predicting entity proposals (Sec. 4.1); (3) a structural predicate node generator for decoding predicate nodes (Sec. 4.2); (4) a bipartite graph assembling module for constructing final bipartite graph via connecting entity nodes and entity-aware predicate nodes (Sec. 4.3). The model learning and inference are detailed in Sec. 4.4. + +# 4.1. Backbone and Entity Node Generator + +We adopt a ResNet as the backbone network, which first produces a convolutional feature representation for the subsequent modules. Motivated by the Transformer-based detector, DETR [2], we then use a multi-layer Transformer encoder to augment the convolutional features. The resulting CNN+transformer feature is denoted as $\mathbf{Z} \in \mathbb{R}^{w \times h \times d}$ , where $w, h, d$ are the width, height, and channel of the feature map, respectively. + +For the entity node generator, we adopt the decoder of DETR to produce $N_{e}$ entity nodes from a set of learnable entity queries. Formally, we define the entity decoder as a mapping function $\mathcal{F}_e$ , which takes initial entity query $\mathbf{Q}_e \in \mathbb{R}^{N_e \times d}$ and the feature map $\mathbf{Z}$ as inputs, and outputs the entity locations $\mathbf{B}_e \in \mathbb{R}^{N_e \times 4}$ and class scores $\mathbf{P}_e \in \mathbb{R}^{N_e \times (\mathcal{C}_e + 1)}$ , along with their associated feature representations $\mathbf{H}_e \in \mathbb{R}^{N_e \times d}$ as follows, + +$$ +\mathbf {B} _ {e}, \mathbf {P} _ {e}, \mathbf {H} _ {e} = \mathcal {F} _ {e} (\mathbf {Z}, \mathbf {Q} _ {e}) \tag {1} +$$ + +where $\mathbf{B}_e = \{\mathbf{b}_1, \dots, \mathbf{b}_{N_e}\}, \mathbf{b} = (x_c, y_c, w_b, h_b), x_c, y_c$ are the normalized center coordinates of the instance, $w_b, h_b$ are the normalized width and height of each entity box. + +# 4.2. Predicate Node Generator + +Our predicate node generator aims to generate an entity-aware predicate representation by incorporating relevant entity proposal information into each predicate node. Such a design enables us to encode potential associations between each predicate and its subject/object entities, which can facilitate predicting the graph edges and lead to efficient generation of the visual relation triplets. + +As shown in Fig. 2, the predicate node generator is composed of three components: (1) a predicate query initialization module for initializing the entity-aware predicate query (in Sec. 4.2.2), (2) a predicate encoder for image feature extraction (in Sec. 4.2.1), and (3) a structural predicate decoder for decoding a set of entity-aware predicate nodes. (in Sec. 4.2.3). + +![](images/81aec44308fb64d4753d2c594fcb7d92ccac97e2a6d3b946c4aac710bf222f3b.jpg) +Figure 2. An illustration of overall pipeline of our SGTR model. Left) We use a CNN backbone together with a transformer encoder for image feature extraction. The entity and predicate node generators are introduced to produce the entity node and entity-aware predicate node. A graph assembling mechanism is developed to construct the final bipartite scene graph. Right) The predicate node generator consists of three parts: a) predicate query initialization, b) a predicate encoder, and c) a structural predicate decoder, which is designed to generate entity-aware predicate nodes. + +![](images/eccead43ba7ed896a6d4f9929f1fd19ae13fdeef0a3ec7341a7c0aaa5744920f.jpg) + +# 4.2.1 Predicate Encoder + +Based on the CNN+transformer features $\mathbf{Z}$ , we introduce a lightweight predicate encoder to extract predicate-specific image features. Our predicate encoder, which has a similar structure to the backbone Transformer encoder, employs a form of multi-layer multi-head self-attention via the skip-connected feed-forward network. The resulting predicate-specific feature is denoted as $\mathbf{Z}^p\in \mathbb{R}^{w\times h\times d}$ . + +# 4.2.2 Predicate Query Initialization + +A simple strategy for initializing the predicate queries is to adopt a set of learnable vectors as in the DETR [2]. However, such a holistic vector-based query design ignores not only the compositional property of the visual relationships but also the entity candidate information. The resulting representations are not expressive enough for capturing the structured and diverse visual relationships. + +To cope with this challenge, we introduce a compositional query representation that decouples predicate queries, denoted as $\mathbf{Q}_p^e\in \mathbb{R}^{N_r\times 3d}$ , into three components $\{\mathbf{Q}_{is};\mathbf{Q}_{io};\mathbf{Q}_p\}$ , where subject/object entity indicator $\mathbf{Q}_{is},\mathbf{Q}_{io}\in \mathbb{R}^{N_r\times d3}$ and predicate representation $\mathbf{Q}_p\in \mathbb{R}^{N_r\times d}$ . Concretely, we generate the predicate query $\mathbf{Q}_p^e$ in an entity-aware and scene-adaptive manner using a set of initial predicate queries $\mathbf{Q}_{init}\in \mathbb{R}^{N_r\times d}$ and entities representation $\mathbf{B}_e,\mathbf{H}_e$ . To achieve this, we first build a geometric-aware entity representation as in [45], which defines a set of key and value vectors $\in \mathbb{R}^{N_e\times d}$ as follows: + +$$ +\mathbf {K} _ {\text {i n i t}} = \mathbf {V} _ {\text {i n i t}} = \left(\mathbf {H} _ {e} + \mathbf {G} _ {e}\right), \mathbf {G} _ {e} = \operatorname {R e L U} \left(\mathbf {B} _ {e} \mathbf {W} _ {g}\right), \tag {2} +$$ + +where $\mathbf{G}_e\in \mathbb{R}^{N_e\times d}$ is a learnable geometric embedding of entity proposals, $\mathbf{W}_g\in \mathbb{R}^{4\times d}$ is a transformation from bounding box locations to the embedding space. + +Given the augmented entity representations, we then compute the predicate queries $\mathbf{Q}_p^e$ using a multi-head cross-attention operation on the initial predicate queries $\mathbf{Q}_{init}$ and $\mathbf{K}_{init}$ . For clarity, we use $\mathcal{A}(q,k,v) = \mathrm{FFN}(\mathrm{MHA}(q,k,v))$ to denote the multi-head attention operation. As such, we have $\mathbf{Q}_p^e = \mathcal{A}(\mathbf{Q}_{init},\mathbf{K}_{init},\mathbf{V}_{init})\mathbf{W}_e$ , where $\mathbf{W}_e \in \mathbb{R}^{d\times 3d} = [\mathbf{W}_e^{is},\mathbf{W}_e^{io},\mathbf{W}_e^p]$ are the transformation matrices for the three sub-queries $\mathbf{Q}_{is},\mathbf{Q}_{io},\mathbf{Q}_p$ , respectively. In this way, we obtain a structural query that incorporates the entity information into the predicate query. The sub-queries $\mathbf{Q}_{is},\mathbf{Q}_{io}$ are referred to as entity indicators as they will be used to capture predicate-entity associations below. + +# 4.2.3 Structural Predicate Node Decoder + +Given the predicate query $\mathbf{Q}_q^e$ , we now develop a structural predicate node decoder that leverages the compositional property and decodes all the predicate triplets from the entity/predicate feature maps. + +Our structural decoder consists of three modules: a) predicate sub-decoder; b) entity indicator sub-decoders; c) predicate indicator fusion. The two types of decoders take the encoder feature map $\mathbf{Z}^p$ and entity features $\mathbf{H}_e$ , respectively and update the three components of the predicate query independently. Based on the updated predicate query components, the predicate-indicator fusion refines the entire predicate queries, aiming to improve the entity-predicate association within each compositional query. + +Specifically, we adopt the standard transformer decoder structure below. For notation clarity, we focus on a single decoder layer and omit layer number $l$ within each sub-decoder, + +as well as the notation of the self-attention operation. + +Predicate Sub-decoder. The predicate sub-decoder is designed to refine the predicate representation from the image feature map $\mathbf{Z}^p$ , which utilizes the spatial context in the image for updating predicate representation. We implement this decoding process using the cross-attention mechanism: $\widetilde{\mathbf{Q}}_p = \mathcal{A}(q = \mathbf{Q}_p, k = \mathbf{Z}^p, v = \mathbf{Z}^p)$ , where $\widetilde{\mathbf{Q}}_p$ is the updated predicate representation. + +Entity Indicator Sub-Decoders. The entity indicator sub-decoders refine the entity indicators associated with the predicate queries. Instead of relying on image features, we leverage more accurate entity features in the given scene. Specifically, we perform cross-attention operation between entity indicators $\mathbf{Q}_{is},\mathbf{Q}_{io}$ and entity proposal features $\mathbf{H}_e$ from the entity node generator, aiming to enhance the representation of the entity associations. We denote the updated representation of the entities indicator as $\tilde{\mathbf{Q}}_{is},\tilde{\mathbf{Q}}_{io}$ , which are generated with standard cross-attention operation: + +$$ +\widetilde {\mathbf {Q}} _ {i s} = \mathcal {A} (\mathbf {Q} _ {i s}, \mathbf {H} _ {e}, \mathbf {H} _ {e}), \quad \widetilde {\mathbf {Q}} _ {i o} = \mathcal {A} (\mathbf {Q} _ {i o}, \mathbf {H} _ {e}, \mathbf {H} _ {e}) \quad (3) +$$ + +Predicate-Indicator Fusion To encode the contextual relation between each predicate query and its entity indicators, we perform a predicate-indicator fusion to calibrate the features of three components in the query. We explicitly fuse the current $l$ -th decoder layer outputs $\widetilde{\mathbf{Q}}_p^l,\widetilde{\mathbf{Q}}_{is}^l,\widetilde{\mathbf{Q}}_{io}^l$ to update each component of as the query for next layer $\mathbf{Q}_p^{l + 1},\mathbf{Q}_{is}^{l + 1},\mathbf{Q}_{io}^{l + 1}$ . Specifically, we adopt fully connected layers for updating the predicate by fusing entity indicator representations as Eq. 4: + +$$ +\mathbf {Q} _ {p} ^ {l + 1} = \left(\widetilde {\mathbf {Q}} _ {p} ^ {l} + \left(\widetilde {\mathbf {Q}} _ {i s} ^ {l} + \widetilde {\mathbf {Q}} _ {i o} ^ {l}\right) \cdot \mathbf {W} _ {i}\right) \cdot \mathbf {W} _ {p} \tag {4} +$$ + +where $\mathbf{W}_i, \mathbf{W}_p \in \mathbb{R}^{d \times d}$ are the transformation parameters for update. For the entity indicators, we simply adopt the previous layer output as input: $\mathbf{Q}_{is}^{l+1} = \widetilde{\mathbf{Q}}_{is}^l$ , $\mathbf{Q}_{io}^{l+1} = \widetilde{\mathbf{Q}}_{io}^l$ . + +Based on the refined predicate queries, we are able to generate the geometric and semantic predictions of the predicate node, as well as the location and category of its associated entity indicator as follows, + +$$ +\mathbf {P} _ {p} = \operatorname {S o f t m a x} \left(\widetilde {\mathbf {Q}} _ {p} \cdot \mathbf {W} _ {c l s} ^ {p}\right) \in \mathbb {R} ^ {N _ {r} \times \left(\mathcal {C} _ {p} + 1\right)}, \tag {5} +$$ + +$$ +\mathbf {B} _ {p} = \sigma (\widetilde {\mathbf {Q}} _ {p} \cdot \mathbf {W} _ {r e g} ^ {p}) = \left\{\left(x _ {c} ^ {s}, y _ {c} ^ {s}, x _ {c} ^ {o}, y _ {c} ^ {o}\right) \right\} \in \mathbb {R} ^ {N _ {r} \times 4} (6) +$$ + +where $\mathbf{P}_p$ are the class predictions of predicates, and $\mathbf{B}_p = \{(x_c^s,y_c^s,x_c^o,y_c^o)\}$ are the box center coordinates of its subject and object entities. The entity indicators are also translated as location prediction of entities $\mathbf{B}_s,\mathbf{B}_o\in \mathbb{R}^{N_r\times 4}$ and their classification predictions $\mathbf{P}_s,\mathbf{P}_o\in \mathbb{R}^{N_r\times (\mathcal{C}_e + 1)}$ which are similar to the entity generator. + +Overall, each predicate decoder layer produces the locations and classifications for all the entity-aware predicate queries. Using the multi-layer structure, the predicate decoder is able to gradually improve the quality of predicate and entity association. + +![](images/7dbf8f06f22d06d8eb1e36bf94374ca235570c2df7a96896882e97bc960a493f.jpg) +Bipartite Graph Assembling +Figure 3. The illustration of Bipartite Graph Assembling. + +# 4.3. Bipartite Graph Assembling + +In our formulation, we convert the original scene graph into a bipartite graph structure which consists of $N_{e}$ entity nodes and $N_{r}$ predicate nodes, as shown in Fig. 3. The main goal of the graph assembling is to link the entity-aware predicate nodes to the proper entity node. + +To achieve this, we need to obtain the adjacency matrix between the $N_{e}$ entity nodes and $N_{r}$ predicate nodes, which can be encoded into a correspondence matrix $\mathbf{M} \in \mathbb{R}^{N_r \times N_e}$ . Concretely, we define the correspondence matrix by the distance between the entity indicators of predicate nodes and the entity nodes. Taking the subject entity indicator as example, we have: $\mathbf{M}^s = d_{loc}(\mathbf{B}_s, \mathbf{B}_e) \cdot d_{cls}(\mathbf{P}_s, \mathbf{P}_e)$ , where $d_{loc}(\cdot)$ and $d_{cls}(\cdot)$ are the distance function to measure the matching quality from different dimensions4. The correspondence matrix of object entity $\mathbf{M}^o \in \mathbb{R}^{N_r \times N_e}$ is obtained following the same strategy. The empirical analysis of different distance metrics will be discussed in the experiment section. Based on the correspondence matrix, we keep the top- $K$ links according to the matching scores as the edge links for each predicate node: + +$$ +\mathbf {R} ^ {s} = \mathcal {F} _ {t o p} (\mathbf {M} ^ {s}, K) \in \mathbb {R} ^ {N _ {r} \times K} \tag {7} +$$ + +$$ +\mathbf {R} ^ {o} = \mathcal {F} _ {t o p} \left(\mathbf {M} ^ {o}, K\right) \in \mathbb {R} ^ {N _ {r} \times K} \tag {8} +$$ + +where $\mathcal{F}_{top}$ is the top- $K$ index selection operation, $\mathbf{R}^s$ and $\mathbf{R}^o$ are the index matrix of entities kept for each triplet from the two relationship roles of subject and object, respectively. + +Using the index matrix $\mathbf{R}^s$ and $\mathbf{R}^o$ , we are able to generate the final relationship triplets as $\mathcal{T} = \left\{\left(\mathbf{b}_e^s,\mathbf{p}_e^s,\mathbf{b}_e^o,\mathbf{p}_e^o,\mathbf{p}_p,\mathbf{b}_p\right)\right\}$ . Here $\mathbf{b}_e^s,\mathbf{b}_e^o\in \mathbb{R}^{1\times 4}$ and $\mathbf{p}_e^s,\mathbf{p}_e^o\in \mathbb{R}^{1\times (\mathcal{C}_e + 1)}$ are bounding boxes and class predictions of its subject and object entity respectively, $\mathbf{p}_p\in \mathbb{R}^{1\times (\mathcal{C}_p + 1)}$ is the class prediction of each predicate $\mathbf{P}_p$ , and $\mathbf{b}_p\in \mathbf{B}_p$ are the centers of the predicate's entities. In the end, the graph assembling module generates the final scene graph as the output of our SGTR model. + +# 4.4. Learning and Inference + +Learning To train our SGTR model, we design a multi-task loss that consists of two components, including $\mathcal{L}^{enc}$ for the entity generator and $\mathcal{L}^{pre}$ for predicate generator. The overall loss function is formulated as: + +$$ +\mathcal {L} = \mathcal {L} ^ {\text {e n c}} + \mathcal {L} ^ {\text {p r e}}, \quad \mathcal {L} ^ {\text {p r e}} = \mathcal {L} _ {i} ^ {\text {p r e}} + \mathcal {L} _ {p} ^ {\text {p r e}} \tag {9} +$$ + +As we adopt a DETR-like detector, the $\mathcal{L}^{enc}$ follows a similar form as [2], and the detailed loss equation is reported in the supplementary material. We mainly focus on $\mathcal{L}^{pre}$ in the remaining parts of this section. To calculate the loss for the predicate node generator, we first obtain the matching matrix between the prediction and the ground truth by adopting the Hungarian matching algorithm [16]. We then convert the ground-truth of the visual relationships into a set of triplet representations in as similar form as $\mathcal{T}$ , denoted as $\mathcal{T}^{gt}$ . The cost of the set matching is defined as: + +$$ +\mathcal {C} = \lambda_ {p} \mathcal {C} _ {p} + \lambda_ {e} \mathcal {C} _ {e} \tag {10} +$$ + +The two components in the total cost correspond to the costs of predicate and subject/object entity, respectively $^{5}$ . The matching index $\mathbf{I}^{tri}$ between triplet predictions and ground truths is produced by: $\mathbf{I}^{tri} = \mathrm{argmin}_{\mathcal{T},\mathcal{T}^{gt}}\mathcal{C}$ , which is used for following loss calculation of predicate node generator. + +The two terms of $\mathcal{L}^{pre}$ , that is, $\mathcal{L}_i^{pre},\mathcal{L}_p^{pre}$ , are used to supervise two types of sub-decoder in predicate node generator. For the entity indicator sub-decoder, we have $\mathcal{L}_i^{pre} = \mathcal{L}_{box}^i +\mathcal{L}_{cls}^i$ , where $\mathcal{L}_{box}^i$ and $\mathcal{L}_{cls}^i$ are the localization loss (L1 and GIOU loss) and cross-entropy loss for entities indicator $\mathbf{P}_s,\mathbf{B}_s,\mathbf{P}_o,\mathbf{B}_o$ . Similarly, for the predicate sub-decoder, we have $\mathcal{L}_p^{pre} = \mathcal{L}_{ent}^p +\mathcal{L}_{cls}^p$ . The $\mathcal{L}_{ent}^p$ is the L1 loss of the location of predicate's associated entities $\mathbf{B}_p$ . The $\mathcal{L}_{cls}^p$ is the cross entropy of predicate category $\mathbf{P}_p$ . + +Inference During model inference, we generate $K \cdot N_r$ visual relationship predictions after the assembling stage. We further remove the invalid self-connection edges during inference. We adopt a post-processing operation to filter out the self-connected triplets (subject and object entities are identical). Then, we rank the remaining predictions by the triplet score $S_t$ and take the top $N$ relationship triplet as final outputs. We denote the output as $S^t = \{(s_s^t \cdot s_o^t \cdot s_p^t)\}$ , where $s_s^t, s_o^t$ and $s_p^t$ are the classification probability of subject entity, object entity and predicate, respectively. + +# 5. Experiments + +# 5.1. Experiments Configuration + +We evaluate our methods on Openimage V6 datasets [17] and Visual Genome [15]. We mainly adopt the data splits and evaluation metrics from the previous work [18, 38, 51]. For the Openimage benchmark, the weighted evaluation + +
#EPNSPDGAmR@50mR@100R@50R@100
1✓✓✓13.917.324.228.2
2✓✓12.015.922.926.3
3✓✓11.415.121.924.9
4✓11.314.821.224.1
5✓✓4.67.010.613.3
+ +Table 1. Ablation study on model components. EPN: Entity-aware Predicate Node; SPD: Structural Predicate Decoder, GA: Graph Assembling. + +metrics $(\mathrm{wmAP}_{phr}, \mathrm{wmAP}_{rel}, \mathrm{score}_{wtd})$ are used for more class-balanced evaluation. For the Visual Genome dataset, we adopt the evaluation metric recall@K (R@K) and mean recall@K (mR@K) of SGDet, and also report the mR@100 on each long-tail category groups: head, body and tail as same as [18]. + +We use the ResNet-101 and DETR [2] as backbone networks and entity detector, respectively. To speedup training convergence, we first train entity detector on the target dataset, followed by joint training with predicate node generator. The predicate node generator uses 3 layers of transformer encoder for predicate encoders and 6 layers of transformer decoder for predicate and entity indicator subdecoders, whose hidden dimensions $d$ is 256. Our predicate decoder uses $N_r = 150$ queries. We set $K = 40$ in training and $K = 3$ during test for graph assembling module. For more implementation details please refer to the supplementary. + +# 5.2. Ablation Study + +Model Components As shown in Tab. 1, we ablate each module to demonstrate the effectiveness of our design on the validation set of Visual Genome. + +- We find that using the holistic query for predicate rather than the proposed structural form decreases the performance by a margin of R@100 and mR@100 at 1.9 and 1.4 in line-2. +- Adopting the shared cross-attention between the image features and predicate/entity indicator instead of the structural predicate decoder leads to the sub-optimal performance as reported in line-3 +- We further remove both entity indicators and directly decode the predicate node from the image feature. The result is reported in line-4, which decreases the performance by a margin of 4.2 and 2.5 on R@100 and mR@100. +- We also investigate the graph assembling mechanism by directly adopting the prediction of entity indicators as entity nodes for relationship prediction. The poor results shown in line-5 demonstrate that the model struggles to tackle such complex multi-tasks within a single structure, while proposed entity-prediction association modeling and graph assembling reduce the difficulty of optimization. + +Graph Assembling Design We further investigate the effectiveness of our graph assembling design. Specifically, we adopt the differentiable entity-predicate pair matching function proposed by recent HOI methods [3, 12], as shown + +
NPDNEDmR@50mR@100R@50R@100
3310.613.323.427.4
6613.917.324.228.2
121213.717.024.028.4
+ +Table 2. Ablation study on number of predicate decoder layers. NPD: number of predicate sub-decoder layers; NED: number of entity indicator sub-decoder layers; + +
GAmR@50mR@100R@50R@100
S10.611.824.427.7
F13.316.123.727.5
Ours13.917.324.228.2
+ +in Tab. 3. Comparison experiments are conducted on the validation set of Visual Genome by using different distance functions for the assembling module. In AS-Net [3], the grouping is conducted based on the distance between entity bounding box and entity center predicted by interaction branch, which lacks the entity semantic information. The HOTR [12] introduces a cosine similarity measurement between the predicate and entity in feature space. We implement this form for calculation the distance between the entity indicator $\widetilde{\mathbf{Q}}_{is}$ , $\widetilde{\mathbf{Q}}_{io}$ and entity nodes $\mathbf{H}_e$ . Compared with location-only [3] similarity and feature-based [12] similarity, our proposed assembling mechanism, taking both semantic and spatial information into the similarity measurement, is preferable. We also empirically observe that the feature-based [12] similarity design has a slower and more unstable convergence process. + +Model Size To investigate the model complexity of the structural predicate node decoder, we incrementally vary the number of layers $L$ in the predicate and entity indicator decoder. The quantitative results are shown in Tab. 2. The results indicate that our model achieves the best performance while $L = 6$ . We observe that the performance improvement is considerable when increasing the number of decoder layers from 3 to 6, and performance will be saturated when $L = 12$ . + +Entity Detector As we adopt different entity detectors compared to previous two-stage designs, we conduct experiments to analyze the influence of detectors on the SGTR. The detailed results are presented in the supplementary. + +# 5.3. Comparisons with State-of-the-Art Methods + +We conduct experiments on Openimage-V6 benchmark and VG dataset to demonstrate the effectiveness of our design. We compare our method with several state-of-the-art two-stage(e.g., VCTree-PCPL, VCTree-DLFE, BGNN [18], VCTree-TDE, DT2-ACBS [5]) and one-stage methods(e.g. AS-Net, HOTR, FCSGG) on Visual Genome dataset. Since our backbone is different from what they reported, we re + +Table 3. Ablation study on graph assembling, S: spatial distance between the predicate and entity-based matching function proposed by AS-Net [3]; F: feature similarity-based matching function proposed by HOTR [12]. + +
BModelsmR@50R@50wmAPscorewtd
relphr
X101-FRelDN37.2075.4033.2131.3141.97
GPS-Net38.9374.7432.7733.8741.60
BGNN40.4574.9833.5134.1542.06
R101\( BGNN^{*†} \)39.4174.9331.1531.3740.00
\( RelDN^† \)36.8072.7529.8730.4238.67
\( HOTR^† \)40.0952.6619.3821.5126.88
\( AS-Net^† \)35.1655.2825.9327.4932.42
Ours42.6159.9136.9838.7342.28
+ +Table 4. The Performance on OpenImage V6. $\dagger$ denotes results reproduced with the authors' code. The performance of ResNeXt-101 FPN is borrow from [18]. * means using resampling strategy. produced the SOTA methods BGNN and its baseline RelDN with the same ResNet-101 backbone for more fair comparisons. Furthermore, since FCSGG [23] is the only published one-stage method for SGG, we reproduce the result of several strong one-stage HOI methods with similar entity-predicate pairing mechanisms (AS-Net [3], HOTR [12]) using their released code for a more comprehensive comparison. + +OpenImage V6 The performance on the OpenImage V6 dataset is reported in Tab. 4. We re-implement the SOTA one-stage and two-stage methods with the same ResNet-101 backbone. Our method outperforms the two-stage SOTA method BGNN with an improvement of 2.28. Specifically, our design has a significant improvement on weighted mAP metrics of relationship detection $(\mathrm{wmAP}_{rel})$ and phrase detection $(\mathrm{wmAP}_{phr})$ sub-tasks of 5.83 and 7.36 respectively, which indicates that leveraging the compositional property of the visual relationship is beneficial for the SGG task. + +Visual Genome As shown in Tab. 5, with the same ResNet-101 backbone, we compare our method with the two-stage method BGNN [18], and the one-stage methods HOTR [12], AS-Net [3]. It shows that our method outperforms HOTR with a significant margin of 4.9 and 3.2 on mRecall@100. Furthermore, our method achieves considerable improvement when compared with the two-stage methods, and the detailed performance is presented in the supplementary. + +- Benefitting from the sparse proposal set, SGTR has a more balanced foreground/background proposal distribution than the traditional two-stage design, where there exists a large number of negative samples due to exhausted entity pairing. Thus, when equipped with the same backbone and learning strategy as before, our method achieves competitive performance in mean recall. We also list several newly proposed works, which develops various training strategies for long-tailed recognition. Our method achieves higher mR@100 performance with less overall performance drop when using the resampling strategy proposed in [18]. We refer the reader to the supplementary for more experiments on our model using advanced long-tail training strategies. + +- We find that the performance of our model in the head + +
BDMethodmR@50/100R@50/100HeadBodyTailTime/Sec
★★FCSGG [23]3.6 / 4.221.3 / 25.1---0.12
X101-FPNFaster-RCNNRelDN [18]6.0 / 7.331.4 / 35.9---0.65
Motifs [29]5.5 / 6.832.1 / 36.9---1.00
VCTree [29]6.6 / 7.731.8 / 36.1---1.69
BGNN*† [18]10.7 / 12.631.0 / 35.834.012.96.01.32
VCTree-TDE [29]9.3 / 11.119.4 / 23.2---≥1.69
VCTree-DLFE [4]11.8 / 13.822.7 / 26.3---≥1.69
VCTree-EBM [26]9.7 / 11.620.5 / 24.7---≥1.69
VCTree-BPLSA [7]13.5 / 15.721.7 / 25.5---≥1.69
DT2-ACBS [5]22.0 / 24.415.0 / 16.3---~0.63
R101BGNN*†8.6 / 10.328.2 / 33.829.112.62.21.32
RelDN†4.4 / 5.430.3 / 34.831.32.30.00.65
DETRAS-Net† [3]6.12 / 7.218.7 / 21.119.67.72.70.33
HOTR† [12]9.4 / 12.023.5 / 27.726.116.23.40.25
Ours°12.0 / 14.625.1 / 26.627.117.26.90.35
Ours12.0 / 15.224.6 / 28.428.218.67.10.35
Ours*15.8 / 20.120.6 / 25.021.721.617.10.35
+ +Table 5. The SGDet performance on test set of Visual Genome dataset. $\dagger$ denotes results reproduced with the authors' code. * denotes the bi-level resampling [18] is applied for this model. $\diamond$ denotes that our model uses $K = 1$ for top- $K$ matching in graph assembling (more ablative experiments for $K$ are presented in the supplementary). $\star$ denotes the special backbone HRNetW48-5S-FPN $_{×2-f}$ and entities detector, CenterNet [53]. + +category is lower than the two-stage methods with the same backbone. The main reason is that the DETR detector performs weaker on small entities than the traditional Faster-RCNN. Since the visual genome has a large proportion of relationships involving small objects, our method performs sub-optimal in recognizing those relationships. The detailed limitation analysis is presented in the supplementary. + +- We compare the efficiency of SGTR with previous methods according to the inference time (seconds/image) on the NVIDIA GeForce Titan XP GPU with a batch size of 1 and an input size of $600 \times 1000$ . Our design obtains comparable inference time as the one-stage methods using the same backbone, which demonstrates the efficiency of our method. + +# 5.4. Qualitative Results + +As shown in Fig. 4, we visualize the attention weight of the predicates sub-decoder and entity sub-decoder on images from the validation set of the Visual Genome dataset. By comparing the heatmaps in Fig. 4 (a) and Fig. 4 (b), we note that for the same triplet prediction, the predicate sub-decoder focuses more on the contextual regions around the entities of triplets while the entity sub-decoders put more attention on the entity regions. Therefore, our design allows the model to learn the compositional property of visual relationships more effectively, which improves prediction accuracy. More visualization results are reported in the supplementary (including analysis of graph assembling, comparison between two-stage methods, etc.). + +# 6. Conclusions + +In this work, we propose a novel end-to-end CNN-Transformer-based scene graph generating approach (SGTR). + +![](images/5dea8ca1298c26992ace771df7a045bf176287957145f2138bb32d67c441deeb.jpg) +(a) The attention maps of predicate sub-decoder + +![](images/8e9386fa21b1f24db64d28b5dfdd7d0cc600819fcf3a31fb0eac51629863a6d6.jpg) + +![](images/c8cedf825d06a3c7e400e2a237c2e5be149c71b6b93d0c56a92832db25c3948f.jpg) + +![](images/891dc9aa439418503862aaf93fe76ae13147311406f028b44c7e09ea69cf3959.jpg) +(b) The attention maps of entitie sub-decoder +Figure 4. The visualization on attention heatmap of structural predicate decoder. The predicate sub-decoder focus on contextual representation around the entities of triplets. Entity indicator sub-decoders focus on relationship-based entity regions. + +![](images/eb82ffb0af9d3899882a7b1763f9b0043fed08c4d34e73d0cc984dc2907c774f.jpg) + +![](images/5063bd249cb7ee3b756bd3bcc1e28bb7be65d2527735fbfc1d1023404a4cb72e.jpg) + +In comparison to the prior approaches, our major contribution consists of two components: We formulate the SGG as a bipartite graph construction with three steps: entity and predicate nodes generation and directed edge connection. We develop the entity-aware representation for modeling the predicate nodes, which is integrated with the entity indicators by the structural predicate node decoder. Finally, the scene graph is constructed by the graph assembling module in an end-to-end manner. Extensive experimental results show that our SGTR outperforms or is competitive with previous state-of-the-art methods on the Visual Genome and Openimage V6 datasets. + +Potential Negative Societal Impact One possible negative impact is that SGG may serve as a base module for surveillance abuse and collecting private information. + +# References + +[1] Sherif Abdelkarim, Aniket Agarwal, Panos Achlioptas, Jun Chen, Jiaji Huang, Boyang Li, Kenneth Church, and Mohamed Elhoseiny. Exploring long tail visual relationship recognition with large vocabulary. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 15921-15930, 2021. 1, 2 +[2] 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. 2, 3, 4, 6 +[3] 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. 2, 6, 7, 8 +[4] Meng-Jiun Chiou, Henghui Ding, Hanshu Yan, Changhu Wang, Roger Zimmermann, and Jiashi Feng. Recovering the unbiased scene graphs from the biased ones. arXiv preprint arXiv:2107.02112, 2021. 1, 2, 8 +[5] Alakh Desai, Tz-Ying Wu, Subarna Tripathi, and Nuno Vasconcelos. Learning of visual relations: The devil is in the tails. arXiv preprint arXiv:2108.09668, 2021. 1, 2, 7, 8 +[6] 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. 1, 2 +[7] Yuyu Guo, Lianli Gao, Xuanhan Wang, Yuxuan Hu, Xing Xu, Xu Lu, Heng Tao Shen, and Jingkuan Song. From general to specific: Informative scene graph generation via balance adjustment. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 16383-16392, 2021. 1, 2, 8 +[8] Marcel Hildebrandt, Hang Li, Rajat Koner, Volker Tresp, and Stephan Gunnemann. Scene graph reasoning for visual question answering. arXiv preprint arXiv:2007.01072, 2020. 1 +[9] Justin Johnson, Ranjay Krishna, Michael Stark, Li-Jia Li, David Shamma, Michael Bernstein, and Li Fei-Fei. Image retrieval using scene graphs. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3668-3678, 2015. 1 +[10] Siddhesh Khandelwal, Mohammed Suhail, and Leonid Sigal. Segmentation-grounded scene graph generation. arXiv preprint arXiv:2104.14207, 2021. 2 +[11] Bumsoo Kim, Taeho Choi, Jaewoo Kang, and Hyunwoo J Kim. Uniondet: Union-level detector towards real-time human-object interaction detection. In European Conference on Computer Vision, pages 498-514. Springer, 2020. 2 +[12] 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. 2, 6, 7, 8 + +[13] Boris Knyazev, Harm de Vries, Catalina Cangea, Graham W. Taylor, Aaron Courville, and Eugene Belilovsky. Graph Density-Aware Losses for Novel Compositions in Scene Graph Generation. In Proceedings of the European Conference on Computer Vision(ECCV), 2017. 2 +[14] Boris Knyazev, Harm de Vries, Catalina Cangea, Graham W Taylor, Aaron Courville, and Eugene Belilovsky. Generative compositional augmentations for scene graph prediction. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 15827-15837, 2021. 1, 2 +[15] 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. 6 +[16] Harold W Kuhn. The hungarian method for the assignment problem. Naval research logistics quarterly, 2(1-2):83-97, 1955. 6 +[17] Alina Kuznetsova, Hassan Rom, Neil Alldrin, Jasper Uijlings, Ivan Krasin, Jordi Pont-Tuset, Shahab Kamali, Stefan Popov, Matteo Malloci, Alexander Kolesnikov, Tom Duerig, and Vittorio Ferrari. The open images dataset v4: Unified image classification, object detection, and visual relationship detection at scale. International Journal of Computer Vision(IJCV), 2020. 6 +[18] Rongjie Li, Songyang Zhang, Bo Wan, and Xuming He. Bipartite graph network with adaptive message passing for unbiased scene graph generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11109-11119, 2021. 1, 2, 3, 6, 7, 8 +[19] Yikang Li, Wanli Ouyang, Bolei Zhou, Jianping Shi, Chao Zhang, and Xiaogang Wang. Factorizable net: an efficient subgraph-based framework for scene graph generation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 335-351, 2018. 2 +[20] Yikang Li, Wanli Ouyang, Bolei Zhou, Kun Wang, and Xiaogang Wang. Scene graph generation from objects, phrases and region captions. In Proceedings of the IEEE International Conference on Computer Vision, pages 1261-1270, 2017. 2 +[21] Yue Liao, Si Liu, Fei Wang, Yanjie Chen, Chen Qian, and Jiashi 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. 2 +[22] Xin Lin, Changxing Ding, Jinquan Zeng, and Dacheng Tao. Gps-net: Graph property sensing network for scene graph generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3746-3753, 2020. 2 +[23] Hengyue Liu, Ning Yan, Masood Mortazavi, and Bir Bhanu. Fully convolutional scene graph generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11546-11556, 2021. 1, 2, 7, 8 +[24] Mengshi Qi, Weijian Li, Zhengyuan Yang, Yunhong Wang, and Jiebo Luo. Attentive relational networks for mapping images to scene graphs. In Proceedings of the IEEE Con- + +ference on Computer Vision and Pattern Recognition, pages 3957-3966, 2019. 2 +[25] Jiaxin Shi, Hanwang Zhang, and Juanzi Li. Explainable and explicit visual reasoning over scene graphs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8376-8384, 2019. 1 +[26] Mohammed Suhail, Abhay Mittal, Behjat Siddiquie, Chris Broaddus, Jayan Eledath, Gerard Medioni, and Leonid Sigal. Energy-based learning for scene graph generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13936-13945, 2021. 2, 8 +[27] Peize Sun, Rufeng Zhang, Yi Jiang, Tao Kong, Chenfeng Xu, Wei Zhan, Masayoshi Tomizuka, Lei Li, Zehuan Yuan, Changhu Wang, et al. Sparse r-cnn: End-to-end object detection with learnable proposals. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14454-14463, 2021. 2 +[28] Masato Tamura, Hiroki Ohashi, and Tomoaki Yoshinaga. Qpic: Query-based pairwise human-object interaction detection with image-wide contextual information. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10410-10419, 2021. 2 +[29] Kaihua Tang, Yulei Niu, Jianqiang Huang, Jiaxin Shi, and Hanwang Zhang. Unbiased scene graph generation from biased training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3716-3725, 2020. 2, 8 +[30] Kaihua Tang, Hanwang Zhang, Baoyuan Wu, Wenhan Luo, and Wei Liu. Learning to compose dynamic tree structures for visual contexts. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6619-6628, 2019. 2 +[31] Damien Teney, Lingqiao Liu, and Anton van Den Hengel. Graph-structured representations for visual question answering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1–9, 2017. 1 +[32] Yao Teng and Limin Wang. Structured sparse r-cnn for direct scene graph generation. arXiv preprint arXiv:2106.10815, 2021. 2 +[33] 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. 2 +[34] 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. 2 +[35] Tzu-Jui Julius Wang, Selen Pehlivan, and Jorma Laaksonen. Tackling the unannotated: Scene graph generation with biasreduced models. In Proceedings of the 28th ACM International Conference on Multimedia, 2020. 2 +[36] Wenbin Wang, Ruiping Wang, Shiguang Shan, and Xilin Chen. Exploring context and visual pattern of relationship for scene graph generation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8188-8197, 2019. 2 + +[37] Sanghyun Woo, Dahun Kim, Donghyeon Cho, and In So Kweon. Linknet: Relational embedding for scene graph. In Advances in Neural Information Processing Systems, pages 560-570, 2018. 2 +[38] Danfei Xu, Yuke Zhu, Christopher B Choy, and Li Fei-Fei. Scene graph generation by iterative message passing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 5410-5419, 2017. 2, 6 +[39] Shaotian Yan, Chen Shen, Zhongming Jin, Jianqiang Huang, Rongxin Jiang, Yaowu Chen, and Xian-Sheng Hua. Pcpl: Predicate-correlation perception learning for unbiased scene graph generation. In Proceedings of the 28th ACM International Conference on Multimedia, pages 265-273, 2020. 2 +[40] Gengcong Yang, Jingyi Zhang, Yong Zhang, Baoyuan Wu, and Yujiu Yang. Probabilistic modeling of semantic ambiguity for scene graph generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12527-12536, 2021. 1, 2 +[41] Jianwei Yang, Jiasen Lu, Stefan Lee, Dhruv Batra, and Devi Parikh. Graph r-cnn for scene graph generation. In Proceedings of the European conference on computer vision (ECCV), pages 670–685, 2018. 2 +[42] Xuewen Yang, Yingru Liu, and Xin Wang. Reformer: The relational transformer for image captioning. arXiv preprint arXiv:2107.14178, 2021. 1 +[43] Xu Yang, Kaihua Tang, Hanwang Zhang, and Jianfei Cai. Auto-encoding scene graphs for image captioning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10685–10694, 2019. 1, 2 +[44] Yuan Yao, Ao Zhang, Xu Han, Mengdi Li, Cornelius Weber, Zhiyuan Liu, Stefan Wermter, and Maosong Sun. Visual distant supervision for scene graph generation. arXiv preprint arXiv:2103.15365, 2021. 1, 2 +[45] Zhuyu Yao, Jiangbo Ai, Boxun Li, and Chi Zhang. Efficient detr: Improving end-to-end object detector with dense prior. arXiv preprint arXiv:2104.01318, 2021. 4 +[46] Guojun Yin, Lu Sheng, Bin Liu, Nenghai Yu, Xiaogang Wang, Jing Shao, and Chen Change Loy. Zoom-net: Mining deep feature interactions for visual relationship recognition. In Proceedings of the European Conference on Computer Vision (ECCV), pages 322-338, 2018. 2 +[47] Cong Yuren, Hanno Ackermann, Wentong Liao, Michael Ying Yang, and Bodo Rosenhahn. Nodis: Neural ordinary differential scene understanding. arXiv preprint arXiv:2001.04735, 2020. 2 +[48] Alireza Zareian, Svebor Karaman, and Shih-Fu Chang. Bridging knowledge graphs to generate scene graphs. In Proceedings of the European Conference on Computer Vision (ECCV), 2020. 2 +[49] Alireza Zareian, Svebor Karaman, and Shih-Fu Chang. Weakly supervised visual semantic parsing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3736-3745, 2020. 2 +[50] Alireza Zareian, Haoxuan You, Zhecan Wang, and Shih-Fu Chang. Learning visual commonsense for robust scene graph + +generation. In Proceedings of the European Conference on Computer Vision(ECCV), 2020. 2 +[51] Rowan Zellers, Mark Yatskar, Sam Thomson, and Yejin Choi. Neural motifs: Scene graph parsing with global context. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5831-5840, 2018. 2, 6 +[52] Aixi Zhang, Yue Liao, Si Liu, Miao Lu, Yongliang Wang, Chen Gao, and Xiaobo Li. Mining the benefits of two-stage and one-stage hoi detection. arXiv preprint arXiv:2108.05077, 2021. 2 +[53] Xingyi Zhou, Dequan Wang, and Philipp Krahenbuhl. Objects as points. arXiv preprint arXiv:1904.07850, 2019. 8 +[54] 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. 2 \ No newline at end of file diff --git a/sgtrendtoendscenegraphgenerationwithtransformer/images.zip b/sgtrendtoendscenegraphgenerationwithtransformer/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b0dbf8eb987a30e7f30b236483a6c94a98877e34 --- /dev/null +++ b/sgtrendtoendscenegraphgenerationwithtransformer/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d93aa846d24f973fbf6d0e4049eb63e1f1f051f63a32429470a89bbea5bad1b5 +size 446606 diff --git a/sgtrendtoendscenegraphgenerationwithtransformer/layout.json b/sgtrendtoendscenegraphgenerationwithtransformer/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..84cb7bb797f941f5891676e1b6cd962e3ea04a4b --- /dev/null +++ b/sgtrendtoendscenegraphgenerationwithtransformer/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:feb1546efbf8ee92593d03c82381abffee4cd09e3e5e40b15c9143e2ad31dd83 +size 473552 diff --git a/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/eeadb6ce-e7db-4667-88c0-5643fb36fefc_content_list.json b/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/eeadb6ce-e7db-4667-88c0-5643fb36fefc_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e92d33593c4568b64816705523042cdde56bab7c --- /dev/null +++ b/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/eeadb6ce-e7db-4667-88c0-5643fb36fefc_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de640dcc2102447a80d2612106419d09592ff0b0aa5d2f003ca52f0fb8bf3cc6 +size 93512 diff --git a/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/eeadb6ce-e7db-4667-88c0-5643fb36fefc_model.json b/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/eeadb6ce-e7db-4667-88c0-5643fb36fefc_model.json new file mode 100644 index 0000000000000000000000000000000000000000..df3a8bcb918e41c39250dd83970c4abe5ef2fc14 --- /dev/null +++ b/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/eeadb6ce-e7db-4667-88c0-5643fb36fefc_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90ca41254abfd45382c5bc58ff70842579f5844f401279aae92cbd28e6146418 +size 122112 diff --git a/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/eeadb6ce-e7db-4667-88c0-5643fb36fefc_origin.pdf b/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/eeadb6ce-e7db-4667-88c0-5643fb36fefc_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cd2949aaae1bb4554bd63ea9096d3c6bea2255ed --- /dev/null +++ b/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/eeadb6ce-e7db-4667-88c0-5643fb36fefc_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:623e0d3fc4b84a38077d15a0f2fd3b4e5a105448e25b632779200733e441aa68 +size 16680040 diff --git a/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/full.md b/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e6a8bb27bb88a26193457d884fcdbe9ce516664e --- /dev/null +++ b/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/full.md @@ -0,0 +1,365 @@ +# SHIFT: A Synthetic Driving Dataset for Continuous Multi-Task Domain Adaptation + +Tao Sun $^{1*}$ Mattia Segu $^{1*}$ Janis Postels $^{1}$ Yuxuan Wang $^{1}$ Luc Van Gool $^{1}$ Bernt Schiele $^{2}$ Federico Tombari $^{3,4}$ Fisher Yu $^{1}$ + +$^{1}$ ETH Zürich ${ }^{2}$ MPI Informatics ${ }^{3}$ Google ${ }^{4}$ Technical University of Munich $\{\text { taosun47, segum, jpostels, yuxuwang }\} @ethz.ch$ + +vangool@vision.ee.ethz.ch, schiele@mpi-inf.mpg.de, tombari@in.tum.de, i@yf.io + +# Abstract + +Adapting to a continuously evolving environment is a safety-critical challenge inevitably faced by all autonomous-driving systems. Existing image- and video-based driving datasets, however, fall short of capturing the mutable nature of the real world. In this paper, we introduce the largest multi-task synthetic dataset for autonomous driving, SHIFT. It presents discrete and continuous shifts in cloudiness, rain and fog intensity, time of day, and vehicle and pedestrian density. Featuring a comprehensive sensor suite and annotations for several mainstream perception tasks, SHIFT allows to investigate how a perception systems' performance degrades at increasing levels of domain shift, fostering the development of continuous adaptation strategies to mitigate this problem and assessing the robustness and generality of a model. Our dataset and benchmark toolkit are publicly available at www.vis.xyz/shift. + +# 1. Introduction + +Recent years have witnessed the remarkable progress of perception systems for autonomous driving. Betting on the role that autonomous driving will serve for society, industry [5, 7, 18, 29, 31, 52, 76] and academia [10, 17, 45, 50, 94] have joined forces to collect and release several large-scale driving datasets, raising hopes for a forthcoming successful deployment of self-driving cars. + +Providing a playground for different techniques to compete and thrive on multiple tasks, large-scale driving datasets have played a pivotal role in the prosperity of perception algorithms. However, while their accuracy surges, progress in terms of generalization to unforeseen environmental conditions has been underwhelming [11, 47]. + +![](images/bfe3867867707603bbffbaa703c27a5fc65e54eccec9b9aa441ddf60748661bd.jpg) +urban + +![](images/9df2e872b15f23db5dcdc38368f5965339c5a1a55cbe8d764af8dc2561b548b4.jpg) +Discrete domain shifts + +![](images/8bd7dc8e36c1ea35acffb92181203310caeb9f5daae802280e4c55a3a55744b4.jpg) +rural + +![](images/67bcf07f4c9cf58a312f16c7683b47c48b24a665fc25c1afe28025be35937462.jpg) +overcast + +![](images/c3cb07b5bc6d32c162b64a6f112c8ed26d36e605dcc06525c6af8eff93aba9cb.jpg) +village + +![](images/bf8400aff5c9b379aa925c94c51f85b48ef992e85d8cbcf798fba0169c5e1506.jpg) + +![](images/d4393bc4c4b5628fe20b9528a4bbf2cad74fad922f647879484f98d0b150bc5b.jpg) +afternoon + +![](images/c3faf51f9c6661623bac2e429fc50edffee68f8e5570fe39071a7701595fed8a.jpg) +rainy +dusk + +![](images/f90e1c5e945dcbb73488f1611d2a93c762e6606fec5ad33673a257a6ee38fbe5.jpg) +foggy +night + +![](images/c212c28d9f999d138b045abb00a75a1e84b04285ae44c4e2797a2a9dbb90a7cf.jpg) +daytime + +![](images/e6df8028a248bc473afe4d821dfb630e9fb3d8516c846efca1239754be7c3e65.jpg) +Continuous domain shifts + +![](images/2d5111663e7efb64de392e66b399c8302937d071c8fb74ffc5082cfd79e9cdb9.jpg) + +![](images/9271bbcc97c69bbf1ebec84b30ef327545761974c140e8fd736e3a75eea8eeea.jpg) +night + +![](images/2ccf2230a6de87d56a1e179e0df14c5447cf8ee83aeb266cbcd3465eb90133e1.jpg) +clear +Figure 1. SHIFT provides (a) discrete domain shifts: sequences are collected using separated domain parameters and random initial states, used for robustness evaluation and domain adaptation; (b) continuous domain shifts: domain parameters change continuously during driving, used for continuous domain adaptation. + +![](images/4c5e3c025313d501bdea24104fbf01c792f5ac25deeba9df6cdf596b7eba767f.jpg) + +![](images/432d2e7856f0a9a0896bf22f0141e1009f1c7a34f4b72d4e53ec583022f3c71e.jpg) + +![](images/ffc6714363f2f5961922f06e6121e21566d0712c8de98912eea9c770669b3f96.jpg) +rainy + +To achieve full autonomy, self-driving cars must adapt to new environments and identify life-threatening failure cases to promptly prevent crashes. Examples of domain shifts affecting driving are changes in weather and lighting conditions, scenery, and behavior, appearance, and quantity of agents on the road. Domain shift [2] is a well-known prob + +lem for learning algorithms, causing unforeseeable performance drops under conditions different from the training ones. Techniques to prevent, counteract or assess its impact have been developed in the form of, respectively, domain generalization [32, 48, 80, 88], domain adaptation [15, 42, 84, 91], uncertainty estimation [14, 36, 43, 58] and out-of-distribution (OOD) detection [26, 57, 68, 93]. However, such approaches are typically deployed and tested on toy datasets [39, 69, 86] or synthetically corrupted ones [24]. Although there are preliminary attempts at providing driving datasets with different domains [5, 11, 55, 67, 72, 73, 83, 94], each only covers a limited amount of perception tasks (e.g. only semantic segmentation [72, 73]) and a narrow selection of domain shift directions (e.g. only rain [83] or snow [55]). Consequently, current solutions to domain shift cannot undergo scrutiny in controlled autonomous driving scenarios, making it difficult to verify their safety without risking real-world car crashes. + +Given their short length, sequences from existing driving datasets are captured under approximately stationary conditions, and only discrete shifts are witnessed among sets of sequences presenting different homogeneous conditions from one set to another (e.g. clear weather and rainy). However, as the ancient Greek philosopher Heraclitus of Ephesus uttered, nothing in this world is constant except change and becoming. Continuous shifts - the intra-sequence shifts from one domain into another - are a certainty in the real world, where a sunny day can rapidly turn into a rainy one, or a quiet road can quickly become busy. Moreover, continuous distributional shift has recently been shown to represent a critical challenge for current learning systems [59]. + +An adequate dataset design is thus needed to quantify and address domain shift both at discrete and continuous levels. Consequently, we set the goal of overcoming the outdated paradigm of previous driving datasets and introduce SHIFT, a new synthetic dataset capturing the continuously evolving nature of the real world through realistic discrete and continuous shifts along safety-critical environmental directions: time of day, cloudiness, rain, fog strength, and vehicle and pedestrian density. Collected by means of the CARLA Simulator [13], SHIFT includes a comprehensive sensor suite and covers the most important perception tasks. Counting $4,800+$ sequences captured from a multi-view sensor suite in 8 different locations, it supports 13 perception tasks for multi-task driving systems: semantic/instance segmentation, monocular/stereo depth regression, 2D/3D object detection, 2D/3D multiple object tracking (MOT), optical flow estimation, point cloud registration, visual odometry, trajectory forecasting and human pose estimation. + +With our dataset, we aim to foster research in several under-explored fields related to the generality and reliability of perception systems for autonomous driving, e.g. + +domain generalization, domain adaptation, and uncertainty estimation. Moreover, by collecting incremental discrete shifts from one domain to another, we hope to foster research in the field of continual learning [20, 87, 90] for autonomous driving, so far only studied on discrete levels of synthetic corruptions [24] of traditional image classification datasets [12, 35]. Finally, by collecting sequences with realistic intra-sequence continuous domain shifts, we provide the first driving dataset allowing research on continuous test-time learning and adaptation [56, 77, 81, 82, 90]. + +We summarize the main contributions of this work: + +- We introduce SHIFT, a multi-task driving dataset featuring the most important perception tasks under a variety of conditions and with a comprehensive sensor setup. To the best of our knowledge, it is the largest synthetic dataset for autonomous driving and provides the most inclusive set of annotations and conditions. +- Using SHIFT, we analyze the importance of modeling discrete and continuous domain shifts, and demonstrate new findings on different adaptation and uncertainty estimation methods under continuous shifts. + +# 2. Related Work + +During the past decade, a large variety of realistic and synthetic driving datasets emerged, providing a playground for researchers to develop novel algorithms. Contextually, domain shift has been identified as a common threat to the performance and safety of learning-based methods. + +We here introduce the most-notable driving datasets and the techniques to mitigate the domain shift effect. For an overview of the current driving datasets, refer to Tab. 1. + +Real-world driving datasets typically focus on a specific subset of perception tasks due to the high cost of data collection and annotation. After almost a decade of development, the pioneering real-world dataset KITTI [17] supports almost all the perception tasks for autonomous driving, including semantic / instance segmentation, depth estimation, 2D and 3D object detection and tracking, optical flow, scene flow, and visual odometry. However, its small scale represents an obvious problem and its diversity is severely limited compared to modern large-scale datasets. CamVid [4], Cityscapes [10], and Mapillary [50] are image-based driving datasets for segmentation, A*3D [54] for 3D object detection, and HD1K [34] for optical flow estimation. Recently, many large-scale datasets, e.g., BDD100K [94], Waymo Open [76], H3D [52], and nuScenes [5], have been released with multi-task annotations, although mainly focusing on object detection and tracking. Our dataset offers a complete set of annotations for all the frames, comprehensive of all the most important perception tasks supported by other datasets, and enabling multi-task learning on a broader range of tasks and conditions. + +
DatasetCitiesTracking sequencesMax length for sequenceLabels for domain shiftsAnnotated frames for
Seg.2D Det.3D Det.MOTDepthFlow
Real-worldKITTI [17]122106 secno20015k15k15k93k389
CamVid [4]4--no700-----
Cityscapes [10]27--no25k-----
Cityscapes-C† [47]27--discrete25k-----
H3D [52]416020 secdiscrete--27k27k--
HD1K [34]1--discrete-----1k
A*3D [53]1--discrete--39k---
nuScenes [5]21,00020 secdiscrete--40k40k--
Waymo Open [76]31,15020 secdiscrete-200k230k230k--
BDD100K [94]multiple2,00040 secdiscrete10k100k-318k--
SyntheticSYNTHIA [67]3--discrete9,000200k200k---
GTA-V [65]1--no25k-----
VIPER [64]118410 mindiscrete320k320k-320k-320k
AIODrive [92]8100100 secdiscrete100k100k100k100k100k-
SHIFT (ours)84,85033 mindiscrete + continuous2.5M2.5M2.5M2.5M2.5M2.5M
+ +Table 1. Comparison of size and supported tasks of existing driving datasets. SHIFT is the largest synthetic dataset and, most notably, the only dataset providing realistic continuous domain shifts, diverse annotations, and longer annotated sequences. ${}^{ \dagger }$ artificially corrupted. + +Synthetic driving datasets are collected using graphic engines and physical simulators. SYNTHIA [67] contains images and segmentation annotations generated by its simulator. AIODrive [92] is produced using CARLA Simulator with multiple sensor support, focusing on high-density long-range LiDAR sets. Compared to ours, these datasets present sequences of limited length and are restricted to discrete domain labels (Tab. 1). Further, video games have also been used for data generation. GTA-V [28, 65] provides images and segmentation masks captured from a popular game. VIPER [64] extends GTA-V by providing optical flow masks and discrete environmental labels. However, low-level control of video game engines is hardly accessible, impeding fine-grained environmental control and the collection of continuous shifts. + +Adverse conditions datasets support the evaluation of robustness under different OOD conditions. A recent work [44] collects meteorological and air temperature measurements under discrete real-world shifts. Image-based datasets, e.g. CIFAR10/100-C [47], ImageNet-R [23] and Cityscapes-C [24], have been generated by applying artificial corruptions such as blurring, additive Gaussian noise and addition of specific patterns on the original dataset. Though carefully designed, such ad-hoc corruptions cannot fully represent the challenges presented by visual shifts in the real world. To this end, recent driving datasets [5,45,53, 76,94] provide manually labeled tags for various weather conditions, scene categories, and day periods. However, each only covers a limited amount of perception tasks (see Tab. 1) and a narrow selection of domain shift directions. Moreover, ad-hoc datasets have been collected for specific underrepresented domains, e.g. rain [30,83], fog [71,72,78], night [11], snow [55]. However, domain tags remain coarse-grained and only certain tasks and do + +main shift directions are supported. Recently, the ACDC dataset [73] has been proposed, featuring images evenly distributed between fog, nighttime, rain, and snow. However, it supports only semantic segmentation. Interestingly, the India Driving Dataset [85] is the only dataset to provide extremely busy roads as adverse conditions. Overall, BDD100K [94] is the large-scale real-world dataset presenting the largest diversity of perception driving tasks and discrete domain labels for the time of day and weather conditions. For this reason, we use it as a reference to validate empirical observations drawn from our dataset. Nevertheless, compared to our dataset, BDD100K only provides annotated images from single cameras, does not provide 3D bounding boxes and optical flow annotations, distribution of domains is highly imbalanced and the domain is stationary within each sequence. In contrast, our dataset provides a full sensor suite, annotations for multiple tasks, balanced domain distribution and sets of sequences with continuously changing time of day, weather conditions (cloudiness, rain and fog strength), and vehicle and pedestrians density. + +Unsupervised domain adaptation (UDA) means simultaneously learning on a labeled source and an unlabeled target domain to find transferable features across domains. UDA is mainly achieved via feature-space alignment [60, 75], domain-consistent regularization [15, 16, 27] and minimization of surrogate functions of domain gaps [70, 89]. The discrete shifts provided in our dataset can be directly used for training and evaluating UDA approaches. + +Continual domain adaptation aims at performing consecutive discrete adaptation steps from one domain to multiple others. Incremental domain adaptation (IncDA) is a subset of continual DA that requires the source data and assumes availability of intermediate domains where domain shifts + +![](images/043fde92350158e36cf6e40ee9c3ed536f31dcd3979f9bf38a67d1917d70d727.jpg) +multi-view camera set + +![](images/7bddd0c5db2a0aeed39e71c8621f5b2e21f82c6078836e376413c50950249fec.jpg) + +![](images/a8a89cfd415c522de2b904e4ff17adf9aa2422d205e0d8cebb7c799ca1b71875.jpg) +3D bounding box + +![](images/a12982d5468400663ed51c7552ab19f227d23b683bf4c03d471d1b3473fd0f29.jpg) + +![](images/89fb6e4d584e3c5969e8b5853ba94fcdd5b25487ac24b84978c50237ca9e5213.jpg) +front RGB camera + +![](images/217ab3cfb36652fdd2871797eb6408942b1a2a5581793a2396c1b2d82d8e6dc4.jpg) +2D bounding box +semantic segmentation +Figure 2. The annotation set of the RGB camera in our dataset. Each frame is associated with annotations of 2D/3D bounding boxes with tracking identities (visualized by different colors), semantic/instance segmentation, depth map and optical flow label. + +![](images/989a1e73c081a05d72a8dc0b41096d85e4dc20487c53a5c73fccd24f351a73f6.jpg) +depth map + +![](images/ff8950a509be4424a98b0e3d8190a4fbe9c850b0bb25fc78ccd78ed1000dc371.jpg) +instance segmentation +optical flow + +occur gradually [37, 87, 90], allowing to minimize the gap between adaptation steps and performing adaptation from the source to the final target domain more effectively than with direct UDA. Providing different strengths of variations along natural axes, our dataset is suitable for IncDA. + +Continuous test-time adaptation (ContinuousTTA) assumes that gradual domain shifts occur within the same test sequence, and adaptation is performed at test time on the incoming data stream. ContinuousTTA is a suitable choice for any scenario where a model is required to adapt on the go to a shifting domain and no large labeled or unlabeled collection of data from the target domain is available in advance. Recent works [49, 77, 90] show the efficiency of TTA when applied to artificial corruptions in the image-based datasets ImageNet-C/-R [23, 24]. The continuously shifting video sequences in our dataset provide instead realistic domain shift along natural directions, facilitating the development of ContinuousTTA methods transferable to the real world. + +Uncertainty Estimation is a fundamental task for safety-critical vision applications. Quantifying the confidence about a model's prediction allows avoiding dangerous failures in autonomous driving. However, current uncertainty estimation techniques [14, 36, 40, 57] mainly focus on classification on toy datasets [35, 38], while recent work [59] has observed poor calibration, i.e. uncertainty uncorrelated with prediction's error, when such techniques are extended to more difficult datasets [25] and tasks under distributional shift. We hope that the domain shifts and multiple tasks supported in SHIFT will enable the study of uncertainty estimation methods on a wide variety of tasks for autonomous driving and their calibration under distributional shift. + +# 3. The SHIFT Dataset + +We provide a driving dataset with a comprehensive sensor suite (Sec. 3.1) and a rich set of annotations (Sec. 3.2), supporting multiple image- and video-based perception and + +forecasting tasks against environmental changes. We detail our design choices regarding domain shifts in Sec. 3.3. + +# 3.1. Sensor Suite + +We collect the data through a comprehensive sensor suite. Our sensor suite features 11 different sensors, including a multi-view RGB camera set with 5 cameras, a stereo RGB camera set, an optical flow sensor, a depth camera, a GNSS sensor, and an IMU. All the cameras have a field-of-view of $90^{\circ}$ and resolution of $1280 \times 800$ pixel. Moreover, we provide point clouds captured by a 128-channel LiDAR sensor. All sensors are synchronized and captured at a $10\mathrm{Hz}$ rate. We follow the Scalabel [1] format and right-hand coordinate systems for storing all the annotations. More details are in the Appendix. + +# 3.2. Annotations + +We provide annotations for multiple mainstream perception tasks in autonomous driving, including 2D/3D bounding box trajectories, instance/semantic segmentation, optical flow and dense depth. Unlike real-world datasets, whose annotations are often limited to a group of keyframes due to prohibitive labeling cost, we offer full annotations for each frame in the sequences. More details are in the Appendix. + +# 3.3. Dataset Design + +Given their short sequence length, existing driving datasets are captured under approximately stationary conditions, and only discrete shifts are witnessed among sets of sequences presenting different homogeneous conditions (e.g. clear weather and rainy). We set the goal of overcoming the outdated paradigm of previous driving datasets and introduce SHIFT, a new synthetic dataset capturing the continuously evolving nature of the real world through realistic discrete and continuous shifts along safety-critical environmental directions: time of day, cloudiness, rain, fog strength, and vehicle and pedestrian density. We collect 4,850 sequences, of which 4,250 contain stationary environ + +![](images/7a08661dc1bda1bf5b9deb182c3d43169fe58f669c2dd443cc5b7cfa71426cd0.jpg) + +![](images/24155a39abe99475ef6a62e08331a181552d678e663abec4e8819c449128585e.jpg) + +![](images/67a2206a8ecb88dbde7d30afb0501a8b7cad787aa2216f16411d861c3a6b2726.jpg) + +![](images/ffa086448c041448c1f5fcc6fde9397b1c1a75311550944eee0c2eb67338d946.jpg) + +![](images/74348ab86bd046485006296620ab16a357f7c4a3097c5ee6271da7ce0da2a452.jpg) +Figure 3. We evaluate four adaptation strategies: targeted domain adaptation (Targeted DA), untargeted domain adaptation (Untargeted DA), incremental domain adaptation (Incremental DA) and continuous test-time adaptation (Continuous TTA). The dots in the same row represent frames from the same sequence; their grayscale marks the degree of domain shift (white dots = source, dark gray dots = target.) +Figure 4. Examples of the two-level structure for domain labels. Each discrete label (tag above images) corresponds to an interval of continuous labels (i.e., severity, axis below images). + +mental conditions, i.e. inter-sequence domain shift. Each sequence is composed of 500 frames collected at $10\mathrm{Hz}$ equivalent to 50 seconds of driving time. The remaining 600 sequences have continuously shifting conditions, i.e. inter-sequence domain shift. Totalling $70+$ hours of driving and 2,500,000 annotated frames, SHIFT is the largest synthetic driving dataset available. + +Domain shift types. We consider the most-frequent real-world environmental changes. SHIFT provides domain shifts in (a) weather conditions, including cloudiness, rain and fog intensity, (b) time of day, (c) the density of vehicles and pedestrians, and (d) camera orientation. + +Domain shifts level. To facilitate research on domain adaptation in different scenarios, SHIFT provides two levels of domain shifts, namely discrete domain shifts and continuous domain shifts. The discrete set contains 4,250 sequences generated with fixed environmental parameters and random initial states. We group these sequences into different domains, according to their severity. Fig. 4 shows grouping examples. All possible domain combinations are uniformly distributed across all sequences. The continuous set contains additional 600 sequences with continuous domain variations. In particular, each sequence presents a gradual shift from one domain to another, where the shift + +happens through the intermediate domains that would naturally occur in the real world. In total, we collect 500 sequences of a basic 20 seconds length (1x), 80 sequences 10x longer than the basic length, and 20 100x longer. Each set is uniformly divided among the following shifts, each of which also loops back to the source domain: day $\rightarrow$ night, clear $\rightarrow$ rain, clear $\rightarrow$ foggy, clear $\rightarrow$ overcast. Given a domain shift direction, e.g. day to night, all other domain parameters are uniformly distributed across all sequences. Different sequence lengths allow analyzing the impact of domain shift speed on continuous TTA strategies (Sec. 4.2). + +# 4. Experiments + +SHIFT allows studying the robustness of perception systems for driving under both discrete and continuous distributional shifts. We first (Sec. 4.1) assess the impact of discrete domain shifts on model performance for multiple perception tasks available in our dataset and empirically demonstrate that observations from our simulation dataset transfer to real-world datasets. Moreover, we compare different discrete adaptation strategies and assess the calibration of uncertainty estimation methods under domain shifts. In Sec. 4.2 we extend the analysis to continuous domain shifts and investigate properties of continuous domain adaptation methods [90] against incremental adaptation and unsupervised domain adaptation [89]. Further experiments, implementation details, and ablations on the data collection choices are reported in the Appendix, together with additional experiments on multitask learning. + +Domain adaptation strategies. To analyze the impact of our dataset design choice, we examine the four domain adaptation strategies allowed by our dataset (Fig. 3). As Baseline, we consider the model trained on the source domain only and directly tested on the other domains. Targeted DA [91] is a traditional computer vision problem consisting of adapting from a labeled source domain to a specific unlabeled target domain. We define Untargeted DA [39, 74] as adapting from a labeled source domain to a set of various unlabeled shifted domains. Incremental DA [87] consists in performing incremental steps of targeted + +![](images/be076e53918c428aa4d7a30768919b63fb06dfd07b2135ca0cf4cbf0dba9de0c.jpg) +Figure 5. Performance degradation for different object detection (left) and semantic segmentation (right) methods under different weather conditions. Every model is trained under clear weather conditions and tested on other domains. SHIFT shows a similar trend as BDD100K. + +![](images/b60d79cb92e5cc57f1b1c2eb1c212b21c65b4eea8ad1cd6705871fb8e6c9f2c1.jpg) + +![](images/62d8616715fcb6727fd593d4a54dbd2270b35facb4e8b9f658778d43c1e4f0cb.jpg) + +
TaskMethodMetricclear-daytimepartly cloudyovercastfoggyrainydawn/dusknight
Semantic segmentationDRN-D [95]mIoU (%) ↑83.679.379.462.454.660.842.8
Instance segmentationMask R-CNN [21]mAP (%) ↑39.339.434.018.735.030.713.1
Object detectionFaster R-CNN [6]mAP (%) ↑46.947.441.121.041.337.315.4
MOTQDTrack [51]MOTA (%) ↑56.253.446.225.041.944.716.5
Mono. depth estimationAdaBins-UNet [3]SILog ↓9.610.08.912.010.319.727.9
Optical flow estimationRAFT [79]EPE (px) ↓2.262.012.352.602.434.178.85
+ +Table 2. Performance degradation on SHIFT of different methods for different perception tasks under discrete domain shifts. Training domain is underlined. The test domains are weather variations in daytime (partly cloudy, overcast, foggy, rainy) and time of day variations in clear weather (dawn/dusk, night). $\uparrow (\downarrow)$ : the higher (lower) the better. + +
ScenarioBaselineTargeted DAIncremental DA
daytime → night42.845.347.3
clear → foggy62.459.157.3
clear → rainy54.661.064.9
+ +Table 3. Comparison of different adaptation strategies for semantic segmentation under three directions of domain shift. The source domain is underlined. Incremental DA improves over Targeted DA, except for the case when Targeted DA underperforms the baseline. (Baseline = without DA) + +DA from the source domain to the target domain passing through intermediate discretely-shifted domains. Continuous TTA [90] aims at adapting frame by frame to a sequence presenting a continuously shifted domain from source to target domain. + +Implementation details. For the adaptation tasks, we focus on semantic segmentation and use ADVENT [89] for the Targeted and Untargeted DA. The segmentation backbone is DRN-D-54 [96]. Incremental DA is performed as a series of Targeted DA steps, while for Continuous TTA we extend TENT [90] to semantic segmentation and iteratively apply it on every incoming frame. Every model is trained in the clear-daytime domain and tested under different weather domains. While our dataset provides finer domain labels depending on the severity of the perturbation, we group different degrees of severity to match the environmental labels in BDD100K [94] in order to assess the compatibility of conclusions drawn from our dataset with real-world trends. + +# 4.1. Discrete Shifts + +As outlined in Sec. 3.3, our dataset provides incremental discrete shifts along natural environmental directions. We investigate properties of discrete shifts on the multitude of supported tasks and report findings on domain adaptation and uncertainty estimation performance. + +Impact of domain shift. We find that many mainstream algorithms for different perception tasks suffer performance drops under domain shift (Tab. 2), where the severity increases with the distance from the source domain. In particular, we train all models in the clear-daytime domain and test under different weather conditions, showing the overall negative impact of domain shift on all the vision tasks supported by our dataset. Nevertheless, in some specific cases a model may even perform better on a shifted domain, e.g. instance segmentation on overcast. We leverage the incremental domain shifts provided in our dataset to investigate in Tab. 3 different discrete adaptation strategies for semantic segmentation, i.e. Incremental DA and Targeted DA. We find that incrementally adapting from source to target domain improves the generalization to the target domain compared to direct Targeted DA. However, clear $\rightarrow$ foggy represents a challenging scenario for which both the adaptation strategies worsen the baseline performance. + +Real-world compatibility. To establish a reliable benchmark we must first confirm that trends witnessed in our simulation dataset are compatible with real-world observations. We use BDD100K [94] for comparison because it + +
Methodclear-daytimecloudyovercastfoggyrainydawn/duskmightOOD avg
SHIFTSoftmax3.332.614.248.864.343.764.745.2
MCDO1.213.17.620.810.027.239.619.7
Ensemble1.412.37.523.48.918.736.918.0
BDDSoftmax9.623.29.99.77.710.648.618.4
MCDO12.322.07.813.011.413.141.418.1
Ensemble12.618.89.211.711.813.939.817.5
+ +Table 4. Calibration (ECE, %) of uncertainty estimation methods under distributional shift for semantic segmentation. The lower, the better. Source domain is clear-daytime. We find that calibration worsens far from the source, both for SHIFT and BDD100K. + +features the largest subset of our tasks available in a real-world dataset with discrete domain labels. We study the domain shift effect on two fundamental perception tasks, i.e. 2D object detection and semantic segmentation, and show compatible trends for different methods trained on SHIFT and BDD100K (Fig. 5). We evaluate the one-stage method YOLO v3 [62], as well as the two-stage methods Faster R-CNN [63] and Cascade R-CNN [6] for object detection. For semantic segmentation, we consider three different methods, FCN [41], DRN-D [95], and DeepLab v3+ [8]. Our experiments suggest that the performance of different methods for semantic segmentation and object detection degrades under different domain shifts. Moreover, we find that the ranking of methods and the relative degradation trend is compatible between SHIFT and the real-world dataset BDD100K, confirming the usefulness of SHIFT and its consistency with the real world. + +Uncertainty estimation. Autonomous driving systems must deal with life-threatening failure cases. To this end, uncertainty estimation represents a powerful tool to assess the reliability of a model's predictions. Following [19], we evaluate the Expected Calibration Error (ECE) to assess the calibration, i.e. correlation with model error, of uncertainty estimation methods under domain shift. In particular, we evaluate the Softmax Entropy baseline and traditional Bayesian techniques such as Monte-Carlo Dropout (MCDO) [14] and Deep Ensembles [36]. We observe that such uncertainty estimation methods are not well calibrated under domain shift, and that calibration worsens under incremental shifts on both SHIFT and BDD100K (Tab. 4). While some domains are more challenging in SHIFT than in BDD100K, the overall degradation of calibration observed on SHIFT is confirmed on BDD100K and the ranking of methods is preserved, further highlighting that conclusions drawn from our dataset transfer to the real world. + +We hope that our dataset will help researchers providing solutions to the potentially life-threatening shortcomings of current DA and uncertainty estimation techniques. + +![](images/60c3311f3e8f1de8b216e9195b719295619d1aac64f8e48b095b23338dcd352b.jpg) +Figure 6. Comparison of different adaptation strategies for semantic segmentation on daytime $\rightarrow$ night shifts at varying amounts of available sequences. TTA is the most effective under limited amounts of data. When enough data becomes available, Incremental DA outperforms all other alternatives. + +![](images/5c52ef45ead2ba06aa1650fdc8e55c3a85df94dc00d5b13eddb12e26ab4b7eaa.jpg) +Figure 7. Performance on the target domain of TTA for different sequence lengths. Best learning rate on target domain is highlighted by black boxes. Both source and target performance are highly sensitive to the learning rates. Dashed lines = before TTA. + +# 4.2. Continuous Shifts + +A key feature of SHIFT is that of providing a set with continuous intra-sequence domain shifts, allowing to compare different adaptation strategies under continuous shifts and provide an in-depth analysis on TTA and its properties. + +Continual domain adaptation. Fig. 6 compares four different adaptation strategies for semantic segmentation on an increasing number of sequences. Given a model pretrained on the source domain, i.e. clear-daytime, and the set of continuously shifting sequences from one domain to another, i.e. clear-daytime $\rightarrow$ night, we train the TTA algorithm on each frame of the incoming data stream. TTA is thus performed independently on each sequence. Final performance is averaged over all the sequences. For the other adaptation strategies, we divide the length of the sequence in 20 bins, consider each bin as a separate domain, and group corresponding bins from all the provided sequences. For + +![](images/56832ffa6213a30bf264a8021d16dace2e844e46639c480e9b5258fee6845906.jpg) + +![](images/1181ff7a63d80317048ee70596beb88296b3b5b078269723652497b8926438c2.jpg) + +![](images/e4cad6cfc0654545294398ceec0d4ae4b0fbf432a3c5ef7173d6e58de90c5847.jpg) + +![](images/8e92e33b424286697f93588ecaba4740b878830086e6fa12e90c5c67c958efc3.jpg) +Figure 8. Performance of TTA for semantic segmentation under three types of domain shift: daytime $\rightarrow$ night, clear $\rightarrow$ foggy, clear $\rightarrow$ rainy. Each point corresponds to the performance of the model on the source (top-blue) / target (top-red) / current (bottom) domain finetuned up to that level of domain shift in the sequence. Horizontal lines in the bottom figure represent the original performance on source (blue) and target domain (red). After reaching the target domain, every sequence loops back to the original source domain. Catastrophic forgetting can be observed by the drop in source performance during TTA. + +![](images/20a2dcfb9788d0aa391b77962f5459eb0fb7c2e7306eb2d2ad32d224c8c71df6.jpg) + +![](images/29976900311008a480dddfe5c80c63021c66c7bde0e13218aebe3959caa2f682.jpg) + +Targeted DA, we thus adapt directly to the last bin, corresponding to the night domain. Untargeted DA is instead applied on all the bins but the source one. Incremental DA is performed by incrementally adapting from one bin to the consecutive one until the end of the sequence is reached. In particular, we plot the average mIoU against the number of training sequences (Fig. 6). We find that TTA is extremely efficient under small target data availability compared to all other alternatives, and that Incremental DA is consistently more effective than both Targeted and Untargeted DA. + +Test-time adaptation. As intra-sequence continuous shifts represent one of the main contributions of SHIFT, we further focus on TTA by using TENT [90] and evaluate the effect of the speed at which domain shift happens within a sequence on TTA performance (Fig. 7). This is made possible by the sets of sequences of different lengths (1x, 10x, 100x the basic sequence length). + +Given a source and a target domain, e.g. daytime and night, each sequence starts from the source domain and reaches the target domain at mid-sequence length; then, it loops back to the original domain. We first observe that, depending on the domain shift speed, the learning rate can highly affect the outcome of the TTA (Fig. 7). Slower (faster) shifts will require lower (higher) learning rates. Moreover, after reaching the target domain at mid-sequence, the performance on the target domain has improved compared to its original value, while that on the source domain has dropped. According to Fig. 7 (1x), we find that the optimal learning rate in terms of adaptation to the target domain leads to the largest performance drop on the original source (Fig. 8, top). This problem, known as catastrophic forgetting [33] in the continual learn + +ing literature, has already been observed for class- and taskincremental learning. + +To further investigate this issue, we loop back to the original domain after adapting to the target and find that, while the performance on the current target domains largely improves over the baseline (Fig. 8, bottom), the original source domain accuracy cannot be recovered (Fig. 8, top). While TTA has shown to be extremely effective to adapt on the go, a model adapted with TTA cannot be safely deployed on the original source domain. Showing that catastrophic forgetting also affects test-time adaptation further demonstrates the importance of providing continuously shifted sequences in driving datasets, and we hope that future research will attempt to mitigate this problem. + +# 5. Conclusion + +We introduce SHIFT, a multi-task driving dataset featuring the most important perception tasks under discrete and continuous domain shifts. Thanks to our dataset design, we demonstrate several new findings on different adaptation strategies and uncertainty estimation methods. Although simulation environments are still far from being a perfect representation of the real world, they allow inexpensive data collection and annotation. Moreover, we empirically demonstrate that conclusions drawn from our dataset hold in real-world datasets. To the best of our knowledge, SHIFT is the largest synthetic dataset for autonomous driving, providing the most inclusive set of annotations and conditions. We hope that providing the first dataset with realistic continuous domain shifts will contribute to shaping the data collection paradigm for real-world driving datasets and promote advances in test-time learning and adaptation. + +# References + +[1] Scalabel: A scalable open-source web annotation tool, how-published = https://scalabel.ai/, note = Accessed: 2021-11-16,. 4 +[2] Shai Ben-David, John Blitzer, Koby Crammer, Alex Kulesza, Fernando Pereira, and Jennifer Wortman Vaughan. A theory of learning from different domains. Machine learning, 79(1):151-175, 2010. 1 +[3] Shariq Farooq Bhat, Ibrahim Alhashim, and Peter Wonka. Adabins: Depth estimation using adaptive bins. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4009-4018, 2021. 6, 19 +[4] Gabriel J Brostow, Julien Fauqueur, and Roberto Cipolla. Semantic object classes in video: A high-definition ground truth database. Pattern Recognition Letters, 30(2):88-97, 2009. 2, 3 +[5] 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 Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 11621-11631, 2020. 1, 2, 3, 13 +[6] 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. 6, 7, 19 +[7] Ming-Fang Chang, John Lambert, Patsorn Sangkloy, Jagjeet Singh, Slawomir Bak, Andrew Hartnett, De Wang, Peter Carr, Simon Lucey, Deva Ramanan, et al. Argoverse: 3D tracking and forecasting with rich maps. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8748-8757, 2019. 1 +[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. IEEE transactions on pattern analysis and machine intelligence, 40(4):834-848, 2017. 7 +[9] 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. 19 +[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 Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3213-3223, 2016. 1, 2, 3, 13 +[11] Dengxin Dai and Luc Van Gool. Dark model adaptation: Semantic image segmentation from daytime to nighttime. In 2018 21st International Conference on Intelligent Transportation Systems (ITSC), pages 3819-3824. IEEE, 2018. 1, 2, 3 +[12] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248-255. IEEE, 2009. 2 + +[13] Alexey Dosovitskiy, German Ros, Felipe Codevilla, Antonio Lopez, and Vladlen Koltun. CARLA: An open urban driving simulator. In Proceedings of the 1st Annual Conference on Robot Learning, pages 1-16, 2017. 2 +[14] Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pages 1050-1059, 2016. 2, 4, 7 +[15] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In International conference on machine learning, pages 1180-1189. PMLR, 2015. 2, 3 +[16] Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. The journal of machine learning research, 17(1):2096-2030, 2016. 3 +[17] Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets robotics: The kitti dataset. The International Journal of Robotics Research, 32(11):1231-1237, 2013. 1, 2, 3, 13, 14, 19 +[18] Jakob Geyer, Yohannes Kassahun, Mentar Mahmudi, Xavier Ricou, Rupesh Durgesh, Andrew S Chung, Lorenz Hauswald, Viet Hoang Pham, Maximilian Muhlegg, Sebastian Dorn, et al. A2D2: Audi autonomous driving dataset. arXiv preprint arXiv:2004.06320, 2020. 1 +[19] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In International Conference on Machine Learning, pages 1321-1330. PMLR, 2017. 7 +[20] Guy Hacohen and Daphna Weinshall. On the power of curriculum learning in training deep networks. In International Conference on Machine Learning, pages 2535-2544. PMLR, 2019. 2 +[21] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961-2969, 2017. 6, 16, 19 +[22] 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. 19 +[23] Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath, Frank Wang, Evan Dorundo, Rahul Desai, Tyler Zhu, Samyak Parajuli, Mike Guo, et al. The many faces of robustness: A critical analysis of out-of-distribution generalization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8340-8349, 2021. 3, 4 +[24] Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. Proceedings of the International Conference on Learning Representations, 2019. 2, 3, 4 +[25] Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. arXiv preprint arXiv:1903.12261, 2019. 4 +[26] Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. arXiv preprint arXiv:1610.02136, 2016. 2 + +[27] Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei Efros, and Trevor Darrell. Cycada: Cycle-consistent adversarial domain adaptation. In International conference on machine learning, pages 1989-1998. PMLR, 2018. 3 +[28] Hou-Ning Hu, Yung-Hsu Yang, Tobias Fischer, Trevor Darrell, Fisher Yu, and Min Sun. Monocular quasi-dense 3d object tracking. arXiv preprint arXiv:2103.07351, 2021. 3 +[29] Xinyu Huang, Peng Wang, Xinjing Cheng, Dingfu Zhou, Qichuan Geng, and Ruigang Yang. The ApolloScape open dataset for autonomous driving and its application. IEEE transactions on pattern analysis and machine intelligence, 42(10):2702-2719, 2019. 1 +[30] Jiongchao Jin, Arezou Fatemi, Wallace Lira, Fenggen Yu, Biao Leng, Rui Ma, Ali Mahdavi-Amiri, and Hao Zhang. RaidaR: A rich annotated image dataset of rainy street scenes. arXiv preprint arXiv:2104.04606, 2021. 3 +[31] R. Kesten, M. Usman, J. Houston, T. Pandya, K. Nadhamuni, A. Ferreira, M. Yuan, B. Low, A. Jain, P. Ondruska, S. Omari, S. Shah, A. Kulkarni, A. Kazakova, C. Tao, L. Platinsky, W. Jiang, and V. Shet. Level 5 perception dataset 2020. https://level-5.global/level5/data/, 2019. 1 +[32] Aditya Khosla, Tinghui Zhou, Tomasz Malisiewicz, Alexei A Efros, and Antonio Torralba. Undoing the damage of dataset bias. In European Conference on Computer Vision, pages 158-171. Springer, 2012. 2 +[33] 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. 8 +[34] Daniel Kondermann, Rahul Nair, Katrin Honauer, Karsten Krispin, Jonas Andrulis, Alexander Brock, Burkhard Gussefeld, Mohsen Rahimimoghaddam, Sabine Hofmann, Claus Brenner, et al. The hci benchmark suite: Stereo and flow ground truth with uncertainties for urban autonomous driving. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 19-28, 2016. 2, 3 +[35] Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. The cifar-10 dataset. online: http://www.cs.toronto.edu/kriz/cifar.html, 55:5, 2014. 2, 4 +[36] Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. In Advances in neural information processing systems, pages 6402-6413, 2017. 2, 4, 7 +[37] Qicheng Lao, Xiang Jiang, Mohammad Havaei, and Yoshua Bengio. Continuous domain adaptation with variational domain-agnostic feature replay. arXiv preprint arXiv:2003.04382, 2020. 4 +[38] Yann LeCun. The mnist database of handwritten digits. http://yann.lecun.com/exdb/mnist/, 1998. 4 +[39] Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy M Hospedales. Deeper, broader and artier domain generaliza + +tion. In Proceedings of the IEEE international conference on computer vision, pages 5542-5550, 2017. 2, 5 +[40] Jeremiah Zhe Liu, Zi Lin, Shreyas Padhy, Dustin Tran, Tania Bedrax-Weiss, and Balaji Lakshminarayanan. Simple and principled uncertainty estimation with deterministic deep learning via distance awareness. Conference on Neural Information Processing Systems, 2020. 4 +[41] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3431-3440, 2015. 7, 19 +[42] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael Jordan. Learning transferable features with deep adaptation networks. In International conference on machine learning, pages 97-105. PMLR, 2015. 2 +[43] Antonio Loquercio, Mattia Segu, and Davide Scaramuzza. A general framework for uncertainty estimation in deep learning. IEEE Robotics and Automation Letters, 5(2):3153-3160, 2020. 2 +[44] Andrey Malinin, Neil Band, German Chesnokov, Yarin Gal, Mark JF Gales, Alexey Noskov, Andrey Ploskonosov, Liudmila Prokhorenkova, Ivan Provilkov, Vatsal Raina, et al. Shifts: A dataset of real distributional shift across multiple large-scale tasks. arXiv preprint arXiv:2107.07455, 2021. 3 +[45] Jiageng Mao, Minzhe Niu, Chenhan Jiang, Xiaodan Liang, Yamin Li, Chaoqiang Ye, Wei Zhang, Zhenguo Li, Jie Yu, Chunjing Xu, et al. One million scenes for autonomous driving: Once dataset. 2021. 1, 3 +[46] Nikolaus Mayer, Eddy Ilg, Philip Hausser, Philipp Fischer, Daniel Cremers, Alexey Dosovitskiy, and Thomas Brox. A large dataset to train convolutional networks for disparity, optical flow, and scene flow estimation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4040-4048, 2016. 19 +[47] Claudio Michaelis, Benjamin Mitzkus, Robert Geirhos, Evgenia Rusak, Oliver Bringmann, Alexander S Ecker, Matthias Bethge, and Wieland Brendel. Benchmarking robustness in object detection: Autonomous driving when winter is coming. arXiv preprint arXiv:1907.07484, 2019. 1, 3 +[48] Krikamol Muandet, David Balduzzi, and Bernhard Scholkopf. Domain generalization via invariant feature representation. In International Conference on Machine Learning, pages 10-18. PMLR, 2013. 2 +[49] Chaithanya Kumar Mummadi, Robin Hutmacher, Kilian Rambach, Evgeny Levinkov, Thomas Brox, and Jan Hendrik Metzen. Test-time adaptation to distribution shift by confidence maximization and input transformation. arXiv preprint arXiv:2106.14999, 2021. 4 +[50] Gerhard Neuhold, Tobias Ollmann, Samuel Rota Bulo, and Peter Kontschieder. The mapillary vistas dataset for semantic understanding of street scenes. In Proceedings of the IEEE international conference on computer vision, pages 4990-4999, 2017. 1, 2 +[51] Jiangmiao Pang, Linlu Qiu, Xia Li, Haofeng Chen, Qi Li, Trevor Darrell, and Fisher Yu. Quasi-dense similarity learning for multiple object tracking. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 164–173, 2021. 6 + +[52] Abhishek Patil, Srikanth Malla, Haiming Gang, and Yi-Ting Chen. The h3d dataset for full-surround 3d multi-object detection and tracking in crowded urban scenes. In 2019 International Conference on Robotics and Automation (ICRA), pages 9552-9557. IEEE, 2019. 1, 2, 3 +[53] Quang-Hieu Pham, Pierre Sevestre, Ramanpreet Singh Pahwa, Huijing Zhan, Chun Ho Pang, Yuda Chen, Armin Mustafa, Vijay Chandrasekhar, and Jie Lin. A* 3d dataset: Towards autonomous driving in challenging environments. In 2020 IEEE International Conference on Robotics and Automation (ICRA), pages 2267-2273. IEEE, 2020. 3 +[54] Quang-Hieu Pham, Pierre Sevestre, Ramanpreet Singh Pahwa, Huijing Zhan, Chun Ho Pang, Yuda Chen, Armin Mustafa, Vijay Chandrasekhar, and Jie Lin. A* 3d dataset: Towards autonomous driving in challenging environments. In 2020 IEEE International Conference on Robotics and Automation (ICRA), pages 2267-2273. IEEE, 2020. 2 +[55] Matthew Pitropov, Danson Evan Garcia, Jason Rebello, Michael Smart, Carlos Wang, Krzysztof Czarnecki, and Steven Waslander. Canadian adverse driving conditions dataset. The International Journal of Robotics Research, 40(4-5):681-690, 2021. 2, 3 +[56] Matteo Poggi, Alessio Tonioni, Fabio Tosi, Stefano Mattoccia, and Luigi Di Stefano. Continual adaptation for deep stereo. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021. 2 +[57] Janis Postels, Hermann Blum, Yannick Strümpler, Cesar Cadena, Roland Siegwart, Luc Van Gool, and Federico Tombari. The hidden uncertainty in a neural networks activations. arXiv preprint arXiv:2012.03082, 2020. 2, 4 +[58] Janis Postels, Francesco Ferroni, Huseyin Coskun, Nassir Navab, and Federico Tombari. Sampling-free epistemic uncertainty estimation using approximated variance propagation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2931-2940, 2019. 2 +[59] Janis Postels, Mattia Segu, Tao Sun, Luc Van Gool, Fisher Yu, and Federico Tombari. On the practicality of deterministic epistemic uncertainty. arXiv preprint arXiv:2107.00649, 2021. 2, 4 +[60] Joaquin Quinonero-Candela, Masashi Sugiyama, Anton Schwaighofer, and N Lawrence. Covariate shift and local learning by distribution matching, 2008. 3 +[61] Joseph Redmon and Ali Farhadi. Yolo9000: better, faster, stronger. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7263-7271, 2017. 19 +[62] Joseph Redmon and Ali Farhadi. Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767, 2018. 7, 19 +[63] 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. 7, 18, 19 +[64] Stephan R. Richter, Zeeshan Hayden, and Vladlen Koltun. Playing for benchmarks. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 2232-2241, 2017. 3, 19 +[65] 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. 3 +[66] 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. 16, 19 +[67] 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 Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3234-3243, 2016. 2, 3 +[68] Lukas Ruff, Jacob R Kauffmann, Robert A Vandermeulen, Grégoire Montavon, Wojciech Samek, Marius Kloft, Thomas G Dietterich, and Klaus-Robert Müller. A unifying review of deep and shallow anomaly detection. Proceedings of the IEEE, 2021. 2 +[69] Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting visual category models to new domains. In European conference on computer vision, pages 213-226. Springer, 2010. 2 +[70] Kuniaki Saito, Donghyun Kim, Stan Sclaroff, Trevor Darrell, and Kate Saenko. Semi-supervised domain adaptation via minimax entropy. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8050-8058, 2019. 3 +[71] Christos Sakaridis, Dengxin Dai, Simon Hecker, and Luc Van Gool. Model adaptation with synthetic and real data for semantic dense foggy scene understanding. In Proceedings of the European Conference on Computer Vision (ECCV), pages 687-704, 2018. 3 +[72] Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Semantic foggy scene understanding with synthetic data. International Journal of Computer Vision, 126(9):973-992, 2018. 2, 3 +[73] Christos Sakaridis, Dengxin Dai, and Luc Van Gool. ACDC: The adverse conditions dataset with correspondences for semantic driving scene understanding. arXiv preprint arXiv:2104.13395, 2021. 2, 3 +[74] Mattia Segu, Alessio Tonioni, and Federico Tombari. Batch normalization embeddings for deep domain generalization. arXiv preprint arXiv:2011.12672, 2020. 5 +[75] Baochen Sun, Jiashi Feng, and Kate Saenko. Correlation alignment for unsupervised domain adaptation. In Domain Adaptation in Computer Vision Applications, pages 153-171. Springer, 2017. 3 +[76] 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. 1, 2, 3, 13 +[77] Yu Sun, Xiaolong Wang, Zhuang Liu, John Miller, Alexei Efros, and Moritz Hardt. Test-time training with self-supervision for generalization under distribution shifts. In International Conference on Machine Learning, pages 9229-9248. PMLR, 2020. 2, 4 + +[78] Jean-Philippe Tarel, Nicholas Hautiere, Laurent Caraffa, Aurélien Cord, Houssam Halmaoui, and Dominique Gruyer. Vision enhancement in homogeneous and heterogeneous fog. IEEE Intelligent Transportation Systems Magazine, 4(2):6-20, 2012. 3 +[79] Zachary Teed and Jia Deng. Raft: Recurrent all-pairs field transforms for optical flow. In European conference on computer vision, pages 402-419. Springer, 2020. 6, 19 +[80] Josh Tobin, Rachel Fong, Alex Ray, Jonas Schneider, Wojciech Zaremba, and Pieter Abbeel. Domain randomization for transferring deep neural networks from simulation to the real world. In 2017 IEEE/RSJ international conference on intelligent robots and systems (IROS), pages 23-30. IEEE, 2017. 2 +[81] Alessio Tonioni, Oscar Rahnama, Thomas Joy, Luigi Di Stefano, Thalaiyasingam Ajanthan, and Philip HS Torr. Learning to adapt for stereo. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9661–9670, 2019. 2 +[82] Alessio Tonioni, Fabio Tosi, Matteo Poggi, Stefano Mattoccia, and Luigi Di Stefano. Real-time self-adaptive deep stereo. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 195-204, 2019. 2 +[83] Frederick Tung, Jianhui Chen, Lili Meng, and James J Little. The raincouver scene parsing benchmark for self-driving in adverse weather and at night. IEEE Robotics and Automation Letters, 2(4):2188-2193, 2017. 2, 3 +[84] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7167-7176, 2017. 2 +[85] Girish Varma, Anbumani Subramanian, Anoop Namboodiri, Manmohan Chandraker, and CV Jawahar. IDD: A dataset for exploring problems of autonomous navigation in unconstrained environments. In 2019 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 1743-1751. IEEE, 2019. 3 +[86] Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, and Sethuraman Panchanathan. Deep hashing network for unsupervised domain adaptation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5018-5027, 2017. 2 +[87] Riccardo Volpi, Diane Larlus, and Grégory Rogez. Continual adaptation of visual representations via domain randomization and meta-learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4443-4453, 2021. 2, 4, 5 +[88] Riccardo Volpi, Hongseok Namkoong, Ozan Sener, John Duchi, Vittorio Murino, and Silvio Savarese. Generalizing to unseen domains via adversarial data augmentation. arXiv preprint arXiv:1805.12018, 2018. 2 +[89] Tuan-Hung Vu, Himalaya Jain, Maxime Bucher, Matthieu Cord, and Patrick Pérez. Advent: Adversarial entropy minimization for domain adaptation in semantic segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2517-2526, 2019. 3, 5, 6 + +[90] Dequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno Olshausen, and Trevor Darrell. Tent: Fully test-time adaptation by entropy minimization. Int. Conf. Learn. Represent. (ICLR), 2021. 2, 4, 5, 6, 8 +[91] Mei Wang and Weihong Deng. Deep visual domain adaptation: A survey. Neurocomputing, 312:135-153, 2018. 2, 5 +[92] Xinshuo Weng, Yunze Man, Dazhi Cheng, Jinhyung Park, Matthew O'Toole, and Kris Kitani. All-In-One Drive: A Large-Scale Comprehensive Perception Dataset with High-Density Long-Range Point Clouds. arXiv, 2020. 3 +[93] Jingkang Yang, Kaiyang Zhou, Yixuan Li, and Ziwei Liu. Generalized out-of-distribution detection: A survey. arXiv preprint arXiv:2110.11334, 2021. 2 +[94] 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 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. 1, 2, 3, 6 +[95] Fisher Yu, Vladlen Koltun, and Thomas Funkhouser. Dilated residual networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 472-480, 2017. 6, 7, 16, 18, 19 +[96] Fisher Yu, Vladlen Koltun, and Thomas Funkhouser. Dilated residual networks. In Computer Vision and Pattern Recognition (CVPR), 2017. 6 \ No newline at end of file diff --git a/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/images.zip b/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ce5bfb93bdb46b0575f32347f754f3460db78076 --- /dev/null +++ b/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:186cf8c54a5c109b8323122512fa27be9c74709b76cfe2f829bc55ea0eaa9ccd +size 612051 diff --git a/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/layout.json b/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..af7ba1613cc66cee823422dd0997d1095a4bcd78 --- /dev/null +++ b/shiftasyntheticdrivingdatasetforcontinuousmultitaskdomainadaptation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f2aee4a52e614223ff09cdbb01e8e49023a100d701033a3eed7627d49e068c1 +size 451365 diff --git a/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/190d1440-77ad-4e37-abc7-f3639e2c6b91_content_list.json b/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/190d1440-77ad-4e37-abc7-f3639e2c6b91_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..dccbc2ad6ec47fdd0013c57c7d50b7f84f7dbf05 --- /dev/null +++ b/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/190d1440-77ad-4e37-abc7-f3639e2c6b91_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd47637116d086560f8a566f58e58f675e9e463dd5958a413bfd5e2435e264dc +size 79586 diff --git a/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/190d1440-77ad-4e37-abc7-f3639e2c6b91_model.json b/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/190d1440-77ad-4e37-abc7-f3639e2c6b91_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e0970b32fca9ac4c2c32ed9ae6596bd2117ee6a1 --- /dev/null +++ b/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/190d1440-77ad-4e37-abc7-f3639e2c6b91_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5884b2ab903a8181d9cc1a42399be21a2bbdeba5093ffacddfb8d77fce451073 +size 95788 diff --git a/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/190d1440-77ad-4e37-abc7-f3639e2c6b91_origin.pdf b/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/190d1440-77ad-4e37-abc7-f3639e2c6b91_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ed3cc033a5a4f80386f86d07110a7b583eb241fb --- /dev/null +++ b/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/190d1440-77ad-4e37-abc7-f3639e2c6b91_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f08b838f6292f35fc0924b0bb681db8aa5653b627175af0a262028ed290b91b9 +size 8602097 diff --git a/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/full.md b/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7cfdf1aab32c6b24069acaab27b2f35eddfd6789 --- /dev/null +++ b/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/full.md @@ -0,0 +1,264 @@ +# SIGMA: Semantic-complete Graph Matching for Domain Adaptive Object Detection + +Wuyang Li Xinyu Liu Yixuan Yuan* City University of Hong Kong + +{wuyangli2, xliu423}-c@my.cityu.edu.hk yxyuan.ee@cityu.edu.hk + +# Abstract + +Domain Adaptive Object Detection (DAOD) leverages a labeled domain to learn an object detector generalizing to a novel domain free of annotations. Recent advances align class-conditional distributions by narrowing down cross-domain prototypes (class centers). Though great success, they ignore the significant within-class variance and the domain-mismatched semantics within the training batch, leading to a sub-optimal adaptation. To overcome these challenges, we propose a novel SemanticComplete Graph MAatching (SIGMA) framework for DAOD, which completes mismatched semantics and reformulates the adaptation with graph matching. Specifically, we design a Graph-embedded Semantic Completion module (GSC) that completes mismatched semantics through generating hallucination graph nodes in missing categories. Then, we establish cross-image graphs to model class-conditional distributions and learn a graph-guided memory bank for better semantic completion in turn. After representing the source and target data as graphs, we reformulate the adaptation as a graph matching problem, i.e., finding well-matched node pairs across graphs to reduce the domain gap, which is solved with a novel Bipartite Graph Matching adaptor (BGM). In a nutshell, we utilize graph nodes to establish semantic-aware node affinity and leverage graph edges as quadratic constraints in a structure-aware matching loss, achieving fine-grained adaptation with a node-to-node graph matching. Extensive experiments verify that SIGMA outperforms existing works significantly. Our code is available at https://github.com/CityU-AIM-Group/SIGMA. + +# 1. Introduction + +Well-trained object detectors [23, 24, 33] have been proven to achieve promising performance with a consistent + +![](images/75e22b83e30a3418e0667d0ff26441b120caa7013d2f56fbfc20426e214d0b8f.jpg) +Figure 1. Illustration of the proposed SemantIc-complete Graph MAatching (SIGMA) framework for DAOD. + +distribution of training and test data. However, deploying these methods in a novel domain leads to the catastrophic performance degradation due to the domain gap [3], which significantly limits the generalization and transferability of object detectors. Furthermore, this challenge also restricts the application of object detection in real-world scenarios, such as self-driving under distinctive weather conditions and video analysis containing novel scenes. + +To overcome this limitation, Unsupervised Domain Adaptation (UDA) methods have been explored to adapt the unlabeled target domain and the annotated source domain, and one of the main streams of UDA works is to align feature distributions between source and target domains. Early works [3, 12, 27] adopt a pixel-to-pixel adaptation in terms of hierarchical features, yielding a global alignment of the whole image with per-pixel adaptation. Some works [3, 37, 41] focus on foreground objects and conduct more precise adaptation on those regions of interest. Recently, some works [32, 37, 41, 42] aim to align cross-domain class-conditional distributions in the implicit feature space and achieve adaptation in a category-to-category manner. These works model category centers with prototypes and minimize the distance of cross-domain prototypes to bridge the domain gap at the category level. + +Though satisfactory performance, there are still two challenges in existing category-level adaptation works [32, 37, 41, 42]. Firstly, these works neglect the significant within-class variance and directly align handcraft category + +centers, which inevitably bring about a sub-optimal adaptation. Due to the diverse size and appearance of object instances, the within-class variance covers essential information to represent class-conditional distributions, e.g., the scale and shape, which should also be aligned for domain adaptation. Overlooking the within-class variance could lead to lots of non-adapted object instances and the potential overlapping of different class-conditional distributions with false-positive classification errors. Although some works have introduced explicit variance [2] to relieve the problem of existing center-based measurements, they follow the Gaussian assumption to model feature distributions, which is not optimal in the non-convex deep feature space. These observations motivate us to design a new paradigm to align cross-domain pixel-pairs in the non-euclidean graphical space [39], which models and adapts class-conditional distributions without handcraft center-based alignment. + +The second challenge lies in the domain-mismatched semantics within the training batch. Some existing works [32, 37, 42] only perform adaptation on the co-occurred categories in two domains, ignoring mismatched categories appearing in a single domain. Neglecting missing categories leads to a non-effective adaptation due to the loss of semantic knowledge. As shown in Figure 1, the train only appears in the source batch, while these bicycles are available in the target domain, yielding inconsistent semantics across domains. These mismatched semantics bring about the difficulty of explicitly estimating class centers, limiting the adaptation of class-conditional distributions. Furthermore, the missing semantics in the target domain even result in the potential risk towards source-specific direction since the supervised source classification could generate a biased class-conditional distribution [35]. Hence, we are committed to designing a semantic completion strategy through generating novel hallucination samples [40] in the missing categories, which relieves the negative impact of mismatched semantics and achieves more effective adaptation. + +To overcome the aforementioned challenges, we propose a SemantIc-complete Graph MAatching (SIGMA) framework for DAOD, which completes domain-mismatched semantics and reformulates the adaptation as a graph matching problem, i.e., finding the suitable matching between graph nodes to bridge the domain gap. As shown in Figure 1, we design a Graph-embedded Semantic Completion module (GSC) to complete the mismatched semantics, which utilizes domain-level statistics to generate hallucination nodes in the missing categories. Then, we establish graphs to model class-conditional distributions for both domains and learn a graph-guided memory bank to improve the capacity of semantic completion in turn. Based on our reformulation of domain adaptation, we propose a Bipartite Graph Matching adaptor (BGM) to solve the graph matching problem between the source and target graph, achieving + +a fine-grained domain alignment. We utilize graph nodes to learn semantic-aware node affinity and introduce graph edges in a structure-aware matching loss for the Quadratic Assignment Problem (QAP). This graph-matching-based domain alignment enables a fine-grained adaptation with well-matched semantics and relieves the biased and noneffective adaptation in existing prototype-based methods. To be summarized, our contributions are as follows. + +- We propose a SemantIc-complete Graph MAatching (SIGMA) framework for DAOD, which aligns the class-conditional distribution with graph matching. To the best of our knowledge, this work represents the first attempt to leverage graph matching theory to bridge the domain gap in the detection community. +- We propose a Graph-embedded Semantic Completion module (GSC) to complete mismatched semantics by generating hallucination nodes and a Bipartite Graph Matching adaptor (BGM) that reformulates DAOD as a graph matching problem to bridge the domain gap. +- Extensive experiments on three benchmarks demonstrate that SIGMA achieves state-of-the-art results and outperforms DAOD counterparts significantly. + +# 2. Related Work + +# 2.1. Domain Adaptive Object Detection + +Domain adaptive object detection (DAOD) aims to bridge the domain gap between the training and testing data, which can be categorized into style-transfer [13, 14, 16], self-labeling [14, 21], and domain-alignment [3, 17, 27]. As one of the main streams, domain-alignment approaches adopt adversarial feature alignment and minimize the cross-domain discrepancy to bridge the domain gap. Early works align global features [3, 17, 27] with diverse mechanisms, e.g., spatial attention [17] and strong-weak alignment [27]. Besides, some works tend to align a community of local pixels with essential attributes, e.g., region proposals [16] and object centers [12]. Recently, some works have introduced a more precise adaptation in class-conditional distributions at the category level. GPA [37] utilizes RoI-based graphs to model prototypes and narrows down these cross-domain measurements. PARPN [41] extends the idea of prototype alignment in the RPN stage, and the authors in [42] extend the batch-wise prototypes at the domain level. However, these works ignore the significant within-class variance, leading to a sub-optimal alignment of class-conditional distributions. This work breaks this barrier with graph matching, avoiding the inaccuracy adaptation caused by handcraft prototype design and center-based alignment. + +![](images/22662eac98b83003f4b6de1bed2353c920d6383c8cfd8adb1d5d82980ae5be9c.jpg) +Figure 2. Overview of the proposed SIGMA framework for DAOD. V2G represents vision-to-graph transformation. + +# 2.2. Graph Matching + +Graph matching establishes pair-wise node correspondences between two graphs, and gives a one-to-one matching of graph nodes belonging to different graphical entities. As a Quadratic Assignment Problem (QAP) [20] with combinational nature, graph matching solvers [20, 38] optimize a cross-graph permutation matrix to encode matched node pairs, considering both node and structure affinities. Recently, graph matching has been extended to visual correspondence detection [8], multi-object tracking [10], point cloud registration [6] to model pair-wise relationships in the graphical space. Gao, et al. [8] model key-point-based graphs on images and establish graph matching between images covering the same objects. Fu et al. model graphs on the 3D rigid point cloud and perform graph matching on two homogeneous point sets to achieve robust point cloud registration. The authors in [10] perform graph matching across the tracklet and detection space to achieve high-quality object tracking. Different from aforementioned scenarios with off-the-shelled graph definition and pair-wise labels, we innovatively reformulate DAOD as a graph matching problem, and leverage the QAP solver to bridge the domain gap. + +# 3. Motivation and Preliminaries + +We theoretically analyze existing category-level adaptation approaches, and demonstrate our motivation and new solution as follows. Considering the batch-wise source and target observation $S = \{(x_s^i,y_s^i)\}_{i = 1}^B$ and $\mathcal{T} = \{x_t^i\}_{i = 1}^B$ drawn from the inconsistent domain distribution $\mathcal{P}_s$ and $\mathcal{P}_t$ ( $\mathcal{P}_s \neq \mathcal{P}_t$ ), existing approaches [32, 37, 41, 42] aim to model and align class-conditional distributions $\mathcal{P}_{X|Y}(\phi (x_{s / t})|y)$ , where $\phi (\cdot)$ is the feature extractor. These works first estimate category centers $\mu_{s / t}^{y} = \mathbb{E}_{X|Y}[\phi (x)|y]$ with handcraft priors, e.g., mean-values of object features + +$\mu_{s/t}^y = \frac{1}{N_{s/t}} \sum_i^{N_{s/t}} RoI_i^y$ , and then minimize the domain-discrepancy between $\mu_s^y$ and $\mu_t^y$ . However, these methods potentially achieve a biased adaptation depending only on center-based knowledge, and fail to adapt mismatched categories $\Omega_{s/t}^{miss}$ appearing in a single domain due to the intractable $\mu_{s/t}^{y=\Omega_{s/t}^{miss}}$ . + +To overcome these issues, we generate novel samples in the missing categories $\Omega_{s/t}^{miss}$ to complete the mismatched semantic, and establish a cross-image graph $\mathcal{G}_{s/t}$ to model the class-conditional distribution $\mathcal{P}_{X|Y}(\phi(x_{s/t})|y)$ for each domain. Then, we reformulate domain adaptation as a graph matching problem between $\mathcal{G}_s$ and $\mathcal{G}_t$ , which can be solved with a differential QAP [6, 8, 10] as follows, + +$$ +\min _ {\boldsymbol {\Pi}} \mathcal {F} (\boldsymbol {\Pi}) = | | \mathcal {A} _ {s} - \boldsymbol {\Pi} \mathcal {A} _ {t} \boldsymbol {\Pi} ^ {T} | | _ {F} ^ {2} - t r \left(\mathbf {X} _ {u} ^ {T} \boldsymbol {\Pi}\right), \tag {1} +$$ + +$$ +\boldsymbol {\Pi} \in [ 0, 1 ] ^ {\mathcal {N} _ {s} \times \mathcal {N} _ {t}}, \boldsymbol {\Pi} \mathbf {l} _ {\mathcal {N} _ {s}} \leq \mathbf {l} _ {\mathcal {N} _ {t}}, \boldsymbol {\Pi} ^ {T} \mathbf {l} _ {\mathcal {N} _ {t}} \leq \mathbf {l} _ {\mathcal {N} _ {s}}, +$$ + +where $\mathcal{A}_s\in \mathbb{R}^{\mathcal{N}_s\times \mathcal{N}_s}$ and $\mathcal{A}_t\in \mathbb{R}^{\mathcal{N}_t\times \mathcal{N}_t}$ represent the adjacent matrix encoding structure information of the graph $\mathcal{G}_s$ and $\mathcal{G}_t$ respectively, $\mathcal{N}_{s / t}$ is the number of graph nodes, $||\cdot ||_F$ is the Frobenius norm, $\mathbf{X}_u\in \mathbb{R}^{\mathcal{N}_t\times \mathcal{N}_s}$ is the unary affinity matrix and generally specified as the node affinity $\mathbf{M}_{\mathrm{aff}}$ [8], and $\Pi$ is the relaxed permutation matrix encoding node-to-node assignment' and $\Pi_{i,j} = 1$ indicates that the node $v_{s}^{i}\in \mathcal{G}_{s}$ is matched with the node $v_{t}^{j}\in \mathcal{G}_{t}$ + +Different from existing works [37, 41, 42] overlooking mismatched categories, we complete missing semantics and effectively align the distribution for each appeared category. Besides, our method achieves a fine-grained adaptation guided by graph matching, breaking the barrier of existing center-based methods adopting sub-optimal alignment. + +# 4. Proposed Method + +The overall workflow the proposed SIGMA framework is shown in Figure 2. Given batch-wise annotated source images $\{(x_s^i,y_s^i)\}_{i = 1}^B$ and unlabeled target images $\{x_t^i\}_{i = 1}^B$ , we use a shared feature extractor $\phi$ to extract image-level features $\{\phi (x_{s / t}^{i})\}_{i = 1}^{B}$ , which are sent to Graph-embedded Semantic Completion module (GSC) (Figure 2(a)). In the GSC module, we first transform visual features to the graphical space (V2G) and perform domain-guided node completion (DNC) to complete mismatched semantics, obtaining semantic-complete node sets $\nu_{s / t}$ . Then, we establish cross-image graphs $\mathcal{G}_{s / t}$ to model the class-conditional distribution with enhanced nodes $\tilde{\nu}_{s / t}$ , which also serves to learn a graph-guided memory bank (GMB) to improve the semantic completion in turn. Afterwards, the well-modeled graphs $\mathcal{G}_{s / t}$ are sent to the Bipartite Graph Matching adaptor (BGM) (Figure 2(b)). We use graph nodes $\tilde{\nu}_{s / t}$ for cross graph interaction (CGI) and learn a semantic-aware node affinity (SNA) matrix $\tilde{\mathbf{M}}_{\mathrm{aff}}$ . Besides, we leverage graph edges $\mathcal{E}_{s / t}$ to serve as quadratic constraints (QC) to optimize the graph matching permutation, achieving fine-grained adaptation with well-aligned node pairs. + +# 4.1. Graph-embedded Semantic Completion + +Given batch-wise annotated source images $\{(x_s^i,y_s^i)\}_{i = 1}^{\mathcal{B}}$ and unlabeled target images $\{x_{t}^{i}\}_{i = 1}^{\mathcal{B}}$ with $C$ categories, we first adopt the domain-shared backbone $\phi$ to extract visual features $\{\phi (x_{s / t}^{i})\}_{i = 1}^{\mathcal{B}},\phi (x_{s / t}^{i})\in \mathbb{R}^{D\times W\times H}$ . For the source features, we perform spatial-uniformed sampling to collect the pixels inside ground-truth boxes as class-aware foreground nodes and a ratio $\frac{1}{C + 1}$ of pixels outside foreground boxes as background samples. For the target domain, we forward-propagate target features in classification head to obtain pseudo score maps $\mathcal{M}_t\in \mathbb{R}^{C\times W\times H}$ as the surrogate sampling principle. Then we sample the pixels satisfying $\max_C(\mathcal{M}_t^i) > \tau_{fg}$ as class-aware foreground nodes and a ratio $\frac{1}{C + 1}$ of low-score pixels $(\max_C(\mathcal{M}_t^i)< \tau_{bg})$ as background samples2. After sampling fine-grained visual features, we perform a non-linear projection to obtain the raw node embedding $\mathcal{V}_{s / t}^{raw} = \{v_{s / t}^{i}\}_{i = 1}^{\mathcal{N}_{s / t}}$ , achieving the transformation from the visual space to the graphical space. Domain-guided Node Completion. The object categories $\Omega_{s / t}^{\mathcal{B}}\in \{0,1,\dots,C\}$ within a training batch are always mismatched between the source and target domain, limiting the adaptation of class-conditional distributions. Hence, we propose a semantic completion strategy to generate hallucination nodes in missing categories $\Omega_s^{miss} = \{\omega |\omega \in$ $\Omega_t^{\mathcal{B}},\omega \notin \Omega_s^{\mathcal{B}}\}$ $\Omega_t^{miss} = \{\omega |\omega \in \Omega_s^{\mathcal{B}},\omega \notin \Omega_t^{\mathcal{B}}\}$ obtaining semantic-complete nodes $\nu_{s / t}$ . To generate ad + +$^{2}\tau_{fg}$ is empirically set 0.5 to satisfy the active condition of the nonlinear sigmoid function and $\tau_{bg}$ is set 0.05 following the commonly used score-threshold setting in existing object detectors [19, 23, 24, 33]. + +ditional nodes containing non-existing semantics, we define a graph-guided memory bank $S_{s/t} \in \mathbb{R}^{C \times D}$ to save the category-specific knowledge of inner-domain semantics, and we will explain the learning strategy of this memory bank in the next section. Considering the source and target domains share a similar category space [3], we fully utilize the semantic cues from the counterpart domain to guide the node generation, which provide a joint measurement of the class-conditional distribution within the batch. Specifically for the completion of the source-missing category $\omega \in \Omega_s^{miss}$ , we calculate the standard variance of target nodes $\{v_t^{(\omega)}\}$ in class $\omega$ to obtain a variant vector $\sigma_t^{(\omega)} \in \mathbb{R}^D$ , which approximates the scale of the distribution for the missing category $\omega$ . Then, we load the corresponding memory seed $S_s^{(\omega)}$ from the memory bank to serve as the category-specific expectation $\mu_s^{(\omega)}$ . After that, we perform Gaussian sampling and adopt a linear projection $\mathcal{P}(\cdot)$ to obtain hallucination nodes $\mathcal{V}_s^{\mathcal{H}} = \{v_s^h | v_s^h = \mathcal{P}(x_s^h), x_s^h \sim N(\mu_s^{(\omega)}, \sigma_t^{(\omega)})\}$ belonging to the mismatched categories. The same completion is also conducted in the target domain to obtain the nodes $\mathcal{V}_t^{\mathcal{H}}$ in the target-missing categories $\Omega_t^{miss}$ . Instead of aligning these statistic-based estimations directly [37, 41, 42], we fully utilize domain knowledge to generate novel and unbiased samples, avoiding the biased and sub-optimal alignment. Finally, both existing nodes and hallucination ones constitute the semantic-complete node set $\mathcal{V}_{s/t}$ for the followed graph modelling. + +Graph-guided Memory Bank. Since the nodes $\mathcal{V}_{s/t}$ derive from different images within a batch, we establish a cross-image graph to model the class-conditional distribution with long-distance semantic dependency, and propose a memory bank to preserve graph-based knowledge, which helps the DNC to generate better hallucination nodes in turn. Specifically, we first introduce edge connections $\mathcal{E}_{s/t}$ between nodes $\mathcal{V}_{s/t}$ and set up a cross-image graph $\mathcal{G}_{s/t} = \{\mathcal{V}_{s/t}, \mathcal{E}_{s/t}\}$ in each domain. For the graph edge, we utilize edge drop [26] to avoid the potential relationship bias caused by the abundant visual correspondence: $\mathcal{A}_{s/t} = \text{Edgedrop}\{\text{softmax}[\mathcal{V}_{s/t} \mathcal{W}_e (\mathcal{V}_{s/t} \mathcal{W}_e)^T]\}$ , where $\mathcal{A}_{s/t}$ is the adjacent matrix encoding structure information, and $\mathcal{W}_e$ is a learnable linear projection. Then, we perform single-layer graph convolution with the graph-based message propagation among nodes to aggregate cross-image semantic knowledge, yielding the enhanced node representation: $\tilde{v}_{s/t}^i = \mathrm{LN}(\sum_{v_{s/t}^j \in \mathcal{NR}^i} | \mathcal{NR}^i| \mathcal{A}_{s/t}^{i,j} v_{s/t}^j \mathcal{W}_{gcn} + v_{s/t}^i)$ , where $\mathcal{NR}^i$ represents the neighbour nodes of $v_{s/t}^i$ , $\mathcal{W}_{gcn}$ is the learnbale parameter, and LN is the layer normalization [1]. + +To provide representative and robust dependency for the hallucination node generation, we introduce a memory bank to save class-specific graph embedding and design a cluster-based update strategy for the memory bank learning. Specifically, we randomly initialize a memory bank + +$\mathcal{S}_{s / t}\in \mathbb{R}^{C\times D}$ at the beginning of the training and gradually update memory seeds with appeared graph nodes. For each appeared category $\omega$ within a training batch, we collect graph nodes $\{\tilde{v}_{s / t}^{(\omega)}\}$ , $\tilde{v}_{s / t}^{(\omega)}\in \mathbb{R}^D$ in class $\omega$ and load the corresponding memory seed $S_{s / t}^{(\omega)}\in \mathbb{R}^D$ from the memory bank $S_{s / t}$ . Then, we get both the memory seed and graph nodes together $\{\mathcal{S}_{s / t}^{(\omega)},\tilde{v}_{s / t}^{(\omega)}\}$ and conduct spectral clustering [31] in the graphical space to generate two clusters, i.e., a seed-included cluster $\pi_{s / t}^{seed} = \{\mathcal{S}_{s / t}^{(\omega)},\tilde{v}_{s / t}^{(\omega)}\}$ and an "else" cluster $\pi^{else} = \{\tilde{v}_{s / t}^{(\omega)}\}$ . Since the domain-level knowledge, referred to as the memory seed, provides a more robust and precise estimation compared with the batch-wise measurement, we only utilize the nodes in $\pi_{s / t}^{seed}$ to update the memory bank, which relieves the impact of noisy nodes appeared in the early training stage: + +$$ +\mathcal {S} _ {s / t} ^ {(\omega)} \leftarrow s i m \left(b _ {s / t}, \mathcal {S} _ {s / t} ^ {(\omega)}\right) \mathcal {S} _ {s / t} ^ {(\omega)} + \left[ 1 - s i m \left(b _ {s / t}, \mathcal {S} _ {s / t} ^ {(\omega)}\right) \right] b _ {s / t}, \tag {2} +$$ + +where $\text{sim}(b_{s/t}, \mathcal{S}_{s/t}^{(\omega)}) = \frac{b_{s/t} \cdot \mathcal{S}_{s/t}^{(\omega)}}{\left\| b_{s/t} \right\|_2 \cdot \left\| \mathcal{S}_{s/t}^{(\omega)} \right\|_2}$ indicates the adaptive momentum for better gradient-free learning [34, 42], and $b_{s/t} = \frac{1}{|\pi_{s/t}^{\text{seed}}| - 1} \sum_{\tilde{v}_{s/t}^{(\omega)} \in \pi_{s/t}^{\text{seed}}} \tilde{v}_{s/t}^{(\omega)}$ . We only utilize existing graph nodes to update memory seeds, and remove those hallucination ones to avoid the potential negative impact of handcraft Gaussian priors for the model learning. + +# 4.2. Bipartite Graph Matching + +Given the graph $\mathcal{G}_{s/t}$ , we reformulate the cross-domain alignment as a graph matching problem, i.e., solving the QAP between $\mathcal{G}_s$ and $\mathcal{G}_t$ . Specifically, we use graph nodes $\tilde{\mathcal{V}}_{s/t}$ to establish cross-graph interaction and learn a node affinity $\tilde{\mathbf{M}}_{\mathrm{aff}}$ . Besides, we introduce graph edges $\mathcal{E}_{s/t}$ to bridge the domain gap with a structure-aware matching loss. Cross Graph Interaction. Since graph matching is a collaborative optimization problem between two graphical entities, the message propagation across graphs is essential for the optimal solution in graph-based affinity learning. Hence, we introduce the knowledge exchange between $\mathcal{G}_s$ and $\mathcal{G}_t$ to establish the cross-domain semantic interaction: + +$$ +\begin{array}{l} \hat {\mathcal {V}} _ {s} = \mathrm {L N} \left\{\text {s o f t m a x} \left[ \left(\tilde {\mathcal {V}} _ {s} \mathcal {W} _ {q}\right) \left(\tilde {\mathcal {V}} _ {t} \mathcal {W} _ {k}\right) ^ {T} \right] \left(\tilde {\mathcal {V}} _ {t} \mathcal {W} _ {v}\right) \mathcal {W} _ {p} + \tilde {\mathcal {V}} _ {s} \right\}, \\ \hat {\mathcal {V}} _ {t} = \mathrm {L N} \left\{\text {s o f t m a x} \left[ \left(\tilde {\mathcal {V}} _ {t} \mathcal {W} _ {q}\right) \left(\tilde {\mathcal {V}} _ {s} \mathcal {W} _ {k}\right) ^ {T} \right] \left(\tilde {\mathcal {V}} _ {s} \mathcal {W} _ {v}\right) \mathcal {W} _ {p} + \tilde {\mathcal {V}} _ {t} \right\}, \end{array} \tag {3} +$$ + +where $\hat{\mathcal{V}}_{s/t} = \{\hat{v}_{s/t}^i\}_{i=1}^{N_{s/t}}$ is the graph node set with cross-domain perception, LN is the layer normalization [1], and $\mathcal{W}_{(\cdot)}$ are learnable parameters. To enhance the graphical semantics, we introduce an auxiliary node classification task by adopting a classifier $f_{cls}$ with the Cross Entropy loss: + +$$ +\mathcal {L} _ {\text {n o d e}} = - \sum_ {i = 1} ^ {\mathcal {N} _ {s} + \mathcal {N} _ {t}} y _ {i} \log \left\{\operatorname {s o f t m a x} \left[ f _ {\text {c l s}} \left(\hat {v} _ {s / t} ^ {i}\right) \right] \right\}, \tag {4} +$$ + +where $y_{i}$ represents the ground-truth label for source nodes and the pseudo label (obtained from score maps $\mathcal{M}_t$ ) for target nodes. Dense relationships can be established among nodes belonging to different domains, serving the sparse and fine-grained adaptation with interactive semantic cues. + +Semantic-aware Node Affinity. Given the graph nodes $\hat{\mathcal{V}}_{s/t}$ with cross-domain perception, we further learn an affinity matrix to model the node correspondence between $\mathcal{G}_s$ and $\mathcal{G}_t$ . Different from existing graph matching approaches [6, 8, 10] utilizing local visual representations, we leverage the category-level semantic with inherent relationships to learn a semantic-aware affinity matrix. Specifically, we define the entry of the node affinity matrix as follows: $\mathbf{M}_{\mathrm{aff}}^{i,j} = f_{mlp}\{f_p(\hat{v}_s^i) \odot f_p(\hat{v}_t^j)\}$ , $\mathbf{M}_{\mathrm{aff}} \in \mathbb{R}^{\mathcal{N}_s \times \mathcal{N}_t}$ , where $\odot$ is the concatenation operation, $f_p$ indicates a linear projection, and $f_{mlp}$ is a multi-layer perceptron layer (MLP) with a single output channel. This MLP layer learns inherent semantic relationships between two graph nodes and encodes them into affinity representations. $\mathbf{M}_{\mathrm{aff}}$ is then sent to the Instance Normalization layer as [6] and the differential Sinkhorn layer [30] to obtain a double-stochastic affinity matrix $\tilde{\mathbf{M}}_{\mathrm{aff}}$ with maximum $k$ -iteration optimization (k is set 20 enough for optimization). Finally, each positive entry in the affinity matrix $\tilde{\mathbf{M}}_{\mathrm{aff}}$ indicates a matched node pair across two graphs for fine-grained domain adaptation. + +Structure-aware Matching Loss. Since graph nodes are drawn from the graphically modeled class-conditional distribution, we align the node pairs across two domains with homogeneous semantics $(\hat{v}_s^{(\omega)} \in \mathcal{G}_s$ and $\hat{v}_t^{(\omega)} \in \mathcal{G}_t)$ , to adapt the distribution for category $\omega$ . Specifically, we propose a structure-aware matching loss to achieve this fine-grained domain adaptation with node-to-node graph matching, which consists of three components as follows, + +$$ +\begin{array}{l} \mathcal {L} _ {m a t} = \sum_ {i} \frac {1}{\mathcal {N} _ {s}} [ \max _ {j} (\tilde {\mathbf {M}} _ {\mathrm {a f f}} \odot \mathbf {Y} _ {\Pi}) _ {i, j} - \mathbf {1} ] ^ {2} \\ + \sum_ {i, j} \frac {1}{\left| \left| \mathbf {1} - \mathbf {Y} _ {\boldsymbol {\Pi}} \right| \right| _ {1}} \left[ \tilde {\mathbf {M}} _ {\text {a f f}} \odot \left(\mathbf {1} - \mathbf {Y} _ {\boldsymbol {\Pi}}\right) \right] _ {i, j} ^ {2} \tag {5} \\ + \sum_ {i, j} \frac {1}{\mathcal {N} _ {s} \cdot \mathcal {N} _ {t}} (\mathcal {A} _ {s} \tilde {\mathbf {M}} _ {\mathrm {a f f}} - \tilde {\mathbf {M}} _ {\mathrm {a f f}} \mathcal {A} _ {t}) _ {i, j}, \\ \end{array} +$$ + +where the $(i,j)$ entry in $\mathbf{Y}_{\Pi} \in \mathbb{R}^{\mathcal{N}_s \times \mathcal{N}_t}$ is 1 if $v_s^i \in \mathcal{G}_s$ and $v_t^j \in \mathcal{G}_t$ are in the same category $\omega$ , otherwise 0, and $\tilde{\mathbf{M}}_{\mathrm{aff}} \in \mathbb{R}^{\mathcal{N}_s \times \mathcal{N}_t}$ is the node affinity. The first term works on correctly matched node pairs and enhances the best-matching of correct cases, named True-positive Enhancement (TE) (as the Red entries of Figure 2 $\hat{\mathbf{Y}}_{\Pi}$ ). The second term evaluates the difference between the node affinity and ground-truth to suppress wrongly activated cases, i.e., False-positive Suppression (FS) (as the Grey entries of Figure 2 $\hat{\mathbf{Y}}_{\Pi}$ ). Besides, we introduce structure-aware Quadratic Constrains (QC) as the third term to minimize the structural difference of matched node pairs in a local + +
MethodBackbonepersonridercartruckbustrainmotorbikemAPSO/ GAIN
CFFA [42]CVPR'20VGG-1634.046.952.130.843.229.934.737.438.620.8/ 17.8
EPM [12]ECCV'2041.938.756.722.641.526.824.635.536.018.4/ 17.6
RPNPA [41]CVPR'2133.643.849.632.945.546.035.736.840.520.8/ 19.7
UMT [5]CVPR'2133.046.748.634.156.546.830.437.441.721.8/ 19.9
MeGA [34]CVPR'2137.749.052.425.449.246.934.539.041.824.4/ 17.4
ICCR-VDD [36]ICCV'2133.444.051.733.952.034.734.236.840.022.8/ 17.2
KTNet [32]ICCV'2146.443.260.625.841.240.430.738.840.918.4/ 22.5
SSAL [21]NeurIPS'2145.147.459.424.550.025.726.038.739.620.4/ 19.2
SIGMA (ours)46.948.463.727.150.735.934.741.443.518.4/ 25.1
GPA [37]CVPR'20ResNet-5032.946.754.124.745.741.132.438.739.522.8/ 16.7
EPM [12]ECCV'2039.938.157.328.750.737.230.234.239.524.2/ 15.3
DIDN [18]ICCV'2138.344.451.828.753.334.732.440.440.528.6/ 11.9
DSS [35]CVPR'2142.951.253.633.649.218.936.241.840.922.8/ 18.1
SDA [25]ICCV'2138.845.957.229.950.251.931.940.943.322.8/ 20.5
SIGMA (ours)44.043.960.331.650.451.531.740.644.224.2/ 20.0
+ +neighborhood. Based on the consistent objective of Eq. 1 and Eq. 5 about graph matching, each source node will be aligned to the optimal-matched counterpart in the target domain in the same category, achieving a fine-grained alignment of class-conditional distributions during training. + +# 4.3. Model Optimization + +During training, we adopt class-agnostic global alignment [12] on visual features $\{x_{s / t}^i\}_{i = 1}^{\mathcal{B}}$ with adversarial loss $\mathcal{L}_{GA}$ . Considering the non-grid correspondence among graph nodes and the non-euclidean representation of graphical space [39], we design a Node Discriminator (ND) to align well-matched nodes, consisting a gradient reversed layer [7], three stacked discrimination blocks $f_{b}$ (each block is FC-LayerNrom-ReLU), and a domain classifier $f_{dc}$ followed with the Binary Cross Entropy (BCE) loss: $\mathcal{L}_{NA} = -\sum_{i}^{\mathcal{N}_s}\mathcal{D}\log \{f_{dc}[f_b(v_s^i)]\} -\sum_i^{\mathcal{N}_t}(1 - \mathcal{D})\log \{f_{dc}[f_b(v_t^i)]\}$ , where $\mathcal{D}$ is the domain label as [3] and $v_{s / t}^{i}$ are existing graph nodes. Then, the overall optimization objective of the proposed framework is denoted as: + +$$ +\mathcal {L} = \lambda_ {1} \mathcal {L} _ {\text {n o d e}} + \lambda_ {2} \mathcal {L} _ {\text {m a t}} + \mathcal {L} _ {N A} + \mathcal {L} _ {G A} + \mathcal {L} _ {\text {d e t}}, \tag {6} +$$ + +where $\mathcal{L}_{node}$ is the node classification loss, $\mathcal{L}_{mat}$ is the graph matching loss, $\mathcal{L}_{NA}$ is the node alignment loss, $\mathcal{L}_{GA}$ is the global alignment loss [12] and $\mathcal{L}_{det}$ is the detection loss. $\lambda_{1/2}$ are set 0.1 respectively to control the intensity. + +# 5. Experiments + +# 5.1. Datasets and Evaluation + +We conduct extensive experiments on three adaptation scenarios following the standard UDA setting in existing literature [3, 12, 21, 32]. We use the mean Average Precision + +Table 1. Results on Cityscapes $\rightarrow$ Foggy Cityscapes (\%) with VGG-16 and ResNet-50 backbone networks. SO represents the source only results and GAIN indicates the adaptation gains compared with the source only model. + +
MethodS→CSO/GAINK→CSO/GAIN
EPM [12]ECCV'2049.039.8/ 9.243.234.4/ 8.8
DSS [35]CVPR'2144.534.7/ 9.842.734.6/ 8.1
MEGA [34]CVPR'2144.834.3/ 10.543.030.2/ 12.8
RPNPA [41]CVPR'2145.734.6/ 11.1--
UMT [5]CVPR'2143.134.3/ 8.8--
KTNet [32]ICCV'2150.739.8/ 10.945.634.4/ 11.2
SSAL [21]NeurIPS'2151.838.0/ 13.845.634.9/ 10.7
SIGMA (ours)53.739.8/ 13.945.834.4/ 11.4
+ +Table 2. Comparison results (\%) on Sim10K→Cityscapes (S→C) and KITTI→Cityscapes (K→C) with VGG-16 backbone. + +with different IoU thresholds $(\mathrm{mAP}_{IoU})$ for comparison and utilize SO/GAIN to assess the source only results3 and the adaptation gains compared with the SO. Besides, we also report the results of GA [12] that adopts global alignment [3] on the FCOS [33] detector as our baseline counterpart. + +Cityscapes $\rightarrow$ Foggy Cityscapes. The Cityscapes [4] is a street scene datasets captured with on-board cameras under the dry weather condition, which consists of the train set (2975 images) and validation set (500 images) with eight categories of annotated bounding boxes. Foggy Cityscapes [28] is a synthesized dataset based on the Cityscapes with foggy noise. We explore the weather conditioned domain gap in this adaptation scenario. + +Sim10k $\rightarrow$ Cityscapes. Sim10k [15] is a simulated dataset obtained from the video game Grand Theft Auto V, yielding the domain gap with the real-world scene (Cityscapes). This dataset covers 10,000 images of the annotated bounding boxes in the car category. We perform domain adaptation between synthesized and real-world images and report + +the performance on car category as the common setting. + +KITTI $\rightarrow$ Cityscapes. KITTI [9] is a real-world traffic scene dataset collected from vehicle-mounted cameras, which yields the cross-camera domain gap with Cityscapes (on-board cameras). This dataset covers annotated cars in 7,481 images with cross-camera domain gap for adaptation. + +# 5.2. Implementation Details + +We adopt both VGG-16 [29] and ResNet-50 [11] feature extractors, which are implemented with Pytorch [22]. Our model is trained with the Stochastic Gradient Descent (SGD) optimizer with a 0.0025 learning rate, 4 batch-size, momentum of 0.9, and weight decay of $5 \times 10^{-4}$ . We sample at most 100 graph nodes for each feature map in each domain. Considering the graph matching may fail if no nodes appear in the target domain, we follow [12] to pretrain the framework as a warm-up stage before introducing the BGM adaptor. The adaption-unrelated settings about the object detector strictly follow related works [12, 21, 32]. + +# 5.3. Comparison with State-of-the-arts + +Cityscapes $\rightarrow$ Foggy Cityscapes. We present the comparison with VGG-16 and ResNet-50 backbones in Table 1. SIGMA achieves $43.5\%$ and $44.2\%$ mAP, respectively, outperforming existing works by a large margin. Compared with category-level adaptation approaches, e.g., CFFA [42] $(38.6\%)$ , RPNPA [41] $(40.5\%)$ , MeGA-CDA [34] $(41.8\%)$ , KTNet [32] $(40.9\%)$ , and GPA [37] $(39.5\%)$ , SIGMA achieves $4.9\%$ $3.0\%$ $1.7\%$ $2.6\%$ and $4.7\%$ mAP improvements respectively, showing our advantages over existing prototype-based works. Besides, SIGMA surpasses EPM [12], KTNet [32], and SSAL [21] with $7.5\%$ $2.6\%$ and $3.9\%$ mAP using the same FCOS [33] object detector. + +Sim10k→Cityscapes. The experimental comparison is recorded in the left part of Table 2. SIGMA achieves a $53.7\%$ mAP with the best adaptation gain (13.9% AP), outperforming existing works significantly. Compared with the approaches using the same FCOS [33] object detector, e.g., EPM [12] (49.0% mAP), KTNet [32] (50.7% mAP), SSAL [21] (51.8% mAP), SIGMA gives 4.7%, 3.0%, and 1.9% mAP improvements, verifying our effectiveness. + +KITTI $\rightarrow$ Cityscapes. The comparison results are shown in the right part of Table 2. SIGMA outperforms existing works with a $45.8\%$ mAP and achieves a comparable adaptation gain ( $11.4\%$ mAP) compared with state-of-the-arts. Compared with EPM [12], KTNet [32] and SSAL [21], our method shows the advantage in terms of adaptation. + +# 5.4. Ablation Studies + +We report detailed ablation studies (Table 3) conducted on Cityscapes $\rightarrow$ Foggy Cityscapes with VGG-16 backbone. Graph-embedded Semantic Completion. As shown in Table 3, adopting the GSC module can achieve $41.8\%$ mAP + +
Methodw/oprsnridercartrucbustrainmotobikemAP
GA [12]-40.341.554.226.742.115.427.135.1
+GSCDNC45.246.257.229.146.531.229.238.7
GMB43.543.857.429.448.330.431.441.1
ND44.145.256.728.045.923.932.838.7
-45.847.658.927.348.633.832.739.3
+GSCCGI44.448.058.828.450.340.531.740.8
SNA46.046.958.828.648.240.433.139.5
+BGMSML46.149.959.126.252.527.134.641.3
-46.948.463.727.150.735.934.741.4
+ +Table 3. Ablation studies on Cityscapes $\rightarrow$ Foggy Cityscapes (%) + +
NsfNtfprsnridercartrucbustrainmotorbikemAP
200041.245.155.226.944.216.328.937.036.8
020042.441.855.327.744.021.829.236.637.3
202042.444.056.527.345.826.630.938.639.0
505044.243.456.932.245.738.629.637.541.0
10010046.948.463.727.150.735.934.741.443.5
20020044.348.859.028.951.745.134.239.943.9
50050044.447.158.024.452.540.331.240.142.6
+ +Table 4. Results on Cityscapes $\rightarrow$ Foggy Cityscapes (\%) with different node combinations. $\mathcal{N}_{s/t}^{f}$ represent the maximum sampled nodes from source and target domains in each feature map. + +
StrategyLossmAP0.5:0.95mAP0.5mAP0.75
Single matching+TE22.042.120.3
+TE+FS23.843.223.0
+TE+FS+QC24.043.523.5
Multiple matching+BCE23.242.922.8
+MSE23.743.123.0
+ +Table 5. Results on Cityscapes $\rightarrow$ Foggy Cityscapes (\%) with different matching strategies and loss functions. $\mathrm{mAP}_{0.5:0.95}$ is the averaged mAP from 0.5 to 0.95 IoU with 0.05 intervals. BCE is Binary Cross Entropy and MSE is Mean Squared Error. + +with $6.5\%$ mAP gains compared with the GA baseline [12]. We then gradually remove each sub-component to verify its effectiveness. Removing Domain-guided Node Completion (DNC) limits the model optimization under mismatched semantic knowledge ( $40.4\%$ mAP). Replacing the Graph-guided Memory Bank (GMB) with a common buffer gives $0.8\%$ mAP drops ( $41.0\%$ mAP) due to the impact of unavoidable noisy samples, and removing Node Discriminator (ND) gives a significant drop ( $39.4\%$ ) due to the severe domain gap in the graphical space. + +Bipartite Graph Matching. Introducing the BGM adaptor achieves consistent improvements with a remarkable $43.5\%$ mAP, outperforming the baseline model with $8.2\%$ mAP. Removing Cross Graph Interaction (CGI) gives a $0.7\%$ mAP performance drop ( $42.8\%$ mAP) due to the limited interaction between two domains. Replacing the Semantic-aware Node Affinity (SNA) with the simplified strategy in [8] leads to $0.9\%$ mAP drops ( $42.6\%$ mAP), and remov- + +![](images/2397dea61185841e0f87701a4c5043ea9aa5a414e0b1780bf38c9e69fb6c922c.jpg) +(a) Source only +(b) EPM +(c) SIGMA (ours) +(d) Ground-truth +Figure 3. Result comparison on the Cityscapes $\rightarrow$ Foggy Cityscapes adaptation scenario among (a) the source only model, (b) EPM [12], (c) the proposed SIGMA, and (d) Ground-truth. (Zooming in for best view.) + +![](images/becc5d28de5222cee136a3277b71350d2075652cc6ae7f587e0b2e7342dad941.jpg) +Figure 4. Feature comparison via T-SNE between the baseline model and our method. For each category, we randomly sample object features (marked as squares) inside bounding boxes in the source domain and target domain equally. + +ing the Structure-aware Matching Loss (SML) reduces the performance $(42.1\% \mathrm{mAP})$ . Hence, each sub-component is necessary for SIGMA to achieve state-of-the-art results. + +# 5.5. Sensitivity Analysis + +To better understand our method, we investigate the node selection (Table 4) and matching design (Table 5). + +Evaluation on the number of nodes. As shown in Table 4, we compare different node combinations $\left(\mathcal{N}_{s/t}^{f}\right)$ represents the maximum number of nodes sampled from each feature map). Only utilizing source and target nodes $(1^{st}$ and $2^{nd}$ lines) severely affects the adaptation performance (36.8% and 37.3% mAP) due to deterioration of domain gap in the graphical space. Besides, we find consistent performance improvements from 39.0% to 43.9% ( $3^{rd}$ row to $6^{th}$ row) with the increase of the node number from 20 to 200, because more nodes improve graph matching guided adaptation with better graphical space. However, using too many nodes (e.g., 500) will lead to the difficulty of graph matching optimization with a worse result (42.6% mAP). + +Evaluation on matching strategies. We compare different settings between single-matching (each node is matched to the best counterpart) and multiple-matching (each node is matched to all counterparts in the same category) in Table 5. We find single-matching $(43.5\% \mathrm{mAP}_{0.5})$ performs relatively better than multiple-matching $(43.1\% \mathrm{mAP}_{0.5})$ because single-matching aligns primary node pairs and relives noisy adaptation on ambiguous nodes. Besides, each com + +ponent (TE, FS, QC) of the proposed matching loss contributes to the matching-based domain adaptation, yielding consistent $\mathrm{mAP}_{0.5}$ improvements from $42.1\%$ to $43.5\%$ . + +# 5.6. Qualitative Results + +Result comparison. We present the comparison among (a) source only, (b) EPM [12], (c) the proposed SIGMA and (d) ground-truth in Figure 3. SIGMA can reduce missing errors, such as the truck in $1^{st}$ and $2^{nd}$ lines compared with the category-agnostic method EPM [12]. Besides, our approach also eliminates some classification errors (false-positive cases), such as the rider in $2^{nd}$ row, showing the advantage in category-level adaptation with well-aligned class-conditional distributions. + +Feature comparison. For each category, we randomly sample an equal number of pixels on ResNet-50-based features for each domain (200 pixels/ domain&category) and present the T-SNE comparison with the GA baseline [12] in Figure 4. It can be observed that those similar categories (person, rider, and bike) can be separated clearly on features by our method, which benefits the followed detection head in terms of object recognition significantly. + +# 6. Conclusion + +In this paper, we propose a novel framework for DAOD, coined SIGMA. It represents domain information through semantic-complete graphs and model domain adaptation as a graph matching problem, which break the barrier of existing category-level approaches in terms of semantic mismatching and sub-optimal prototype alignment. It adopts a Graph-embedded Semantic Completion module (GSM) to complete mismatched semantics and model class-conditional distributions with graphs. Then, it leverages a Bipartite Graph Matching adaptor (BGM) to achieve fine-grained alignment with a node-to-node matching. Extensive experiments on three benchmarks show that the proposed method outperforms existing approaches significantly. + +# References + +[1] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. 4, 5 +[2] Adrien Bardes, Jean Ponce, and Yann LeCun. Vicreg: Variance-invariance-covariance regularization for self-supervised learning. arXiv preprint arXiv:2105.04906, 2021. 2 +[3] Yuhua Chen, Wen Li, Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Domain adaptive faster r-cnn for object detection in the wild. In CVPR, pages 3339-3348, 2018. 1, 2, 4, 6 +[4] 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. 6 +[5] Jinhong Deng, Wen Li, Yuhua Chen, and Lixin Duan. Unbiased mean teacher for cross-domain object detection. In CVPR, pages 4091-4101, June 2021. 6 +[6] Kexue Fu, Shaolei Liu, Xiaoyuan Luo, and Manning Wang. Robust point cloud registration framework based on deep graph matching. In CVPR, pages 8893-8902, 2021. 3, 5 +[7] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In ICML, pages 1180-1189, 2015. 6 +[8] Quankai Gao, Fudong Wang, Nan Xue, Jin-Gang Yu, and Gui-Song Xia. Deep graph matching under quadratic constraint. In CVPR, pages 5069-5078, 2021. 3, 5, 7 +[9] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In CVPR, pages 3354-3361, 2012. 7 +[10] Jiawei He, Zehao Huang, Naiyan Wang, and Zhaoxiang Zhang. Learnable graph matching: Incorporating graph partitioning with deep feature learning for multiple object tracking. In CVPR, pages 5299-5309, 2021. 3, 5 +[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 7 +[12] Cheng-Chun Hsu, Yi-Hsuan Tsai, Yen-Yu Lin, and Ming-Hsuan Yang. Every pixel matters: Center-aware feature alignment for domain adaptive object detector. In ECCV, pages 733-748, 2020. 1, 2, 6, 7, 8 +[13] Han-Kai Hsu, Chun-Han Yao, Yi-Hsuan Tsai, Wei-Chih Hung, Hung-Yu Tseng, Maneesh Singh, and Ming-Hsuan Yang. Progressive domain adaptation for object detection. In WACV, pages 749-757, 2020. 2 +[14] Naoto Inoue, Ryosuke Furuta, Toshihiko Yamasaki, and Kiyoharu Aizawa. Cross-domain weakly-supervised object detection through progressive domain adaptation. In CVPR, pages 5001-5009, 2018. 2 +[15] Matthew Johnson-Roberson, Charles Barto, Rounak Mehta, Sharath Nittur Sridhar, Karl Rosaen, and Ram Vasudevan. Driving in the matrix: Can virtual worlds replace human-generated annotations for real world tasks? In ICRA, pages 746-753, 2017. 6 + +[16] Taekyung Kim, Minki Jeong, Seunghyeon Kim, Seokeon Choi, and Changick Kim. Diversify and match: A domain adaptive representation learning paradigm for object detection. In CVPR, pages 12456-12465, 2019. 2 +[17] Congcong Li, Dawei Du, Libo Zhang, Longyin Wen, Tiejian Luo, Yanjun Wu, and Pengfei Zhu. Spatial attention pyramid network for unsupervised domain adaptation. In ECCV, pages 481-497. Springer, 2020. 2 +[18] Chuang Lin, Zehuan Yuan, Sicheng Zhao, Peize Sun, Changhu Wang, and Jianfei Cai. Domain-invariant disentangled network for generalizable object detection. In ICCV, pages 8771-8780, October 2021. 6 +[19] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. In ICCV, pages 2980-2988, 2017. 4 +[20] Eliane Maria Loiola, Nair Maria Maia de Abreu, Paulo Oswaldo Boaventura-Netto, Peter Hahn, and Tania Querido. A survey for the quadratic assignment problem. Eur. J. Oper. Res., 176(2):657–690, 2007. 3 +[21] Muhammad Akhtar Munir, Muhammad Haris Khan, M Saquib Sarfraz, and Mohsen Ali. Synergizing between self-training and adversarial learning for domain adaptive object detection. 2021. 2, 6, 7 +[22] 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 NeurIPS, pages 8024-8035, 2019. 7 +[23] Joseph Redmon and Ali Farhadi. Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767, 2018. 1, 4 +[24] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: towards real-time object detection with region proposal networks. In NeurIPS, pages 91-99, 2015. 1, 4 +[25] Farzaneh Rezaeanaran, Rakshith Shetty, Rahaf Aljundi, Daniel Olmeda Reino, Shanshan Zhang, and Bernt Schiele. Seeking similarities over differences: Similarity-based domain alignment for adaptive object detection. In ICCV, pages 9204-9213, 2021. 6 +[26] Yu Rong, Wenbing Huang, Tingyang Xu, and Junzhou Huang. Droppedge: Towards deep graph convolutional networks on node classification. ICLR, 2020. 4 +[27] Kuniaki Saito, Yoshitaka Ushiku, Tatsuya Harada, and Kate Saenko. Strong-weak distribution alignment for adaptive object detection. In CVPR, pages 6956–6965, 2019. 1, 2 +[28] Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Semantic foggy scene understanding with synthetic data. Int J Comput Vis, 126(9):973-992, 2018. 6 +[29] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 7 +[30] Richard Sinkhorn. A relationship between arbitrary positive matrices and doubly stochastic matrices. Ann. math. stat., 35:876-879, 1964. 5 +[31] X Yu Stella and Jianbo Shi. Multiclass spectral clustering. In ICCV, volume 2, pages 313-313. IEEE Computer Society, 2003. 5 + +[32] Kun Tian, Chenghao Zhang, Ying Wang, Shiming Xiang, and Chunhong Pan. Knowledge mining and transferring for domain adaptive object detection. In ICCV, pages 9133-9142, October 2021. 1, 2, 3, 6, 7 +[33] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: Fully convolutional one-stage object detection. In ICCV, pages 9627-9636, 2019. 1, 4, 6, 7 +[34] Vibashan VS, Vikram Gupta, Poojan Oza, Vishwanath A. Sindagi, and Vishal M. Patel. Mega-cda: Memory guided attention for category-aware unsupervised domain adaptive object detection. In CVPR, pages 4516-4526, June 2021. 5, 6, 7 +[35] Yu Wang, Rui Zhang, Shuo Zhang, Miao Li, Yangyang Xia, Xishan Zhang, and Shaoli Liu. Domain-specific suppression for adaptive object detection. In CVPR, pages 9603-9612, June 2021. 2, 6 +[36] Among Wu, Rui Liu, Yahong Han, Linchao Zhu, and Yi Yang. Vector-decomposed disentanglement for domain-invariant object detection. ICCV, 2021. 6 +[37] Minghao Xu, Hang Wang, Bingbing Ni, Qi Tian, and Wenjun Zhang. Cross-domain detection via graph-induced prototype alignment. In CVPR, pages 12355-12364, 2020. 1, 2, 3, 4, 6, 7 +[38] Junchi Yan, Xu-Cheng Yin, Weiyao Lin, Cheng Deng, Hongyuan Zha, and Xiaokang Yang. A short survey of recent advances in graph matching. In ACM ICMR, pages 167-174, 2016. 3 +[39] Xu Yang, Cheng Deng, Tongliang Liu, and Dacheng Tao. Heterogeneous graph attention network for unsupervised multiple-target domain adaptation. IEEE Trans. Pattern Anal. Mach. Intell., pages 1-1, 2020. 2, 6 +[40] Weilin Zhang and Yu-Xiong Wang. Hallucination improves few-shot object detection. In CVPR, pages 13008-13017, 2021. 2 +[41] Yixin Zhang, Zilei Wang, and Yushi Mao. Rpn prototype alignment for domain adaptive object detector. In CVPR, pages 12425-12434, June 2021. 1, 2, 3, 4, 6, 7 +[42] Yangtao Zheng, Di Huang, Songtao Liu, and Yunhong Wang. Cross-domain object detection through coarse-to-fine feature adaptation. In CVPR, pages 13766-13775, 2020. 1, 2, 3, 4, 5, 6, 7 \ No newline at end of file diff --git a/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/images.zip b/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..0af469332af97d5b9a51d4749dd01513d6f26d51 --- /dev/null +++ b/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef45c672ded101a551d16492ca5a3c38ae47e0ebfd1b46660fc7a2e39d8c916d +size 565547 diff --git a/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/layout.json b/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1ff312c1d948a7dcf6612f347e41f706329691ce --- /dev/null +++ b/sigmasemanticcompletegraphmatchingfordomainadaptiveobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a860d5b6a6277820d1816a375354b334abca19ca6a1a0672fa32d1aa2477a712 +size 444362 diff --git a/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/5bb9a250-5d80-4824-bd17-4f5ec5a8c21b_content_list.json b/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/5bb9a250-5d80-4824-bd17-4f5ec5a8c21b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..646cda5f56a2c88e7a40db14ba828d89116213cd --- /dev/null +++ b/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/5bb9a250-5d80-4824-bd17-4f5ec5a8c21b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8f3ffc66ca0cd1fa54d275e63fa7ca00666561c749700424a7d2daea6b520ba +size 83049 diff --git a/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/5bb9a250-5d80-4824-bd17-4f5ec5a8c21b_model.json b/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/5bb9a250-5d80-4824-bd17-4f5ec5a8c21b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3676a4da5011990b4121f904115107cebfb68190 --- /dev/null +++ b/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/5bb9a250-5d80-4824-bd17-4f5ec5a8c21b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77ed2309bf4484a142bfb633ff50c82b53b2ece1231e270822ea2b01705a872a +size 109335 diff --git a/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/5bb9a250-5d80-4824-bd17-4f5ec5a8c21b_origin.pdf b/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/5bb9a250-5d80-4824-bd17-4f5ec5a8c21b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..429ee06d4543412b576dfa169a2f138ac3611f18 --- /dev/null +++ b/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/5bb9a250-5d80-4824-bd17-4f5ec5a8c21b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d0e78c44925e36e24f203d1ff19b0b1af4afd7642c9ee0cce16e0a652d84e2f +size 8673712 diff --git a/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/full.md b/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..dc3361306a659c8bb681d3f2790031bd28011210 --- /dev/null +++ b/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/full.md @@ -0,0 +1,339 @@ +# SIMBAR: Single Image-Based Scene Relighting For Effective Data Augmentation For Automated Driving Vision Tasks + +Xianling Zhang $^{1*}$ , Nathan Tseng $^{2*}$ , Ameerah Syed $^{1}$ , Rohan Bhasin $^{1}$ , Nikita Jaipuria $^{1}$ $^{1}$ Ford Greenfield Labs, Palo Alto $^{2}$ University of Michigan + +{xzhan258, asyed17, rbhasin, njaipuri}@ford.com, tsnathan@umich.edu + +# Abstract + +Real-world autonomous driving datasets comprise of images aggregated from different drives on the road. The ability to relight captured scenes to unseen lighting conditions, in a controllable manner, presents an opportunity to augment datasets with a richer variety of lighting conditions, similar to what would be encountered in the real-world. This paper presents a novel image-based relighting pipeline, SIMBAR, that can work with a single image as input. To the best of our knowledge, there is no prior work on scene relighting leveraging explicit geometric representations from a single image. We present qualitative comparisons with prior multi-view scene relighting baselines. To further validate and effectively quantify the benefit of leveraging SIMBAR for data augmentation for automated driving vision tasks, object detection and tracking experiments are conducted with a state-of-the-art method, a Multiple Object Tracking Accuracy (MOTA) of $93.3\%$ is achieved with CenterTrack on SIMBAR-augmented KITTI - an impressive $9.0\%$ relative improvement over the baseline MOTA of $85.6\%$ with CenterTrack on original KITTI, both models trained from scratch and tested on Virtual KITTI. For more details and sample relit datasets, please visit our project website (https://simbarv1.github.io). + +# 1. Introduction + +A lack of diversity in lighting conditions is a known issue with manually collected real-world autonomous driving datasets [1, 3, 14, 18]. For example, KITTI [18] has video sequences captured only during noon, with similar lighting and shadow conditions across different sequences. More recent datasets [32, 37, 59], one such as BDD100K [59], are comparatively better in terms of diversity and have images captured during multiple times of the day. Still, between images collected from the same drive, there are minimal changes in lighting conditions. Furthermore, attempting to acquire data for all types of lighting conditions is implausible both in terms of time and money. + +This lack of diversity in lighting conditions and by ex + +![](images/9e2841f2a1deb5278c2ab9e7ba6044a67e1686dde99193e40d79857a9684209d.jpg) +Input +(a) SIMBAR Relights DIV2K Outdoor Racing Field + +![](images/95c8d437c8eb2d70cc823c32a676c4def6f75171fa2c4607c19e43040f3fed1c.jpg) +Input +(b) SIMBAR Relights DIV2K Dark Desert Scene + +![](images/a5a9c4dc5e38abf9a99a41d23a496637fed0b73cddcf82667b190e5e27eafc6d.jpg) +Input +(c) SIMBAR Relights KITTI Road Driving Scene + +![](images/71130abcb438e28720e4abd4c7c188949c2b3eb86b1e7e0515389070a5aa2002.jpg) +Input +(d) SIMBAR Relights BDD100K Tunnel Entrance +Figure 1. Input images (Left) are shown against SIMBAR-relit outputs (Middle, Right). SIMBAR synthesized two lighting variations for (a)(b) Div2k, (c) BDD100K and (d) KITTI. + +tension, the shadows present within a scene, often serves as a crucial roadblock in successful real-world deployment of perception models for safety-critical automated driving applications. Models trained with limited lighting conditions are unable to generalize to the plethora of lighting conditions encountered in the real-world [26, 28]. The ability to relight existing datasets in a controllable manner presents an opportunity to develop improved perception models. + +However, scene relighting, in the absence of depth sensors, is an extremely difficult vision task. It implicitly comprises of three main sub-tasks: shadow detection [10, 25, 53], removal [23, 24, 53] and insertion [61]. Of these, shadow removal and insertion are most challenging because shadows blend tightly with the source object geometry [2, 15]. This coupling makes it difficult to separate the shadow from its parent object without a strong 3D ge + +ometric understanding of the scene [4, 8, 20]. To address this, most prior scene relighting methods rely on multiple camera views of the source lighting condition to estimate the 3D scene geometry [42, 49, 62]. The relatively few prior methods that can work with a single image are based on Generative Adversarial Networks (GANs) [6]. GANs are known to be difficult to train [31, 38], limited in controllability [52], and often produce results that are physically inconsistent with scene geometry [16]. To the best of our knowledge, there is no prior work on controllable scene relighting using a single input image. + +This paper presents a novel Single Image-BAsed scene Relighting pipeline, SIMBAR. It takes a single image as input and produces relit versions for a wide variety of sun positions and sky zeniths, as shown in Fig. 1. The top two rows show relit results from the Div2k [1]. Div2k is an internet-scraped dataset with images of a wide variety of object classes, that SIMBAR is able to effectively relight. The first row shows realistic variations in sky colors, shadow orientations, and consistent cast shadow locations and light intensities for an outdoor scene with complex structures. The second row is a challenging low-light desert scene. SIMBAR cleanly removes existing hard cast shadows of the rock in the foreground and realistically recasts geometrically consistent shadows for the provided sun angle. Additionally, the mountainous landscape in the horizon has also been effectively relit. The third and fourth rows also show geometrically consistent and visually realistic relit versions of a KITTI road driving scene and a tunnel/underpass scene from BDD100K respectively. Most notable is the variation in hard cast shadows of the tunnel in the BDD100K example and the two cars in the KITTI example. + +SIMBAR consists of two main modules: (i) geometry estimation and (ii) image relighting. The geometry estimation module is responsible for computing scene mesh proxy and illumination buffers. We are inspired by WorldSheet [22] to use external depth networks to obtain a scene mesh. Note that WorldSheet is a novel view synthesis pipeline that does not have relighting purpose. The image relighting module is inspired by prior work on multi-view scene relighting using a geometry aware network [42], referred to as MVR for brevity. Section 3.1 provides a short overview of Single Image-Based Scene Geometry Estimation and MVR, followed by a detailed description of SIMBAR's pipeline description in Section 3.2. Our work is closest in terms of goals and overall pipeline structure to MVR. Therefore, scene relighting comparisons are provided with both out-of-the-box MVR and its improved version, MVR-I, where we refined MVR for autonomous driving datasets with limited views, in Section 3.4. Across the board, SIMBAR provides significantly more realistic and geometrically consistent real images, even though it takes as input a single image, as compared to MVR/MVR-I that take as input multiple im + +ages of the same scene. + +Another major limitation of all prior works on scene relighting is the lack of a quantitative evaluation of the effectiveness of scene relighting in augmenting vision datasets. In the absence of such a metric, the real-world applicability and usefulness of any scene relighting methodology cannot be established. To address this, in Section 4, we perform image relighting-based data augmentation experiments with a state-of-the-art object detection and tracking network, CenterTrack [64]. Section 4.1 provides a detailed overview of our experiment setup. We train three different CenterTrack models on: (i) original KITTI tracking dataset with 21 real-world sequences captured at noon; (ii) augmented KITTI with MVR-I relit sequences; and (iii) augmented KITTI with SIMBAR relit sequences. All models are tested on Virtual KITTI (vKITTI) [17], which consists of clones of real KITTI sequences in a variety of lighting conditions. Section 4.2 shows that CenterTrack models augmented with relit KITTI images (from either MVR-I or SIMBAR) consistently outperform the baseline CenterTrack model. Specifically, the CenterTrack model trained on KITTI augmented with SIMBAR achieves the highest Multiple Object Tracking Accuracy (MOTA) of $93.3\%$ - a $9.0\%$ relative improvement over the baseline MOTA of $85.6\%$ . This model also achieves the highest Multiple Object Detection Accuracy (MODA) of $94.1\%$ - again an impressive $8.9\%$ relative improvement over the baseline MODA of $86.4\%$ . + +To summarize, the main contributions of this paper are: + +1. A novel single-view image-based scene relighting pipeline, called SIMBAR, that offers lighting controllability without the need for multi-perspective images. +2. Single image-based geometry estimation via adapting dense prediction transformer monodepth model and better representation of far-away background objects. +3. An improved version of MVR [42], called MVR-I, with fewer artifacts and smoother surfaces in the generated mesh for road driving scenes with limited views, resulting in more realistic relit images. +4. Qualitative evaluation and comparison of scene relighting results using MVR, MVR-I and SIMBAR, on multiple automated driving datasets, such as KITTI [18] and BDD100K [59]. +5. Quantitative evaluation of the effectiveness of augmenting the popular KITTI 2D tracking dataset using SIMBAR and MVR-I for simultaneous object detection and tracking using CenterTrack. + +# 2. Related Work + +Our work is closely related to the fields of novel view synthesis [34, 47, 54], 3D reconstruction [9, 56, 57], and physics-based differentiable rendering [29, 41]. Given the direct connection between the relighting task and scene geometry [12, 60, 65], we split the related work into two broad + +categories: (i) implicit approaches learning geometric priors and encoding them into a model; and (ii) explicit approaches leveraging multiple views of the input scene to generate a 3D mesh to apply rendering and image processing techniques upon. While explicit approaches provide better controllability and geometrically consistent shadows, their multi-view prerequisite inhibits their application to most automated driving datasets. This is due to the unique challenge of limited views from a front-facing car camera, compounded by high scene complexity of ever-moving cars and pedestrians. Our work falls in the explicit category, while leveraging insights from the implicit approaches. + +# 2.1. Using Implicit Geometric Representations + +Both Generative Adversarial Networks (GANs) [21] and Neural Radiance Fields (NeRFs) [35] have explored scene relighting. As is typical of GANs, the shadow manipulation network from [6] struggles to maintain geometric consistency and is difficult to train, thus resulting in conservative relighting effects. This also occurs for GANs that focus on image-to-image translation and ignore geometric priors [11, 16]. The recent success of NeRF-based methods for novel view synthesis has naturally resulted in their application to the scene relighting task as well. Rather than querying an explicit scene geometry, NeRFs encode the scene into a multilayer perceptron (MLP) [33], which takes as input a viewing direction and location to output color and density values, that are then used for volumetric rendering [39, 40]. At training time, many different views of a static scene are given to the network to learn the scene geometry. At test time, the input viewing direction and location are used to render the scene with accurate lighting and shadows. Recent works have repurposed NeRFs for scene relighting by modeling the surface material and reflectance properties [5, 49, 62]. However, such methods face a significant computational roadblock in their application to automated driving datasets with dynamic scenes, since each scene requires training a different model. + +# 2.2. Using Explicit Geometric Representations + +Combining Structure-from-Motion with Multi-View Stereo (SFM+MVS) is a common way of modeling scene geometry. It relies on feature matching across images captured from different views of a single scene of interest. After the application of SFM+MVS, bundle adjustment [51] can be used to generate a 3D point cloud, as is the case in COLMAP [45, 46]. The point cloud allows for application of traditional mesh reconstruction techniques, such as Delaunay [7] or Poisson [30] reconstruction, to generate an explicit geometric representation of the scene. Vision tasks that utilize geometric priors, such as novel view synthesis, can take advantage of such an explicit scene representation [44, 58]. The mesh can also be applied towards scene + +relighting tasks, as explored by [42]. In their work, physics-based rendering is used to approximate shadow locations using the generated mesh, with an additional network for shadow refinement. The relighting results are realistic and geometrically consistent. However, this method is severely limited in its application to a wide variety of datasets. For example, limited views and dynamic scenes result in failed mesh reconstruction [27]. In the case of relatively simpler and restricted datasets, such as human portraits, image relighting using a single view has been successful, owing to the high similarity in structure across facial data [36, 63]. However, the same is not true for datasets of outdoor scenes, which contain a wider variety of structure and content [13]. + +# 3. Single Image-Based Scene Relighting + +Our proposed pipeline, SIMBAR, models the scene as a 3D mesh to explicitly represent scene geometry. Physics-based rendering is then used in conjunction with a shadow refinement network to produce realistic shadow maps. The original image can be composited with the target shadow maps to form the final relit output. Such an approach addresses the limitations posed by prior works on multi-view scene relighting and can generalize across scenes. + +# 3.1. Preliminaries + +# 3.1.1 Single Image-Based Scene Geometry Estimation + +To solve the multi-view limitations of SFM+MVS-based mesh reconstruction, we have been inspired by WorldSheet [22] to use external depth for scene geometry estimation in order to perform single image-based mesh reconstruction. Note that the underlying ideas for the overall WorldSheet and SIMBAR pipelines are completely different. WorldSheet is a differentiable rendering pipeline, trained end-to-end for novel view synthesis, while SIMBAR is designed to manipulate existing views with various shadows cast. + +For scene mesh formation, external depth predictions are treated as ground truth, thus requiring no predictions for grid offsets in the $x$ and $y$ direction. Let $z_{w,h}$ be the depth prediction at the corresponding sheet coordinate $(w,h)$ and $x_{w,h}$ and $y_{w,h}$ are simply linearly spaced samples in the Normalized Device Coordinates (NDC) space from [0,1], with the camera placed at the origin. Given a fixed size of the mesh sheet of $129\times 129$ , depth predictions are grid-sampled to account for differences in resolution. With FoV angle, $\theta_F$ , this gives the following equation for forming the vertex coordinates: + +$$ +V _ {w, h} = \left[ \begin{array}{c} z _ {w, h} x _ {w, h} \tan \left(\theta_ {f} / 2\right) \\ z _ {w, h} y _ {w, h} \tan \left(\theta_ {f} / 2\right) \\ z _ {w, h} \end{array} \right] \tag {1} +$$ + +Grid edges that connect neighboring vertices form the mesh faces [22]. The faces are then smoothed with a Laplacian function [48] for the final output mesh. + +![](images/dbf62c7c3ac423850afd763a392f500fdbbba029ba5f60f71c328cfb72324411.jpg) +Figure 2. (a) Geometry Estimation Component: a single input image, $I$ , is fed to monocular depth estimation networks $(m)$ . The predicted depth map, $D$ , is used to form scene mesh using the vertex coordinates in Eq. 1. The resulting set of vertices and faces forms the 3D mesh, $M$ . A set of input buffers, $I_B$ , are rendered with respect to the camera pose using $M$ . (b) Image Relighting Component: With estimated input lighting parameters and demanded target lighting variations, source shadow map $S_{src}$ and target shadow map(s) $S_{tgt}$ are generated. The shadow refinement networks $r_{src}$ and $r_{tgt}$ refine the shadow maps $S_{src}$ and $S_{tgt}$ respectively. Finally, relighting network $r_{out}$ takes refined shadow maps with $I_B$ , to generate the final relit images. + +# 3.1.2 Geometry Aware Multi-View Relighting + +Encoding the scene geometry priors and the relationship between scene geometry and lighting effects is an established method of providing strong signals to shadow removal and synthesis networks [35, 42, 62]. The image relighting networks in SIMBAR follow MVR [42], in which a set of geometric priors are leveraged as inputs in addition to the source image. A set of input buffers, $I_B$ , are generated which consists of normal maps, reflectance maps, and refined shadow maps. The normal map encodes the surface normals at each pixel. The reflectance map is a dot product between the surface normals and sun directions. To obtain refined shadow maps, a set of coarse RGB shadow maps are used as inputs to two shadow refinement networks - one each for the source and target lighting condition. These coarse RGB shadow map are created from rays cast onto a 3D mesh of the scene to generate shadow locations. For each ray that intersects the mesh and casts a shadow, let $m_i$ represent the point of intersection. The coordinates of $m_i$ can be re-projected to find the corresponding 2D image pixel and its RGB value. The latter is encoded in the shadow maps to create RGB shadow maps. Encoding the RGB value that corresponds to the object that cast the shadow can help the shadow refinement networks correct the errors made by the 3D mesh reconstruction, in order to produce + +final refined shadow maps for the relighting network. + +To finish the relighting process, a third network is used in combination with the shadow refinement networks. All of them are pre-trained on synthetically rendered data. Given the input image and RGB shadow maps for the source and target lighting conditions, the source and target shadow refinement networks attempt to refine the shadow maps to correct for errors in the mesh construction. This is followed by the final relighting network that takes in both the scene priors and refined shadow maps to produce the relit output. + +# 3.2. Method Description: SIMBAR + +Most prior scene relighting methods [42, 49, 62] require multiple images with different viewpoints. In contrast, SIMBAR leverages monocular depth estimation to obtain geometry approximation. SIMBAR is modular with two distinct components, geometry estimation and image relighting. The full pipeline is shown in Fig. 2. The geometry estimation module (a) represents the scene as a 3D mesh, which allows for a variety of informative priors to be generated for the image relighting module (b). This allows for a novel system design of a single image-based scene relighting that leverages explicit geometric scene representations. + +# 3.2.1 Geometry Estimation Component + +The geometry estimation module in SIMBAR generates a 3D scene mesh $M$ , from a single input image $I$ , as shown in Fig. 2. This is in direct contrast to MVR, which relies on SFM+MVS [45,46] for multi-view scene reconstruction. The steps taken to generate the mesh $M$ from a single image $I$ are inspired by WorldSheet (refer Section 3.1.1), but with additional modifications for improved mesh reconstruction. + +In SIMBAR, an external pre-trained monocular depth estimation network is used to provide depth information for generating the scene mesh. This is because higher-quality meshes are given for outdoor driving scenes when leveraging the Worldsheet variant that uses an external depth prediction rather than the full end-to-end pipeline that predicts depth and grid offsets. This observation makes sense as with WorldSheet trained models, there is no direct loss on the mesh $M$ in the end-to-end training regime. The supervision is instead obtained only via rendering losses on the final relit image. Thus, the predicted grid offset may not be as geometrically accurate as the one obtained using an external depth network. In addition, we have adapted new monodepth backbones for improved scene geometry estimation for relighting purpose. + +![](images/19dfd29c941d04956418775aae5ecd592c8a428cdcb2f0abdaa132b27d427eaa.jpg) +(a) Before: 3D Scene Mesh Missing Details + +![](images/70048a3be0128c4cbdb704520d2165fc1c3dcc6aebe1bbc5b433d75251ee1cf1.jpg) +(b) No Prominent Shadow Created + +![](images/c612fdde07156a6596a9b9132a6256bd78a5903d197daa42b2b07719c447ce5b.jpg) +(c) After:Refined Scene Mesh Geometry +Figure 3. (a) With MiDaS v2.1, the 3D scene mesh misses details, resulting in (b) no prominent shadow created. (c) Our improvements with DPT Hybrid which leverages dense vision transformers captures far-away car objects, (d) creating realistic shadows. + +![](images/da056abec4f235fe0046007732facb8b8a726ba84f410733d99c23a809088e95.jpg) +(d) Relit Result with Novel Shadows + +Improved Monocular Depth Estimation: While WorldSheet utilizes MiDaS v2.1 as the external depth backbone, we have experimented with Dense Prediction Transformer (DPT) monodepth models [43]). Fig. 3 shows that the generated mesh $M$ misses faraway car objects with the MiDaS v2.1 depth prediction, thus missing out on encoding structural details that can potentially cast shadows. This issue is particularly visible in the case of the KITTI scene on the top row, where the faraway car objects are not well relit. To address this limitation, we find that using the improved, dense vision transformers in DPT Hybrid-Kitti (finetuned on KITTI), helps produce more detailed meshes. + +Foreground/Background Scene Separation: As shown in Fig. 2, for a given input image $I$ , a pre-trained + +![](images/dd4fe472da6f553e8b9aed1a43b8b5cffdbc39043a55fa4cf0f48138eb7db287.jpg) +(a) Min Inverse Threshold $= 800$ + +![](images/e064bb4e928636171520914aba6a5e3584cff4470fb5aa3d1431293bc2088a65.jpg) +(b) Over Shadowed Result w Dark Sky + +![](images/5b57417e7f464b6adc59ba0f9cf6e20f65cbee70678c7de98c2fc2924285ce41.jpg) +(c) Min Inverse Threshold $= 100$ + +![](images/c4e8a414a96318a6b4cfbd95fecd0e4d044a982a24d79c5a533e86868e8ee64f.jpg) +(d) Realistically Result w Clear Sky +Figure 4. (a) For min inverse depth of 800, the scene mesh forms a flat vertical surface at the corresponding threshold distance. This phenomenon is observed as a flat, light gray wall mistakenly cuts off the top part of pyramid geometry. (b) This wall artifact casts a large dark shadow in the relit image labeled "over shadowed". (c) Using min inverse depth of 100 effective pushes the wall boundary further away, which gives a greater level of detail to the scene mesh, resulting in (d) a more realistic clear shadowed result. + +monocular depth estimation network is used to obtain the pixel-wise inverse depth values $D$ . These values are then used to inform the deformation of a planar scene mesh. We observe that thresholding the inverse depth at different scales allows us to focus on different levels of detail. + +Experiments with different levels of inverse depth thresholds are shown in Fig. 4. For the high inverse depth threshold of 800, a wall surface is generated fairly close to the camera and scene content. This set up could work for scenes with low depth range, but fail at diverse outdoor scenes with various depth boundaries. This results in over-shadowed results where the fake surface casts its own shadow over the scene. We opt for a lower inverse depth threshold, since this corresponds to a distance further away from the camera position. This allows the mesh to extend further back and produces cleaner shadows. Both the sky and surfaces far away in the horizon are better represented in the mesh $M$ with a lower inverse depth threshold. + +# 3.2.2 Image Relighting Component + +As shown in Fig. 2, given the scene mesh $M$ from the geometry estimation module, a set of priors or input buffers, as described in Section 3.1.2, are generated. They are fed as inputs to the shadow refinement networks $(r_{src}, r_{tgt})$ and the subsequent image relighting network $(r_{out})$ . We choose to use MVR's pre-trained networks for $r_{src}$ , $r_{tgt}$ and $r_{out}$ since they performed well despite imperfect mesh constructions across different datasets. Furthermore, obtaining a large and diverse set of high-resolution synthetic data for re-training the relighting networks is both time and cost intensive. Therefore, in SIMBAR, we focus on the novel adaption to single-view geometry-aware scene relighting. + +# 3.3. Improved MVR Medthod as Baseline: MVR-I + +The out-of-the-box MVR method fails at single-view collected autonomous driving dataset. To allow for comparisons with a strong baseline, we optimize MVR for road driving scenes with limited views, which we call MVR-I. We use MVR-I as a baseline for all qualitative (Section 3.4) and quantitative comparisons (Section 4.2). + +![](images/60d4b2fe616801ed0870bda8f466a8c10fd875e36a6105a28ca30c9f8af67e4a.jpg) + +![](images/b128107f2fc122879b501be85fb0dcc47f511578122ed3a9ce5ce4cd48e931f7.jpg) +(b) Hallucinated Shadows + +![](images/27349e64bb6103a977704dc66dc6155f9c1496a766b3fd47170b99dddc56cdb9.jpg) +(a) MVR: Noisy Sky Mesh +(c) MVR-I: Scene Mesh w Sky Removal +Figure 5. RGB point cloud overlayed on top of the scene mesh generated for a KITTI scene visualization. Using out-of-the-box MVR, hallucinates surfaces in the sky (a) resulting in phantom shadows (b), which we improve with MVR-I (c) leading to a more realistic image relighting result (d). + +![](images/e8b70db6724d9cd5715e248e7bdd25be74ab33819271a4acb2cbab75c6053e94.jpg) +(d) MVR-I Relit Result + +Removal of Hallucinated Mesh Surfaces: Firstly, we find that running MVR on KITTI scenes results in hallucinated sky surfaces in the generated mesh, thus casting corresponding phantom shadows on the ground. This is because SFM+MVS reconstruction triangulates selected 3D feature points in the input images with low re-projection error across images. In Fig. 5, note that the triangulated points leading to surface reconstruction in the sky in (a). These hallucinated surfaces cast prominent shadows in the sky and also on the foreground corner in the relit image in (b). While minor inaccuracies in the mesh can be addressed by the shadow refinement networks [42], the major inaccuracies shown lead to unrealistic scene relighting effects. To solve this issue, we implement a simple yet highly effective fix. We exclude confounding factors that appear in the sky in (c), such as clouds, as well as the sky itself, through segmentation using Detector2 [55] on the input multi-view images. This addresses the issue of hallucinated mesh surfaces in the sky and corresponding phantom shadows (d). + +![](images/7875346d805808af752a9be71eca82997b832e871715384ad3494f956fd7fd81.jpg) +(a) Delaunay + +![](images/aa5055519bf4326a0da7f188ec40c88e28cb4af9909f8c3752a1057f643f84ac.jpg) +(b) Poisson +Figure 6. (a) Delaunay surface reconstruction is sensitive to noise, causing triangular artifacts. (b) Poisson reconstructed mesh has much smoother surfaces. + +Improved Surface Reconstruction: The second improvement is replacing the Delaunay surface reconstruction algorithm [7] for mesh generation with the Poisson surface + +reconstruction algorithm [30]. Fig. 6 (left) shows that the Delaunay algorithm results in a noisy mesh, especially for the ground surface. Poisson surface reconstruction (right) for the same scene results in fewer angled edges and overall smoother road and tree surfaces. + +A natural outcome of both these fixes is more realistic relighting results, as shown in Fig. 5 (d). + +# 3.4. Scene Relighting Results + +Both MVR and MVR-I require multiple viewpoints of a scene to generate an approximate 3D mesh using SFM+MVS. Such an approach fails in video sequences captured by a stationary ego vehicle because of the lack of multiple view-points within the captured sequence. This is a known limitation of SFM+MVS, which leads to many hallucinated shadows rendered in a KITTI frame relit using MVR-I. This can be observed in the top row in Fig. 7. + +![](images/793e5d84d9c8dee41883400004e1d092dc8fe1c8fe251653b33bd8a6744d1af0.jpg) +(a) MVR on KITTI + +![](images/5e7e506efc2ee9ab8e99ee519de113603398c7cf5ef3a384303cf912e1044af3.jpg) +(b) SIMBAR on KITTI + +![](images/9dc01ceae40ca03ab78e2e4593591747d56899f0122652c12e6e6e96fa348028.jpg) +(c) MVR on BDD100K + +![](images/669b12bba1a8d0589c1f881005d0cfe665bf37a326da9dd6993b7a634e448acd.jpg) +(d) SIMBAR on BDD100K +Figure 7. Relighting results from MVR-I (a)(c) and SIMBAR (b)(d) on KITTI and BDD100K respectively. + +In contrast, SIMBAR provides significantly more realistic and geometrically consistent relighting results, as shown in Fig. 7 (b) and (d). While MVR-I fails to realistically relight images of road driving scenes from both KITTI (top) and BDD100K (bottom), SIMBAR's relighting results are consistently more realistic in terms of target shadow orientations and sky colors. However, there are some strong cast shadow residual that cannot be removed cleanly. + +# 3.5. Limitations + +Full Occlusion: With our proposed improvements in the geometry estimation module (refer Section 3.2.1), there are significant improvements in the generated mesh leading to more surface details of foreground objects and better inclusion of background objects. However, the natural drawback of a monocular depth approach is the exclusion of fully-occluded objects. While partially-occluded objects mesh errors can be corrected by shadow refinement networks, fully occluded objects currently present issues with shadow removal. The mesh is unable to represent the object without an additional view containing the object, yet in the real input image, the object can still contribute shadows. We find this to occasionally result in shadow residue from shadow + +removal due to the lack of context on the object when utilizing single-view sources. + +Scene Mesh Manipulation: Using low inverse threshold generates sky objects as wall surface further away in the horizon (see Fig. 4), and ideally we hope to remove the flat wall surface via scene mesh manipulation for more robust scene mesh separation. To achieve a better geometric understanding of individual objects in the scene and more granular control for scene relighting and shadow manipulation, another optimization could be leveraging 3D mesh predictions using neural networks such as Mesh R-CNN [19]. We currently use the 3D mesh as a geometric representation, and do not model the specific surface properties. Further modeling could allow for realistic lighting effects that account for specular reflection. + +# 4. Data Augmentation Using Scene Relighting For Object Detection & Tracking + +A serious limitation of all prior works on scene relighting is the lack of quantitative metrics to validate the effectiveness of scene relighting as a useful data augmentation methodology for vision tasks. In the absence of such a metric, the efficacy of real-world applicability of any scene relighting pipeline cannot be assessed. Therefore, to validate the effectiveness of scene relighting as a data augmentation strategy for vision tasks, we present real-world application results by integrating a state-of-the-art simultaneous object detection and tracking model, CenterTrack, with SIMBAR-augmented datasets. Our goal is to evaluate the enhanced generalization capability of vision models trained on data augmented using SIMBAR. + +# 4.1. Experiment Setup + +Train & Test Datasets: The KITTI tracking dataset consists of 21 sequences of road scenes, collected during daytime, with minimal variation in lighting conditions. Vision models trained on such a limited dataset cannot generalize well to the wide variety of lighting conditions that might be encountered in the real-world. To approximate this real-world generalization challenge, we train CenterTrack models on KITTI and test on vKITTI (only contains 'car' annotations) [17] which comprises of 'morning' and 'sunset' lighting variations. Prior work has also shown that testing on vKITTI is a useful strategy for evaluating data augmentations [50]. A visual of the domain gap between the training and test sets is shown in Fig. 8. Such an experiment setup is important in highlighting that vision models trained on limited datasets are susceptible to failure when encountering a seen scene in unseen lighting conditions. + +Data Augmentation Using Scene Relighting: To compare the data augmentation effectiveness of SIMBAR with that of MVR-I (see Section 3.3), we compare the perfor + +![](images/1c48afbd37ad3df822ac7af97ad9f0ae69dc730d2089bc979ca1efd7639156c4.jpg) +Figure 8. KITTI images taken at noon augmented with MVR-I/SIMBAR relit results used for training CenterTrack models, and vKITTI 'morning' and 'sunset' images used for testing. + +mance of CenterTrack models trained on two types of augmented KITTI datasets. Both use the full training set of ground-truth KITTI sequences, and an augmented versions of sequence numbers: 0001, 0002, 0006. The two augmented datasets differ in how the images are relit, one using MVR-I and the other using SIMBAR, where input parameters such as sun direction and sky zenith are randomly initialized. For our experiments, 4 different relit versions were generated for each frame in the 3 KITTI sequences. However, up to 120 different lighting conditions can be generated for each frame. We perform this augmentation offline. The rest of the training procedure follows the original CenterTrack implementation as-is. For brevity, we will refer to the CenterTrack models trained on the original 21 KITTI sequences without any image relighting-based augmentation as $(\mathbf{K})$ ; $(\mathbf{K} + \mathbf{M})$ and $(\mathbf{K} + \mathbf{S})$ denote the models trained with KITTI augmented with MVR-I relit sequences and SIMBAR relit sequences respectively. + +Metrics: To quantify the effectiveness of data augmentation using scene relighting for object detection and tracking, we report the Multiple Object Tracking Accuracy (MOTA), MOT Precision (MOTP), Multiple Object Detection Accuracy (MODA), MOD Precision (MODP), complemented with Precision (P), Recall(R), F1 score, False Positives (FP) and False Negatives (FN). + +# 4.2. Evaluation Results + +A summary of the quantitative results is shown in Table. 1. All models trained from scratch, and the best checkpoint for each training run is chosen based on MOTA on the real KITTI validation set. CenterTrack models trained on KITTI augmented with relit KITTI, from either MVR-I $(\mathbf{K} + \mathbf{M})$ or SIMBAR $(\mathbf{K} + \mathbf{S})$ , consistently outperform the baseline CenterTrack model trained on KITTI $(\mathbf{K})$ , on all metrics except for MODP. Specifically, the CenterTrack model trained on KITTI augmented with SIMBAR $(\mathbf{K} + \mathbf{S})$ has the highest MOTA of $93.3\%$ - a $9.0\%$ relative improvement over the baseline MOTA of $85.6\%$ from $\mathbf{K}$ . Similarly, the highest MODA of $94.1\%$ is also achieved by $\mathbf{K} + \mathbf{S}$ - again an impressive $8.9\%$ relative improvement over the + +baseline MODA of $86.4\%$ from $\mathbf{K}$ . In addition, $\mathbf{K} + \mathbf{S}$ has the least amount of false positives and false negatives. + +
KK+MK+S
MOTA ↑85.6%92.0%93.3%
MOTP ↑83.1%83.5%83.5%
MODA ↑86.4%92.7%94.1%
MODP ↑87.6%87.6%87.4%
Recall ↑94.0%96.5%96.9%
Precision ↑94.4%97.4%98.1%
F1 ↑94.2%96.9%97.5%
False Positives ↓28313395
False Negatives ↓302179157
+ +Table 1. Compared to baseline CenterTrack, models trained with data augmented using both MVR-I and SIMBAR provide consistently better performance. + +![](images/0d25cc50c3ec3242e7f1131ae149b7b3e59dabc6542c8546352ae4e61faf66df.jpg) +(a) Model K Failure Case + +![](images/808a6e9a6bf1cd3b1ec94eee207a996f41e6fbdfef3e16f36a31fcba6255d6da.jpg) +(b) Model $\mathbf{K} + \mathbf{M}$ Success Case + +![](images/89c3da046a28fc37ba05957e74257fd2fa5888085c04258c398c6e84ac13cad5.jpg) +(c) Model K+S Success Case +Figure 9. Object detection and tracking results on vKITTI from CenterTrack models $\mathbf{K}$ (a), $\mathbf{K} + \mathbf{M}$ (b), and $\mathbf{K} + \mathbf{S}$ (c). + +Fig. 9 shows a qualitative downstream task performance comparison of detection and tracking results from $\mathbf{K}$ , $\mathbf{K} + \mathbf{M}$ and $\mathbf{K} + \mathbf{S}$ on vKITTI. The top result shows that model $\mathbf{K}$ , trained on original KITTI, fails to detect and track a black van obscured by a dense, dark shadow. Even though $\mathbf{K}$ was trained on the exact same scene from KITTI, it fails in this scenario because the training set, limited to images captured at noon, does not contain diverse lighting and shadow variations. Thus, model $\mathbf{K}$ performs properly in this seen scene with an unseen lighting condition. In contrast, both the models $\mathbf{K} + \mathbf{M}$ and $\mathbf{K} + \mathbf{S}$ perform well on this edge case with challenging lighting conditions. + +To investigate the reliability of the obtained improvements, we ran 5 different training instances for each of the + +![](images/0aec2d2039a9e0942ee6760501265bba834e829b1fd44a735709f940eee55a06.jpg) +Figure 10. MOTA (left) and MODA (right) variance across 5 different training instances of models $\mathbf{K}$ , $\mathbf{K} + \mathbf{M}$ and $\mathbf{K} + \mathbf{S}$ . + +![](images/0f2777746d9a5f5f37d096acebf7e69c7618d55b435d9708d46674b4c47387af.jpg) + +three models $\mathbf{K}, \mathbf{K} + \mathbf{M}$ and $\mathbf{K} + \mathbf{S}$ . Each training instance was run for 100 epochs, which took 9 hours with 8 NVIDIA A100 GPUs. Fig. 10 shows consistent improvement in MOTA and MODA, averaged across the 5 training runs, with $\mathbf{K} + \mathbf{S}$ achieving the best overall performance. Note that as compared to $\mathbf{K}, \mathbf{K} + \mathbf{M}$ also performs relatively well on the unseen lighting conditions, with a small variance across different training jobs. + +# 5. Conclusion + +We present a novel single-image based scene relighting pipeline, SIMBAR, for time and cost effective diversification of real-world datasets to include a plethora of lighting conditions. SIMBAR consists of two main modules. The geometry estimation module, inspired by 3D scene geometry estimation from a single image using WorldSheet, exploits various inverse depth thresholds and monocular depth networks to improve the scene mesh. The image relighting module re-purposes the relighting networks from prior art MVR and further relaxes the application-prohibitive requirement of multiple input images with different camera views. An improved version of MVR (MVR-I) is also provided for benchmark purposes. MVR-I leverages segmentation pre-processing to remove confounding classes, and is refined for road driving scenes. + +Additionally, a comprehensive quantitative evaluation of CenterTrack models trained on KITTI augmented with relit data is used to demonstrate the effectiveness of scene relighting as a data augmentation strategy for object detection and tracking. Our results show an impressive MOTA of $93.3\%$ on the vKITTI dataset with CenterTrack trained on KITTI augmented using SIMBAR - a $9.0\%$ relative improvement over the baseline MOTA of $85.6\%$ with CenterTrack trained on original KITTI. These results present a strong case for using SIMBAR as an effective data augmentation technique for vision tasks in automated driving. + +Acknowledgements: The authors would like to thank Ronghang Hu and Deepak Pathak for sharing WorldSheet source code, and Julien Philip for the inspiring discussions on his MVR relighting method. + +# References + +[1] Eirikur Agustsson and Radu Timofte. Ntire 2017 challenge on single image super-resolution: Dataset and study. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, July 2017. 1, 2 +[2] Nijad Al-Najdawi, Helmut E Bez, Jyoti Singhai, and Eran A Edirisinghe. A survey of cast shadow detection algorithms. Pattern Recognition Letters, 33(6):752-764, 2012. 1 +[3] Mohamed Aly. Real time detection of lane markers in urban streets. CoRR, abs/1411.7113, 2014. 1 +[4] Iro Armeni, Sasha Sax, Amir Roshan Zamir, and Silvio Savarese. Joint 2d-3d-semantic data for indoor scene understanding. CoRR, abs/1702.01105, 2017. 2 +[5] Mark Boss, Raphael Braun, Varun Jampani, Jonathan T. Barron, Ce Liu, and Hendrik P.A. Lensch. Nerd: Neural reflectance decomposition from image collections. In IEEE International Conference on Computer Vision (ICCV), 2021. 3 +[6] Alexandra Carlson, Ram Vasudevan, and Matthew Johnson-Roberson. Shadow transfer: Single image relighting for urban road scenes. arXiv preprint arXiv:1909.10363, 2019. 2, 3 +[7] Frédéric Cazals and Joachim Giesen. Delaunay triangulation based surface reconstruction. In Effective computational geometry for curves and surfaces, pages 231-276. Springer, 2006. 3, 6 +[8] Angel X. Chang, Angela Dai, Thomas A. Funkhouser, Maciej Halber, Matthias Nießner, Manolis Savva, Shuran Song, Andy Zeng, and Yinda Zhang. Matterport3d: Learning from RGB-D data in indoor environments. CoRR, abs/1709.06158, 2017. 2 +[9] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 5939-5948. Computer Vision Foundation / IEEE, 2019. 2 +[10] Xiaodong Cun, Chi-Man Pun, and Cheng Shi. Towards ghost-free shadow removal via dual hierarchical aggregation network and shadow matting GAN. 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 10680-10687. AAAI Press, 2020. 1 +[11] Sourya Dipta Das, Nisarg A Shah, and Saikat Dutta. Msrnet: Multi-scale relighting network for one-to-one relighting. arXiv preprint arXiv:2107.06125, 2021. 3 +[12] Paul E. Debevec, Camillo J. Taylor, and Jitendra Malik. Modeling and rendering architecture from photographs: A hybrid geometry- and image-based approach. In John Fujii, editor, Proceedings of the 23rd Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH 1996, New Orleans, LA, USA, August 4-9, 1996, pages 11-20. ACM, 1996. 2 +[13] Farshad Einabadi, Jean-Yves Guillemaut, and Adrian Hilton. Deep neural models for illumination estimation and relight- + +ing: A survey. In Computer Graphics Forum. Wiley Online Library, 2021. 3 +[14] Jannik Fritsch, Tobias Kuehnl, and Andreas Geiger. A new performance measure and evaluation benchmark for road detection algorithms. In International Conference on Intelligent Transportation Systems (ITSC), 2013. 1 +[15] Qingxu Fu, Xiaoguang Di, and Yu Zhang. Learning an adaptive model for extreme low-light raw image processing, 2020. 1 +[16] Paul Gafton and Erick Maraz. 2d image relighting with image-to-image translation. arXiv preprint arXiv:2006.07816, 2020. 2, 3 +[17] Adrien Gaidon, Qiao Wang, Yohann Cabon, and Eleonora Vig. Virtual worlds as proxy for multi-object tracking analysis. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4340-4349, 2016. 2, 7 +[18] Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets robotics: The kitti dataset. The International Journal of Robotics Research, 32(11):1231-1237, 2013. 1, 2 +[19] Georgia Gkioxari, Jitendra Malik, and Justin Johnson. Mesh R-CNN. CoRR, abs/1906.02739, 2019. 7 +[20] Clément Godard, Oisin Mac Aodha, and Gabriel J. Brostow. Digging into self-supervised monocular depth estimation. CoRR, abs/1806.01260, 2018. 2 +[21] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial networks. Communications of the ACM, 63(11):139–144, 2020. 3 +[22] Ronghang Hu, Nikhila Ravi, Alexander C Berg, and Deepak Pathak. Worldsheet: Wrapping the world in a 3d sheet for view synthesis from a single image. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 12528-12537, 2021. 2, 3 +[23] Xiaowei Hu, Chi-Wing Fu, Lei Zhu, Jing Qin, and Pheng-Ann Heng. Direction-aware spatial context features for shadow detection and removal. IEEE Trans. Pattern Anal. Mach. Intell., 42(11):2795-2808, 2020. 1 +[24] Xiaowei Hu, Yitong Jiang, Chi-Wing Fu, and Pheng-Ann Heng. Mask-shadowgan: Learning to remove shadows from unpaired data. In 2019 IEEE/CVF International Conference on Computer Vision, ICCV 2019, Seoul, Korea (South), October 27 - November 2, 2019, pages 2472-2481. IEEE, 2019. 1 +[25] Xiaowei Hu, Lei Zhu, Chi-Wing Fu, Jing Qin, and Pheng-Ann Heng. Direction-aware spatial context features for shadow detection. In 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 7454-7462. Computer Vision Foundation / IEEE Computer Society, 2018. 1 +[26] Manuel José Ibarra-Arenado, Tardi Tjahjadi, and Juan Pérez-Oria. Shadow detection in still road images using chrominance properties of shadows and spectral power distribution of the illumination. Sensors, 20(4):1012, 2020. 1 +[27] Matthias Innmann, Kihwan Kim, Jinwei Gu, Matthias Nießner, Charles Loop, Marc Stamminger, and Jan Kautz. Nrmvs: Non-rigid multi-view stereo. In Proceedings of the + +IEEE/CVF Winter Conference on Applications of Computer Vision, pages 2754-2763, 2020. 3 +[28] Nikita Jaipuria, Xianling Zhang, Rohan Bhasin, Mayar Arafa, Punarjay Chakravarty, Shubham Shrivastava, Sagar Manglani, and Vidya N Murali. Deflating dataset bias using synthetic data augmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 772-773, 2020. 1 +[29] Yue Jiang, Dantong Ji, Zhizhong Han, and Matthias Zwicker. Sdfdiff: Differentiable rendering of signed distance fields for 3d shape optimization. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 1248-1258. Computer Vision Foundation / IEEE, 2020. 2 +[30] Michael Kazhdan, Matthew Bolitho, and Hugues Hoppe. Poisson surface reconstruction. In Proceedings of the fourth Eurographics symposium on Geometry processing, volume 7, 2006. 3, 6 +[31] Naveen Kodali, Jacob Abernethy, James Hays, and Zsolt Kira. On convergence and stability of gans. arXiv preprint arXiv:1705.07215, 2017. 2 +[32] Seokju Lee, Junsik Kim, Jae Shin Yoon, Seunghak Shin, Oleksandr Bailo, Namil Kim, Tae-Hee Lee, Hyun Seok Hong, Seung-Hoon Han, and In So Kweon. Vpgnet: Vanishing point guided network for lane and road marking detection and recognition. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. 1 +[33] Popescu Marius, Valentina Balas, Liliana Perescu-Popescu, and Nikos Mastorakis. Multilayer perceptron and neural networks. WSEAS Transactions on Circuits and Systems, 8, 07 2009. 3 +[34] 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. CoRR, abs/1905.00889, 2019. 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, pages 405-421. Springer, 2020. 3, 4 +[36] Thomas Nestmeyer, Jean-François Lalonde, Iain Matthews, and Andreas Lehrmann. Learning physics-guided face relighting under directional light. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5124-5133, 2020. 3 +[37] Gerhard Neuhold, Tobias Ollmann, Samuel Rota Bulò, and Peter Kontschieder. The mapillary vistas dataset for semantic understanding of street scenes. In International Conference on Computer Vision (ICCV), 2017. 1 +[38] Behnam Neyshabur, Srinadh Bhojanapalli, and Ayan Chakrabarti. Stabilizing gan training with multiple random projections. arXiv preprint arXiv:1705.07831, 2017. 2 +[39] Michael Niemeyer, Lars M. Mescheder, Michael Oechsle, and Andreas Geiger. Differentiable volumetric rendering: Learning implicit 3d representations without 3d supervision. In 2020 IEEE/CVF Conference on Computer Vision and Pat + +tern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 3501-3512. Computer Vision Foundation / IEEE, 2020. 3 +[40] Michael Niemeyer, Lars M. Mescheder, Michael Oechsle, and Andreas Geiger. Differentiable volumetric rendering: Learning implicit 3d representations without 3d supervision. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 3501-3512. Computer Vision Foundation / IEEE, 2020. 3 +[41] Keunhong Park, Arsalan Mousavian, Yu Xiang, and Dieter Fox. Latentfusion: End-to-end differentiable reconstruction and rendering for unseen object pose estimation. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 10707-10716. Computer Vision Foundation / IEEE, 2020. 2 +[42] Julien Philip, Michael Gharbi, Tinghui Zhou, Alexei A Efros, and George Drettakis. Multi-view relighting using a geometry-aware network. ACM Transactions on Graphics (TOG), 38(4):1-14, 2019. 2, 3, 4, 6 +[43] René Ranftl, Alexey Bochkovskiy, and Vladlen Koltun. Vision transformers for dense prediction. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 12179-12188, 2021. 5 +[44] Gernot Riegler and Vladlen Koltun. Free view synthesis. In European Conference on Computer Vision, pages 623–640. Springer, 2020. 3 +[45] Johannes Lutz Schonberger and Jan-Michael Frahm. Structure-from-motion revisited. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 3, 5 +[46] Johannes Lutz Schonberger, Enliang Zheng, Marc Pollefeys, and Jan-Michael Frahm. Pixelwise view selection for unstructured multi-view stereo. In European Conference on Computer Vision (ECCV), 2016. 3, 5 +[47] Meng-Li Shih, Shih-Yang Su, Johannes Kopf, and Jia-Bin Huang. 3d photography using context-aware layered depth inpainting. CoRR, abs/2004.04727, 2020. 2 +[48] O. Sorkine, D. Cohen-Or, Y. Lipman, M. Alexa, C. Rössl, and H.-P. Seidel. Laplacian surface editing. In Proceedings of the 2004 Eurographics/ACM SIGGRAPH Symposium on Geometry Processing, SGP '04, page 175–184, New York, NY, USA, 2004. Association for Computing Machinery. 3 +[49] Pratul P Srinivasan, Boyang Deng, Xiuming Zhang, Matthew Tancik, Ben Mildenhall, and Jonathan T Barron. Nerv: Neural reflectance and visibility fields for relighting and view synthesis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7495-7504, 2021. 2, 3, 4 +[50] Jonathan Tremblay, Aayush Prakash, David Acuna, Mark Brophy, Varun Jampani, Cem Anil, Thang To, Eric Cameracci, Shaad Boochoon, and Stan Birchfield. Training deep networks with synthetic data: Bridging the reality gap by domain randomization. In Proceedings of the IEEE conference on computer vision and pattern recognition workshops, pages 969–977, 2018. 7 +[51] Bill Triggs, Philip F McLauchlan, Richard I Hartley, and Andrew W Fitzgibbon. Bundle adjustment—a modern synthe- + +sis. In International workshop on vision algorithms, pages 298-372. Springer, 1999. 3 +[52] Andrey Voynov and Artem Babenko. Unsupervised discovery of interpretable directions in the gan latent space. In International Conference on Machine Learning, pages 9786-9796. PMLR, 2020. 2 +[53] Tianyu Wang, Xiaowei Hu, Qiong Wang, Pheng-Ann Heng, and Chi-Wing Fu. Instance shadow detection. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 1877-1886. Computer Vision Foundation / IEEE, 2020. 1 +[54] Olivia Wiles, Georgia Gkioxari, Richard Szeliski, and Justin Johnson. Synsin: End-to-end view synthesis from a single image. CoRR, abs/1912.08804, 2019. 2 +[55] Yuxin Wu, Alexander Kirillov, Francisco Massa, Wan-Yen Lo, and Ross Girshick. Detector2. https://github.com/facebookresearch/detectron2, 2019.6 +[56] Qiangeng Xu, Weiyue Wang, Duygu Ceylan, Radomir Mech, and Ulrich Neumann. DISN: deep implicit surface network for high-quality single-view 3d reconstruction. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d'Alché-Buc, Emily B. Fox, and Roman Garnett, editors, 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 490-500, 2019. 2 +[57] Wei Yin, Jianming Zhang, Oliver Wang, Simon Niklaus, Long Mai, Simon Chen, and Chunhua Shen. Learning to recover 3d scene shape from a single image. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 204-213. Computer Vision Foundation / IEEE, 2021. 2 +[58] Jae Shin Yoon, Kihwan Kim, Orazio Gallo, Hyun Soo Park, and Jan Kautz. Novel view synthesis of dynamic scenes with globally coherent depths from a monocular camera. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5336-5345, 2020. 3 +[59] Fisher Yu, Wenqi Xian, Yingying Chen, Fangchen Liu, Mike Liao, Vashisht Madhavan, and Trevor Darrell. Bdd100k: A diverse driving video database with scalable annotation tooling. arXiv preprint arXiv:1805.04687, 2(5):6, 2018. 1, 2 +[60] Andy Zeng, Shuran Song, Matthias Nießner, Matthew Fisher, Jianxiong Xiao, and Thomas A. Funkhouser. 3dmatch: Learning local geometric descriptors from RGB-D reconstructions. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 199-208. IEEE Computer Society, 2017. 2 +[61] Shuyang Zhang, Runze Liang, and Miao Wang. Shadowgan: Shadow synthesis for virtual objects with conditional adversarial networks. Comput. Vis. Media, 5(1):105-115, 2019. 1 +[62] Xiuming Zhang, Pratul P Srinivasan, Boyang Deng, Paul Debevec, William T Freeman, and Jonathan T Barron. Ner-factor: Neural factorization of shape and reflectance under an unknown illumination. arXiv preprint arXiv:2106.01970, 2021. 2, 3, 4 + +[63] Hao Zhou, Sunil Hadap, Kalyan Sunkavalli, and David W Jacobs. Deep single-image portrait relighting. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7194-7202, 2019. 3 +[64] Xingyi Zhou, Vladlen Koltun, and Philipp Krahenbuhl. Tracking objects as points. In European Conference on Computer Vision, pages 474-490. Springer, 2020. 2 +[65] C. Lawrence Zitnick, Sing Bing Kang, Matthew Uyttendaele, Simon A. J. Winder, and Richard Szeliski. High-quality video view interpolation using a layered representation. ACM Trans. Graph., 23(3):600-608, 2004. 2 \ No newline at end of file diff --git a/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/images.zip b/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..abc4234bf46f41964dfb1a63b8bc8cc825315027 --- /dev/null +++ b/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77da6dc36a40dcc7e33859fdcff98f3ffeb9b4fe59b779e12e818a9af7b7ca12 +size 468982 diff --git a/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/layout.json b/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4096b1448b41caac41b5251beeef8234a5e19c9d --- /dev/null +++ b/simbarsingleimagebasedscenerelightingforeffectivedataaugmentationforautomateddrivingvisiontasks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:770a6c16458850dcae9ab6eb4ab333d54f01860f372c2159d108b2dbf8d1456c +size 461685 diff --git a/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/b2224a70-a52c-4a89-a427-c7d390ff9a00_content_list.json b/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/b2224a70-a52c-4a89-a427-c7d390ff9a00_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b99e5390395edcd532a2834c667d8c8623d92b67 --- /dev/null +++ b/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/b2224a70-a52c-4a89-a427-c7d390ff9a00_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a28d11cf53bba898dbe71e21847d947048e283115c06e36a4d75be7cffdd43e +size 78185 diff --git a/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/b2224a70-a52c-4a89-a427-c7d390ff9a00_model.json b/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/b2224a70-a52c-4a89-a427-c7d390ff9a00_model.json new file mode 100644 index 0000000000000000000000000000000000000000..810c8bd15969ff2db3a3efd8f2d1bf809da72019 --- /dev/null +++ b/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/b2224a70-a52c-4a89-a427-c7d390ff9a00_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd16ef89d59b2747eba9f9b36a0d27a3b98ac987af631e2116563d9ca6ce50ea +size 97060 diff --git a/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/b2224a70-a52c-4a89-a427-c7d390ff9a00_origin.pdf b/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/b2224a70-a52c-4a89-a427-c7d390ff9a00_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0c3f9137a6cb7611c4a1cb2e9f6785b9e41f236a --- /dev/null +++ b/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/b2224a70-a52c-4a89-a427-c7d390ff9a00_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56aab33560e54e96d1440fdc6864465bc3fb1462c892771c36947919e9e1756d +size 3277298 diff --git a/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/full.md b/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..028e90d84d64ec4598d23707df0feb19e86532f4 --- /dev/null +++ b/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/full.md @@ -0,0 +1,310 @@ +# SIOD: Single Instance Annotated Per Category Per Image for Object Detection + +Hanjun Li $^{1*}$ , Xingjia Pan $^{2}$ , Ke Yan $^{2\dagger}$ , Fan Tang $^{3}$ , Wei-Shi Zheng $^{1,4,5\dagger}$ + +$^{1}$ School of Computer Science and Engineering, Sun Yat-sen University + +$^{2}$ Youtu Lab, Tencent $^{3}$ Jilin University $^{4}$ Peng Cheng Laboratory + +$^{5}$ Key Laboratory of Machine Intelligence and Advanced Computing, Ministry of Education + +lihj85@mail2.sysu.edu.cn, {xjia.pan,tfan.108}@gmail.com,kerwinyan@tencent.com, wszheng@ieee.org + +# Abstract + +Object detection under imperfect data receives great attention recently. Weakly supervised object detection (WSOD) suffers from severe localization issues due to the lack of instance-level annotation, while semi-supervised object detection (SSOD) remains challenging led by the inter-image discrepancy between labeled and unlabeled data. In this study, we propose the Single Instance annotated Object Detection (SIOD), requiring only one instance annotation for each existing category in an image. Degraded from inter-task (WSOD) or inter-image (SSOD) discrepancies to the intra-image discrepancy, SIOD provides more reliable and rich prior knowledge for mining the rest of unlabeled instances and trades off the annotation cost and performance. Under the SIOD setting, we propose a simple yet effective framework, termed Dual-Mining (DMiner), which consists of a Similarity-based Pseudo Label Generating module (SPLG) and a Pixel-level Group Contrastive Learning module (PGCL). SPLG firstly mines latent instances from feature representation space to alleviate the annotation missing problem. To avoid being misled by inaccurate pseudo labels, we propose PGCL to boost the tolerance to false pseudo labels. Extensive experiments on MS COCO verify the feasibility of the SIOD setting and the superiority of the proposed method, which obtains consistent and significant improvements compared to baseline methods and achieves comparable results with fully supervised object detection (FSOD) methods with only $40\%$ instances annotated. Code is available at https://github.com/solicucu/SIOD. + +# 1. Introduction + +With the boom of Convolutional Neural Network (CNN) and Vision Transformer [9, 16, 13, 23, 30, 33], object + +![](images/2679068cd8274c3a523486fcd2942d8c7190dbca7f43d742db3fb0908bf8070d.jpg) +(a) WSOD + +![](images/6d522322fcdad5e242ce81d4096d97760799ab0c9a4070914f6d4299b664159b.jpg) +(b) SSOD + +![](images/0d1603b3985be12cbf8d325817b7ae0382b5990b3b6d74f6c24484292fd14dd2.jpg) +(c) SAOD + +![](images/574cf072dac3af4752dba834224243f22c748acf383d68306bdc5edf2dbbf2ba.jpg) +(d) SIOD (Ours) +Figure 1. Different annotation setup for (a) WSOD, (b) SSOD, (c) SAOD and (d) SIOD (Ours). + +detection [3, 5, 20, 22, 26, 27, 28, 50] has achieved great improvements with a large number of instance-level annotations. However, these annotations are not only labor-intensive and time-consuming, but also prevent detectors from generalizing to most realistic scenarios where only few labeled data is available. + +Weakly supervised object detection (WSOD), which requires only image-level labels for training, has received much attention in computer vision community. Although great advances [2, 19, 34, 29, 8] have been achieved in recent years, it still remains a huge performance gap between WSOD and FSOD. WSOD suffers from severe localization issues due to the large discrepancy between image-level annotation and instance-level task. Semi-supervised object detection (SSOD) is an alternative few-label object detection task, where only a small number of instance-level annotations are available. SSOD methods [14, 15, 1, 35, 17, 49] obtain superior localization accuracy compared to WSOD methods, but the inter-image discrepancy between labeled and unlabeled data limits further improvement by a large margin due to the lack of explicit inter-image communication in popular mini-batch optimization manner. + +Sparsely annotated object detection (SAOD) is recently proposed, which annotates a part of instances in each image. Specifically, SAOD methods [37, 43, 45] usually imitate sparse annotation by randomly erasing different proportion of annotations from completely annotated object detection + +datasets [21]. In this way, it's inevitable that there are not any annotations for all instances of some categories in an image, which leads to inter-image discrepancy as SSOD. To this end, we propose a new task, termed as Single Instance annotated Object Detection (SIOD), which annotates only one instance for each existing category in an image. Compared to WSOD, SSOD and SAOD, SIOD reduces the inter-task or inter-image discrepancies to intra-image discrepancy and trades off the annotating cost and performance. Fig. 1 illustrates the annotation details of WSOD, SSOD, SAOD and the proposed SIOD. + +Pseudo label-based methods are the most popular solution under the imperfect data and achieve impressive progress. However, pseudo labels generated by detector in the early training phase are usually inaccurate and make it difficult for stable training. In this study, we propose a simple yet effective framework under the SIOD setup, called Dual-Mining (DMiner), which consists of a Similarity-based Pseudo Label Generating module (SPLG) and a Pixel-level Group Contrastive Learning module (PGCL). In contrast to detector-based pseudo labels, the SPLG instead utilizes the feature similarity to mines latent instances, which is based on the ability of equi-variance of CNN. We then propose the PGCL, which self-mines a group of positive pairs for each category for group contrastive learning, to boost the tolerance to false pseudo labels and minimize the distances between instances of same category in each image. COCO style evaluation protocol does not filter the detected boxes with extremely low confidence and thus results in illusory advances in object detection by recalling a large number of objects with low confidence. We therefore introduce additional confidence constraint to coco style evaluation metrics that a predicted box is determined as a true match only when it satisfies the specific IoU (Interaction Over Union) and confidence threshold. + +In summary, the contributions in this study include: + +- Investigate the SIOD task, which provides more possibility of the development of object detection with lower annotated cost. +- Propose the DMiner framework to mine unlabeled instances and boost the tolerance to false pseudo labels. +- Extensive experiments verify the superiority of SIOD and the proposed DMiner obtains consistent and significant gains compared with baseline methods. + +# 2. Related Works + +# 2.1. Object Detection + +Object detection under full supervision. Fully supervised object detection has achieved great progress in recent years. Most modern detection methods can be roughly + +divided into two-stage or one-stage methods. Two-stage methods [28, 20, 4, 11] usually first generate high-quality proposals by introducing Region Proposal Networks (RPN) and then apply a refine stage to obtain final predictions. Meanwhile, one-stage methods [22, 27, 3, 50, 36] directly regress bounding boxes and predict class probabilities, which lead to high efficiency. After CornerNet [18], several methods [50, 52, 32, 44, 5, 46] are proposed to remove anchor setting by directly predicting absolute bounding box w.r.t input image and most of these methods follow the setup of one-stage pipeline. However, the great success of these approaches heavily depend on a large number of instance-level annotations, which is notoriously labor-intensive and time-consuming. + +Object detection under imperfect data. Weakly and semi-supervised object detection attracts increasing attention because they relieve the demand of expensive instance-level annotations. Most of WSOD methods [2, 19, 34, 29, 25, 10, 47] adopt multiple instance learning (MIL) [7] or CAM [48] to mine the latent object proposals with image-level labels followed by some instance refinement modules. Due to the lack of instance-level annotations, there is still a large performance gap between WSOD and FSOD. SSOD approaches leverage both limited instance-level labeled data and large amounts of unlabeled data. Consistency regularization based methods [14, 15] help to train a model to be robust to given perturbed inputs, but the effect is limited and heavily depends on the data augmentation strategies [24]. Pseudo-label based methods [1, 35, 17] are the current state-of-the-arts, and most of them conduct a complex multi-stage training schema: generating pseudo labels and re-training process. The final performance is limited by the quality of pseudo labels. Recently, SAOD methods [37, 43, 45] randomly annotate a proportion of instances in each image, which inevitably lead to imbalance for each category. Different from aforementioned setup, SIOD annotates one instance for each existing category in each image to achieve the purpose of reducing annotation and retaining rich information. + +# 2.2. Contrastive Learning + +Contrastive learning [12, 6, 51, 38] has been widely used in the filed of self-supervised learning. Most of these methods use instance discrimination [40] as pretext task to pretrain a network and then fine-tune for different downstream tasks (e.g. classification, object detection and segmentation). Contrastive learning aims to minimize the distance between the positive pairs, namely two different augmented views of same image, and push away negative pairs. Specifically, Xie et al. [41] introduces contrastive learning between global image and local patches at multilevel features for pretraining and then transfer the learned model to object detection task. Xie et al. [42] introduces + +![](images/0b6c3dedb67e1637139349cff067f8c3e8b30735a6f6eea407886e17e7498b47.jpg) +Figure 2. The overview of proposed DMiner, which consists of a Similarity-based Pseudo Label Generating module (SPLG) and a Pixel-level Group Contrastive Learning module (PGCL). Let $M_{15}, M_{27}, M_{31} = 1$ and refer to Eq. (6) to understand the meaning of $M$ . + +pixel-level pretext tasks for learning dense feature representations which are friendly to dense prediction tasks (e.g. object detection and segmentation). To mitigate the reliance on pseudo-labels and boost the tolerance to false pseudo labels, Wang et al. [38] proposes a Pseudo Group Contrast mechanism (PGC) to address the challenge of confirmation bias in self-training. However, all of them need to maintain a momentum encoder for extracting key features and a large feature queue, which is relatively cumbersome and resource-consuming. To alleviate the error amplification issue led by inaccurate pseudo labels and mine more unlabeled instances in object detection, we design a pixel-level group contrastive learning module (PGCL). Note that PGCL is applied to each image independently without extra momentum encoder. + +# 3. DMiner + +# 3.1. Overview + +In this paper, we adopt CenterNet [50] as our basic framework. Let $I \in \mathbb{R}^{H \times W \times 3}$ be an input image of height H and width W. Given a backbone Net, it firstly extracts the feature map $F \in \mathbb{R}^{\hat{H} \times \hat{W} \times D} = \text{Net}(I)$ , where $\hat{H} = \frac{H}{s}$ , $\hat{W} = \frac{W}{s}$ , and $s$ is the downsample stride w.r.t the input. $D$ is the feature dimension. The features $F$ are then fed into a classifier head for predicting the category heatmap $\hat{Y} \in \mathbb{R}^{\hat{H} \times \hat{W} \times C}$ , where $C$ is the number of category. Given an instance ground truth annotation $(cp_x, cp_y, w, h, c)$ , where $(cp_x, cp_y)$ denotes the coordinates of the center point of the instance and $w, h, c$ are the width, height and category + +respectively, we generate a target category heatmap $Y \in [0,1]^{\hat{H} \times \hat{W} \times C}$ with Gaussian kernel function in Eq. (1), where $\hat{p}_x = \left\lfloor \frac{cp_x}{s} \right\rfloor$ , $\hat{p}_y = \left\lfloor \frac{cp_y}{s} \right\rfloor$ and $\sigma_{wh}$ is an object size-adaptive standard deviation [18]. + +$$ +Y _ {y x c} = \exp \left(- \frac {\left(x - \hat {p} _ {x}\right) ^ {2} + \left(y - \hat {p} _ {y}\right) ^ {2}}{2 \sigma_ {w h} ^ {2}}\right). \tag {1} +$$ + +Under the SIOD setup, directly assigning all the unlabeled region as background undoubtedly hurts the training process and deteriorates detector performance. To alleviate the annotation missing issue, we propose the Dual-Mining (DMiner) framework as shown in Fig. 2, which consists of a Similarity-based Pseudo Label Generating module (SPLG) and a Pixel-level Group Contrastive Learning module (PGCL). The SPLG recalls several latent instances based on feature similarity between the reference instances (labeled) and the rest of the unlabeled region. The model only utilizing the pseudo labels generated by SPLG is easily confused by false pseudo labels since it focuses on learning a hyperplane for discriminating each class from the other classes [38]. Therefore, we further design the PGCL module to boost the tolerance to false pseudo labels, which is inspired from that contrastive learning loss focuses on exploring the intrinsic structure of data and is naturally independent of false pseudo labels [38]. The overall training objective is as follows: + +$$ +L _ {\text {t o t a l}} = L _ {\text {s p l g}} + \lambda_ {\text {p g c l}} L _ {\text {p g c l}} + \lambda_ {\text {o f f}} L _ {\text {o f f}} + \lambda_ {\text {s i z e}} L _ {\text {s i z e}} \tag {2} +$$ + +where $L_{off}$ and $L_{size}$ are center point offset and size regression losses following CenterNet [50], $L_{splg}$ is the modified focal loss of the SPLG module (in Sec. 3.2) and $L_{pgcl}$ + +is the loss of PGCL module (in Sec. 3.3). $\lambda_{pgcl},\lambda_{off},\lambda_{size}$ are the weight parameters of $L_{pgcl},L_{off},L_{size}$ losses, respectively. + +# 3.2. Similarity-based Pseudo Label Generating + +Under SIOD setup, we can obtain a labeled reference instance for each existing category in an image. To solve the annotation missing problem, we propose to recall the unlabeled instances according to the feature similarity between the labeled reference instances and the rest of unlabeled data. Let $C_I = \{c_1, c_2, \dots, c_N\}$ denotes the existing $N$ categories in current image $I$ . We can easily obtain the feature vector of each reference instance via Eq. (3). + +$$ +G _ {c _ {i}} = l _ {2} \left(\sum_ {y x} Y _ {y x c _ {i}} \hat {F} _ {y x}\right) \tag {3} +$$ + +where $l_{2}$ denotes the L2-normalization. Let $\hat{P_U} = \{\hat{p_i}\}$ unlabeled at position $\hat{p_i}\}$ denotes the unlabeled pixels in the feature map $F$ and $Q\in \mathbb{R}^{K\times D}$ denotes the feature vectors of unlabeled data, where $K = |\hat{P_U} |$ indicates the number of unlabeled pixels. We then attain the cosine similarity $S = QG^T$ between the reference instances and the rest of unlabeled data via a dot-product operation, where $S\in [0,1]^{K\times N}$ . According to the similarity matrix $S$ , we can construct a pseudo category heatmap $\widetilde{Y}\in [0,1]^{\hat{H}\times \hat{W}\times C}$ . For each position $\hat{p_i}$ , $S_{i}\in [0,1]^{1\times N}$ indicates the similarity between its feature and that of $\mathbf{N}$ existing reference instances. we then determine its pseudo class label as follows: + +$$ +c _ {n}, v = \operatorname {a r g m a x} _ {C _ {I}} \left(S _ {i}\right) +$$ + +$$ +\widetilde {Y} _ {\hat {p} _ {i} c _ {n}} = \left\{ \begin{array}{l l} v * \eta , & \text {i f} v > T _ {s i m} \\ 0, & \text {o t h e r w i s e} \end{array} \right. \tag {4} +$$ + +where $c_{n}$ and $v$ denotes the most similar category and corresponding similarity, respectively. $\eta$ and $T_{sim}$ are scale factor and similarity threshold, respectively. We then obtain a new target category heatmap $\bar{Y} = Y + \widetilde{Y}$ . Following [50], we compute the classification loss as follows: + +$$ +L _ {S P L G} = - \frac {1}{N} \sum_ {y x c} \left\{ \begin{array}{l} (1 - \hat {Y} _ {y x c}) ^ {\gamma} \log (\hat {Y} _ {y x c}), \bar {Y} _ {y x c} = 1 \\ (1 - \bar {Y} _ {y x c}) ^ {\alpha} (\hat {Y} _ {y x c}) ^ {\gamma} \\ \log (1 - \hat {Y} _ {y x c}) \end{array} , o t h e r w i s e \right. \tag {5} +$$ + +# 3.3. Pixel-level Group Contrastive Learning + +The SPLG recalls several latent instances based on feature similarity, but the inaccurate pseudo labels inevitably raise the error amplification issue which is led by the cross-entropy loss [38]. To overcome the drawbacks of class discrimination for self-training, we propose the Pixel-level Group Contrastive Learning (PGCL) to boost the tolerance + +to false pseudo labels by focusing on exploring the intrinsic structure of data. + +Different from standard contrastive learning which involves just a positive key in each contrast at image-level, PGCL introduces a group of positive keys with the same pseudo-class to contrast with all negative keys from other pseudo classes following [38]. Given the class prediction $\hat{Y} \in \mathbb{R}^{\hat{H} \times \hat{W} \times C}$ for an image, we first select top- $m$ instances (pixels) $\hat{P}_p = \{p_1, p_2, \dots, p_m\}$ as latent positive samples and maintain a mask $M \in \{0, 1\}^{N \times m}$ where $M_{ij}$ indicates whether the selected sample $\hat{p}_j$ belongs to the category $c_i$ according to its self-predicted label. We then gather corresponding feature vectors as encoded positive keys $f_k \in \mathbb{R}^{m \times D}$ . For each labeled reference instance of class $c_i$ , the encoded query $f_q^{c_i}$ is obtained by extracting its central feature and its according primary positive key is encoded as $f_{k0}^{c_i}$ using Eq. (3), which is augmented by weighted summing neighbor pixels following Gaussian distribution. Formally, the overall objective of the PGCL is summarized as: + +$$ +\begin{array}{l} L _ {p g c l} = - \frac {1}{m} \sum_ {i = 1} ^ {N} \sum_ {j = 1} ^ {m} M _ {i j} \log \frac {\exp \left(f _ {q} ^ {c _ {i}} \cdot f _ {k} ^ {j} / \tau\right)}{Z _ {i}} \\ - \frac {1}{N} \sum_ {i = 1} ^ {N} \log \frac {\exp \left(f _ {q} ^ {c _ {i}} \cdot f _ {k 0} ^ {c _ {i}} / \tau\right)}{Z _ {i}} \tag {6} \\ \end{array} +$$ + +$$ +Z _ {i} = \sum_ {j = 1} ^ {m} \exp \left(f _ {q} ^ {c _ {i}} \cdot f _ {k} ^ {j} / \tau\right) + \sum_ {z = 1} ^ {N} \exp \left(f _ {q} ^ {c _ {i}} \cdot f _ {k 0} ^ {c _ {z}} / \tau\right) +$$ + +where $\tau$ denotes the temperature scaling. Obviously, PGCL maximizes the similarity between the query $f_{q}^{c_{i}}$ and a corresponding group of positive keys $\{f_{k0}^{c_i},f_k^j |M_{ij} = 1\}$ for each category $c_{i}$ . Positive keys $f_{k0}^{c_i}$ and $\{f_k^j |M_{ij} = 1\}$ with self-predicted class label $c_{i}$ will compete with each others. Although there are some false predictions in the selected group, those false instances will be defeated in the above competition, because their encoded features tend to be less similar to the query compared with that of true ones. Therefore, the model will be updated mainly by the gradients of true self-predicted labels and tend to avoid being misled by false self-predicted labels. Due to the strong tolerance to false self-predicted labels, PGCL effectively minimizes the distance between unlabeled instances and reference instance of same class and therefore improves the predicted scores for unlabeled instances. + +# 3.4. Application to Other Detectors + +In this section, we introduce how to apply the DMiner to other detectors, e.g. two-stage anchor-based Faster-RCNN [28] and multi-scale anchor-free FCOS [36], on SIOD task. For Faster-RCNN, we only apply the DMiner to the Region Proposal Network (RPN), because the classifier + +![](images/700f773e73e60009259564557d3e0908428343b83122bb711d2fd911f8f6426b.jpg) +Figure 3. Illustration of Faster-RCNN equipped with DMiner. + +branch of RoI (Region of Interest) head is region-based while the DMiner is constructed on pixel-level features. Since the RPN is class-agnostic, we cannot obtain specific categories for each anchor and the discrimination ability of the feature $F_{c4}$ constrained by RPN is limited, which leads to many inaccurate pseudo labels. We therefore introduce a new class-wise classifier branch in parallel with the RPN and apply the DMiner to the new branch, as shown in the Fig. 3. To assign satisfactory pseudo labels for each anchor, we utilize the average pooling operation on the initial pseudo labels generated by the feature map $F_{p}$ with different kernel sizes (e.g. 1, 3, 5, 7, 9) according to the sizes of predefined anchors (e.g. 32, 64, 128, 256, 512) to automatically obtain corresponding pseudo labels for each anchor. + +For FCOS, we directly apply the DMiner to each feature level of FPN [20] structure in a similar way. Concretely, the DMiner in each feature level shares hyperparameters except to the number $m$ of selected positive samples in PGCL module, because the discrimination ability of feature reduces as the receptive filed being larger. Especially, the features from P6, P7 level have limited discrimination due to the large overlap between receptive fields of each pixel-level feature. In the practice, we only apply the DMiner at the first three level features and set the $m$ to [96, 64, 32]. + +# 4. Experiments + +# 4.1. Datasets and Evaluation Protocol + +Datasets. According to the definition of SIOD, we first construct a new dataset called Keep1-COCO2017-Train via randomly preserving one annotation for each existing category in each image from the training set of COCO2017 [21]. In this way, it reduces about $60\%$ instance annotations. We keep the validation set COCO2017-Val the same as usual for comparison with fully supervised object detection. + +Evaluation protocol. Since the official COCO evaluation protocol cannot distinguish the difference of detection results with different scoring distributions (refer to supple + +mental materials for more details), we propose a new Score-aware Detection Evaluation Protocol for measuring such ability. Given a ground truth bounding box $g$ of class $c$ and a predicted bounding box $d$ of class $c$ with score $s_d$ , we add a score constraint to official COCO matching rule and determine the match results as follows: + +$$ +M _ {t _ {i o u}} ^ {t _ {s}} (g, d, s _ {d}) = \left\{ \begin{array}{l} 1, I o U (g, d) > t _ {i o u} a n d s _ {d} > t _ {s} \\ 0, \quad o t h e r w i s e \end{array} \right. \tag {7} +$$ + +where $t_s \in \{0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9\}$ is the score threshold and $t_{iou}$ is the IoU threshold. For brevity, we denote $AP@S_i$ as the average precision over all IoU thresholds for score threshold $t_s = i/10$ . We additionally summarize a more comprehensive metric as follows: + +$$ +A P @ \mathbb {S} = \frac {1}{1 0} \sum_ {i = 0} ^ {9} A P @ \mathbb {S} _ {i} \tag {8} +$$ + +In this paper, we evaluate the detector with the proposed score-aware detection evaluation protocol and provide a more comprehensive comparison. We report the AP with different scores constraint $AP@S_i$ (e.g. $AP@S_1$ for $t_s = 0.1$ ). Note that the $AP@S_0$ is completely the same as the official COCO evaluation protocol. + +Implementation details. In this work, our experiments are mainly conducted with the CenterNet framework [50]. For CenterNet, we train on an input resolution of $512 \times 512$ . This yields an output resolution of $128 \times 128$ . Adam optimizer is utilized to optimize the network parameters. For CenterNet-Res18, we train with a batch-size of 114 (on 4 GPUs) and initial learning rate is 5e-4 for 140 epochs. For CenterNet-Res101, we train with a batch-size of 96 (on 8 GPUs) and initial learning rate is 3.75e-4 for 140 epochs. Both of them decay the learning rate with factor 0.1 at 90 and 120 epochs. As for Faster-RCNN-Res50-C4, we conduct the experiments with the detector2 framework [39]. FCOS-Res50-FPN is implemented with the official code of [36]. All experiments are conducted with the environment that Tesla V100, Pytorch 1.7.0 and CUDA 10.1. As for hyper-parameters, $\eta$ and $T_{sim}$ are set to 1.0 and 0.6 by default, respectively. And $\lambda_{pgcl}, \lambda_{off}, \lambda_{size}$ are set to 0.1, 1.0, 0.1, respectively. + +# 4.2. Main Results + +We first examine the effect on CenterNet-Res18 from FSOD to SIOD with the proposed score-aware detection evaluation protocol. Although the annotations have been reduced about $60\%$ , $AP@S_0$ just decreases by 3.0, which shows that the detector still has competitive localization ability under SIOD setup. However, the performance gap increases obviously (-5.5) on $AP@S_3$ , which explains the phenomenon in Fig. 4(b). Compared $AP@S_3$ with $AP@S_0$ , + +
DetectorTaskAP(%)
@S@S0@S3@S5@S7@S9
CenterNet-Res18 [50]FSOD17.328.124.017.18.81.5
SIOD (base)13.925.118.512.36.11.4
SIOD (DMiner)16.8 (+2.9)26.6 (+1.5)22.4 (+3.9)17.1 (+4.8)9.4 (+3.3)2.1 (+0.7)
CenterNet-Res101 [50]FSOD22.634.230.323.613.63.1
SIOD (base)15.127.820.913.36.11.1
SIOD (DMiner)19.7 (+4.6)29.8 (+2.0)26 (+5.1)20.5 (+7.2)12.2 (+6.1)2.9 (+1.8)
Faster-RCNN-Res50-C4 [28]FSOD32.835.934.733.231.226.1
SIOD (base)27.031.629.427.324.618.9
SIOD (DMiner)29.2 (+2.2)31.9 (+0.3)30.6 (+1.2)29.5 (+2.2)27.8 (+3.2)23.9 (+5.0)
FCOS-Res50-FPN [36]FSOD27.138.638.333.516.00.1
SIOD (base)22.033.232.125.611.30
SIOD (DMiner)23.6 (+1.6)33.9 (+0.7)33.3 (+1.2)28.6 (+3.0)14.1 (+2.8)0
+ +large gap indicates that the scores of a large number of detected objects are between 0 and 0.3, which are determined as false recall when the score threshold is set to 0.3. A main reason is that most of unlabeled instances are treated as background during the training. To refine the incorrect supervision, the proposed SPLG mines the latent positive instances based on feature similarity. In addition, the PGCL adopts the contrastive learning to boost the tolerance to false pseudo labels. Equipped with two modules, CenterNet-Res18-SIOD (DMiner) improves the detection performances across different score thresholds consistently as shown in Table 1. Compared with SIOD (base), our method improves by 1.5 and 3.9 at $AP@S_0$ and $AP@S_3$ , respectively. The former indicates that our method recalls more instances while the latter indicates that our method raises the scores of those low-quality detection (objects with scores less than 0.3) up to 0.3. Note that the gap between SIOD and FSOD is narrowed to 0.5 on the more comprehensive metric $AP@S$ . Other than verifying the effectiveness of DMiner with the small network (Res18), we further validate our method with a large backbone (Res101). As shown in Table 1 (CenterNet-Res101), large improvements are obtained consistently. To validate the effectiveness on various detection frameworks, we conduct experiments with detector Faster-RCNN and FCOS. Both of them are confronted with incorrect background supervision and have large performance degradation. After equipped with the proposed DMiner, the performances are improved across different score thresholds. + +From Table 1, we also observe that as the backbone network gets larger (from Res18 to Res101), the performance gaps between detectors on FSOD and SIOD (base) settings increase. In our opinion, as the model gets larger, + +Table 1. Detection results on COCO2017-Val for single instance annotated object detection (SIOD) and fully supervised object detection (FSOD) task. SIOD (base) denotes that we directly apply according detector to SIOD task and SIOD (DMiner) denotes that the detector is equipped with DMiner. + +
MethodTypeAP(%)
@S@S0@S3@S5
BaseSSOD14.423.419.514.3
BaseSAOD14.025.018.612.7
BaseSIOD13.925.118.512.3
CSD [14]SSOD15.124.020.315.1
TS [31]SSOD15.825.221.415.8
Comining [37]SAOD14.825.018.913.9
DMinerSIOD16.826.622.417.1
+ +Table 2. We implement different methods from semi-supervised object detection(SSOD) and sparsely annotated object detection(SAOD) with CenterNet-Res18 and evaluate them on COCO2017-Val for fair comparison. + +more labeled data is needed to learn optimal parameters. Considering the computation cost, the proposed method only introduces extra cost in the training phase. Specifically, it requires about $1.4 \times$ time for learning and additional $3 \times$ memory compared with the baseline method. + +# 4.3. Comparison with Other Methods + +To fairly compare with other methods proposed for SSOD (e.g. CSD [14]) or SAOD (Comining [37]), we implement them with CenterNet-Res18. Specifically, we first construct a new training set for SSOD methods via randomly preserving a number of completely annotated images and erasing all annotations for the rest images from COCO2017-Train, which has equivalent instance annotations to Keep1-COCO2017-Train. As shown in Table 2, Base denotes directly training the detector on according training set. Since SIOD reduces the inter-image discrepancy to intra-image discrepancy, the baseline of SIOD is ob + +
BackboneModuleAP(%)
SPLGPGCL@S@S0@S3@S5
Res18✓13.925.118.512.3
15.826.421.515.7
✓16.225.822.316.6
✓✓16.826.622.417.1
Res101✓15.127.820.913.3
18.53025.218.6
✓18.929.225.820.1
✓✓19.729.82620.5
+ +viously superior to SSOD at $AP@S_0$ , which demonstrates that the proposed annotated manner retransmits richer information. Furthermore, the proposed method outperforms CSD and TS (Teacher-Student) by a large margin with same number of instance annotations. As for Comining, it is very sensitive to score threshold for selecting pseudo positive samples and tends to fall into collapse. Therefore, the improvement brought by Comining is very limited. + +# 4.4. Ablations Experiments + +Effectiveness of SPLG and PGCL. To validate the effectiveness of the proposed SPLG and PGCL, we equip the basic detector (CenterNet) with them for training respectively. As shown in Table 3, both SPLG and PGCL boost the performance independently. Specifically, SPLG tends to improve the $AP@S_0$ while PGCL improves the $AP@S$ greatly, which means that SPLG is beneficial to mining more instances and PGCL tends to improve the scores of latent instances. After integrating them, the detector achieves a higher performance. + +Hyper-parameters Selection for SPLG. Note that the accuracy of pseudo labels is very sensitive to the $T_{sim}$ . A higher score threshold will lead to low recall rate of positive samples and a lower score threshold will lead to generating a large number of false pseudo class labels. As shown in Table 4, although it achieves the best performance with $T_{sim} = 0.5$ , it actually almost determines all candidate positions as foregrounds, which is unreasonable. Knowing that PGCL module will maximize the similarity between positive pairs, we finally set the $T_{sim}$ to 0.6 for better performance in combination with PGCL by default. As for the scaling factor $\eta$ , large value tends to result in model collapse and no scaling is the best choice. + +Hyper-parameters Selection for PGCL. We first explore the effect of top- $m$ in PGCL. Since we determine the top- $m$ positions as foregrounds, many backgrounds will + +Table 3. Effectiveness of SPLG and PGCL for SIOD task on COCO2017-Val. + +
Tsim0.50.550.60.650.7
AP@S16.21615.815.515.4
AP@S026.826.526.42626.1
η0.80.91.01.11.2
AP@S15.415.815.81.60
AP@S026.126.226.44.10
+ +Table 4. Impact of different hyper-parameters in SPLG. + +
m6496128160192
AP@S15.816.316.216.116
AP@S025.725.725.825.525.3
τ0.010.040.070.10.13
AP@S016.116.21615.7
AP@S0025.825.825.625.2
λpgcl0.050.10.150.20.25
AP@S16.116.216.216.215.9
AP@S025.925.825.525.625.4
+ +Table 5. Impact of different hyper-parameters in PGCL. + +be recognized as foregrounds with large $m$ while few of foregrounds are recalled with small $m$ . To better trade-off this contradiction, we explore different values from 64 to 192 and find that 128 is relatively suitable choice. As for the $\tau$ in Eq. (6), the best performance is achieved when it is set to 0.07, a value usually selected in Contrastive Learning by default. To better balance the effect of $L_{pgcl}$ and other losses, we try to opt different values for experiments. As shown in Table 5, the detector achieves satisfactory performance when $\lambda_{pgcl}$ is set to 0.1. + +Advantage of SIOD Task. Note that SIOD task is very similar to the SAOD task. We therefore conduct rigorous experiments for comparison. There are three different annotation sets (e.g. easy, hard and extreme) for SAOD task. Specifically, the hard set keeps $50\%$ instance annotations from COCO2017-Train while only $40\%$ instance annotations are preserved in SIOD task. As shown in Table 6, the method Comining further achieves better performance with the annotations from SIOD task compared with that of SAOD task, although less instance annotations are available. Such phenomenon suggests that the annotated manner of SIOD has great potential to achieve better performance with lower annotated cost. + +# 4.5. Visualization + +To clearly reveal the effectiveness of our method, we visualize the detection results of different methods under the proposed SIOD setup. As shown in Fig. 4, column (a) shows the detection results of CenterNet-Res18 trained with + +![](images/f81fa7cbd09794561fca803f41d1f5aaef067d73a46e6688637ec3a3827ce306.jpg) +(a) FSOD + +![](images/0e835de200b6eea6fc3ea18d74f623c98655a4d2f942f2216547e3ac2d83cbd9.jpg) +(b) SIOD (base) + +![](images/db03162f6dda2fbd7c4b88d1ca2dae5c2462721fd9962958f67c61237369c50c.jpg) +(c) SSOD-CSD + +![](images/24faa54292b7ac0c3209bc75e47dab808e459425ce9df05650c6469968f19a81.jpg) +(d) SSOD-TS +Figure 4. Visualization of different methods with CenterNet-Res18 with score threshold 0.3, (a)FSOD, (b) SIOD(base), (c) SSOD-CSD, (d) SSOD-TS, (e) Ours. + +![](images/760c18331a262805cf98ba7383846e785921397f3e6d5bd711cfa5b1d7b40edf.jpg) +(e) Ours + +
MethodTypeAP(%)
@S@S0@S3@S5
Comining[37]SAOD19.431.626.816.7
Comining[37]SIOD23.632.428.523.6
+ +Table 6. Experiments are conducted with RetinaNet-Res50 on two different annotation sets. Note that SAOD here adopts the hard sparse annotation sets [37] for training. + +fully annotated data, where most of instances are located and classified accurately. However, the detection results of the detector directly trained for SIOD task are very unsatisfactory as shown in column (b). A main reason results in such phenomenon is that the incorrect background supervision confuses the detector during the training. Therefore, most of instances are detected with very low scores and are filtered when visualizing with $t_s = 0.3$ . Additionally, we also visualize two semi-supervised methods, column (c) and (d). From the first row, it is observed that they fail to locate some skis in the pictures. After armed with SPLG and PGCL of DMiner, most of salient instances are accurately detected with relatively higher scores compared with SIOD (base) as shown in column (e). Compared with DMiner, the locating of method CSD is relatively imperfect. As shown in bottom picture, the boy and the skateboard are detected partially by the method CSD. + +# 5. Conclusion + +In this study, we investigate a new task, termed Single Instance annotated Object Detection(SIOD). Under the SIOD setup, we propose a simple yet effective framework, termed + +Dual-Mining (DMiner), to mine latent instances based on feature similarity by the proposed SPLG and further boost the tolerance to false pseudo labels by the proposed PGCL. The extensive experiments verify the superiority of the SIOD setup and the proposed DMiner effectively reduces the gap from the fully supervised object detection. As the first and solid baseline under SIOD setup, DMiner provides a fresh insight to the challenging object detection task under imperfect data. + +Limitations. Extensive experiments show that the SIOD task provides a promising way to trade off the annotation cost and detection accuracy, but the annotation cost of SIOD is still not to be ignored. It is worth to explore annotating only one instance in an image in the future work. Although we have witnessed the effectiveness of the proposed DMiner framework for SIOD task, the proposed approach remains challenging when applied to anchor-based architectures (e.g. Faster RCNN). Since the SPLG and PGCL modules are constructed on pixel-level features, it is difficult to assign accurate pseudo labels for anchors that share the same feature representation. In the future, we will update the framework to better adapt to different architectures. + +# 6. Acknowledgements + +This work was supported partially by the NSFC(U21A20471,U1911401,U1811461), Guangdong NSF Project (No. 2020B1515120085, 2018B030312002), and the Key-Area Research and Development Program of Guangzhou (202007030004). + +# References + +[1] Philip Bachman, Ouais Alsharif, and Doina Precup. Learning with pseudo-ensembles. Advances in neural information processing systems, 27:3365-3373, 2014. 1, 2 +[2] Hakan Bilen and Andrea Vedaldi. Weakly supervised deep detection networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2846-2854, 2016. 1, 2 +[3] Alexey Bochkovskiy, Chien-Yao Wang, and Hong-Yuan Mark Liao. Yolov4: Optimal speed and accuracy of object detection. arXiv preprint arXiv:2004.10934, 2020. 1, 2 +[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. 2 +[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 +[6] Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020. 2 +[7] Thomas G Dietterich, Richard H Lathrop, and Tomás Lozano-Pérez. Solving the multiple instance problem with axis-parallel rectangles. Artificial intelligence, 89(1-2):31-71, 1997. 2 +[8] 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 +[9] 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 +[10] Wei Gao, Fang Wan, Xingjia Pan, Zhiliang Peng, Qi Tian, Zhenjun Han, Bolei Zhou, and Qixiang Ye Ts-cam. Token semantic coupled attention map for weakly supervised object localization. arXiv preprint arXiv:2103.14862, 9, 2021. 2 +[11] Jianyuan Guo, Kai Han, Yunhe Wang, Han Wu, Xinghao Chen, Chunjing Xu, and Chang Xu. Distilling object detectors via decoupled features. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2154-2164, 2021. 2 +[12] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9729-9738, 2020. 2 +[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 1 + +[14] Jisoo Jeong, Seungeui Lee, Jeesoo Kim, and Nojun Kwak. Consistency-based semi-supervised learning for object detection. Advances in neural information processing systems, 32:10759-10768, 2019. 1, 2, 6 +[15] Jisoo Jeong, Vikas Verma, Minsung Hyun, Juho Kannala, and Nojun Kwak. Interpolation-based semi-supervised learning for object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11602-11611, 2021. 1, 2 +[16] 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. 1 +[17] Chia-Wen Kuo, Chih-Yao Ma, Jia-Bin Huang, and Zsolt Kira. Featmatch: Feature-based augmentation for semi-supervised learning. In European Conference on Computer Vision, pages 479-495. Springer, 2020. 1, 2 +[18] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In Proceedings of the European conference on computer vision (ECCV), pages 734-750, 2018. 2, 3 +[19] Chenhao Lin, Siwen Wang, Dongqi Xu, Yu Lu, and Wayne Zhang. Object instance mining for weakly supervised object detection. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 11482-11489, 2020. 1, 2 +[20] Tsung-Yi Lin, Piotr Dollár, 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. 1, 2, 5 +[21] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014. 2, 5 +[22] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C Berg. Ssd: Single shot multibox detector. In European conference on computer vision, pages 21-37. Springer, 2016. 1, 2 +[23] 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 +[24] Chengcheng Ma, Xingjia Pan, Qixiang Ye, Fan Tang, Yunhang Shen, Ke Yan, and Changsheng Xu. Mitigating the mutual error amplification for semi-supervised object detection. arXiv preprint arXiv:2201.10734, 2022. 2 +[25] Xingjia Pan, Yingguo Gao, Zhiwen Lin, Fan Tang, Weiming Dong, Haolei Yuan, Feiyue Huang, and Changsheng Xu. Unveiling the potential of structure preserving for weakly supervised object localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11642-11651, 2021. 2 +[26] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 779-788, 2016. 1 + +[27] Joseph Redmon and Ali Farhadi. Yolo9000: better, faster, stronger. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7263-7271, 2017. 1, 2 +[28] 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. 1, 2, 4, 6 +[29] Yunhang Shen, Rongrong Ji, Zhiwei Chen, Yongjian Wu, and Feiyue Huang. Uwsod: Toward fully-supervised-level capacity weakly supervised object detection. Advances in Neural Information Processing Systems, 33, 2020. 1, 2 +[30] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 1 +[31] Kihyuk Sohn, Zizhao Zhang, Chun-Liang Li, Han Zhang, Chen-Yu Lee, and Tomas Pfister. A simple semi-supervised learning framework for object detection. arXiv preprint arXiv:2005.04757, 2020. 6 +[32] Peize Sun, Rufeng Zhang, Yi Jiang, Tao Kong, Chenfeng Xu, Wei Zhan, Masayoshi Tomizuka, Lei Li, Zehuan Yuan, Changhu Wang, et al. Sparse r-cnn: End-to-end object detection with learnable proposals. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14454-14463, 2021. 2 +[33] 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 +[34] 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 2843-2851, 2017. 1, 2 +[35] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pages 1195–1204, 2017. 1, 2 +[36] 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. 2, 4, 5, 6 +[37] Tiancai Wang, Tong Yang, Jiale Cao, and Xiangyu Zhang. Co-mining: Self-supervised learning for sparsely annotated object detection. arXiv preprint arXiv:2012.01950, 2020. 1, 2, 6, 8 +[38] Ximei Wang, Jinghan Gao, Mingsheng Long, and Jianmin Wang. Self-tuning for data-efficient deep learning. In International Conference on Machine Learning, pages 10738-10748. PMLR, 2021. 2, 3, 4 +[39] Yuxin Wu, Alexander Kirillov, Francisco Massa, Wan-Yen Lo, and Ross Girshick. Detector2. https://github.com/facebookresearch/detectron2, 2019.5 +[40] Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3733-3742, 2018. 2 + +[41] Enze Xie, Jian Ding, Wenhai Wang, Xiaohang Zhan, Hang Xu, Peize Sun, Zhenguo Li, and Ping Luo. Detco: Unsupervised contrastive learning for object detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8392-8401, 2021. 2 +[42] Zhenda Xie, Yutong Lin, Zheng Zhang, Yue Cao, Stephen Lin, and Han Hu. Propagate yourself: Exploring pixel-level consistency for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 16684-16693, 2021. 2 +[43] Mengmeng Xu, Yancheng Bai, Bernard Ghanem, Boxiao Liu, Yan Gao, Nan Guo, Xiaochun Ye, Fang Wan, Haihang You, Dongrui Fan, et al. Missing labels in object detection. In CVPR Workshops, volume 3, 2019. 1, 2 +[44] Ze Yang, Shaohui Liu, Han Hu, Liwei Wang, and Stephen Lin. Reppoints: Point set representation for object detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9657-9666, 2019. 2 +[45] Han Zhang, Fangyi Chen, Zhiqiang Shen, Qiqi Hao, Chenchen Zhu, and Marios Savvides. Solving missing-annotation object detection with background recalibration loss. In ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1888-1892. IEEE, 2020. 1, 2 +[46] Haoyang Zhang, Ying Wang, Feras Dayoub, and Niko Sunderhauf. Varifocalnet: An iou-aware dense object detector. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8514-8523, 2021. 2 +[47] 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 conference on computer vision and pattern recognition, pages 1325-1334, 2018. 2 +[48] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2921-2929, 2016. 2 +[49] 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. 1 +[50] Xingyi Zhou, Dequan Wang, and Philipp Krahenbuhl. Objects as points. arXiv preprint arXiv:1904.07850, 2019. 1, 2, 3, 4, 5, 6 +[51] Rui Zhu, Bingchen Zhao, Jingen Liu, Zhenglong Sun, and Chang Wen Chen. Improving contrastive learning by visualizing feature transformation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 10306-10315, 2021. 2 +[52] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. arXiv preprint arXiv:2010.04159, 2020. 2 \ No newline at end of file diff --git a/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/images.zip b/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..447c5958685a763ad771b3d377c7bc9833fe0139 --- /dev/null +++ b/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bcf8956781d3ccf16255f77baae8cb581b82adae491f7563c9b5c12d2f32fb6 +size 669589 diff --git a/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/layout.json b/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a5a165cc1aad18786002659437c23d556d23941c --- /dev/null +++ b/siodsingleinstanceannotatedpercategoryperimageforobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f33f420e8dae23476393de1408b9d4c796d16abbc3287089c7ce4a0fe12d225d +size 410144 diff --git a/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/470c7a0e-9f39-45b0-ae26-eb4c88c6408d_content_list.json b/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/470c7a0e-9f39-45b0-ae26-eb4c88c6408d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e824d40e9c8afa311943c93146b43a0706fbccde --- /dev/null +++ b/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/470c7a0e-9f39-45b0-ae26-eb4c88c6408d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4d612cb3a5c7d53df4122ffc8a13792b95c8410638f1de2fe4c0d1c41ff1ee3 +size 94764 diff --git a/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/470c7a0e-9f39-45b0-ae26-eb4c88c6408d_model.json b/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/470c7a0e-9f39-45b0-ae26-eb4c88c6408d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..99feab494dac99343b5acd01fe1760a81466aa8d --- /dev/null +++ b/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/470c7a0e-9f39-45b0-ae26-eb4c88c6408d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b2e3af5b6f2dff317aa8a7b612d4c2f7e25d24f9bc5d6b4622e43e4868dbfe7 +size 118962 diff --git a/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/470c7a0e-9f39-45b0-ae26-eb4c88c6408d_origin.pdf b/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/470c7a0e-9f39-45b0-ae26-eb4c88c6408d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..75d9dc869cabbaf23d957075af4f0acda76c599b --- /dev/null +++ b/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/470c7a0e-9f39-45b0-ae26-eb4c88c6408d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5842f262622ec5a21b91d188c220d3744da2eba20cc7b2dfaebcfac2c00b9668 +size 1729874 diff --git a/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/full.md b/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e406da4616f8fb9e4a38113069e49143097baaf3 --- /dev/null +++ b/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/full.md @@ -0,0 +1,371 @@ +# SLIC: Self-Supervised Learning with Iterative Clustering for Human Action Videos + +Salar Hosseini Khorasgani* Yuxuan Chen* Florian Shkurti + +University of Toronto + +{salar.hosseinikhorasgani, yuxuansherry.chen}@mail.utoronto.ca, florian@cs.toronto.edu + +# Abstract + +Self-supervised methods have significantly closed the gap with end-to-end supervised learning for image classification [13, 24]. In the case of human action videos, however, where both appearance and motion are significant factors of variation, this gap remains significant [28, 58]. One of the key reasons for this is that sampling pairs of similar video clips, a required step for many self-supervised contrastive learning methods, is currently done conservatively to avoid false positives. A typical assumption is that similar clips only occur temporally close within a single video, leading to insufficient examples of motion similarity. To mitigate this, we propose SLIC, a clustering-based self-supervised contrastive learning method for human action videos. Our key contribution is that we improve upon the traditional intra-video positive sampling by using iterative clustering to group similar video instances. This enables our method to leverage pseudo-labels from the cluster assignments to sample harder positives and negatives. SLIC outperforms state-of-the-art video retrieval baselines by $+15.4\%$ on top-1 recall on UCF101 and by $+5.7\%$ when directly transferred to HMDB51. With end-to-end finetuning for action classification, SLIC achieves $83.2\%$ top-1 accuracy $(+0.8\%)$ on UCF101 and $54.5\%$ on HMDB51 $(+1.6\%)$ . SLIC is also competitive with the state-of-the-art in action classification after self-supervised pretraining on Kinetics400. + +# 1. Introduction + +Self-supervision tasks have emerged as effective pretraining methods for image classification, retrieval, and other downstream tasks. They have also been shown to outperform end-to-end supervised learning in a number of settings [13, 34]. A key assumption in many self-supervised methods is the ability to do instance discrimination, by sampling or generating similar and dissimilar data, given a query. While this is a reasonable assumption for training image rep + +![](images/c036420899238c65c75028fb2f13436348a416277ae9005112617a22b5448097.jpg) +punch + +![](images/27f1d2c13c3c3e1aeecd9edacc1aba5dbe01f19819ec3a07f0d9568950de0752.jpg) +Bowling + +![](images/7b7a7832e2320bdda13ffe6450a211feac8fd546c18033cdb49e2828c888bce1.jpg) +BasketballDunk + +![](images/648b67c929ba50e4305eee71968f1f9e654af1a58ff1d71766b8802b4b4e717f.jpg) +SkateBoarding + +![](images/bbf23179fe97abb8fa2f321c9a40d4089ae5eed63bc3a152dcf3b0ffcedbbfc6.jpg) +Diving + +![](images/ad361273312256f918cefea3b048c5aa7c5d19673a652bd56354e8f539932394.jpg) +Kayaking +Figure 1. Nearest neighbor retrieval results of SLIC after pretraining on UCF101. The leftmost column is the query video from the UCF101 test set. On the right are the top 5 nearest neighbours from the training set in UCF101. Incorrect retrieval results are highlighted in red. + +![](images/552bbaa62eaab3666cac25ce705456e946bda476c2120d3eb24f2a43f649b8e9.jpg) +Query +punch + +![](images/a155aa32f18fec9c51bdab1bcec96fa8b2ada67c29812487414525481fbfeda6.jpg) +Bowling + +![](images/d501e3c603dfa09a36213f7210596f087cd13a94acf5e6b34e2533b89474550b.jpg) +BasketballDunk + +![](images/575888fdafc65fd63aedf2932a1b597ebc30f1d00d1c7d549228ad3082fb26a7.jpg) +SkateBoarding + +![](images/bfe43d4951626b51e252fe2e7f338e28ea662b5c365bf13e76092c6fc11f34d5.jpg) +Diving + +![](images/56222937a326c7b2bc97605fa47c263c2f38640eae155166838feb94d45842f0.jpg) +Kayaking + +![](images/266bd8a15be068b9ce4a4b93f7838ec211e001a16514e8d5109daf75bc5f7f97.jpg) +Top 5 Nearest Neighbours +punch + +![](images/123a88bb2a3e2ef0544c4a8c68ca31ce965aeb2f3dd7f7118a01eb2ce8cb8028.jpg) +# +punch + +![](images/8c5fcc5777d133ac7c4fa61f9ef698fb9cd0c7467e68fa1ad4a018552e57024d.jpg) + +![](images/d9ea37a43eac163f29fb8d403f9ef15cbff5fa4ca0eea2b93f0906d6ad06c9fe.jpg) +Bowling + +![](images/c56ac2db3fa9fcd2c21e552f77ed965a2e6b7b0c06c6b95800fd91d223dd4c28.jpg) +BasketballDunk + +![](images/5b177d3d32b7b4eab1a59e6ad69369cec26390f81c66bcdb1b99f83e17871eb2.jpg) +SkateBoarding + +![](images/a044c32924ac648666cb0534586d37ea02db308e397b993aad3e796d5439f4d3.jpg) +Diving + +![](images/fcf6eaf93abd779001b4022bb99291e539c40822c14e4c5e2c20fd2ac81c2aad.jpg) +Rowing + +![](images/186972a025660a2000751e88fd7f6526483f9db90b4f4f805801456c95e61d6d.jpg) +punch + +![](images/595cf2524f70d7228295ff7db09d3a3579c10b4ebbfae523a75a6284c783c0c6.jpg) +Bowling + +![](images/21f57714dd34f29b0973cfa07b718d7aef9596a73d4cc429f9da611af67b544c.jpg) +BasketballDunk + +![](images/42d22ed429abee1889fa485181f24f0f36d9942ff38e157a90885444b1831ef5.jpg) +SkateBoarding + +![](images/0c7adf810c86840d6b67a5ce5a68ca83ee27960c1b6efe4cab2c7fbdcb30029c.jpg) +Diving + +![](images/e71360f69d8e31854926515617902c12597a6ff87c530057d043ba89f60afb44.jpg) +Rowing + +resentations, for example by generating similar data through augmentations and dissimilar data by random sampling, it becomes much more challenging in the case of video representations as we need to account for motion-based as well as appearance-based similarities. + +Different clips might have dissimilar appearances and the same motion (e.g. running at different locations), or similar appearances but different motions (e.g. playing cricket or golf with a green field as the background). In instance discrimination we sample positive video instances conservatively, typically by assuming that they only occur temporally close within a single video, and sample negatives randomly from different videos. Even though some methods attempted to improve upon instance discrimination by sampling harder positives using additional views, self-supervised pretraining of video representations is still not as effective as fully supervised pretraining (when evaluating on downstream clas + +sification using only visual inputs) [28, 52, 58]. + +To mitigate this, we propose SLIC, a self-supervised learning method for videos. SLIC alternates between periodically clustering video representations to produce pseudo-labels, and using those pseudo-labels to inform the sampling of positive and negative pairs to update the video representations, by minimizing a triplet margin loss. SLIC also combines iterative clustering with multi-view encoding and a temporal discrimination loss to learn view-invariant embeddings and fine-grained motion features, in order to distinguish the additional aspect of similarity that arises from the temporal dimension. Figure 2 shows an overview of our method. + +Our main contributions are twofold. First, we show that iterative clustering significantly improves upon traditional instance discrimination in self-supervised learning for video representation. While this has already been established for image representations [8, 9], it has not been examined carefully for videos. Our method is the first to leverage efficient iterative clustering for video representation, specifically for sampling harder positives and negatives for contrastive learning. Second, we integrate iterative clustering with multi-view encoding and a temporal discrimination loss to sample harder positives and negatives during pretraining. We demonstrate that the interaction of these components, which has not been carefully examined by previous methods, is beneficial. + +Our experiments show that SLIC achieves state-of-the-art results on video retrieval $(+15.4\%)$ improvement on top-1 recall on UCF101 and $+5.7\%$ on HMDB51 respectively, as shown in Table 1), and action classification when pretrained on UCF101. When finetuning end-to-end for action classification, we observe significant gains from pretraining instead of using a random initialization of weights (about $+24\%$ on top-1 accuracy on both UCF101 and HMDB51, as shown in Table 2). We demonstrate through additional experiments that all three components (i.e. iterative clustering, multi-view encoding, and temporal discrimination loss) complement each other, and result in larger performance improvements when combined. We evaluate the individual contribution from each component in the ablation studies, and identify that iterative clustering and multi-view encoding are the main contributing factors in SLIC (shown in Table 3). + +# 2. Related work + +Syntax Tasks and Losses for Self-Supervision: Several pretext tasks have been used in the past to provide training signals for image-based self-supervision, including predicting the position of an image patch relative to the first [17], solving jigsaw puzzles with shuffled image patches [40], performing colorization [18, 54, 65], inpainting of missing pixels [42], or predicting image rotations [23]. In the case of video data, these tasks can be extended to include predicting the direction of time in the shuffled frames of a video [57], and predicting the playback rate of the video [6, 56, 62]. Our + +proposed method does not rely on any of these pretext tasks. + +Many of the tasks mentioned above were superseded by contrastive learning approaches, using the triplet loss [45], multiclass N-pairs loss [49], and variants of noise contrastive estimation [25, 26, 31, 41, 44, 53, 61], where the task is to discriminate between noisy and observed data. In particular, [26, 44] attempt to recurrently predict the representation of future frames using previous frames, then train the network to contrast the predicted representation against the ground truth representation and a pool of distractors. Also, [46] uses a triplet loss to attract images from multiple videos concurrently recording different viewpoints of the same observation. In addition, [24] shows that negatives are not needed to achieve comparable performance with self-supervised contrastive methods in image classification. While we experimented with contrastive losses [13, 14, 28, 53], we observed lower performance on video retrieval accuracy with iterative clustering, so our method relies on two triplet losses instead. + +Clustering-based Self-Supervision: Using clustering as part of the pretraining process in self-supervision has been examined in multiple prior works. For example, ClusterFit [60] clusters the features computed by a pretrained CNN using K-means and then trains a new network using the resulting cluster assignments as pseudo-labels, showing notable improvements in transfer tasks. Our method differs in two ways: (a) we do not rely on a pretrained CNN to obtain features for clustering and instead use iterative clustering steps, which Fig. 3 shows to reduce false positives, and (b) we do not rely on K-means and thus we do not need to pre-specified K. + +DeepCluster [8, 9] showed that the idea of using iterative clustering through K-means brings significant improvements in large-scale image classification, while our work addresses self-supervised activity recognition and retrieval, instead. Our idea is also similar to Prototypical Contrastive Learning (PCL) [37], which learns cluster prototypes and optimizes the InfoNCE loss [53] in an Expectation Maximization loop. PCL differs from our work in that it addresses image classification only, and uses a different loss for contrastive learning than what we use here. It is worth mentioning here that [32] presents a neural clustering method that does not compute cluster centers and thus does not require a pre-defined distance metric or number of clusters. Similarly, [10, 63] optimize clustering using an optimal transport solver, and a contrastive learning objective, but only address image classification and require a known number of labels, while our method does not. Our method also shares similarities with [47] which clusters face representations, however there is again the difference that we do not cluster the features from any pretrained networks and we progressively update the features used for clustering. + +Multimodal and Multiview Self-Supervision: Multiple modalities for self-supervision have been used as different + +![](images/79f651d8a1098578501da7ca8e5d48e04bcb4ce50caa4f963cb0f389b44bfbcb.jpg) +Figure 2. Overview of the proposed self-supervised learning with iterative clustering framework (SLIC). We extract features using a deep 3D CNN and perform clustering every $k$ epochs in the feature space to obtain cluster assignments. The cluster assignments are used as pseudo labels to sample positives and negatives for triplet learning. There is a fixed probability of replacing the positive (RGB view) with its corresponding optical flow view. + +views of the data. For example audio and video [2-5,35,55], or video, audio and text [1]. In particular, [3,5] rely on both audio and visual inputs to produce clustering assignments for cross-entropy classification (pre-specified number of clusters). In contrast, our method only uses visual inputs. + +Co-training based on RGB videos and optical flow was examined in CoCLR [28], which is one of the best-performing methods for video representation. [44] also adopts a multiview training scheme similar to that of CoCLR [28] by ensuring that the embeddings of different views such as flow, segmentation masks, and poses are consistent with respect to their distances between the same clips. + +Action Recognition from Video: The main approaches for supervised learning for video action recognition rely on 3D-CNN architectures [21, 30, 52] that assume either single-stream networks [20, 52, 58] or multi-stream networks (e.g. separate streams for RGB and optical flow inputs) [16, 21, 22, 48, 66]. Our method belongs in the former category since we use one shared encoder network to process both RGB and optical flow inputs. + +# 3. Method + +Our goal is to learn feature representations from videos in a self-supervised manner. We propose an iterative clustering based method for video representation learning. The core elements of the proposed framework consist of the following: i) performing gradient updates using a triplet margin loss, and (ii) acquiring pseudo-labels from the cluster assignments to sample triplets. We incorporate two loss functions to optimize the encoder: an instance-based triplet loss and a temporal discrimination loss. Furthermore, we encourage the clustering to discover motion-based similarities by incorporating multi-view encoding of the RGB and optical flow + +views (using a single encoder). The pseudo code is presented in Algorithm 1 in Appendix Section D. + +# 3.1. Iterative Clustering + +To generate pseudo labels for the training set, we adopt the FINCH [39] algorithm to obtain pseudo-labels from clustering the video embeddings. FINCH discovers groupings in the data by linking the first neighbor relations of each sample, and hence does not require any prior knowledge of the data distribution. FINCH is more suitable for our task compared to other clustering methods such as K-means and DBSCAN [19] as it does not involve any hyper-parameter tuning or prior specification of the number of clusters, and it is considerably faster when handling large datasets. + +FINCH computes the first neighbor $k_{i}^{1}$ for each video instance $x_{i}$ in the feature space using the cosine distance metric. For instance, $k_{i}^{1} = j$ means that $x_{j}$ is the first neighbor of $x_{i}$ . It then generates an adjacency link matrix $A(i,j)$ via Equation 1. + +$$ +A (i, j) = \left\{ \begin{array}{c} 1, \text {i f} j = \kappa_ {i} ^ {1} \text {o r} k _ {j} ^ {1} = i \text {o r} \kappa_ {i} ^ {1} = \kappa_ {j} ^ {1} \\ 0, \text {o t h e r w i s e} \end{array} \right. \tag {1} +$$ + +The adjacency matrix links each video instance $x_{i}$ to its first neighbors via $j = \kappa_{i}^{1}$ , enforces symmetry through $i = \kappa_{j}^{1}$ , and links video instances that share a common first neighbor with $\kappa_{i}^{1} = \kappa_{j}^{1}$ . Clustering is performed by recursively merging the connected components obtained from the adjacency matrix $A(i,j)$ in a hierarchical fashion. The output of the FINCH clustering algorithm is a small hierarchy of partitions that capture groupings in the underlying data structure at different levels of granularity, where each successive partition is a superset of the preceding partitions. Partition 1 is a flat partition of data generated via Equation 1, which + +consists of a large quantity of small clusters at high purity. Due to it being the partition with the highest purity and to reduce the likelihood of sampling false positives, we use the cluster labels from the first partition to provide pseudo-labels for positive and negative mining. + +SLIC periodically performs FINCH clustering in the feature space during training every $k$ epochs. After applying FINCH, we update the pseudo label set $\{\hat{y}_i\}$ from the first partition $P_1$ , where $\hat{y}_i \in \{1, 2, \dots, C_{P_1}\}$ , and $C_{P_1}$ is the total number of clusters generated in partition $P_1$ . As an alternative to FINCH, we also experiment with K-means and spherical K-means as baselines (with different values of K). In Section 4.5, we demonstrate that when a large enough number of clusters is used, K-means and spherical K-means result in comparable performance to that of FINCH but at a higher computational cost. We quantify the clustering quality by computing the Normalized Mutual Information (NMI) between the pseudo labels generated by the clustering algorithm $\{\hat{y}_i\}$ and the ground truth labels $\{y_i\}$ . + +$$ +N M I (\{\hat {y} _ {i} \}, \{y _ {i} \}) = \frac {I (\{\hat {y} _ {i} \} , \{y _ {i} \})}{\sqrt {H (\{\hat {y} _ {i} \}) H (\{y _ {i} \})}} \tag {2} +$$ + +where $I(\cdot, \cdot)$ and $H(\cdot)$ are the mutual information and the entropy respectively. We show in Section 4.4 that clustering quality improves throughout the training. + +# 3.2. Instance-based Triplet Loss + +We adopt the triplet margin loss and use it in conjunction with the pseudo labels attained from clustering, which allow us to sample harder positives and negatives during training. Let the dataset be denoted as $D$ with $N$ videos, i.e. $D = \{x_{1}, x_{2}, \dots, x_{N}\}$ , the goal is to learn an encoder $f_{\theta}(\cdot)$ that enforces the distance between two similar video clips to be closer than the distance between a dissimilar pair in the feature space. Given a triplet that consists of an anchor $x$ , positive $x^{+}$ , and negative $x^{-}$ , we want to compute $f_{\theta}(\cdot)$ to maximize the distance between $x$ and $x^{-}$ while minimizing the distance between $x$ and $x^{+}$ , i.e. $d(f_{\theta}(x), f_{\theta}(x^{-})) > d(f_{\theta}(x), f_{\theta}(x^{+}))$ , where $d(\cdot)$ is the cosine distance $d(f_{1}, f_{2}) = 1 - \frac{f_{1} \cdot f_{2}}{\|f_{1}\| \|f_{2}\|}$ . The triplet margin loss is defined as follows: + +$$ +\mathcal {L} _ {\text {t r i p l e t}} \left(x, x ^ {+}, x ^ {-}; \theta , m _ {1}\right) = +$$ + +$$ +\max \left(0, d \left(f _ {\theta} (x), f _ {\theta} \left(x ^ {+}\right)\right) - d \left(f _ {\theta} (x), f _ {\theta} \left(x ^ {-}\right)\right) + m _ {1}\right) \tag {3} +$$ + +where $m_{1}$ is a hyper-parameter that enforces a margin between anchor-positive and anchor-negative distance pairs. + +Positive mining. Let $x_{i}$ and $x_{j}$ be two different instances sampled from the dataset $D$ , where $x_{i}$ is the anchor, and $x_{j}$ belongs to the same cluster as $x_{i}$ . Many prior works [15, 43, 51] sample the positive and anchor as two non-overlapping clips from the same video, which is known as instance discrimination. Although augmented differently, + +these two clips have limited diversity in objects and scenes since they are sampled from the same video. Thus, it is desirable to use different videos from the same semantic class as positives. However, due to the instability of clustering quality in the early stages of training, we might sample false positives (i.e. positives sampled from the same cluster but belonging to different semantic classes) that could be detrimental to the training. Hence, we leverage both methods by sampling positives from the same instance with probability $p_{\alpha}$ and from different instances with probability $(1 - p_{\alpha})$ : + +$$ +x ^ {+} = \alpha x _ {i} ^ {+} + (1 - \alpha) x _ {j} ^ {+}, \quad \alpha \sim \operatorname {B e r n o u l l i} (p _ {\alpha}) \tag {4} +$$ + +where $x_{i}^{+}$ is a sampled augmented clip from the same video instance as the anchor $x_{i}$ , and $x_{j}^{+}$ is a sampled augmented clip from a different instance, $x_{j}$ , which belongs to the same cluster as $x_{i}$ . $p_{\alpha}$ is a hyper-parameter that dictates how often the positives are sampled from the same instance or from different instances within the same cluster. + +Multi-view positives. We denote video data from two different views as $x$ and $\mathrm{view}(x)$ . For our method, optical flow is used as the second view in addition to RGB to encourage learning motion-based features. We use a shared encoder to process both input views to achieve faster inference speed with less memory consumption. To learn view-invariant embeddings, the features $f_{\theta}(x)$ and $f_{\theta}(\mathrm{view}(x^{+}))$ should be close to each other in embedding space, since the features are extracted from similar videos. Thus, we sample the original RGB clip $x^{+}$ as the positive with probability $p_{\beta}$ , or replace the RGB clip with another $\mathrm{view}(x^{+})$ with probability $(1 - p_{\beta})$ . This is written as: + +$$ +x ^ {+} = \beta x ^ {+} + (1 - \beta) \operatorname {v i e w} \left(x ^ {+}\right), \quad \beta \sim \operatorname {B e r n o u l l i} \left(p _ {\beta}\right) \tag {5} +$$ + +Negative mining. Most prior works [15, 28, 43, 51] randomly select a large batch of negatives for contrastive instance discrimination, where the easiest $95\%$ of the negatives do not contribute to the training and the hardest $0.1\%$ are usually in-class negatives [7]. Easy negatives are further apart from the anchor than positives, which would evaluate to a loss of zero, whereas the in-class negatives refer to the negatives that belong to the same semantic class as the anchor, and could be detrimental to the training. On the other hand, hard negatives are closer to the anchor than the positive and satisfy $d(f_{\theta}(x),f_{\theta}(x^{-})) < d(f_{\theta}(x),f_{\theta}(x^{+}))$ . To avoid easy negatives and in-class negatives, we use pseudo labels generated by the cluster assignments to sample semi-hard negatives (within the mini-batch) that satisfy the constraint: + +$$ +d \left(f _ {\theta} (x), f _ {\theta} \left(x ^ {-}\right)\right) \leq d \left(f _ {\theta} (x), f _ {\theta} \left(x ^ {+}\right)\right) + m _ {1} \tag {6} +$$ + +where $x^{-}$ belongs to a different cluster than $x$ and $x^{+}$ . + +# 3.3. Temporal Discrimination Loss + +In order to distinguish fine-grained temporal actions, we propose a temporal discrimination loss. This loss is similar + +to the local-local contrastive loss proposed by TCLR [15], but has the key difference that a much greater variety of negatives can be sampled across different video instances as a result of the pseudo-labels from clustering. Given an anchor clip $x_{i}$ , the positive clip is designated as the spatial augmentation $\mathrm{aug}(x_i)$ of the anchor clip. The negative is any temporally non-overlapping clip from the same instance or, unlike TCLR [15], from a different instance in the same cluster. The temporal discrimination loss is defined as: + +$$ +\mathcal {L} _ {\text {t e m p o r a l}} = \mathcal {L} _ {\text {t r i p l e t}} \left(x _ {i}, \operatorname {a u g} \left(x _ {i}\right), x ^ {+}; \theta , m _ {2}\right) \tag {7} +$$ + +where $m_2$ represents the margin parameter for the temporal discrimination loss. It should be noted here that this loss pushes away $x^{+}$ from $x_{i}$ whereas the instance-based triplet loss pulled it closer. To ensure that the difference between the anchor-positive and anchor-negative distances in this loss are smaller than those in the instance-based loss, $m_2$ is set to be less than $m_{1}$ . Overall, the combined loss function is: + +$$ +\mathcal {L} _ {\text {t o t a l}} = \mathcal {L} _ {\text {t r i p l e t}} + \lambda \mathcal {L} _ {\text {t e m p o r a l}} \tag {8} +$$ + +where $\lambda$ is a weighting parameter to balance the triplet loss and the temporal discrimination loss. + +# 4. Experiments + +# 4.1. Setup and Settings + +Datasets. We conduct various experiments to evaluate the proposed model and its transferability on unseen data. We use two video action recognition datasets for pretraining the model: UCF101 [50] and Kinetics400 [33]. We use UCF101 [50] and HMDB51 [36] for finetuning on downstream evaluation tasks. The UCF101 dataset consists of 13,320 videos spanning 101 classes, HMDB51 consists of 7000 videos in 51 action categories, and Kinetics400 consists of 222,454 training videos in 400 action classes. For self-supervised pretraining, we use the UCF101 training set (split-1) and Kinetics400 training set without any class labels. For downstream evaluation tasks, we benchmark on split-1 of both UCF101 and HMDB51. + +Implementation details. Unless stated otherwise, we use R3D-18 [29] as the feature extractor for all experiments due to its common use in the literature. As done in SimCLR [13], we attach a non-linear projection head (2-layer MLP) during training, with a hidden size of 2048 and an output dimension of 128. We maintain the projection head when evaluating action retrieval, and remove it for action classification. For both training and evaluation, we use clips of 16-frames or 32-frames (consecutive frames from 25fps videos) with a spatial resolution of $128 \times 128$ pixels as inputs. We apply clip-wise consistent spatial augmentations including random cropping, random scaling, horizontal flipping, color jittering, color dropping, and Gaussian blurring. We + +also apply random temporal cropping that crops the input video clips at random time stamps. This helps the model leverage the natural variation of the temporal dimension. For multi-view positive sampling, optical flow $(u)$ is computed using the unsupervised TV-L1 algorithm [64], with the same pre-processing procedure as in [11]. We duplicate the data from the second view to generate input clips with channel dimension 3. We provide more details on the experimental setup in Appendix Section B. + +# 4.2. Evaluation on Video Retrieval + +In this protocol, we directly evaluate the extracted 128-dimensional representations from the self-supervised pretraining by performing nearest neighbour (NN) retrieval without any supervised fine-tuning. We follow the protocol used in prior work [15,27,28,38,59], where videos from the test set are used as the query for retrieving the $k$ -nearest neighbours from the training set. For every query video, we average the output representations over 10 uniformly spaced clips. For every training video, we use the representation from a clip at a random time step. For both query and training videos, spatial center-crops of the frames are used. The retrieval results are presented for both UCF101 and HMDB51 in Table 1. In Appendix Section F, we also provide the retrieval results from discarding the projection head and using the intermediate embeddings, which attains similar performance on HMDB51 and UCF101. + +Comparison with state-of-the-art. Similar to prior methods, we evaluate video retrieval using the top- $k$ retrieval accuracy (recall@ $k$ ), which is defined as the accuracy that at least one of the $k$ -nearest neighbours from the training set belongs to the same semantic category as the query video. As shown in Table 1, our proposed method achieves $71.6\%$ top-1 accuracy on UCF101, which is $15.4\%$ higher than the current state-of-the-art. The direct transferability of the trained model is evaluated on the HMDB51 dataset. SLIC achieves $28.9\%$ top-1 retrieval accuracy, which is $5.7\%$ higher than the current state-of-the-art performance from a single-stream network. As a reference, we also report the performance from a supervised version of SLIC which does not use iterative clustering and instead samples positives and negatives using semantic labels. The gap with this supervised model has been reduced to $9.4\%$ for R@1 on UCF101 and $4.1\%$ for R@1 on HMDB51 (using 32 frames as the temporal input size). Lastly, we include the results obtained from using S3D [58] as the feature extractor to demonstrate that SLIC generalizes to both ResNet and Inception-based backbones. + +Qualitative results. Figure 1 visualizes 6 query videos sampled from the test set and their top 5 nearest neighbors from the training set for UCF101. SLIC is able to retrieve similar videos based on their high-level semantics, and we observe that the incorrect retrievals generally share similar motion patterns and scene dynamics with the query video. + +Table 1. Nearest neighbour video retrieval results on UCF101 and HMDB51 (both split-1). Testing set clips are used as queries to retrieve the top- $k$ nearest neighbors in the training set,where $k \in \left\lbrack {1,5,{10},{20}}\right\rbrack$ . Models with ${}^{ \dagger }$ use both RGB and optical flow as inputs for retrieval. "Supervised SLIC" is trained using a supervised triplet loss with positives and negatives sampled using semantic labels. + +
MethodInput SizeArch.UCF101HMDB51
R@1R@5R@10R@20R@1R@5R@10R@20
VCP [38]\( 16 \times 112^2 \)R3D-1818.633.642.553.57.624.436.353.6
VCOP [59]\( 16 \times 112^2 \)R3D-1814.130.340.451.17.622.934.448.8
IIC [51]\( 16 \times 112^2 \)R3D-1836.554.162.972.413.432.746.761.5
\( IIC^\dagger \)[51]\( 16 \times 112^2 \)R3D-1842.460.969.277.119.742.957.170.6
MemDPC [27]\( 40 \times 128^2 \)R3D-1820.240.452.464.77.725.740.657.7
CoCLR-RGB [28]\( 32 \times 128^2 \)S3D-2353.369.476.682.023.243.253.565.5
\( CoCLR^\dagger \)[28]\( 32 \times 128^2 \)S3D-2355.970.876.982.526.145.857.969.7
TCLR [15]\( 16 \times 112^2 \)R3D-1856.272.279.085.322.845.457.873.1
SLIC\( 16 \times 128^2 \)S3D-2360.973.578.684.021.846.359.772.4
SLIC\( 32 \times 128^2 \)S3D-2369.879.283.287.226.852.966.278.1
SLIC\( 16 \times 128^2 \)R3D-1866.777.382.086.425.349.864.976.1
SLIC\( 32 \times 128^2 \)R3D-1871.682.486.690.328.952.865.477.8
Supervised SLIC\( 16 \times 128^2 \)S3D-2367.773.274.876.017.339.453.767.7
Supervised SLIC\( 32 \times 128^2 \)S3D-2372.579.180.983.919.145.158.070.7
Supervised SLIC\( 16 \times 128^2 \)R3D-1875.380.582.884.926.851.265.176.3
Supervised SLIC\( 32 \times 128^2 \)R3D-1881.084.986.588.633.057.470.082.7
+ +# 4.3. Evaluation on Action Classification + +We pretrain the model on UCF101 and Kinetics 400, then evaluate the pretrained model for action recognition on UCF101 and HMDB51 following the protocol from prior work [28]. After self-supervised pretraining, we discard the non-linear projection head and attach a linear classifier, then evaluate the model under two settings: i) linear probing with a frozen backbone, and ii) fine-tuning the network end-to-end. The model is trained using the supervised cross-entropy loss, while applying all the data augmentations mentioned in Section 4.1 except for Gaussian blur. We use a learning rate of $10^{-3}$ for the linear classifier, and $10^{-4}$ learning rate for the backbone (when not frozen). For both i) and ii), the learning rate is decayed by a factor of 0.1 at epoch 60 and 100, and the training is carried out for 150 epochs. During inference, we follow the same procedure as [27, 28] and average the probabilities from 10 spatial crops (center-crop plus four corners, with horizontal flipping), and all temporal crops from a moving window with half temporal overlap. + +Comparison with state-of-the-art. Comparison with the results from prior works are presented in Table 2. When pretrained on UCF101, SLIC outperforms the current state-of-the-art on end-to-end finetuning and linear probing using a temporal window of 32 frames. Compared to our fine-tuning results from using randomly initialized weights, self-supervised pretraining on UCF101 provides significant improvement in classification accuracy for both UCF101 and HMDB51. Furthermore, to examine how action classification performance would vary if semantic label information was used during pretraining, we perform end-to-end finetuning and linear probing on Supervised SLIC. Compared to + +SLIC, Supervised SLIC pretraining improves linear probing accuracy by $2 - 5\%$ (depending on temporal input size and dataset) on UCF101 and HMDB51, but only provides marginal improvements for end-to-end finetuning. When pretrained on the larger Kinetics400 dataset, SLIC achieves comparable performance to TCLR [15] but underperforms compared to CoCLR-RGB [28]. It is worth noting that, while 32 frame inputs were used during finetuning, 16 frame inputs were used during Kinetics400 pretraining for faster computation. + +# 4.4. Evolution of Cluster Assignments and Retrieval Accuracy + +This section demonstrates the evolution of the clustering quality, and a simplified top- $k$ retrieval accuracy which only uses the center 16 or 32 frames of query (test) and training videos as inputs. This simplified retrieval accuracy was used to monitor training progress since it is faster to compute than the final metric described in Section 4.2. As shown in Figure 3, the retrieval accuracy plateaus by the end of training when the clustering quality (the NMI between the cluster assignments and the ground-truth semantic labels) has nearly stabilized. Thus, the embeddings gradually improve in their ability to represent information relating to semantic classes. Additionally, the false positive rate (percentage of positives sampled using cluster assignments which do not have the same ground-truth label as the anchor) is decreasing during training, which indicates that the sampled positives get better as the clustering quality improves. On the other hand, the false negative rate (negatives with the same ground-truth label as the anchor) increases as training progresses, indicating that some videos with the same semantic label + +Table 2. Linear probing and end-to-end finetuning top-1 accuracy results for action classification pretrained on UCF101 and Kinetics400, then fine-tuned on UCF101 and HMDB51, using only visual inputs. Methods with * indicate that results were averaged across the 3 splits of each dataset instead of only using split-1. Subscripts of the input sizes indicate the skip rates each method uses. "None (Rand. Init.)" is trained using a supervised cross-entropy loss with a randomly initialized backbone. Methods with $\dagger$ use optical flow or residual frames in addition to RGB as inputs to the action classification model. SLIC ${}^{ \land }$ indicates that pretraining used 16 frame inputs. Dashes indicate unavailable information. "Supervised SLIC" is trained using a supervised triplet loss with positives and negatives sampled using semantic labels. "Cross-Ent." is the state-of-the-art finetuning performance after supervised pretraining (cross-entropy loss) on Kinetics400. + +
Pretrain. MethodInput SizeArch.UCF101HMDB51
None (Rand. Init.)16 × 1282R3D-1853.522.3
Linear Probe (Pretrained on UCF101)
TCLR [15]16×2 × 1122R3D-1869.9-
CoCLR-RGB [28]32 × 1282S3D-2370.239.1
CoCLR† [28]32 × 1282S3D-2372.140.2
SLIC32 × 1282S3D-2374.844.7
SLIC16 × 1282R3D-1872.341.8
SLIC32 × 1282R3D-1877.748.3
Supervised SLIC16 × 1282R3D-1876.444.9
Supervised SLIC32 × 1282R3D-1882.350.6
End-to-end Finetuning (Pretrained on UCF101)
DPC [26]40 × 1282R3D-1860.6-
VCP* [38]16 × 1122R3D-1866.031.5
VCOP* [59]16 × 1122R3D-1864.929.5
IIC [51]16 × 1122R3D-1861.6-
IIC†* [51]16 × 1122R3D-1874.438.3
MemDPC [27]40 × 1282R3D-1868.2-
CoCLR-RGB [28]32 × 1282S3D-2381.452.1
CoCLR† [28]32 × 1282S3D-2387.358.7
TCLR* [15]16×2 × 1122R3D-1882.452.9
CoCon-RGB* [44](-) × 2242R3D-1870.538.4
CoCon-E*† [44](-) × 2242R3D-1882.452.0
SLIC32 × 1282S3D-2381.356.2
SLIC16 × 1282R3D-1877.446.2
SLIC32 × 1282R3D-1883.254.5
Supervised SLIC16 × 1282R3D-1877.446.6
Supervised SLIC32 × 1282R3D-1881.956.1
End-to-end Finetuning (Pretrained on Kinetics400)
DPC [26]40 × 1282R3D-1868.234.5
CoCon-RGB* [44](-) × 2242R3D-1871.646.0
CoCon-E*† [44](-) × 2242R3D-1878.152.0
VideoMoCo [41]16 × 1122R3D-1874.143.6
RSPNet [12]16 × 1122R3D-1874.341.8
SpeedNet [6]16 × 2242S3D-G81.148.8
TCLR* [15]16×2 × 1122R3D-1884.153.6
CoCLR-RGB [28]32 × 1282S3D-2387.954.6
CoCLR† [28]32 × 1282S3D-2390.662.9
SLIC*32 × 1282S3D-2382.349.4
SLIC*32 × 1282R3D-1883.252.2
Cross-Ent. [52]16 × 1122R(2+1)D-3496.874.5
+ +are being grouped in different clusters. The inability to detect these false positive and negatives is one of the current + +![](images/a0cc3c5e2f3fd03a973815072dc52e26004c5758d05590f77510417a4d5c993d.jpg) +Figure 3. Retrieval accuracy, clustering quality, and false sampling rates for the experiment settings described in section 4.1 over 600 epochs on UCF101. (left): evolution of the top-1/5 retrieval accuracy; (middle): evolution of the clustering quality as measured by the NMI between the cluster assignments and the ground-truth labels; (right): percentage of positives and negatives sampled from clusters which are erroneous according to ground truth labels. + +![](images/33d35a859bba9b1528e8526ac4b59900ffc6d8cf84cbfe033a4dfc02e6b28f4d.jpg) + +![](images/179ab012714b0be20427ea591037ae8d46ac5a1522028048ac3c59227cfb4b54.jpg) + +limitations of our method. + +# 4.5. Ablation Studies + +Ablation study on major training components. In order to study the impact of the main training components used in SLIC, we test the top-1/5 retrieval performance of R3D-18 models pretrained on UCF101 with a subset of the components. The results from removing iterative clustering, multi-view positive sampling, and the temporal discrimination loss from the self-supervised pretraining are shown in Table 3. With all-else fixed, the addition of iterative clustering results in a significant $21.7\%$ gain (from $45.0\%$ ) in $\mathbf{R}@\mathbf{1}$ on UCF101 and a $5.8\%$ gain (from $19.5\%$ ) in $\mathbf{R}@\mathbf{1}$ on HMDB51. The next-best impact on UCF101 $\mathbf{R}@\mathbf{1}$ performance comes from multi-view positive sampling ( $59.2\%$ without it). However, the largest $\mathbf{R}@\mathbf{1}$ performance gain on HMDB51 comes from the temporal discrimination loss ( $19.1\%$ without it), possibly indicating that HMDB51 benefits more from temporal attention than UCF101. + +Table 3. Ablation study on the impact of 3 major training components: (1) iterative clustering (IC), (2) multi-view positive replacement using optical flow (MV), and (3) temporal discrimination loss (TL). + +
ICMVTLInput SizeUCF101HMDB51
R@1R@5R@1R@5
X✓✓16 × 128245.062.319.545.1
✓XX16 × 128254.765.618.241.5
✓✓X16 × 128259.969.819.141.1
✓X✓16 × 128259.269.820.143.6
✓✓✓16 × 128266.777.325.349.8
+ +Ablation studies on clustering settings. We perform ablation studies to measure the impact of the clustering settings used during the self-supervised pretraining. In particular, we try clustering with FINCH partition-2, K-means, and Spherical K-means as alternatives to FINCH partition-1, and we measure the impact of the cluster interval $(k)$ as well as the number of clusters in the case of K-means. All experiments + +are performed with $16 \times 128^{2}$ input size. As shown in table 4, K-means and Spherical K-means result in comparable performance to FINCH partition-1 (which results in approximately 2200 clusters when clustering UCF101 video embeddings) when at least 1000 clusters are used. However, FINCH is significantly more efficient than K-means (roughly 85x faster) when clustering embeddings from the larger Kinetics400 dataset. Furthermore, the performance of K-means is quite sensitive to the number of clusters. For instance, using only 100 clusters with K-means results in a significant degradation in retrieval accuracy. The hyper-parameter search would pose great challenge when deploying K-means in practice. Hence, FINCH is a more suitable option for this application since it doesn't require additional hyper-parameter tuning. In addition, the performance of FINCH partition-2 (which results in approximately 550 clusters) is lower than that of the first FINCH partition. Thus, it can be hypothesized that over-clustering, or using many clusters with high purity, is beneficial to positive sampling. Additionally, cluster intervals of 1, 2, 5, and 10 result in similar video retrieval performance. Thus, it is not necessary to re-compute all training set embeddings and cluster them every epoch to achieve the best performance. + +Table 4. Ablation study on the impact of clustering settings on video retrieval (after pretraining on UCF101). 'Num.' indicates the number of clusters and $k$ ’ indicates the clustering interval. + +
Clustering MethodNum.kUCF101HMDB51
R@1R@5R@1R@5
FINCH(partition 1)-166.877.924.549.0
FINCH(partition 1)-264.876.724.246.6
FINCH(partition 1)-566.777.325.349.8
FINCH(partition 1)-1066.777.822.448.7
FINCH(partition 2)-562.276.121.044.7
K-means100551.566.418.743.0
K-means500563.576.222.047.4
K-means1000566.076.421.846.4
K-means2000566.477.323.247.9
Spherical K-means1000564.977.323.648.2
+ +Ablation study on positive sampling settings. We perform ablation studies to measure the impact of different positive sampling settings on the nearest neighbour retrieval tasks. $p_{\alpha}$ determines the probability of sampling positives from the same video instance (as opposed to different instances within the same cluster), and $p_{\beta}$ determines the probability of using RGB inputs for positives (as opposed to replacing them with the optical flow view). The retrieval results from varying $p_{\alpha}$ and $p_{\beta}$ are shown in Table 5. All experiments are performed with $16 \times 128^{2}$ input size. These results indicate that it is beneficial to sample most, but not all, of the positive clips using clustering assignments. Further, increasing $p_{\beta}$ results in improved performance. The best performance is achieved with $p_{\alpha} = 0.2$ and $p_{\beta} = 0.75$ . + +Table 5. Ablation study on the impact of $p_{\alpha}$ and $p_{\beta}$ on video retrieval (after pretraining on UCF101). The ablations on $p_{\alpha}$ are done using RGB views only. + +
Pos. ViewpαpβUCF101HMDB51
R@1R@5R@1R@5
RGB0.0-54.867.116.336.9
RGB0.2-59.269.820.143.6
RGB0.5-52.367.515.736.5
RGB0.7-52.867.616.236.2
Optical flow0.20.2559.674.321.245.7
Optical flow0.20.562.876.221.346.9
Optical flow0.20.7566.777.325.349.8
+ +# 5. Limitations and Future Work + +One of the main limitations of our method is that it is heavily reliant on the false positive and false negative rate. This is mainly an issue for the former since it was observed in Figure 3 that the false positive rate starts quite high at $60\%$ , but is reduced due to iterative clustering. This high false positive rate could also potentially be reduced by obtaining multiple clustering assignments (e.g., from multiple clustering algorithms or clustering embeddings from multiple input views) and prioritizing positives which are in agreement across all cluster assignment sets. Additionally, it was observed in Figure 3 that the false negative rate was rising during the training, which indicates that some semantically similar videos are considered as dissimilar pairs when training the model. This could be detrimental to the final performance. We plan to address this issue by continuing to sample positives from one of the lower FINCH partitions but instead sample negatives from a higher partition. Since the higher FINCH partitions capture the data structure at a coarser granularity, it would reduce the likelihood of sampling false negatives when sampling from a higher partition. + +# 6. Conclusions and Societal Impact + +We propose a self-supervised, iterative clustering based contrastive learning framework to learn useful video representations. We showed that we can sample harder positives through clustering, and achieve further improvement by incorporating multi-view positives and a temporal discrimination loss. Our proposed method, SLIC, achieves state-of-the-art performance across various downstream video understanding tasks. Finally, while there is both promise and need for self-supervised representations to enable better activity recognition, video retrieval, and other downstream tasks, there exist potential uses of this technology (e.g. surveillance) that could exacerbate societal problems. + +Acknowledgment This work is supported by the Vector Scholarship in Artificial Intelligence, provided through the Vector Institute. + +# References + +[1] Hassan Akbari, Linagzhe Yuan, Rui Qian, Wei-Hong Chuang, Shih-Fu Chang, Yin Cui, and Boqing Gong. Vatt: Transformers for multimodal self-supervised learning from raw video, audio and text, 2021. 3 +[2] Humam Alwassel, Dhruv Mahajan, Bruno Korbar, Lorenzo Torresani, Bernard Ghanem, and Du Tran. Self-supervised learning by cross-modal audio-video clustering, 2020. 3 +[3] Humam Alwassel, Dhruv Mahajan, Lorenzo Torresani, Bernard Ghanem, and Du Tran. Self-supervised learning by cross-modal audio-video clustering. CoRR, abs/1911.12667, 2019. 3 +[4] Relja Arandjelović and Andrew Zisserman. Look, listen and learn. arXiv:1705.08168, 2017. 3 +[5] Yuki Markus Asano, Mandela Patrick, Christian Rupprecht, and Andrea Vedaldi. Labelling unlabelled videos from scratch with multi-modal self-supervision. CoRR, abs/2006.13662, 2020. 3 +[6] Sagie Benaim, Ariel Ephrat, Oran Lang, Inbar Mosseri, William T. Freeman, Michael Rubinstein, Michal Irani, and Tali Dekel. Speednet: Learning the speediness in videos. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. 2, 7 +[7] Tiffany Tianhui Cai, Jonathan Frankle, David J. Schwab, and Ari S. Morcos. Are all negatives created equal in contrastive instance discrimination?, 2020. 4 +[8] Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In European Conference on Computer Vision, 2018. 2 +[9] Mathilde Caron, Piotr Bojanowski, Julien Mairal, and Armand Joulin. Unsupervised pre-training of image features on non-curated data. arXiv:1905.01278, 2019. 2 +[10] Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. In Advances in Neural Information Processing Systems, volume 33, pages 9912-9924. Curran Associates, Inc., 2020. 2 +[11] João Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4724-4733, 2017. 5 +[12] Peihao Chen, Deng Huang, Dongliang He, Xiang Long, Runhao Zeng, Shilei Wen, Mingkui Tan, and Chuang Gan. Rspnet: Relative speed perception for unsupervised video representation learning. In The AAAI Conference on Artificial Intelligence (AAAI), 2021. 7 +[13] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020. 1, 2, 5, 12 +[14] Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020. 2 +[15] Ishan Dave, Rohit Gupta, Mamshad Nayeem Rizve, and Mubarak Shah. TcIr: Temporal contrastive learning for video representation. arXiv:2101.07974, 2021. 4, 5, 6, 7, 13 + +[16] Ali Diba, Vivek Sharma, Luc Van Gool, and Rainer Stiefelhagen. Dynamonet: Dynamic action and motion network. In 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pages 6191-6200, 2019. 3 +[17] Carl Doersch, Abhinav Gupta, and Alexei A. Efros. Unsupervised visual representation learning by context prediction. In International Conference on Computer Vision (ICCV), 2015. 2 +[18] Carl Doersch and Andrew Zisserman. Multi-task self-supervised visual learning. In 2017 IEEE International Conference on Computer Vision (ICCV), pages 2070-2079, 2017. 2 +[19] 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 International Conference on Knowledge Discovery and Data Mining, KDD'96, page 226-231. AAAI Press, 1996. 3 +[20] Christoph Feichtenhofer. X3d: Expanding architectures for efficient video recognition. In Computer Vision and Pattern Recognition (CVPR), June 2020. 3 +[21] Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He. Slowfast networks for video recognition, 2019. 3 +[22] Christoph Feichtenhofer, Axel Pinz, and Andrew Zisserman. Convolutional two-stream network fusion for video action recognition. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 3 +[23] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. In International Conference on Learning Representations, 2018. 2 +[24] Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Guo, Mohammad Gheshlaghi Azar, Bilal Piot, koray kavukcuoglu, Remi Munos, and Michal Valko. Bootstrap your own latent - a new approach to self-supervised learning. In Advances in Neural Information Processing Systems, volume 33, pages 21271-21284. Curran Associates, Inc., 2020. 1, 2 +[25] Michael Gutmann and Aapo Hyvarinen. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models. In Yee Whye Teh and Mike Titterington, editors, International Conference on Artificial Intelligence and Statistics, volume 9 of Proceedings of Machine Learning Research, pages 297–304, Chia Laguna Resort, Sardinia, Italy, 13–15 May 2010. PMLR. 2, 13 +[26] Tengda Han, Weidi Xie, and Andrew Zisserman. Video representation learning by dense predictive coding. CoRR, abs/1909.04656, 2019. 2, 7 +[27] Tengda Han, Weidi Xie, and Andrew Zisserman. Memory-augmented dense predictive coding for video representation learning. In European Conference on Computer Vision, 2020. 5, 6, 7 +[28] Tengda Han, Weidi Xie, and Andrew Zisserman. Self-supervised co-training for video representation learning. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, + +volume 33, pages 5679-5690. Curran Associates, Inc., 2020. 1, 2, 3, 4, 5, 6, 7, 12, 13 +[29] Kensho Hara, Hirokatsu Kataoka, and Yutaka Satoh. Can spatiotemporal 3d cnns retrace the history of 2d cnns and imagenet?, 2018. 5, 12 +[30] Kensho Hara, Hirokatsu Kataoka, and Yutaka Satoh. Towards good practice for action recognition with spatiotemporal 3d convolutions. In 24th International Conference on Pattern Recognition (ICPR), pages 2516-2521, 2018. 3 +[31] R. Devon Hjelm and Philip Bachman. Representation learning with video deep infomax. CoRR, abs/2007.13278, 2020. 2 +[32] Yen-Chang Hsu and Zsolt Kira. Neural network-based clustering using pairwise constraints. arXiv:1511.06321, 2016. 2 +[33] Will Kay, Joao Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, Mustafa Suleyman, and Andrew Zisserman. The kinetics human action video dataset. arXiv:1705.06950, 2017. 5 +[34] Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 18661-18673. Curran Associates, Inc., 2020. 1 +[35] Bruno Korbar, Du Tran, and Lorenzo Torresani. Cooperative learning of audio and video models from self-supervised synchronization. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, page 7774-7785, 2018. 3 +[36] H. Kuehne, H. Jhuang, E. Garrote, T. Poggio, and T. Serre. Hmdb: A large video database for human motion recognition. In 2011 International Conference on Computer Vision, pages 2556-2563, 2011. 5 +[37] Junnan Li, Pan Zhou, Caiming Xiong, and Steven C.H. Hoi. Prototypical contrastive learning of unsupervised representations. *ICLR*, 2021. 2 +[38] Dezhao Luo, Chang Liu, Yu Zhou, Dongbao Yang, Can Ma, Qixiang Ye, and Weiping Wang. Video cloze procedure for self-supervised spatio-temporal learning, 2020. 5, 6, 7 +[39] Vivek Sharma M. Saquib Sarfraz and Rainer Stiefelhagen. Efficient parameter-free clustering using first neighbor relations. In Computer Vision and Pattern Recognition (CVPR), pages 8934-8943, 2019. 3 +[40] M. Noroozi and P. Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In ECCV, 2016. 2 +[41] Tian Pan, Yibing Song, Tianyu Yang, Wenhao Jiang, and Wei Liu. Videomoco: Contrastive video representation learning with temporally adversarial examples. CoRR, abs/2103.05905, 2021. 2, 7 +[42] Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei Efros. Context encoders: Feature learning by inpainting. In CVPR, 2016. 2 +[43] Rui Qian, Tianjian Meng, Boqing Gong, Ming-Hsuan Yang, Huisheng Wang, Serge Belongie, and Yin Cui. Spatiotemporal contrastive video representation learning. arXiv:2008.03800, 2021. 4 + +[44] Nishant Rai, Ehsan Adeli, Kuan-Hui Lee, Adrien Gaidon, and Juan Carlos Niebles. Cocon: Cooperative-contrastive learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, pages 3384–3393, June 2021. 2, 3, 7, 13 +[45] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. Conference on Computer Vision and Pattern Recognition (CVPR), Jun 2015. 2 +[46] Pierre Sermanet, Corey Lynch, Jasmine Hsu, and Sergey Levine. Time-contrastive networks: Self-supervised learning from multi-view observation. CoRR, abs/1704.06888, 2017. 2 +[47] Vivek Sharma, Makarand Tapaswi, M. Saquib Sarfraz, and Rainer Stiefelhagen. Clustering based contrastive learning for improving face representations. In 2020 15th IEEE International Conference on Automatic Face and Gesture Recognition (FG 2020), pages 109–116, 2020. 2 +[48] Karen Simonyan and Andrew Zisserman. Two-stream convolutional networks for action recognition in videos. In International Conference on Neural Information Processing Systems - Volume 1, NIPS'14, page 568-576, Cambridge, MA, USA, 2014. MIT Press. 3 +[49] Kihyuk Sohn. Improved deep metric learning with multi-class n-pair loss objective. In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 29. Curran Associates, Inc., 2016. 2 +[50] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv:1212.0402, 2012. 5 +[51] Li Tao, Xueting Wang, and Toshihiko Yamasaki. Self-supervised video representation learning using inter-intra contrastive framework. Proceedings of the 28th ACM International Conference on Multimedia, Oct 2020. 4, 6, 7 +[52] Du Tran, Heng Wang, Lorenzo Torresani, Jamie Ray, Yann LeCun, and Manohar Paluri. A closer look at spatiotemporal convolutions for action recognition. arXiv:1711.11248, 2018. 2, 3, 7 +[53] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv:1807.03748, 2019. 2 +[54] Carl Vondrick, Abhinav Shrivastava, Alireza Fathi, Sergio Guadarrama, and Kevin Murphy. Tracking emerges by colorizing videos. arXiv:1806.09594, 2018. 2 +[55] Jiangliu Wang, Jianbo Jiao, Linchao Bao, Shengfeng He, Wei Liu, and Yunhui Liu. Self-supervised video representation learning by uncovering spatio-temporal statistics. CoRR, abs/2008.13426, 2020. 3 +[56] Jiangliu Wang, Jianbo Jiao, and Yunhui Liu. Self-supervised video representation learning by pace prediction. In European Conference on Computer Vision, 2020. 2 +[57] Donglai Wei, Joseph J Lim, Andrew Zisserman, and William T Freeman. Learning and using the arrow of time. In Computer Vision and Pattern Recognition (CVPR), pages 8052-8060, 2018. 2 +[58] Saining Xie, Chen Sun, Jonathan Huang, Zhuowen Tu, and Kevin Murphy. Rethinking spatiotemporal feature + +learning: Speed-accuracy trade-offs in video classification. arXiv:1712.04851, 2018. 1, 2, 3, 5 +[59] Dejing Xu, Jun Xiao, Zhou Zhao, Jian Shao, Di Xie, and Yueting Zhuang. Self-supervised spatiotemporal learning via video clip order prediction. In Computer Vision and Pattern Recognition (CVPR), June 2019. 5, 6, 7 +[60] Xueting Yan, Ishan Misra, Abhinav Gupta, Deepti Ghadiyaram, and Dhruv Mahajan. Clusterfit: Improving generalization of visual representations. arXiv:1912.03330, 2019. 2 +[61] Ting Yao, Yiheng Zhang, Zhaofan Qiu, Yingwei Pan, and Tao Mei. Seco: Exploring sequence supervision for unsupervised representation learning. In 35th AAAI Conference on Artificial Intelligence, 2021. 2 +[62] Yuan Yao, Chang Liu, Dezhao Luo, Yu Zhou, and Qixiang Ye. Video playback rate perception for self-supervised spatiotemporal representation learning. arXiv:2006.11476, 2020. 2 +[63] Asano Y.M., Rupprecht C., and Vedaldi A. Self-labelling via simultaneous clustering and representation learning. In International Conference on Learning Representations, 2020. 2 +[64] C. Zach, T. Pock, and H. Bischof. A duality based approach for realtime tv-11 optical flow. In Proceedings of the 29th DAGM Conference on Pattern Recognition, page 214–223, Berlin, Heidelberg, 2007. Springer-Verlag. 5 +[65] Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In ECCV, 2016. 2 +[66] Jiaojiao Zhao and Cees G. M. Snoek. Dance with flow: Two-in-one stream action detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 3 \ No newline at end of file diff --git a/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/images.zip b/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..8f58ab5a92a481b7002df3c3c4f7d065b8ff646f --- /dev/null +++ b/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:443ff6399d9aa662767e222ef6ca0f322f9b61813eff4f84bb0fbf0c77c8df96 +size 543101 diff --git a/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/layout.json b/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f814803315025d145b8d86fd4e054cd7801e9030 --- /dev/null +++ b/slicselfsupervisedlearningwithiterativeclusteringforhumanactionvideos/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d0d0221c7745d9d8f1113c3b578fb6d239b67d0183ac828a38991041edd0a84 +size 505069 diff --git a/smplamodelingpersonspecificdeformableanatomy/110f46f0-bf8e-4ef1-98c3-ba10e4ce474d_content_list.json b/smplamodelingpersonspecificdeformableanatomy/110f46f0-bf8e-4ef1-98c3-ba10e4ce474d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..03dd1c5cf28f23dfd84ca77d6e0b42c924f33dd8 --- /dev/null +++ b/smplamodelingpersonspecificdeformableanatomy/110f46f0-bf8e-4ef1-98c3-ba10e4ce474d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00bda67a7efa5723e5d32271073500113e8e2ac42322f95cfe0818c7e55bb8cd +size 70404 diff --git a/smplamodelingpersonspecificdeformableanatomy/110f46f0-bf8e-4ef1-98c3-ba10e4ce474d_model.json b/smplamodelingpersonspecificdeformableanatomy/110f46f0-bf8e-4ef1-98c3-ba10e4ce474d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1c747ebf173dd578110f754e7fe1229e7208a493 --- /dev/null +++ b/smplamodelingpersonspecificdeformableanatomy/110f46f0-bf8e-4ef1-98c3-ba10e4ce474d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e41ee758ad8cbf3062a90d45767d1f55705b28461b0286cb2d2aef64f8af7896 +size 84312 diff --git a/smplamodelingpersonspecificdeformableanatomy/110f46f0-bf8e-4ef1-98c3-ba10e4ce474d_origin.pdf b/smplamodelingpersonspecificdeformableanatomy/110f46f0-bf8e-4ef1-98c3-ba10e4ce474d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..405cf965bfac2d6b41fb2bd6f08599080414f8fb --- /dev/null +++ b/smplamodelingpersonspecificdeformableanatomy/110f46f0-bf8e-4ef1-98c3-ba10e4ce474d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ce55cacdfe71256e06577133cc3dd8d53edd6f07bf721a17d094cd4e105ded1 +size 9532897 diff --git a/smplamodelingpersonspecificdeformableanatomy/full.md b/smplamodelingpersonspecificdeformableanatomy/full.md new file mode 100644 index 0000000000000000000000000000000000000000..18216b4e543038d750f58b8385e4c5d5529e5ab8 --- /dev/null +++ b/smplamodelingpersonspecificdeformableanatomy/full.md @@ -0,0 +1,282 @@ +# SMPL-A: Modeling Person-Specific Deformable Anatomy + +Hengtao Guo $^{1,2}$ , Benjamin Planche $^{1}$ , Meng Zheng $^{1}$ , Srikrishna Karanam $^{1}$ , Terrence Chen $^{1}$ , Ziyan Wu $^{1}$ $^{1}$ United Imaging Intelligence, Cambridge MA, USA + $^{2}$ Rensselaer Polytechnic Institute, Troy NY, USA + +{first.last}@uii-ai.com, guoh9@rpi.edu + +# Abstract + +A variety of diagnostic and therapeutic protocols rely on locating in vivo target anatomical structures, which can be obtained from medical scans. However, organs move and deform as the patient changes his/her pose. In order to obtain accurate target location information, clinicians have to either conduct frequent intraoperative scans, resulting in higher exposition of patients to radiations, or adopt proxy procedures (e.g., creating and using custom molds to keep patients in the exact same pose during both preoperative organ scanning and subsequent treatment. Such custom proxy methods are typically sub-optimal, constraining the clinicians and costing precious time and money to the patients. To the best of our knowledge, this work is the first to present a learning-based approach to estimate the patient's internal organ deformation for arbitrary human poses in order to assist with radiotherapy and similar medical protocols. The underlying method first leverages medical scans to learn a patient-specific representation that potentially encodes the organ's shape and elastic properties. During inference, given the patient's current body pose information and the organ's representation extracted from previous medical scans, our method can estimate their current organ deformation to offer guidance to clinicians. We conduct experiments on a well-sized dataset which is augmented through real clinical data using finite element modeling. Our results suggest that pose-dependent organ deformation can be learned through a point cloud autoencoder conditioned on the parametric pose input. We hope that this work can be a starting point for future research towards closing the loop between human mesh recovery and anatomical reconstruction, with applications beyond the medical domain. + +# 1. Introduction + +Many medical procedures rely on precise location and shape information of target tissues. Since radioactive scans are invasive, there is a maximum number that a patient can safely undergo per specific time period [10, 12]. Due to this + +![](images/bef539abd2a490c4da957414bdaa70014f63b51198c58dffa976d60819d987cb.jpg) +Figure 1. Application overview. The information from previous medical scans can facilitate estimating current organ's shape and deformation. + +constraint, doctors have to carefully plan imaging protocols, weighing risks for the patient versus spatial and temporal inconsistency that may arise from too coarse scan-based investigation. Any solution to help determine the evolution of an illness or the impact of a treatment without excessive imaging would greatly help clinicians and reduce patients' risks. Currently, complex protocols are used to precisely target organ regions while minimizing potential radioactive damage. For example, in radiotherapy (a cancer treatment that uses high doses of radiation to kill cancerous cells and shrink tumors [8]), it is common practice to create and use patient-specific molds (usually made of plastic or plaster) to keep patients in the exact same pose during both preoperative organ scanning and during subsequent treatment sessions. Such customized molds help ensure the desired organ region is targeted accurately without having to re-scan the patient and re-localize the tumors before each session. This custom proxy method—like other + +methods specific to different scan-reliant treatments—are typically sub-optimal, constraining the clinicians and costing precious time and money to the patients. These protocols could however be relaxed with appropriate organ pose estimation, thereby removing the need for patient-specific molds and decreasing cost and delays of such vital procedures (i.e., more generic and thus less costly molds could be adopted with the sole purpose of keeping patients still during treatment). Other less sensitive domains could also benefit from cheaper and computationally-lighter organ pose estimation. Existing simulation tools mostly rely on finite-element modeling (FEM) [11, 16, 23] to predict the deformation of soft tissues—such as organs—based on input load forces. Their inherent computational footprint and abstraction makes them unpractical for real-time and artistic applications (e.g., movie or video-game industries). In this paper, we not only propose a modeling function that relies on lightweight operations during inference, but we also condition it on more concrete parameters, i.e., the pose of the target person; therefore making this kind of simulation accessible to a larger audience. + +In order to learn the latent correspondences between human contours and in vivo organ deformations, we need a representation of the human body model. While the popular skinned multi-person linear (SMPL) model [22] and its variants [27, 33] provide a flexible statistical representation to capture human pose and shape deformations, they do not have the necessary information to model in vivo organ deformations. In our work, we propose a novel approach to address this issue. While retaining the computational flexibility offered by the family of SMPL models, we take one new step: modeling how the pose parameters affect internal organ deformations. Our intuition is that when a patient changes pose (e.g., arms stretched over head as in Figure 2), internal organs deform accordingly, and we seek to capture all these changes (pose and internal deformations) jointly. Concretely, while the SMPL family defines two parameters, $\theta$ for pose and $\beta$ for shape, our method adds one additional parameter for organ deformation: $\alpha$ . Consequently, whereas the SMPL model learns the function mapping $(\beta, \theta)$ to the vertices of the human mesh, our method seeks to additionally capture organ deformations from $(\beta, \theta, \alpha)$ . In particular, we propose a framework that can (1) extract patient-specific organ representation from previous medical scans and (2) estimate the organ deformation conditioned on arbitrary human poses for any scans in the future. To the best of our knowledge, there has been little previous work studying similar topics, despite the need transpiring from the medical community. + +To summarize, our contributions are three-fold: + +1. We unify the shape representation for one specific organ across different patients by automatically setting up anatomical correspondences. Specifically, we ap- + +![](images/dbb99526cec3ff07f72cbf1e0da948b7fc955a7c8413c3b33ebbce53d3977e1d.jpg) +Case A + +![](images/7253424626620f73877f298c566d8fcb67e60b29cf500595999ad91351c8bcf8.jpg) +Case B + +![](images/b9280b5e7259f9f29a554cfeb74b3851b3845e485097103dab5bc3ae179ffd0e.jpg) +Case C +Figure 2. Four data samples in our dataset. For each subject, the segmentation of lung (yellow), livers (green), spleen (grey) and kidneys (blue) are available, alongside with full-body skin segmentation (red). + +![](images/57417fdb0d550f68e9c69e31a915958fe5e7b55e10bb29025ee1be10ea697101.jpg) +Case D + +ply a 3D deformable registration between a mean organ binary segmentation and any given segmentation in the dataset. The generated deformation field can warp the mean organ's 3D mesh into any shape in the dataset such that every organ's representation can be unified into a fixed-length point cloud representation with anatomical correspondences, as in Figure 3. + +2. We propose SMPL-A ("A" for anatomy), an extension to the SMPL model for pose/shape-dependent organ deformation estimation. SMPL-A encodes the organ's shape into a low-dimensional representation $\alpha$ and can reconstruct a deformed organ shape conditioned on different poses during inference. In a novel fashion, the proposed framework correlates a patient's external pose change to internal organ deformation, which may significantly contribute to surgical guidance; +3. Our work suggests that the organ's shape and elastic properties can indeed be encoded into lower-dimensional representations $\alpha$ . The experimental results also demonstrate that conditioned on the patient's exterior body movement, a deformed organ mesh can be reconstructed with the patient-specific organ representation that was extracted from previous scans. + +# 2. Related Work + +Modeling Human Body. Person-specific 3D models can be obtained through a variety of means. Most state-of-the-art solutions start from a mean/template 3D mesh (set of vertices encoding the body surface information) and apply adequate deformations so to fit the person's appearance [24]. Such paradigm resulted in the creation of various statistical models of the 3D human body [1, 14, 22]. The most predominant in the literature, the skinned multipersonal linear (SMPL) model [22] is based on skinning and blend shapes, and is learned from thousands of 3D body scans. SMPL originally uses rotation vectors for 24 joints—encoded as a vector $\theta \in \mathbb{R}^{3\times 24}$ —and a shape parameter $\beta \in \mathbb{R}^{10}$ to represent a human mesh at a specific pose. As $\beta$ domain is defined via dimensional reduction over the + +dataset of body scans (principal component analysis), each of its dimension maps to specific morphological changes, e.g., the first dimension controls the body height and thickness, the second dimension mostly impacts waist size, etc. Simple yet highly expressive, this model has been widely adopted by the community [5, 17, 20, 28, 36] and many extensions have been proposed since, e.g., adding different parameters to articulate the hands [33], the head (eyeball, jaw, and neck) [27], etc. Based on all these parameters, SMPL can model realistic surface deformations linked to body shape and pose (e.g., visible contraction of muscles and deformation of fat pad w.r.t. some poses). However, it has no notion of the underlying anatomy, i.e., volumetric content under the skin surface. In this work, we propose to adopt SMPL's methodology and extend its model with volumetric information on patient-specific anatomy. + +Learning Tissue Deformation. At the crossroad between computer science and medicine, the modeling of anatomical elements and their behavior under various conditions has gained a lot of interest in recent years [31], driven by extensive developments in machine learning. Data-driven models based on artificial neural networks, applied to the simulation of deformable organs, have achieved commendable accuracy [25, 29, 30, 34]. For example, Pfeiffer et al. [30] have demonstrated that a convolutional neural network (CNN), trained on synthetic data, is able to extrapolate the displacement field of all points inside an organ based on a partial input surface force field. Similarly, Salehi et al. [34] leverages a graph convolutional network (GCN) to better induce the deformation of organs' 3D structures caused by force loads applied to surface vertices. Most of these learning-based methods are proposed as alternative to the more traditional but much heavier FEM [13]. Yeo et al. [38] proposed an interesting approach which uses learned pose/shape factors to facilitate segmenting adipose tissue. Unlike these previous models that express the shape of organs as functions of local, abstract load forces, our goal is to estimate the deformation of internal organs based on the pose and shape of the patients themselves, as well as past observations (scans) providing patient-specific organ information. + +Point Cloud Registration. In order to morph a template 3D shape into custom ones (e.g., person-specific body mesh), a unified representation needs to be applied to the considered samples. For example, SMPL defines the human body as a mesh composed of 13,776 triangular surfaces supported by 6,890 vertices, whose displacements from one individual to the other can be controlled by a direct mapping [22]. We adopt a similar, common shape representation for the organs across all patients, homogenizing the number and organization of their surface vertices, as highlighted in Figure 3. Opting for a vertex-based representation allows us to leverage the extensive efforts in recent years + +![](images/41e02b4e2fb245adb9e9b3f1d364a6cee4ac0f0d7f6b9d605f64d7e6dca08d4e.jpg) + +![](images/810914413544801421c584a5a600a4692912d3ce2880aa66391567096a56e7c6.jpg) + +![](images/7754d1da6e2aa9a193d64eb40355802fb664c78e47985514038d7df9c1f8c2a4.jpg) +Figure 3. Point correspondences across samples. The idea of unifying the shape representation of organs originates from the SMPL model. However, instead of creating an artistic template model as in SMPL, we use Elastix registration to set up point-to-point correspondence for organs' surface [19], e.g., using 944 points to represent the surface of the spleen. The color coding indicates the vertex's index in the points cloud: two points with the same color are locating on the corresponding anatomical structures. + +![](images/3ab506991424ace64892548a3e6deebdc6c63c923684222dcbe0525f7e8e460a.jpg) + +towards the efficient processing of 3D point-cloud structures. Among other operations, the registration of point clouds is the basis for 3D reconstruction and scenes perception [6, 15]. It helps set up correspondence between two sets of 3D points. The same-source points cloud registration can be further divided into optimization-based registration methods [21, 37], feature-learning methods [9], end-to-end learning registration [35]. The vast majority of works on points cloud registration focus on laser-scanning captured data and aim for natural scenery understanding. One recent work [3] proposed a global feature extraction module with PointNet [32] backbone to fuse ultrasound and magnetic resonance images for surgery guidance, by generating 3D displacement vectors for each input point. The aforementioned methods can all serve as candidates to set up point-to-point correspondence. + +# 3. Methodology + +In this section, we detail our methodology for pose-dependent organ deformation estimation. We start by formalizing the problem, and then justify the design of each component of the proposed, showing how to condition the deformed organ mesh reconstruction on the patient's external body shape and pose. + +![](images/4265593313ecef993336aab578acd0f3153b348df90b4a133cbf601ce62d29bb.jpg) +Figure 4. Overview of SMPL-A Let $M$ be the 3D shape of a target organ scanned from a patient with pose $\theta$ and body shape $\beta$ . We jointly learn a shape-encoding function $E$ to extract patient-specific organ properties $\alpha$ , as well as a pose-dependent decoding function $D$ that predicts proper organ deformation from new combinations of the three parameter sets $(\theta, \beta, \alpha)$ . + +# 3.1. Formalization + +For a given patient, we assume that a custom SMPL model is provided (i.e., optimizing $\beta$ according to pictures of the patient), as well as a set of annotated computed tomography (CT) scans $I$ captured at known patient poses $\theta_{\mathrm{CT}}$ (we assume that 3D model and scans are captured not too long apart so that the patient's shape $\beta$ can be assumed constant between the two modalities). Originally inspired by the human SMPL model, we represent organs as 3D point clouds $M \in \mathbb{R}^{3 \times m}$ ( $m$ number of points) in order to capture the organs' complex topology (see Figure 3 and details in Subsection 4.2). After converting the 3D CT scans $I$ into point clouds, our goal is thus to define a parametric set of functions to model their patient-specific properties. + +From correspondences between these modalities (SMPL models and scanned point clouds), we propose to learn a low-dimensional vector $\alpha \in \mathbb{R}^k$ (i.e., composed of $k_{\alpha}$ real-valued parameters) that encodes patient-specific properties of the target organ(s), partially disentangled from the patient's shape and pose. This feature vector can later guide the inference of the 3D shape of target organ(s) under different body poses $\theta'$ , e.g., if during treatment the patient should assume a pose $\theta' \neq \theta_{\mathrm{CT}}$ (we later discuss how our scheme can also be extended to predicting organ deformation for different body shape $\beta'$ , e.g., if the patient lost or gained weight since the last scans). + +To that end, as shown in Figure 4, the proposed solution consists of a learning-based function $E(\theta, \beta, M) = \alpha$ that encodes the patient-specific organ characteristics, and a decoding function $D(\theta', \beta', \alpha) = M_{pred}$ , i.e., predicting the deformed organ shape when the patient takes a pose to $\theta'$ . + +The design of these two models $E$ and $D$ , as well as the + +methodology w.r.t. to their training and data preprocessing, are subsequently detailed. + +# 3.2. Model Definition + +The aforementioned patient-specific organ shape encoder $E$ and pose-conditioned organ shape decoder $D$ are defined as artificial neural networks, trained jointly in an end-to-end way. + +Patient-Specific Organ Shape Encoder $E$ aims to map the organ's 3D mesh (represented as points cloud) to a low-dimensional feature representation $\alpha$ . Similar to how the shape parameter $\beta$ in SMPL encodes complex person-specific morphological information, $\alpha$ represents here the complex shape information of target organ, encoded into a lower-dimension space. + +Since the shape of anatomic structures is intrinsically dependent on the pose and shape parameters of the subject him/herself, we also provide $E$ with the corresponding $\theta$ and $\beta$ parameters as input, so that the network can learn to decouple the organ shape information from them. To guide the shape encoding, a point-cloud feature extractor $F$ first takes the processed organ point cloud (cf. Section 4.2) as input and produce a latent feature vector $z_{M} \in \mathbb{R}^{k_{z}}$ . Fixing a reasonable value for $k_{z}$ (set to 128 in our experiments) allows to balance the contributions of $M$ compared to the contributions of low-dimensional SMPL parameters, during organ shape encoding. Afterwards, a multi-layer perceptron (MLP) takes the concatenated organ feature vector $z_{M}$ and the SMPL parameters $\theta$ and $\beta$ as input to encode a patient-specific, pose-agnostic organ representation $\alpha$ . Overall, the patient-specific organ shape encoder can be denoted as: + +$$ +E (\theta , \beta , M) = \operatorname {M L P} (\theta , \beta , F (M)) = \alpha . \tag {1} +$$ + +Pose-Conditioned Organ Shape Decoder $D$ aims to reconstruct the deformed organ mesh conditioned on different poses for the same patient. It takes the patient's organ shape prior $\alpha$ , SMPL shape parameter $\beta$ and a different pose parameters $\theta'$ as input to infer the deformation of the organ under the new body pose $\theta'$ , i.e.: + +$$ +D \left(\theta^ {\prime}, \beta , \alpha\right) = M _ {p r e d} \tag {2} +$$ + +where $M_{pred} \in \mathbb{R}^{3 \times m}$ is deformed organ mesh prediction to obtain $M'$ , organ shape of the patient under body pose $\theta'$ . Training: We propose to train the aforementioned system in an end-to-end manner $cf$ . literature on autoencoders. We compute the reconstruction loss, named $L_{mesh}$ , directly on the set of vertices, as follows: + +$$ +L _ {\text {m e s h}} = \left\| M ^ {\prime} - M _ {\text {p r e d}} \right\| _ {2}. \tag {3} +$$ + +Optimizing the parameters of $E$ and $D$ based on this criterion will encourage $E$ to extract patient-specific organ prior $\alpha$ disentangled from the reparameterized variable $\theta / \theta'$ , and + +![](images/bf5553d82472daff56a62c30685d06765572ffbeee9bac8cdad2db30c858c3e2.jpg) +Figure 5. SMPL-A dataset overview. The color bar indicates the index of the vertex in the points cloud, which shows the point-to-point correspondence across different subjects. + +![](images/5198fbc742387e5973d43af69bd08f98bb9cfd32c386ac654cf4d65d2f3d532a.jpg) + +![](images/9c65a4a9622d5b5f94fadd2ea5a8187adf3da717d159663a0e8146ae2c853a7f.jpg) + +![](images/e50dd062baef554a1ec5b0c1bfa9162bd7c39e75187b190b5fcedce793e1b449.jpg) + +![](images/2f710c6072cedf4a96e691229164c7fb99a4b850d6fc58d098885060afe8971c.jpg) + +![](images/0d0b4f8c5c03e421d644238ad057a07e932be29555e3cb257137cead10e3d9ec.jpg) + +![](images/6f51fe69fbcc09ff97dad66d69e7214d93dbad2cb2a3bda022ca7502a06f55a7.jpg) + +![](images/382a8c6e0aecf9afb68a8eba475f0715b38351ae080dc178545ad32a314a09a7.jpg) + +![](images/71bff6b35ac861c5b88f14df54d88722b54c71c5878ddd5cb593b9897411eb06.jpg) + +![](images/59a6bf67acd86e0d0573cea82e452308febd19eaef2653144076532f1bd09d10.jpg) + +![](images/3b3c4da5cc7d7cc7fabde011d80e1896a74aca5f670294bc244c1cedb62eb010.jpg) + +![](images/84399a750c88ff321f6db7da6d29c43b1cd23c1d0d54ba47bc5152ef0c0e731c.jpg) + +![](images/d638a5203af40521803e239796d9d6577e1c083426d6f4b1f5dade3358302195.jpg) + +will encourage $D$ to leverage all available information to predict proper organ displacement. Note, however that while this objective encourages $M_{pred}$ to approximate $M'$ , $D$ may generate non-smooth displacement fields $\delta M = M_{pred} - M$ that are physically unrealistic. To further impose a constraint on the smoothness of the deformed organ surface, a regularization term $L_{smooth}$ , weighted by a factor $\lambda$ , is considered. Borrowed from [2], this term approximates the spatial gradients of $\delta M$ using differences between neighboring points (see paper for further details). The full loss function for training is, therefore, denoted as: + +$$ +L = L _ {\text {m e s h}} + \lambda L _ {\text {s m o o t h}}. \tag {4} +$$ + +For training, our framework thus needs pairs of segmented organ shapes $M$ and $M'$ , along with their corresponding patient's pose parameters $\theta$ and $\theta'$ , and supposedly constant patient's body shape $\beta$ . To relax these data requirements, we present in the next section how to use non-rigid registration to unify the organs' representations and how to apply FEM to effectively augment the data with synthetic deformation pairs $(\theta, M)$ and $(\theta', M')$ . + +# 4. Data Preparation + +Due to the complexity and heterogeneity of the data modalities considered in this paper, and for reproducibility purposes, we share details on data pre-processing in the following section. + +# 4.1. SMPL Pose/Shape Annotation + +Every patient in our dataset has their CT scan processed into full-body skin segmentation that highlights the contour of the patient, as in Figure 2. To find the corresponding pose parameter $\theta$ and shape parameter $\beta$ , we manually generate the SMPL model that matches the skin best. We use the SMPL-X [27] add-on in Blender [7] to adjust the pose joints by joints and alter the shape parameters to match the body contour. Manually generating the matching SMPL model for the skin segmentation is considered more accurate for downstream analysis, though this step can also benefit from automatic human modeling process, e.g., applying the Implicit Part Network (IPNet) [4] or similar solutions. + +# 4.2. Organ Correspondence + +The classical SMPL model, sculpted by an artist, has a fixed-length design which unifies the representation of different human subjects, even given different body shapes and poses. Another benefit is that, for different human subjects, the $i$ -th vertex denotes the same anatomical structure. In our task, we also need to parameterize the shape of organs across different patients, by homogenizing the size of their representation as in Figure 3. + +Specifically, we create one mean mesh model for each type of organ and then use it as a template to warp into other shapes for a uniform representation (Figure 5). Taking the spleen as an example: we first gather a dataset that contains 3D spleen segmentation $\{I_n|n = 1,\dots,N\}$ , where $I_{n}$ denotes the $n$ -th patient's binary spleen segmentation image. We first compute a mean segmented 3D scan $\hat{I}$ from all the cases in the dataset through simple averaging, and then evenly sample $m$ vertices on its surface to obtain a mean organ mesh $\hat{M}$ . The organ mean shape $\hat{M}$ serves as template to unify the representation of the organ from different subjects, with the $j$ -th vertex assigned to the same anatomical location across the patients. + +To obtain such unified representation, we apply Elastix [19]—an intensity-based medical image registration method—to set up the correspondence between organs from different subjects. The optimization function is denoted as + +$$ +\widehat {\mu} _ {k} = \underset {\mu} {\arg \min } C \left(I _ {k}, T (\hat {I}; \mu)\right), \tag {5} +$$ + +where we aim to find a transformation $T_{\mu}$ to non-rigidly align the 3D template image $\hat{I}$ to any given target fixed image $I_{n}$ , in order to minimize the selected cost function $C$ . The optimization target $\mu$ contains the transformation parameters of a linear transformation and a B-spline deformation field. We use here the mean square difference (MSD) for $C$ . The optimized transformation $T_{\hat{\mu}}$ can then be applied to the 3D template mesh $\hat{M}$ , such that we could use the transformed template mesh $T(\hat{M}; \hat{\mu})$ to represent any other cases in the dataset. Considering the template mesh $\hat{M}$ has $m$ vertices, every other case in the dataset can all be represented by $m$ vertices correspondingly. + +# 4.3. Finite Element Modeling for Deformation + +Our work aims to model the organ's deformation under different poses. To learn such pattern, multiple scans are needed for each patient under various pose conditions. As a matter of fact, such data is extremely difficult to require as it may introduce additional radiation to the subjects during acquisition. To make up for the lack of data, we run FEM simulations [11, 16, 23] to create organ deformations, by applying different amounts of load to the organ mesh model. + +We first study the statistics of the patients' pose information collected from the annotated SMPL dataset. The ma + +![](images/eef49dfbd2aaea962f9240c911ea87f5ec01c312955b85dc401373b5a1dc364b.jpg) +Figure 6. Synthetic data augmentation. We correlate some body movements (e.g., arms lifting) to the amount of internal organs stretching for synthetic data generation, using FEM. + +jority of subjects are lifting their arms to guarantee a better imaging purpose, as in Figure 2. To match such scenario, we simulate the relationship between pose and organ deformation with a focus on the rotation angles of collar and shoulder joints, i.e., the more lifted the arms are, the larger the stretching forces—and therefore deformation—applied to the organs are, as shown in Figure 6. We thus correlate the collars/shoulders' joints rotations parameters to the loads applied during finite element modeling, to produce a reasonable amount of deformation to the organ. Specifically, we assign nodal loads to the upper surface of the organs and place boundary constraints to stabilize the lower surface. The applied load will slightly stretch the organ in the positive Z-direction, so as to simulate how the organs deform while raising arms. For each case, we run FEM to generate a deformation sequence length of 10, from a resting pose to an extreme pose with corresponding amount of stretch in the organs. During the downstream analysis, we expect the trained network to recover such simulated relationship between the pose parameters and the organ deformation for a prove of theory. Used only during training (when computational constraints can be relaxed), the FEM method is a compensation for the lack of data samples. Even once multiple scans from each patient end up being collected, this simulation could be preserved to further augment the dataset. + +# 5. Experiments + +# 5.1. Implementation Details + +We collected 30 cases from IRB-approved clinical trial, each with the skin, lungs, kidneys, liver, and spleen segmentation. We follow the aforementioned data preparation (cf. Section 4.3) to generate the SMPL models for each patient by aligning the template model to the skin segmentation, and to further augment the dataset using FEM to create a sequence of deformed organs. We opt for different mesh size $m$ for the template of each organ due to the varying volume size of each organ (e.g., $m = 944$ vertices for the spleen, 3,184 vertices for the left lung, etc., as illustrated in Fig- + +![](images/d596e4f2d4658d56a4659891a7d9936e307e10ab447075716c9796e364997b21.jpg) +Figure 7. (A) Predicted deformation error (color-coded, in mm) for the left lung; (B) Impact of patients' pose parameter $\theta$ and organ parameter $\alpha$ on deformed spleen shape reconstruction (color-coded by the stretch amount w.r.t. the first frame in each sequence, in mm). + +![](images/6ab6443d1e10a83f8e7b98657e1b2378386980dc8f0b0de0efd12152e88f6a21.jpg) + +ure 5). During training, we subsample 512 equally spaced points to guarantee computational efficiency and maintain the point-to-point correspondence. We use $24/3/3$ sequence splits respectively for training, validation, and testing. + +The network structure of feature extractor $F$ and organ shape decoder $D$ are both multi-layer perceptrons, implemented using PyTorch [26]. Note that our solution is meant to be network-agnostic, e.g., the backbone for $F$ could be switched to any other network structures such as PointNet [32]. For each organ, we train the network end-to-end for 300 epochs with batch size $K = 8$ using Adam optimizer [18] with an initial learning rate of $1 \times 10^{-5}$ , which decays by 0.9 after every five epochs. + +# 5.2. Results and Discussions + +For each testing subject with FEM simulated deformation sequence $\{(\theta_i,\beta ,\alpha_i,M_i)|i = 0,\dots,10\}$ , we evaluate the proposed SMPL-A by reconstructing the 3D deformed meshes $\{M_{pred,i}|i = 1,\dots,10\}$ from the first frame's parameters $\alpha_0$ and $\theta_{i},\beta_{i}$ . Since there is little previous references for comparison, we compute a mean mesh for each sequence that serves as baseline method. Since the surface of the organ have point-to-point correspondence, we compute the surface distance error in millimeters as metric. + +The results for multi-organ reconstruction are shown in Table 1. We run a paired t-test for statistical analysis with a confidence interval of 0.05. The results suggest that the reconstruction error of the proposed SMPL-A is significantly lower than the baseline error. This indicates that the proposed SMPL-A is able to reconstruct the same person's 3D + +organ shape, stretched by a different pose. + +Figure 7-A shows the results for one left lung deformation sequence (refer to supplemental materials for more). Lifting of the arms is gradually increased from first to last row, leading to the stretching of the internal organs. The ground-truth column shows the organ deformed by the FEM. The color bar encodes the point-wise surface error (in mm), compared to the ground-truth. Comparing the two rightmost columns, we can observe how the smoothness constraint $L_{smooth}$ prevents the organ surface to become uneven (with points deviating from the expected surface planes) by enforcing smooth local deformations. + +Figure 7-B shows how different $\theta$ and $\alpha$ impacts our SMPL-A model. We reconstruct the spleen shape for different patients (i.e., varying $\alpha$ across columns) and different poses (i.e., varying $\theta$ across rows). The morphological differences indicate that SMPL-A can encode patient-specific organ information into $\alpha$ and recover the 3D point cloud from it, while also learning a correspondence between the patient pose information $\theta$ and predicted deformation. Additionally, Figure 8 shows the left lung mesh reconstruction for a different patient. We plot the errors onto the mesh surface for visual purposes. + +# 5.3. Ablation Studies + +To demonstrate that the low-dimensional representation $\alpha$ can encode the organ's shape information (similar to the 10-D shape parameter $\beta$ for the SMPL model), we train a 3D points cloud autoencoder with various sizes of latent space, noted as $k_{\alpha}$ . This experiment does not involve or + +![](images/5445044c3b5b59346adf6f865eb583f1c9d8f22455c7a3cdd725730883a64fb4.jpg) +Figure 8. Predicted deformation error (color-coded, in mm) for a left lung, using 3D mesh as target modality. + +Table 1. Reconstruction error (mm) for the deformation of six organ parts. The baseline method computes the error between mean and ground-truth shape. + +
Baseline ErrorSMPL-A Error
Spleen2.5353 ± 0.10881.4496 ± 0.0949
Liver2.9810 ± 0.13951.7832 ± 0.1012
Left Kidney2.2364 ± 0.11741.2694 ± 0.0974
Right Kidney2.4608 ± 0.12071.2504 ± 0.1088
Left Lung4.4784 ± 0.25862.2475 ± 0.1688
Right Lung4.9846 ± 0.24072.3716 ± 0.1942
+ +Table 2. We train a point-cloud autoencoder to reconstruct the organ's shape for $\alpha$ 's ablation study, without pose-conditioned deformation. + +
kαReconstruction Error (mm)
SpleenLiverLung_leftKidney_left
51.45 ± 0.232.45 ± 0.232.65 ± 0.211.65 ± 0.24
101.09 ± 0.171.76 ± 0.201.75 ± 0.231.33 ± 0.14
200.78 ± 0.131.21 ± 0.151.22 ± 0.180.84 ± 0.12
400.74 ± 0.161.05 ± 0.191.15 ± 0.160.82 ± 0.14
+ +gan deformation and only concentrates on the shape encoding. From Table 2 we can see that, for any organ mesh $M \in \mathbb{R}^{3 \times 512}$ , we can still reconstruct its shape from its latent representation $\alpha$ with relatively low reconstruction error, even when $k_{\alpha}$ is as low as 5. The larger the size of $\alpha$ , the more expressive it can be, which matches the intuition. + +We also try to understand the potential meaning behind each dimension in the latent representation $\alpha$ . In Figure 9, we gradually increase the first three values within the $\alpha$ vector to see their respective impacts on the organ shape reconstruction. The first value $\alpha[1]$ seems to correlate with + +![](images/906030d1ce09be79959b590e53cf13f09e43d7fab39ef8b40bff25ff2b844e65.jpg) +Figure 9. Impact of the first three values of $\alpha$ in reconstruction. + +the orientation of the organ; the second value $\alpha[2]$ correlates to the thickness in the vertical direction; the third value $\alpha[3]$ correlates more to the horizontal thickness. Similar to how changing the $\beta$ values results in SMPL models [22] that have different height, fatness and proportions; changing the $\alpha$ values results in our SMPL-A model recovering organs showing a variety of shapes. + +# 6. Conclusion + +In this work, we propose SMPL-A, a model for in vivo organ deformation based on the subject's different poses, as an extension to the SMPL family. We first set up the organ mesh correspondences through deformable image registration, followed by FEM to simulate organ deformation caused by lifting the arms. The generated organ mesh representations and corresponding pose/shape parameters are used for training the SMPL-A network. Upon convergence, the SMPL-A network can extract the organ's shape representation $\alpha$ specific to each patient, and predict its deformed shape, conditioned on different pose parameters. During inference, given the organ shape representation $\alpha$ of a person in record, and his/her current pose/shape parameters, SMPL-A can predict the current organ shape for various applications such as surgery guidance and radiotherapy. + +To reflect on our method, we use FEM to simulate pose-dependent organ deformation as a compensation to data scarcity. The simulation may not perfectly match real-life data, yet experimental results demonstrate that proposed SMPL-A can recover such complex, simulated relationship. Given sufficient data, we could further disentangle $\theta$ (e.g., for body articulations not covered yet by SMPL) and also $\beta$ (requiring, e.g., time-series morphological information) from the organ's information, and reveal the intrinsic relationship between body pose/shape and in vivo organ's deformation. + +As the first study of this kind (leveraging cross-modal correspondences to tie human pose and organ deformation), our work aims to demonstrate the soundness and feasibility of such an approach, and to inspire further studies, as well as further data collection effort to enable them. + +# References + +[1] D. Anguelov, P. Srinivasan, D. Koller, S. Thrun, J. Rodgers, and J. Davis. Scape: shape completion and animation of people. In ACM SIGGRAPH 2005 Papers, pages 408-416. 2005. 2 +[2] G. Balakrishnan, A. Zhao, M. R. Sabuncu, J. Guttag, and A. V. Dalca. Voxelmorph: a learning framework for deformable medical image registration. IEEE transactions on medical imaging, 38(8):1788-1800, 2019. 5 +[3] Z. M. Baum, Y. Hu, and D. C. Barratt. Real-time multimodal image registration with partial intraoperative point-set data. Medical image analysis, 74:102231, 2021. 3 +[4] B. L. Bhatnagar, C. Sminchisescu, C. Theobalt, and G. Pons-Moll. Combining implicit function learning and parametric models for 3d human reconstruction. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part II 16, pages 311-329. Springer, 2020. 5 +[5] F. Bogo, A. Kanazawa, C. Lassner, P. Gehler, J. Romero, and M. J. Black. Keep it smpl: Automatic estimation of 3d human pose and shape from a single image. In European conference on computer vision, pages 561-578. Springer, 2016. 3 +[6] L. Cheng, S. Chen, X. Liu, H. Xu, Y. Wu, M. Li, and Y. Chen. Registration of laser scanning point clouds: A review. Sensors, 18(5):1641, 2018. 3 +[7] B. O. Community. Blender - a 3D modelling and rendering package. Blender Foundation, Stichting Blender Foundation, Amsterdam, 2018. 5 +[8] G. Delaney, S. Jacob, C. Featherstone, and M. Barton. The role of radiotherapy in cancer treatment: estimating optimal utilization from a review of evidence-based clinical guidelines. Cancer: Interdisciplinary International Journal of the American Cancer Society, 104(6):1129-1137, 2005. 1 +[9] H. Deng, T. Birdal, and S. Ilic. Ppfnet: Global context aware local features for robust 3d point matching. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 195-205, 2018. 3 +[10] A. J. Einstein. Effects of radiation exposure from cardiac imaging: how good are the data? Journal of the American College of Cardiology, 59(6):553-565, 2012. 1 +[11] S. M. Finley, D. S. Brodke, N. T. Spina, C. A. DeDen, and B. J. Ellis. Febio finite element models of the human lumbar spine. Computer methods in biomechanics and biomedical engineering, 21(6):444-452, 2018. 2, 6 +[12] J. D. Hall, M. Godwin, and T. Clarke. Lifetime exposure to radiation from imaging investigations. Canadian Family Physician, 52(8):976-977, 2006. 1 +[13] K. Halonen, C. M. Dzialo, M. Mannisi, M. Venäläinen, M. de Zee, and M. S. Andersen. Workflow assessing the effect of gait alterations on stresses in the medial tibial cartilage-combined musculoskeletal modelling and finite element analysis. Scientific reports, 7(1):1-14, 2017. 3 +[14] D. A. Hirshberg, M. Loper, E. Rachlin, and M. J. Black. Coregistration: Simultaneous alignment and modeling of articulated 3d shape. In European conference on computer vision, pages 242-255. Springer, 2012. 2 + +[15] X. Huang, G. Mei, J. Zhang, and R. Abbas. A comprehensive survey on point cloud registration. arXiv preprint arXiv:2103.02690, 2021. 3 +[16] S. F. Johnsen, Z. A. Taylor, M. J. Clarkson, J. Hipwell, M. Modat, B. Eiben, L. Han, Y. Hu, T. Mertzanidou, D. J. Hawkes, et al. Niftysim: Agpu-based nonlinear finite element package for simulation of soft tissue biomechanics. International journal of computer assisted radiology and surgery, 10(7):1077-1095, 2015. 2, 6 +[17] S. Karanam, R. Li, F. Yang, W. Hu, T. Chen, and Z. Wu. Towards contactless patient positioning. IEEE transactions on medical imaging, 39(8):2701-2710, 2020. 3 +[18] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 7 +[19] S. Klein, M. Staring, K. Murphy, M. A. Viergever, and J. P. Pluim. Elastix: a toolbox for intensity-based medical image registration. IEEE transactions on medical imaging, 29(1):196-205, 2009. 3, 6 +[20] C. Lassner, J. Romero, M. Kiefel, F. Bogo, M. J. Black, and P. V. Gehler. Unite the people: Closing the loop between 3d and 2d human representations. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6050-6059, 2017. 3 +[21] H. M. Le, T.-T. Do, T. Hoang, and N.-M. Cheung. Sdrsc: Semidefinite-based randomized approach for robust point cloud registration without correspondences. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 124-133, 2019. 3 +[22] M. Loper, N. Mahmood, J. Romero, G. Pons-Moll, and M. J. Black. Smpl: A skinned multi-person linear model. ACM transactions on graphics (TOG), 34(6):1-16, 2015. 2, 3, 8 +[23] S. A. Maas, B. J. Ellis, G. A. Ateshian, and J. A. Weiss. Febio: finite elements for biomechanics. Journal of biomechanical engineering, 134(1), 2012. 2, 6 +[24] A. Mazier, S. Ribes, R. Testylier, F. Van Meer, B. Gilles, F. Faure, and S. Bordas. A rigged model of the breast for preoperative surgical planning. arXiv preprint arXiv:2105.00763, 2021. 2 +[25] A. Mendizabal, P. Márquez-Neila, and S. Cotin. Simulation of hyperelastic materials in real-time using deep learning. Medical image analysis, 59:101569, 2020. 3 +[26] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. Advances in neural information processing systems, 32:8026-8037, 2019. 7 +[27] G. Pavlakos, V. Choutas, N. Ghorbani, T. Bolkart, A. A. Osman, D. Tzionas, and M. J. Black. Expressive body capture: 3d hands, face, and body from a single image. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10975-10985, 2019. 2, 3, 5 +[28] G. Pavlakos, L. Zhu, X. Zhou, and K. Daniilidis. Learning to estimate 3d human pose and shape from a single color image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 459-468, 2018. 3 +[29] M. Pfeiffer, C. Riediger, S. Leger, J.-P. Kühn, D. Seppelt, R.-T. Hoffmann, J. Weitz, and S. Speidel. Non-rigid vol + +ume to surface registration using a data-driven biomechanical model. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 724-734. Springer, 2020. 3 +[30] M. Pfeiffer, C. Riediger, J. Weitz, and S. Speidel. Learning soft tissue behavior of organs for surgical navigation with convolutional neural networks. International journal of computer assisted radiology and surgery, 14(7):1147-1155, 2019. 3 +[31] R. Phellan, B. Hachem, J. Clin, J.-M. Mac-Thiong, and L. Duong. Real-time biomechanics using the finite element method and machine learning: Review and perspective. Medical Physics, 48(1):7-18, 2021. 3 +[32] 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. 3, 7 +[33] J. Romero, D. Tzionas, and M. J. Black. Embodied hands: Modeling and capturing hands and bodies together. ACM Transactions on Graphics (ToG), 36(6):1-17, 2017. 2, 3 +[34] Y. Salehi and D. Giannacopoulos. Physgnn: A physics-driven graph neural network based model for predicting soft tissue deformation in image-guided neurosurgery. arXiv preprint arXiv:2109.04352, 2021. 3 +[35] L. Wang, J. Chen, X. Li, and Y. Fang. Non-rigid point set registration networks. arXiv preprint arXiv:1904.01428, 2019. 3 +[36] Y. Xu, W. Wang, T. Liu, X. Liu, J. Xie, and S.-C. Zhu. Monocular 3d pose estimation via pose grammar and data augmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021. 3 +[37] H. Yang and L. Carlone. A polynomial-time solution for robust registration with extreme outlier rates. arXiv preprint arXiv:1903.08588, 2019. 3 +[38] S. Yeo, J. Romero, M. Loper, J. Machann, and M. Black. Shape estimation of subcutaneous adipose tissue using an articulated statistical shape model. Computer Methods in Biomechanics and Biomedical Engineering: Imaging & Visualization, 6(1):51-58, 2018. 3 \ No newline at end of file diff --git a/smplamodelingpersonspecificdeformableanatomy/images.zip b/smplamodelingpersonspecificdeformableanatomy/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7c2773af37a80541474a974b12d4cda1a362755d --- /dev/null +++ b/smplamodelingpersonspecificdeformableanatomy/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20116e56034d1c8f224cca2503e3404c5d7c348fc0fdaeab90fff66e5a2d1c42 +size 644520 diff --git a/smplamodelingpersonspecificdeformableanatomy/layout.json b/smplamodelingpersonspecificdeformableanatomy/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0e9fda73b1ee29c314056a551cedffd2a9847ee6 --- /dev/null +++ b/smplamodelingpersonspecificdeformableanatomy/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57f97b178b16ac0d91262bd305821aece55ba7b9964c62353448d5792c33d957 +size 413833 diff --git a/snrawarelowlightimageenhancement/fc04e479-62bc-4c84-a704-b16a1d9b83fa_content_list.json b/snrawarelowlightimageenhancement/fc04e479-62bc-4c84-a704-b16a1d9b83fa_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4573dbaf339efafab4fdfab35ed7f0a0275af17e --- /dev/null +++ b/snrawarelowlightimageenhancement/fc04e479-62bc-4c84-a704-b16a1d9b83fa_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9b3ab8bc8ed6887870a4d5105543ec3411ed25e303a18ab868807b244b1a887 +size 86955 diff --git a/snrawarelowlightimageenhancement/fc04e479-62bc-4c84-a704-b16a1d9b83fa_model.json b/snrawarelowlightimageenhancement/fc04e479-62bc-4c84-a704-b16a1d9b83fa_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a033d92673adfa2f4ebbb7b543e7e9d0a6337d94 --- /dev/null +++ b/snrawarelowlightimageenhancement/fc04e479-62bc-4c84-a704-b16a1d9b83fa_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a611a6b2eff5800dd256dea5ba2d8801cf709f3727887ea23c134889ebd6f449 +size 111327 diff --git a/snrawarelowlightimageenhancement/fc04e479-62bc-4c84-a704-b16a1d9b83fa_origin.pdf b/snrawarelowlightimageenhancement/fc04e479-62bc-4c84-a704-b16a1d9b83fa_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6e39f77165c7beec14e43f126d3d9ceaea7f08d0 --- /dev/null +++ b/snrawarelowlightimageenhancement/fc04e479-62bc-4c84-a704-b16a1d9b83fa_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0377c1f0c11baae63fafe4dba463ef1363d1aac2a47902ba76bed294acf3884 +size 8150989 diff --git a/snrawarelowlightimageenhancement/full.md b/snrawarelowlightimageenhancement/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7e7b134e1b294746d0e157bc111064f460226237 --- /dev/null +++ b/snrawarelowlightimageenhancement/full.md @@ -0,0 +1,404 @@ +# SNR-Aware Low-light Image Enhancement + +Xiaogang Xu $^{1}$ Ruixing Wang $^{1,2}$ Chi-Wing Fu $^{1}$ Jiaya Jia $^{1}$ $^{1}$ The Chinese University of Hong Kong ${}^{2}$ SmartMore + +{xgxu, rxwang, cwfu, leojia}@cse.cuhk.edu.hk + +# Abstract + +This paper presents a new solution for low-light image enhancement by collectively exploiting Signal-to-Noise-Ratio-aware transformers and convolutional models to dynamically enhance pixels with spatial-varying operations. They are long-range operations for image regions of extremely low Signal-to-Noise-Ratio (SNR) and short-range operations for other regions. We propose to take an SNR prior to guide the feature fusion and formulate the SNR-aware transformer with a new self-attention model to avoid tokens from noisy image regions of very low SNR. Extensive experiments show that our framework consistently achieves better performance than SOTA approaches on seven representative benchmarks with the same structure. Also, we conducted a large-scale user study with 100 participants to verify the superior perceptual quality of our results. The code is available at https://github.com/dvlab-research/SNR-Aware-Low-Light-Enhance. + +# 1. Introduction + +Low-light imaging is critical for many tasks, such as object and action recognition at night [18, 27]. Low-light images are generally with poor visibility for human perception. Similarly, downstream vision tasks can be affected when taking low-light images directly as the input. + +Several methods have been proposed to enhance low-light images. The de facto approach nowadays is to develop neural networks that learn to manipulate color, tone, and contrast to enhance low-light images [12, 15, 41, 56], while some recent works account for noise in images [29, 48]. In this paper, our key insight is that different regions in a low-light image can have different characteristics of lightness, noise, visibility, etc. Regions of extremely low lightness are heavily corrupted by noise, while other regions in the same image can still have reasonable visibility and contrast. For better overall image enhancement, we should adaptively consider different regions in the low-light images. + +To this end, we study the relation between signal and noise in image space by exploring Signal-to-Noise-Ratio + +![](images/a5c2d1966139d8847baa6848e9fa3a0bce6abd106ac802a67baf1a1f4ef83ebd.jpg) + +![](images/6cae9561b4e0638b1d2423b1213cb089e6d6f3cd042ebc8a5c2ee510e735e1d5.jpg) + +![](images/40327902b7a02d79ed340504d9bba03433569a1759757c51828b7665b7a001b4.jpg) + +![](images/f0ee94906225a92e9944b05906afdb7c3a31f802fff37ca4431bac849d6b33d0.jpg) + +![](images/8f6fa1c618d470e066043957854d2b7a54d17129d9f6ebf583931f3776011f51.jpg) + +![](images/f22e4f07d65952182ff19b3f281ec294b0f239c61e767b6745266908a5e6cea2.jpg) +$\triangle$ IPT (CVPR2021) 3DLUT (TPAMI2020) Band (TIP2021) $\times$ FIDE (CVPR2020) Uformer (CVPR2022) + +Figure 1. Our approach consistently achieves better performance in terms of PSNR/SSIM over 10 SOTA methods on 7 different benchmarks with the same network structure. Each plot is for comparison on one benchmark dataset. +![](images/93f27ea4738e7a81ed54e92b2f651abb893aea439aeb9a6f99b9fddbf83c8d7d.jpg) +MIRNet (ECCV2020) A3DLUT (ICCV2021) +- Sprase (TIP2021) +Retinex (CVPR2021) +$\times$ EG (TIP2021) +Ours + +(SNR) [3, 54] for achieving spatial-varying enhancement. In particular, regions of lower SNR are typically unclear. So we exploit non-local image information in longer spatial range for image enhancement. On the other hand, regions of relatively higher SNR typically have higher visibility and less noise. Thus local image information is typically sufficient. Fig. 2 shows a low-light image example for illustration. Further discussion is presented in Sec. 3.1. + +Our solution to low-light image enhancement in the RGB domain is to collectively exploit long- and short-range operations. In the deepest hidden layer, we design two branches. The long-range branch with a transformer structure [38] is to capture non-local information and the short-range one with convolutional residual blocks [17] captures local information. When enhancing each pixel, we determine the contribution of local (short-range) and nonlocal (long-range) information dynamically based on the + +![](images/715a21ac32d0e5f6a17897c57dc466cdc40bfcc80e29308e61126dead60c0cae.jpg) +Figure 2. Low-light image enhancement requires spatial-varying operations. The blue (or red) region has extremely low (or relatively high) SNR. It offers inadequate (or sufficient) local image information for image enhancement. In operations, we use long-range image information for the blue region, since it has been heavily corrupted by noise. We linearly scale up brightness on the right for visualizing noise in different image regions. + +![](images/a9428b601f6d9e2dba7df102d500e8024fb7d923e924dcdd8610a0bd7d21f40c.jpg) + +pixel's signal-to-noise ratio. Hence, in regions of high SNR, local information plays a vital role during the enhancement, whereas in regions of very low SNR, non-local messages are effective. To achieve such spatial-varying operations, we construct an SNR prior and use it to guide feature fusion. Also, we modify the attention mechanism in the transformer structure and propose the SNR-aware transformer. Unlike existing transformer structure, not all tokens contribute to the attention computation. We consider only the tokens with sufficient SNR values to avoid noise influence from the very-low-SNR regions. + +Our framework effectively enhances low-light images of dynamic noise levels. Extensive experiments were conducted on 7 representative datasets: LOL (v1 [45], v2-real [53], & v2-synthetic [53]), SID [5], SMID [4], and SDSD (indoor & outdoor) [39]. As shown in Fig. 1, our framework outperforms 10 SOTA approaches on all datasets with the same structure. Further, we conduct large-scale user study with 100 participants to verify the effectiveness of our approach. Qualitative comparison is presented in Fig. 3. Overall, our contribution is threefold. + +- We propose a new signal-to-noise-aware framework that simultaneously adopts a transformer structure and a convolutional model for achieving spatial-varying low-light image enhancement with an SNR prior. +- We design an SNR-aware transformer with a new self-attention module for low-light image enhancement. +- We conducted extensive experiments on seven representative datasets, manifesting that our framework consistently outperforms a rich set of SOTA methods. + +# 2. Related Work + +No-learning-based Low-light Image Enhancement. To enhance low-light images, histogram equalization and gamma correction are fundamental tools to expand the dynamic range and increase the image contrast. These + +![](images/7425807f5951c106d5de047daf3cc97800b9c443a4478f23829f43cdb1ce1d7d.jpg) +(a) Input + +![](images/bf79b6254d19b1b9823e78d871ab4b687dc8d7941fe078ca4eeab17a16ca955d.jpg) +(b) MIR-Net [59] (ECCV 2020) + +![](images/7a02339119c4b0a01c6d62656a08e086e58cedf2ea30c05c42086d5b5e971699.jpg) +(c) IPT [6] (CVPR 2021) +Figure 3. A challenging low-light frame (a) enhanced by a SOTA method with a convolutional structure (b), a SOTA transformer structure (c), and our method (d). Ours exhibits clearer details, more distinct contrast, and less noise (best view by zoom-in). + +![](images/62b349a0f1932ac01998a314710607e9f5317f69b5b37bff67b5e859be9fa8d5.jpg) +(d) Ours + +primary approaches tend to produce undesirable artifacts in the enhanced real-world images. Retinex-based methods, which treat the reflectance component as plausible approximation for image enhancement, are able to produce more realistic and natural results [28, 35]. However, when enhancing complicated real-world images, this line of methods often distort colors locally [40]. + +Learning-based Low-light Image Enhancement. Many learning-based low-light image enhancement approaches were proposed in recent years [2, 14, 20, 22, 29, 31, 42, 48-50, 52, 53, 59, 60, 62, 63]. Wang et al. [40] proposed to predict the illumination map for enhancing underexposed photos. Sean et al. [33] designed a strategy to learn three different types of spatially local filters for enhancement. Yang et al. [51] presented a semi-supervised approach to recover a linear-band representation of the low-light image. Also, there are unsupervised methods [7, 14, 19]. For instance, Guo et al. [14] built a lightweight network to estimate pixelwise and high-order curves for dynamic range adjustment. + +Unlike previous work, our new approach enhances low-light image based on a signal-to-noise-aware framework consisting of a new SNR-aware transformer design and a convolutional model to adaptively enhance low-light images in a spatial-varying manner. As shown in Fig. 1, our framework achieves better performance consistently on seven different benchmarks with the same structure. + +# 3. Our Method + +Fig. 4 shows the overview of our framework. The input is a low-light image, from which we first obtain an SNR map using a simple and yet effective strategy (see Sec. 3.2 for details). We propose to take SNR to guide our framework to learn different enhancement operations adaptively for image regions of varying signal-to-noise ratios. + +In the deepest hidden layer of our framework, we design + +![](images/4890e21a97b8df66253410620a937836c714c8371823fb64992e0563294075b3.jpg) +Figure 4. Our framework for low-light image enhancement starts by estimating an SNR map for guiding pixel enhancement in different image regions. We formulate an SNR-guided attention (Fig. 5) to guide how our patch-wise SNR-aware transformer processes long-range image information, particularly for enhancing image regions of very low SNR. Further, we develop the SNR-guided fusion to combine resulting long-range feature $\mathcal{F}_l$ with short-range feature $\mathcal{F}_s$ to produce the final image feature $\mathcal{F}$ . + +two different branches for long- and short-range. They are specifically formulated for achieving efficient operations, implemented by transformer [38] and convolution structures, respectively. To achieve the long-range operations while avoiding the influence of noise in extremely low-light regions, we guide the attention mechanism in transformer with an SNR map. To adopt different operations, we develop an SNR-based fusion strategy to obtain a combined representation from the long- and short-range features. Also, we use skip connections from the encoder to decoder to enhance image details. + +# 3.1. Long- and Short-range Branches + +Necessity of spatial-varying operations. Traditional networks for low-light image enhancement adopt convolution structures in the deepest hidden layer. These operations have short-range to capture local information mostly. Local information may suffice to recover image regions that are not extremely dark, since these pixels still contain an amount of visible image content (or signals). But for extremely dark regions, local information is inadequate for enhancing pixels, since adjacent local regions are also weak in terms of visibility and are mostly dominated by noise. + +To address this key issue, we dynamically enhance pixels in different regions with varying local and non-local communication. Local and non-local information is complementary. The effect can be determined based on the SNR distribution over the image. On the one hand, for image regions of high SNR, local information should play the major role, since local information is adequate + +for enhancement. It is generally more accurate than long-distance non-local information. + +On the other hand, for image regions of very low SNR, we pay more attention to non-local information, since local regions likely have very little image information while being dominated by noise. Unlike previous methods, we explicitly formulate a long-range branch for image regions of very low SNR and a short-range branch for other regions in the deepest hidden layer of our framework (see Fig. 4). + +Implementation of two branches. The short-range branch is implemented based on the structure of convolutional residual blocks for capturing local information, whereas the long-range branch is implemented based on the structure of transformer [38] since transformers are good at capturing long-range dependency via the global self-attention mechanism, as demonstrated in many high-level [10, 16, 21, 30, 46, 57, 58] and low-level tasks [6, 44]. + +In the long-range branch, we first partition feature map $F$ (extracted by the encoder from input image $I \in \mathbb{R}^{H \times W \times 3}$ ) into $m$ feature patches, i.e., $F_{i} \in \mathbb{R}^{p \times p \times C}$ , $i = \{1, \dots, m\}$ . Suppose the size of feature map $F$ is $h \times w \times C$ and the patch size is $p \times p$ . There are $m = \frac{h}{p} \times \frac{w}{p}$ feature patches for covering the entire feature map. + +As shown in Fig. 4, our SNR-aware transformer is patch-based. It consists of the multi-head self-attention (MSA) modules [38] and the feed-forward networks (FFN) [38], both composed of two fully connected layers. The output features $\mathcal{F}_1,\dots,\mathcal{F}_m$ from the transformer have the same size as the input feature patches. We flatten $F_{1},\ldots ,F_{m}$ into 1D + +features and perform the computation of + +$$ +\begin{array}{l} y _ {0} = \left[ F _ {1}, F _ {2}, \dots , F _ {m} \right], \\ q _ {i} = k _ {i} = v _ {i} = L N \left(y _ {i - 1}\right), \\ \widehat {y} _ {i} = M S A \left(q _ {i}, k _ {i}, v _ {i}\right) + y _ {i - 1}, \tag {1} \\ y _ {i} = F F N \left(L N \left(\widehat {y} _ {i}\right)\right) + \widehat {y} _ {i}, \\ \text {a n d} \left[ \mathcal {F} _ {1}, \mathcal {F} _ {2}, \dots , \mathcal {F} _ {m} \right] = y _ {l}, i = \{1, \dots , l \}, \\ \end{array} +$$ + +where $LN$ denotes layer normalization; $y_{i}$ denotes the output of the $i$ -th transformer block; $MSA$ denotes our SNR-aware multi-head self-attention module (see Fig. 5), which will be detailed in Sec. 3.3; $q_{i}, k_{i}$ , and $v_{i}$ denote the query, key, and value vectors, respectively, in the $i$ -th multi-head self-attention module; and $l$ denotes the number of layers in the transformer. The transformed features $\mathcal{F}_1, \dots, \mathcal{F}_m$ can be merged to form the 2D feature map $\mathcal{F}_l$ (see Figure 4). + +# 3.2. SNR-based Spatially-varying Feature Fusion + +The SNR map. As shown in Fig. 4, our framework starts by estimating an SNR map. It is difficult and tedious to estimate the amount of noise in input image $I$ and prepare a clean version of $I$ to determine the SNR value of each pixel, given only a single input image. Similar to previous no-learning-based denoising approaches [1,8], we treat noise as discontinuous transition between adjacent pixels in spatial domain. The noise component can be modeled as the distance between the noisy image and an associated clean image. In this work, we use it to estimate the SNR map of $I$ and make it an effective prior for our spatial-varying feature fusion. Given $I \in \mathbb{R}^{H \times W \times 3}$ , we first compute the gray-scale of $I$ , i.e., $I_g \in \mathbb{R}^{H \times W}$ , followed by computing the SNR map $S \in \mathbb{R}^{H \times W}$ as + +$$ +\widehat {I} _ {g} = \text {d e n o i s e} \left(I _ {g}\right), \quad N = \operatorname {a b s} \left(I _ {g} - \widehat {I} _ {g}\right), \quad S = \widehat {I} _ {g} / N, \tag {2} +$$ + +where denoise is a no-learning-based denoising operation (with experiments in Sections 4.2 and 4.3), e.g., averaging local groups of pixels; abs denotes the absolute value; and $N \in \mathbb{R}^{H \times W}$ is the estimated noise map. Although the resulting SNR values are approximates given the extracted noise not accurate, our framework with such SNR map is still effective as verified by our extensive experiments. + +Spatial-varying feature fusion with the SNR map. As shown in Fig. 4, we employ encoder $\mathcal{E}$ to extract feature $F$ from input image $I$ . The feature is then processed separately by the long- and short-range branches, which produce long-range feature $\mathcal{F}_l \in \mathbb{R}^{h \times w \times C}$ and short-range feature $\mathcal{F}_s \in \mathbb{R}^{h \times w \times C}$ . To adaptively combine the two features, we resize the SNR map into $h \times w$ , normalize its values to range [0, 1], and take the normalized SNR map $S'$ as interpolation weights to fuse $\mathcal{F}_l$ and $\mathcal{F}_s$ as + +$$ +\mathcal {F} = \mathcal {F} _ {s} \times S ^ {\prime} + \mathcal {F} _ {l} \times (1 - S ^ {\prime}), \tag {3} +$$ + +![](images/55981596ca2f89dfce5f4ff4a3c0f8d5851fb4a13ecb8e60ffe63ec5cdd78991.jpg) +Figure 5. Illustration: SNR-guided attention in transformer. Black squares are elements ignored by SoftMax; colored squares reveal the similarity between feature tokens. They are used in SoftMax. + +where $\mathcal{F} \in \mathbb{R}^{h \times w \times C}$ is the output feature to be passed to the decoder for producing the final output image. Since values in the SNR map dynamically reveal the level of noise in different regions of the input image, the fusion can adaptively combine local (short-range) and non-local (long-range) image information for production of $\mathcal{F}$ . + +# 3.3. SNR-guided Attention in Transformer + +Limitation of traditional transformer structures. Although traditional transformers can capture non-local information for enhancing images, they have critical issues. In original structures, the attention is computed among all patches. To enhance a pixel, the long-range attention may come from any image region, regardless of the signal and noise levels. In fact, regions of very low SNR are dominated by noise. Thus, their information is inaccurate, severely disrupting image enhancement. Here, we propose SNR-guided attention to improve transformer in this special task. + +SNR-aware transformer. Fig. 5 shows our SNR-aware transformer with the new self-attention module. Given input image $I \in \mathbb{R}^{H \times W \times 3}$ and associated SNR map $S \in \mathbb{R}^{H \times W}$ , we first resize $S$ to $S' \in \mathbb{R}^{h \times w}$ to match the size of feature map $F$ . We then partition $S'$ into $m$ patches following the way we partition $F$ into patches, and compute the average value in each patch, i.e., $S_i \in \mathbb{R}^1, i = \{1, \dots, m\}$ . We pack these values into vector $S \in \mathbb{R}^m$ . It acts as a mask in the attention computation of the transformer, which can avoid the message propagation from image regions of extremely low SNR (see Fig. 5) in the transformer. The mask value of the $i$ -th element of $S$ is + +expressed as + +$$ +\mathcal {S} _ {i} = \left\{ \begin{array}{l l} 0, & S _ {i} < s \\ 1, & S _ {i} \geq s \end{array} , i = \{1, \dots , m \}, \right. \tag {4} +$$ + +where $s$ is a threshold value. Next, we stack $m$ copies of $\mathcal{S}$ to form matrix $\mathcal{S}' \in \mathbb{R}^{m \times m}$ . Suppose the head number is $B$ for the multi-head self-attention (MSA) module (Eq. (1)), the $b$ -th head self-attention calculation $Attention_{i,b}$ in the transformer's $i$ -th layer is formulated as + +$$ +\mathbf {Q} _ {i, b} = q _ {i} W _ {b} ^ {q}, \mathbf {K} _ {i, b} = k _ {i} W _ {b} ^ {k}, \mathbf {V} _ {i, b} = v _ {i} W _ {b} ^ {v}, \quad \text {a n d} \tag {5} +$$ + +$$ +\text {A t t e n t i o n} _ {i, b} \left(\mathbf {Q} _ {i, b}, \mathbf {K} _ {i, b}, \mathbf {V} _ {i, b}\right) = \operatorname {S o f t m a x} \left(\frac {\mathbf {Q} _ {i , b} \mathbf {K} _ {i , b} ^ {T}}{\sqrt {d _ {b}}} + (1 - S ^ {\prime}) \sigma\right) \mathbf {V} _ {i, b}, \tag {6} +$$ + +where $q_{i}, k_{i}, v_{i} \in \mathbb{R}^{m \times (p \times p \times C)}$ are input 2D features in Eq. (1); $W_{k}^{q}, W_{k}^{k}, W_{k}^{v} \in \mathbb{R}^{(p \times p \times C) \times C_{k}}$ represent the projection matrices for the $k$ -th head; $\mathbf{Q}_{i,b}, \mathbf{K}_{i,b}, \mathbf{V}_{i,b} \in \mathbb{R}^{m \times C_{k}}$ are the query, key, and value features, respectively, in attention computation. + +The output shape of Softmax() and $Attention_{i,b}$ is $m \times m$ and $m \times C_k$ , respectively, where $C_k$ is the channel number in the self-attention computation. Also, $\sqrt{d_k}$ is for normalization and $\sigma$ is a small negative scalar $-1e9$ . The output of all $B$ heads are concatenated. All values are linearly projected to produce the final output of $MSA$ in the transformer's $i$ -th layer. Thus, we ensure that long-range attentions are from the image regions with sufficient SNR. + +# 3.4. Loss Function + +Data flow. Given the input image $I$ , we first apply an encoder with convolutional layers to extract feature $F$ . Each stage in the encoder contains a stack of the convolutional layer and LeakyReLU [47]. Residual convolutional blocks are used after the encoder. Then, we forward $F$ to the long- and short-range branches to produce features $\mathcal{F}_l$ and $\mathcal{F}_s$ . Lastly, we fuse $\mathcal{F}_l$ and $\mathcal{F}_s$ into $\mathcal{F}$ and use the decoder (symmetrical to the encoder) to transfer $\mathcal{F}$ into the residual $R$ . The final output image $I'$ is $I' = I + R$ . + +Loss terms. There are two reconstruction loss terms to train our framework, i.e., the Charbonnier loss [25] and the perceptual loss. The Charbonnier loss is written as + +$$ +L _ {r} = \sqrt {\| I ^ {\prime} - \widehat {I} \| _ {2} + \epsilon^ {2}}, \tag {7} +$$ + +where $\widehat{I}$ is the ground truth and $\epsilon$ is set as $10^{-3}$ in all experiments. The perceptual loss compares the VGG feature distances between $\widehat{I}$ and $I^{\prime}$ using an $L_{1}$ loss as + +$$ +L _ {v g g} = \left\| \Phi \left(I ^ {\prime}\right) - \Phi (\widehat {I}) \right\| _ {1}, \tag {8} +$$ + +where $\Phi()$ is the operation of extracting features from the VGG network [37]. The overall loss function is + +$$ +L = L _ {r} + \lambda L _ {v g g}, \tag {9} +$$ + +where $\lambda$ is a hyper parameter. + +# 4. Experiments + +# 4.1. Datasets and Implementation Details + +We evaluate our framework on several datasets with noise observable in low-light image regions. They are LOL (v1 & v2) [45, 53], SID [5], SMID [4], and SDSD [39]. + +LOL has noticeable noise in both v1 and v2 versions. LOL-v1 [45] contains 485 pairs of low-/normal-light images for training and 15 pairs for testing. Each pair includes a low-light input image and an associated well-exposed reference image. LOL-v2 [53] is divided into LOL-v2-real and LOL-v2-synthetic. LOL-v2-real contains 689 low-/normal-light image pairs for training and 100 pairs for testing. Most low-light images were collected by changing the exposure time and ISO with other camera parameters fixed. LOL-v2-synthetic was created by analyzing the illumination distribution in the RAW format. + +For SID and SMID, each input sample is a pair of short- and long-exposure images. Both SID and SMID have heavy noise, as the low-light images were captured in extreme dark environments. For SID, we use the subset captured by the Sony camera and follow the script provided by SID to transfer the low-light images from RAW to RGB using rawpy's default ISP. For SMID, we use its full images and also transfer the RAW data to RGB, since our work explores low-light image enhancement in the RGB domain. We set the training and testing split according to that of [4]. + +Lastly, we adopt the SDSD dataset [39] (the static version) for evaluation. It contains an indoor subset and an outdoor subset, both providing low- and normal-light pairs. + +We implement our framework in PyTorch [34], and train and test it on a PC with a 2080Ti GPU. We train our method from scratch with network parameters randomly initialized with Gaussian distribution and adopt standard augmentation, e.g., vertical and horizontal flips. The encoder of our framework has three convolution layers (i.e., strides 1, 2, and 2) with one residual block after the encoder. The decoder is symmetric to the encoder with the upsampling mechanism implemented using the pixel shuffle layer [36]. For the loss minimization, we adopt the Adam [23] optimizer with momentum set to 0.9. + +# 4.2. Comparison with Current Methods + +We compare our method with a rich collection of SOTA methods for low-light image enhancement, including Dong [9], LIME [15], MF [11], SRIE [12], BIMEF [55], DRD [45], RRM [28], SID [5], DeepUPE [40], KIND [61], DeepLPF [33], FIDE [48], LPNet [26], MIR-Net [59], RF [24], 3DLUT [60], A3DLUT [42], Band [52], EG [20], Retinex [29], and Sparse [53]. Also, we compared our framework with two recent transformer structures for low-level tasks, i.e., IPT [6] and Uformer [44]. + +Quantitative analysis. We adopt Peak Signal-to-Noise + +![](images/7a9bbe106f615c632f66b28fcb18e8ca765579b93b26a27923001497aee6262e.jpg) +Input + +![](images/7ebdf841786074dce50eee1ad828214d6c9f481bf6e8cd1dd5bbc1b3647ec203.jpg) +LPNet [26] + +![](images/82caa24c5dae7f9ff214d103166526e063b9aa245873f13c43313862315a755f.jpg) +MIR-Net [59] + +![](images/25135cb0100e04ebd651924843228c7e8c3f858de677c38f1de692b9e2face3b.jpg) +Ours + +![](images/5e1b795c6acccddba028307e5c80fe823dcad47e2fbdd98956ede4facbe486a5.jpg) +GT + +![](images/942000878000077273ab9011ce3c37fb5cdb3ece8e9ad78b1d34e414d5f5b0ca.jpg) +Input + +![](images/8c3203ac294112163d3dbfd271fa85649780ece2b28eb642a247a10c195a7539.jpg) +Band [52] + +![](images/a788e2ae77a99f1ab57e557bdbf4dec745b22e4fa6361975305465f612bc100c.jpg) +Sparse [53] + +![](images/d1d8898459766a00f5a422fee403f75484273ed4b8ca44421e451caf731133bc.jpg) +Ours + +![](images/3bc354615ec45c08e4f0d1355a563521c101b50bda83da2124f4042ffc3023d0.jpg) +GT + +![](images/a784d7e753531eadc5cf2597e1cb4e64670fb9fef8afba32ff611d3d66749cdb.jpg) +Input +Figure 6. Visual comparison on LOLv1, LOL-v2-real, and LOL-v2-synthetic (top to bottom). Our method yields less noise and higher visibility. + +![](images/7db010b245b7d5aa14262189c7063d970cef8518ef00f75283ad1c778bf4416e.jpg) +Band [52] + +![](images/1ab8b407de0ddf5fc6986a1b4b869d18d6da9f371c8b178d4be7ef30e1f833de.jpg) +MIR-Net [59] + +![](images/dbf1a9a36c3decab06637a495175c6810e4072720c179decba795c6b3138fd7e.jpg) +Ours + +![](images/fbb60d02f20e40e67fa207a1efb6963520d3554d8f3b8f146f963b39f655d17c.jpg) +GT + +
MethodsDong [9]LIME [15]MF [11]SRIE [12]BIMEF [55]DRD [45]RRM [28]SID [5]DeepUPE [40]KIND [61]DeepLPF [33]FIDE [48]
PSNR16.7216.7618.7911.8613.8616.7713.8814.3514.3820.8715.2818.27
SSIM0.5800.5600.6400.5000.5800.5600.6600.4360.4460.8000.4730.665
MethodsLPNet [26]MIR-Net [59]RF [24]3DLUT [60]A3DLUT [42]Band [52]EG [20]Retinex [29]Sparse [53]IPT [6]Uformer [44]Ours
PSNR21.4624.1415.2314.3514.7720.1317.4818.2317.2016.2716.3624.61
SSIM0.8020.8300.4520.4450.4580.8300.6500.7200.6400.5040.5070.842
+ +Table 1. Quantitative comparison on LOL-v1. + +
MethodsDong [9]LIME [15]MF [11]SRIE [12]BIMEF [55]DRD [45]RRM [28]SID [5]DeepUPE [40]KIND [61]DeepLPF [33]FIDE [48]
PSNR17.2615.2418.7317.3417.8515.4717.3413.2413.2714.7414.1016.85
SSIM0.5270.4700.5590.6860.6530.5670.6860.4420.4520.6410.4800.678
MethodsLPNet [26]MIR-Net [59]RF [24]3DLUT [60]A3DLUT [42]Band [52]EG [20]Retinex [29]Sparse [53]IPT [6]Uformer [44]Ours
PSNR17.8020.0214.0517.5918.1920.2918.2318.3720.0619.8018.8221.48
SSIM0.7920.8200.4580.7210.7450.8310.6170.7230.8160.8130.7710.849
+ +Table 2. Quantitative comparison on LOL-v2-real. + +
MethodsDong [9]LIME [15]MF [11]SRIE [12]BIMEF [55]DRD [45]RRM [28]SID [5]DeepUPE [40]KIND [61]DeepLPF [33]FIDE [48]
PSNR16.9016.8817.5014.5017.2017.1317.1515.0415.0813.2916.0215.20
SSIM0.7490.7760.7510.6160.7130.7980.7270.6100.6230.5780.5870.612
MethodsLPNet [26]MIR-Net [59]RF [24]3DLUT [60]A3DLUT [42]Band [52]EG [20]Retinex [29]Sparse [53]IPT [6]Uformer [44]Ours
PSNR19.5121.9415.9718.0418.9223.2216.5716.5522.0518.3019.6624.14
SSIM0.8460.8760.6320.8000.8380.9270.7340.6520.9050.8110.8710.928
+ +Table 3. Quantitative comparison on LOL-v2-synthetic. + +Ratio (PSNR) and Structural Similarity Index (SSIM) [43] for evaluation. In general, a higher SSIM means more high-frequency details and structures in results. Tables 1-3 show the comparisons on LOL-v1, LOL-v2-real, and LOL-v2-synthetic. Our method surpasses all the baselines. Note that we obtain these numbers either from the respective papers or by running the respective public code. Out method (24.61/0.842) also outperforms those of [22] (22.81/0.827) and [62] (21.71/0.834) on LOL-v1. Table 4 compares methods on SID, SMID, SDSD-indoor, and SDSD-outdoor. Ours yields the best performance. + +Qualitative analysis. First, we present visual samples in + +Fig. 6 (top row) for comparing our method with baselines that achieve the best performance (in terms of PSNR) on LOL-v1. Our result shows better visual quality with higher contrast, more precise details, color consistency, and better brightness. Fig. 6 also shows visual comparison on LOL-v2-real and LOL-v2-synthetic. While the original images in these datasets have apparent noise and weak illumination, our method can still produce more realistic results. Also, in regions with complex textures, our output exhibits less visual artifacts. + +Fig. 7 (top row) shows visual comparison on SID, demonstrating that our method can effectively deal with + +![](images/39aa7c8eb5004614a7488969aa0a2d95b54f6976569f9b8d9ecae04eb0df1464.jpg) +Figure 7. Qualitative comparison on SID (top row), SMID (2nd row), SDSD-indoor (3rd row) and SDSD-outdoor (4th row). + +
SIDSMIDSDSD-indoorSDSD-outdoor
MethodsPSNRSSIMPSNRSSIMPSNRSSIMPSNRSSIM
DRD [45]16.480.57822.830.68420.840.61720.960.629
SID [5]16.970.59124.780.71823.290.70324.900.693
DeepUPE [40]17.010.60423.910.69021.700.66221.940.698
KIND [61]18.020.58322.180.63421.950.67221.970.654
DeepLPF [33]18.070.60024.360.68822.210.66422.760.658
FIDE [48]18.340.57824.420.69222.410.65922.200.629
LPNet [26]20.080.59826.550.77223.870.84122.090.629
MIR-Net [59]20.840.60525.660.76224.380.86427.130.837
RF [24]16.440.59623.110.68120.970.65521.210.689
3DLUT [60]20.110.59223.860.67821.660.65521.890.649
A3DLUT [42]20.320.59524.560.68422.390.65622.950.692
Band [52]19.020.57726.600.78124.080.86825.770.841
EG [20]17.230.54322.620.67420.020.60420.100.616
Retinex [29]18.440.58125.880.74423.170.69623.840.743
Sparse [53]18.680.60625.480.76623.250.86325.280.804
IPT [6]20.530.56127.030.78326.110.83127.550.850
Uformer [44]18.540.57727.200.79223.170.85923.850.748
Ours22.870.62528.490.80529.440.89428.660.866
+ +Table 4. Quantitative comparison on SID, SMID, SDSD-indoor, and SDSD-outdoor. Our method performs the best consistently. + +very noisy low-light images. Fig. 7 also shows visual results on SMID, SDSD-indoor, and SDSD-outdoor. These results also manifest that our method is effective to enhance image lightness and reveal details, while suppressing noise. + +User study. We further conduct large-scale user study with 100 participants to evaluate the human perception of our method and five strongest baselines (chosen by mean PSNR on SID, SMID, and SDSD) on enhancing low-light photos captured by an iPhone X or Huawei P30. Altogether, 30 low-light photos were captured in various environments, including roads, parks, libraries, schools, portraits, etc., and + +the intensity of $50\%$ image pixels are lower than $30\%$ . + +Following the setting in [40], we evaluate results via user ratings on the six questions shown in Fig. 8 using a Likert scale of 1 (worst) to 5 (best). All methods were trained on SDSD-outdoor, since [39] shows that the trained models can effectively enhance low-light images captured by mobile phones. Fig. 8 reports the rating distributions of different methods, among which our approach receives more "red" and less "blue" ratings. Also, we performed a statistical analysis on the ratings using a paired t-test (using the T-Test function in MS Excel) between our approach and each of the other methods. With a significant level of 0.001, all the t-test results are statistically significant, since all p-values are smaller than 0.001. + +# 4.3. Ablation Study + +We consider four ablation settings by removing different components from our framework individually. + +- "Ours w/o $L$ " removes the long-range branch, so the framework has only convolutional operations. +- "Ours w/o $S$ " removes the short-range branch, keeping the full long-range branch and SNR-guided attention. +- "Ours w/o SA" further removes the SNR-guided attention from "Ours w/o S", keeping only the basic transformer structure in the deepest layer. +- "Ours w/o $A$ " removes the SNR-guided attention. + +We performed ablation studies on all seven datasets. Table 5 summarizes the results. Compared with all ablation + +![](images/df63229b45f57af7d2c974722403ff44750b0001af48604704969a0330b68df0.jpg) + +![](images/65f0ce3913d99433d4a85c4e4708162d3c10aa48bcf6321a577e37a887ddb560.jpg) + +![](images/8d65e24281edf54c0274f91b7d04f91336061a580a915380e01c39dec59d4759.jpg) + +![](images/9e844f2b0a5901fd0b112f4d3ecedbb3365b9c78fd9082208b0d18c3f59891d1.jpg) +Figure 8. Rating distributions for different methods on the six questions in the user study. The ordinate axis records the rating frequency received from the 100 participants. Obviously, our approach receives more "red" (score 5) and less "blue" (score 1). + +![](images/761a7df3467d88e2bee8102c0ebc76935c11e4157d91b112c5ec78453edfe706.jpg) + +![](images/9dd0a3300a6e132566896ca69d93888234ea6a52426b0924f9c9853cf27a183f.jpg) + +
LOL-v1LOL-v2-realLOL-v2-syntheticSIDSMIDSDSD-indoorSDSD-outdoor
MethodsPSNRSSIMPSNRSSIMPSNRSSIMPSNRSSIMPSNRSSIMPSNRSSIMPSNRSSIM
Ours w/o L16.270.63816.980.68720.810.88119.100.59326.200.77622.240.81820.030.713
Ours w/o S23.060.82818.980.79023.470.91922.300.60427.000.76828.130.88425.430.823
Ours w/o SA20.670.75218.850.76521.880.84221.020.54427.010.77425.780.83924.570.832
Ours w/o A21.860.76019.400.78222.230.86621.190.55026.870.76927.360.87426.620.857
Ours24.610.84221.480.84924.140.92822.870.62528.490.80529.440.89428.370.862
+ +Table 5. Results of the ablation study in Sec. 4.3. + +![](images/5e9647ce8b554b25b2da4753def2230e75e113dc43777bbbebf8eb7489981fc2.jpg) +Figure 9. Our framework yields consistent performance on datasets when incorporated with different denoising operations for obtaining the input SNR prior. + +![](images/47b8c06a86d80403b39bf04ce81a0117940b1eccdd0ca06dd43d3bcce266c7f1.jpg) + +settings, our full setting yields the highest PSNR and SSIM. "Ours w/o $L$ ," "Ours w/o $S$ ," and "Ours w/o $SA$ " show the shortcomings of solely using convolution operations or transformer structures, thus manifesting effectiveness of collectively exploiting short-range (convolution models) and long-range (transformer structures) operations. The results also show effects of "SNR-guided attention" ("Ours w/o $A$ " vs. "Ours") and "SNR-guided fusion" ("Ours w/o $S$ " vs. "Ours"). + +# 4.4. Influence of SNR Prior + +The SNR input to our framework is obtained by applying a no-learning-based denoising operation to the input frame (Eq. (2)). In all experiments, we adopt the local means as the denoising operation considering its fast speed. In + +this section, we analyze the impact when embracing other operations, including non-local means [1] and BM3D [8]. Fig. 9 shows the results, revealing that our framework is not sensitive to strategies of obtaining the SNR input. All these results are better than those of baselines. + +# 5. Conclusion + +We have presented a novel SNR-aware framework that collectively exploits short- and long-range operations to dynamically enhance pixels in a spatial-varying manner. An SNR prior is adopted to guide feature fusion. The SNR-aware transformer is formulated with a new self-attention module. Extensive experiments, including user study, demonstrate that our framework consistently achieves the best performance on representative benchmark using the same network structure. + +Our future work is to explore other semantics to enhance the spatial-varying mechanism. Also, we plan to extend our method to handling low-light videos by simultaneously considering temporal- and spatial-varying operations. Another direction is to explore generative methods [13, 32] for nearly black areas in low-light images. + +Acknowledgements We would like to thank Prof. Ying-Cong Chen in HKUST(GZ) for discussions. + +# References + +[1] Antoni Buades, Bartomeu Coll, and J-M. Morel. A non-local algorithm for image denoising. In IEEE Conf. Comput. Vis. Pattern Recog., 2005. 4, 8 +[2] Jianrui Cai, Shuhang Gu, and Lei Zhang. Learning a deep single image contrast enhancer from multi-exposure images. IEEE Trans. Image Process., 2018. 2 +[3] Damon M. Chandler and Sheila S. Hemami. VSNR: A wavelet-based visual signal-to-noise ratio for natural images. IEEE Trans. Image Process., 2007. 1 +[4] Chen Chen, Qifeng Chen, Minh N. Do, and Vladlen Koltun. Seeing motion in the dark. In Int. Conf. Comput. Vis., 2019, 2, 5 +[5] Chen Chen, Qifeng Chen, Jia Xu, and Vladlen Koltun. Learning to see in the dark. In IEEE Conf. Comput. Vis. Pattern Recog., 2018. 2, 5, 6, 7 +[6] Hanting Chen, Yunhe Wang, Tianyu Guo, Chang Xu, Yiping Deng, Zhenhua Liu, Siwei Ma, Chunjing Xu, Chao Xu, and Wen Gao. Pre-trained image processing transformer. In IEEE Conf. Comput. Vis. Pattern Recog., 2021. 2, 3, 5, 6, 7 +[7] Yu-Sheng Chen, Yu-Ching Wang, Man-Hsin Kao, and Yung-Yu Chuang. Deep Photo Enhancer: Unpaired learning for image enhancement from photographs with GANs. In IEEE Conf. Comput. Vis. Pattern Recog., 2018. 2 +[8] Kostadin Dabov, Alessandro Foi, Vladimir Katkovnik, and Karen Egiazarian. Image denoising with block-matching and 3D filtering. In Image Processing: Algorithms and Systems, Neural Networks, and Machine Learning, 2006. 4, 8 +[9] Xuan Dong, Guan Wang, Yi Pang, Weixin Li, Jiangtao Wen, Wei Meng, and Yao Lu. Fast efficient algorithm for enhancement of low lighting video. In Int. Conf. Multimedia and Expo, 2011. 5, 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. In Int. Conf. Learn. Represent., 2021. 3 +[11] Xueyang Fu, Delu Zeng, Yue Huang, Yinghao Liao, Xinghao Ding, and John Paisley. A fusion-based enhancing method for weakly illuminated images. Signal Processing, 2016. 5, 6 +[12] Xueyang Fu, Delu Zeng, Yue Huang, Xiao-Ping Zhang, and Xinghao Ding. A weighted variational model for simultaneous reflectance and illumination estimation. In IEEE Conf. Comput. Vis. Pattern Recog., 2016. 1, 5, 6 +[13] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative Adversarial Nets. In Adv. Neural Inform. Process. Syst., 2014. 8 +[14] Chunle Guo, Chongyi Li, Jichang Guo, Chen Change Loy, Junhui Hou, Sam Kwong, and Runmin Cong. Zero-reference deep curve estimation for low-light image enhancement. In IEEE Conf. Comput. Vis. Pattern Recog., 2020. 2 + +[15] Xiaojie Guo, Yu Li, and Haibin Ling. LIME: Low-light image enhancement via illumination map estimation. IEEE Trans. Image Process., 2016. 1, 5, 6 +[16] Kai Han, Yunhe Wang, Hanting Chen, Xinghao Chen, Jianyuan Guo, Zhenhua Liu, Yehui Tang, An Xiao, Chunjing Xu, Yixing Xu, et al. A survey on visual transformer. IEEE Trans. Pattern Anal. Mach. Intell., 2022. 3 +[17] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conf. Comput. Vis. Pattern Recog., 2016. 1 +[18] Yukun Huang, Zheng-Jun Zha, Xueyang Fu, Richang Hong, and Liang Li. Real-world person re-identification via degradation invariance learning. In IEEE Conf. Comput. Vis. Pattern Recog., 2020. 1 +[19] Andrey Ignatov, Nikolay Kobyshev, Radu Timofte, Kenneth Vanhoey, and Luc Van Gool. WESPE: Weakly supervised photo enhancer for digital cameras. In IEEE Conf. Comput. Vis. Pattern Recog., 2018. 2 +[20] Yifan Jiang, Xinyu Gong, Ding Liu, Yu Cheng, Chen Fang, Xiaohui Shen, Jianchao Yang, Pan Zhou, and Zhangyang Wang. EnlightenGAN: Deep light enhancement without paired supervision. IEEE Trans. Image Process., 2021. 2, 5, 6, 7 +[21] Salman Khan, Muzammal Naseer, Munawar Hayat, Syed Waqas Zamir, Fahad Shahbaz Khan, and Mubarak Shah. Transformers in vision: A survey. ACM Computing Surveys (CSUR), 2021. 3 +[22] Hanul Kim, Su-Min Choi, Chang-Su Kim, and Yeong Jun Koh. Representative color transform for image enhancement. In Int. Conf. Comput. Vis., 2021. 2, 6 +[23] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv:1412.6980, 2014. 5 +[24] Satoshi Kosugi and Toshihiko Yamasaki. Unpaired image enhancement featuring reinforcement-learning-controlled image editing software. In AAAI, 2020. 5, 6, 7 +[25] Wei-Sheng Lai, Jia-Bin Huang, Narendra Ahuja, and Ming-Hsuan Yang. Fast and accurate image super-resolution with deep laplacian pyramid networks. IEEE Trans. Pattern Anal. Mach. Intell., 2018. 5 +[26] Jiaqian Li, Juncheng Li, Faming Fang, Fang Li, and Guixu Zhang. Luminance-aware pyramid network for low-light image enhancement. IEEE Trans. Multimedia, 2020. 5, 6, 7 +[27] Jing Li, Stan Z. Li, Quan Pan, and Tao Yang. Illumination and motion-based video enhancement for night surveillance. In IEEE International Workshop on Visual Surveillance and Performance Evaluation of Tracking and Surveillance, 2005. 1 +[28] Mading Li, Jiaying Liu, Wenhan Yang, Xiaoyan Sun, and Zongming Guo. Structure-revealing low-light image enhancement via robust Retinex model. IEEE Trans. Image Process., 2018. 2, 5, 6 +[29] Risheng Liu, Long Ma, Jiao Zhang, Xin Fan, and Zhongxuan Luo. Retinex-inspired unrolling with cooperative prior architecture search for low-light image enhancement. In IEEE Conf. Comput. Vis. Pattern Recog., 2021. 1, 2, 5, 6, 7 + +[30] 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 Int. Conf. Comput. Vis., 2021. 3 +[31] Kin Gwn Lore, Adedotun Akintayo, and Soumik Sarkar. LLNet: A deep autoencoder approach to natural low-light image enhancement. Pattern Recognition, 2017. 2 +[32] Mehdi Mirza and Simon Osindero. Conditional Generative Adversarial Nets. arXiv:1411.1784, 2014. 8 +[33] Sean Moran, Pierre Marza, Steven McDonagh, Sarah Parisot, and Gregory Slabaugh. DeepLPF: Deep local parametric filters for image enhancement. In IEEE Conf. Comput. Vis. Pattern Recog., 2020. 2, 5, 6, 7 +[34] 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 Adv. Neural Inform. Process. Syst., 2019. 5 +[35] Zia-ur Rahman, Daniel J. Jobson, and Glenn A. Woodell. Retinex processing for automatic image enhancement. IEEE Trans. Image Process., 2004. 2 +[36] Wenzhe Shi, Jose Caballero, Ferenc Huszár, Johannes Totz, Andrew P. Aitken, Rob Bishop, Daniel Rueckert, and Zehan Wang. Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In IEEE Conf. Comput. Vis. Pattern Recog., 2016. 5 +[37] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In Int. Conf. Learn. Represent., 2014. 5 +[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 Adv. Neural Inform. Process. Syst., 2017. 1, 3 +[39] Ruixing Wang, Xiaogang Xu, Chi-Wing Fu, Jiangbo Lu, Bei Yu, and Jiaya Jia. Seeing dynamic scene in the dark: High-quality video dataset with mechatronic alignment. In Int. Conf. Comput. Vis., 2021. 2, 5, 7 +[40] Ruixing Wang, Qing Zhang, Chi-Wing Fu, Xiaoyong Shen, Wei-Shi Zheng, and Jiaya Jia. Underexposed photo enhancement using deep illumination estimation. In IEEE Conf. Comput. Vis. Pattern Recog., 2019. 2, 5, 6, 7 +[41] Shuhang Wang, Jin Zheng, Hai-Miao Hu, and Bo Li. Naturalness preserved enhancement algorithm for nonuniform illumination images. IEEE Trans. Image Process., 2013. 1 +[42] Tao Wang, Yong Li, Jingyang Peng, Yipeng Ma, Xian Wang, Fenglong Song, and Youliang Yan. Real-time image enhancer via learnable spatial-aware 3D lookup tables. In Int. Conf. Comput. Vis., 2021. 2, 5, 6, 7 +[43] Zhou Wang, Alan C. Bovik, Hamid R. Sheikh, and Eero P. Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE Trans. Image Process., 2004. 6 +[44] Zhendong Wang, Xiaodong Cun, Jianmin Bao, and Jianzhuang Liu. Uformer: A general U-Shaped transformer for image restoration. In IEEE Conf. Comput. Vis. Pattern Recog., 2022. 3, 5, 6, 7 + +[45] Chen Wei, Wenjing Wang, Wenhan Yang, and Jiaying Liu. Deep Retinex decomposition for low-light enhancement. In Brit. Mach. Vis. Conf., 2018. 2, 5, 6, 7 +[46] Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan, and Lei Zhang. CvT: Introducing convolutions to vision transformers. In Int. Conf. Comput. Vis., 2021. 3 +[47] Bing Xu, Naiyan Wang, Tianqi Chen, and Mu Li. Empirical evaluation of rectified activations in convolutional network. In ICML, 2015. 5 +[48] Ke Xu, Xin Yang, Baocai Yin, and Rynson WH. Lau. Learning to restore low-light images via decomposition-and-enhancement. In IEEE Conf. Comput. Vis. Pattern Recog., 2020. 1, 2, 5, 6, 7 +[49] Jianzhou Yan, Stephen Lin, Bing Kang Sing, and Xiaou Tang. A learning-to-rank approach for image color enhancement. In IEEE Conf. Comput. Vis. Pattern Recog., 2014. 2 +[50] Zhicheng Yan, Hao Zhang, Baoyuan Wang, Sylvain Paris, and Yizhou Yu. Automatic photo adjustment using deep neural networks. ACM Trans. Graph., 2016. 2 +[51] Wenhan Yang, Shiqi Wang, Yuming Fang, Yue Wang, and Jiaying Liu. From fidelity to perceptual quality: A semi-supervised approach for low-light image enhancement. In IEEE Conf. Comput. Vis. Pattern Recog., 2020. 2 +[52] Wenhan Yang, Shiqi Wang, Yuming Fang, Yue Wang, and Jiaying Liu. Band representation-based semi-supervised low-light image enhancement: Bridging the gap between signal fidelity and perceptual quality. IEEE Trans. Image Process., 2021. 2, 5, 6, 7 +[53] Wenhan Yang, Wenjing Wang, Haofeng Huang, Shiqi Wang, and Jiaying Liu. Sparse gradient regularized deep Retinex network for robust low-light image enhancement. IEEE Trans. Image Process., 2021. 2, 5, 6, 7 +[54] Susu Yao, Weisi Lin, EePing Ong, and Zhongkang Lu. Contrast Signal-to-Noise Ratio for image quality assessment. In IEEE Int. Conf. Image Process., 2005. 1 +[55] Zhenqiang Ying, Ge Li, and Wen Gao. A bio-inspired multi-exposure fusion framework for low-light image enhancement. arXiv:1711.00591, 2017. 5, 6 +[56] Zhenqiang Ying, Ge Li, Yurui Ren, Ronggang Wang, and Wenmin Wang. A new low-light image enhancement algorithm using camera response model. In Int. Conf. Comput. Vis., 2017. 1 +[57] Kun Yuan, Shaopeng Guo, Ziwei Liu, Aojun Zhou, Fengwei Yu, and Wei Wu. Incorporating convolution designs into visual transformers. In Int. Conf. Comput. Vis., 2021. 3 +[58] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Zihang Jiang, Francis EH. Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-Token ViT: Training vision transformers from scratch on ImageNet. In Int. Conf. Comput. Vis., 2021. 3 +[59] Syed Waqas Zamir, Aditya Arora, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, Ming-Hsuan Yang, and Ling Shao. Learning enriched features for real image restoration and enhancement. In Eur. Conf. Comput. Vis., 2020. 2, 5, 6, 7 + +[60] Hui Zeng, Jianrui Cai, Lida Li, Zisheng Cao, and Lei Zhang. Learning image-adaptive 3D lookup tables for high performance photo enhancement in real-time. IEEE Trans. Pattern Anal. Mach. Intell., 2020. 2, 5, 6, 7 +[61] Yonghua Zhang, Jiawan Zhang, and Xiaojie Guo. Kindling the darkness: A practical low-light image enhancer. In ACM Int. Conf. Multimedia, 2019. 5, 6, 7 +[62] Lin Zhao, Shao-Ping Lu, Tao Chen, Zhenglu Yang, and Ariel Shamir. Deep symmetric network for underexposed image enhancement with recurrent attentional learning. In Int. Conf. Comput. Vis., 2021. 2, 6 +[63] Chuanjun Zheng, Daming Shi, and Wentian Shi. Adaptive unfolding total variation network for low-light image enhancement. In Int. Conf. Comput. Vis., 2021. 2 \ No newline at end of file diff --git a/snrawarelowlightimageenhancement/images.zip b/snrawarelowlightimageenhancement/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..cdb5b0704e83ecb62ac81f7390c93c845c75245a --- /dev/null +++ b/snrawarelowlightimageenhancement/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea708762860961ef511ca3f228b6ec7e4a4214a56c076e19a126238181d31c75 +size 1065241 diff --git a/snrawarelowlightimageenhancement/layout.json b/snrawarelowlightimageenhancement/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..669b39586f079d678d5eb1746a38401d043dbf89 --- /dev/null +++ b/snrawarelowlightimageenhancement/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffa95ab47eadb7a738d6d75119094e81b88e206e7e630b20a525b4450610349b +size 504550 diff --git a/snugselfsupervisedneuraldynamicgarments/1999597d-b69c-478c-a94f-2ac0cb06256f_content_list.json b/snugselfsupervisedneuraldynamicgarments/1999597d-b69c-478c-a94f-2ac0cb06256f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a766371855ef403f7314128a51a862f2155b2758 --- /dev/null +++ b/snugselfsupervisedneuraldynamicgarments/1999597d-b69c-478c-a94f-2ac0cb06256f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97b2511fbb0315e1e095e44d800de5ed8de0da6f2384830147fe58921010e779 +size 78266 diff --git a/snugselfsupervisedneuraldynamicgarments/1999597d-b69c-478c-a94f-2ac0cb06256f_model.json b/snugselfsupervisedneuraldynamicgarments/1999597d-b69c-478c-a94f-2ac0cb06256f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f9bc80c6cffceccb8ad23b37179a95f9f7151770 --- /dev/null +++ b/snugselfsupervisedneuraldynamicgarments/1999597d-b69c-478c-a94f-2ac0cb06256f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5019c636f1fb60ed036c95a69b703177d5bd463ef6150cb9f94d2cd66f59d45e +size 99095 diff --git a/snugselfsupervisedneuraldynamicgarments/1999597d-b69c-478c-a94f-2ac0cb06256f_origin.pdf b/snugselfsupervisedneuraldynamicgarments/1999597d-b69c-478c-a94f-2ac0cb06256f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b05032a0350038ebd9495406a1af060026252391 --- /dev/null +++ b/snugselfsupervisedneuraldynamicgarments/1999597d-b69c-478c-a94f-2ac0cb06256f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3dfa2cae8f4e89411082d03c57a8db670ddd3df74c4b64e8ab70b1a49b2ba7f7 +size 3588305 diff --git a/snugselfsupervisedneuraldynamicgarments/full.md b/snugselfsupervisedneuraldynamicgarments/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0906bf7649122210904f909741e2b5fbd9ebdbb8 --- /dev/null +++ b/snugselfsupervisedneuraldynamicgarments/full.md @@ -0,0 +1,344 @@ +# SNUG: Self-Supervised Neural Dynamic Garments + +Igor Santesteban1 + +Miguel A. Otaduy1 + +Dan Casas + +1Universidad Rey Juan Carlos, Spain + +first.last@{urjc.es} + +![](images/a8459015d797e5a5bb7210d26b52472d0c7920d26d63a5cc0438bcf908d0606c.jpg) +Figure 1. Existing learning-based methods for garment deformations (left) use supervised training schemes that require the expensive computation of large datasets. In contrast, our approach SNUG (right) is a learning-based method that enables the self-supervised training of dynamic neural 3D garments, without requiring any ground-truth data. + +![](images/4f9299f770355db63f3efbd47aa613af5b30e8ab5d87159c53fdef7cd98f301a.jpg) + +# Abstract + +We present a self-supervised method to learn dynamic 3D deformations of garments worn by parametric human bodies. State-of-the-art data-driven approaches to model 3D garment deformations are trained using supervised strategies that require large datasets, usually obtained by expensive physics-based simulation methods or professional multi-camera capture setups. In contrast, we propose a new training scheme that removes the need for ground-truth samples, enabling self-supervised training of dynamic 3D garment deformations. Our key contribution is to realize that physics-based deformation models, traditionally solved in a frame-by-frame basis by implicit integrators, can be recasted as an optimization problem. We leverage such optimization-based scheme to formulate a set of physics-based loss terms that can be used to train neural networks without precomputing ground-truth data. This allows us to learn models for interactive garments, including dynamic deformations and fine wrinkles, with a two orders of magnitude speed up in training time compared to state-of-the-art supervised methods. + +# 1. Introduction + +The efficient modeling of digital garments is an active area of research due to the large number of applications, including fashion design, e-commerce, virtual try-on, and video games. The traditional approach to this problem is + +through physics-based simulation [38], but the high computational cost required at run time hinders the deployment of these techniques to real-world applications. Recently, learning-based methods [17, 31, 39, 45, 46, 50, 53, 55] have demonstrated that it is possible to closely approximate the accuracy of physics-based solutions. These methods use supervised learning strategies to find a function that outputs a deformed garment given an input body descriptor. During the training phase, the supervision is enforced by directly minimizing at a vertex level the difference between the predicted garment and ground-truth 3D meshes. Despite requiring hours of training, learning-based methods are highly-efficient to evaluate at run time, therefore they potentially offer an attractive alternative to traditional physics-based solutions. + +However, the need for large datasets in current supervised methods is far from ideal. Ground-truth meshes must be obtained –for each combination of garment, body shape, and pose– via computationally-expensive simulations [37] or complex 3D scanning setups [40], which heavily hinders the scalability of current learning-based methods. We observe that for similar image-based problems, self-supervised strategies have shown that it is possible to learn complex tasks without requiring ground-truth data [41, 57]. Unfortunately, self-supervision for dynamic 3D clothing has not been explored. + +In this work, we present a self-supervised method to learn dynamic deformations of 3D garments worn by parametric human bodies. The key to our success is realizing that the solution to the equations of motion used in cur + +rent physics-based methods can also be formulated as an optimization problem [34]. More specifically, we show that the per-time-step numerical integration scheme used to update the vertex position (e.g., backward Euler) in physics-based simulators, can be recast as an optimization problem, and demonstrate that the function for this minimization can become the central ingredient of a self-supervised learning scheme. Since this objective function includes both an inertial term and static term directly derived from the equations of motion, we are able to learn time-dependent and pose-dependent deformations without any ground-truth data. + +The advantages of self-supervision go beyond removing the need for ground-truth data. By reformulating the learning tasks in terms of physics-based intrinsic properties instead of explicit 3D surface similarity, we also mitigate the smoothing artifacts common in supervised methods where L2 losses are used directly at the vertex level [39]. Additionally, self-supervised approaches also generalize better to test sequences outside the distribution of the training set. Finally, we also show how different material models can be easily formulated in our self-supervised framework, bringing the generalization capabilities of physics-based solutions (i.e., deform any material) to learning-based methods, without requiring any precalculation or offline step. + +All in all, our main contribution is a novel learning-based method capable of learning to dynamically deform garments using a self-supervised strategy. We demonstrate the superiority of our approach in terms of data requirements, training time, and inference time, and we quantitatively and qualitatively compare our results with state-of-the-art supervised methods. + +# 2. Related Work + +Existing methods that model how cloth and garment deform can be categorized into two groups: physics-based models and learning-based models. + +Physics-Based Methods. Physics-based simulation of cloth is to date a very mature field. Over the years, many methods have been developed to solve the most relevant challenges. These include the design of deformation models such as in-plane and bending energies [15, 22], robust implicit solvers [4], rich and efficient contact handling [9, 49], or adaptive discretizations [37]. Recent efforts also include the design of differentiable physics simulators [18], including specific problems of cloth simulation such as continuous collision detection and constraint-based solvers [28], and physics-based objectives for tracking and reconstruction of garments [27, 59]. While the majority of the cloth simulation models represent the fabric as a continuum, a recent line of research uses yarn-level representations for high-resolution detail [10, 21]. Some works also show two-way coupling between garments and soft-body avatars [36, 42]. + +While we do not tackle this level of detail in our paper, more accurate methods could be used to replace our cloth and body models. + +Learning-Based Methods. In contrast to physics-based models, which typically require solving large systems of nonlinear equations at each time step, learning-based methods aim at estimating a single function that directly outputs the desired deformation for any input. Inspired by early works on Pose Space Deformation [24], a common strategy is to learn parametric garment deformations, which are added to a mesh template, as a function of pose [16, 56], shape [53], pose-and-shape [5, 45], design [31, 39, 55], or garment size [50]. + +To this end, state-of-the-art methods for garments use supervised strategies that require large datasets of ground-truth data of the specific task to be learned. This methodology has been recently explored for many use cases, including 3D reconstruction [1, 2, 43, 62], garment design [46, 53, 55], animation [7, 17, 19, 31, 39, 56], and virtual try-on [8, 16, 45, 61]. To efficiently tackle the learning task, and depending on the goal of each method, different supervision terms and domains have been used. Most methods use direct 3D supervision at the vertex level [17, 39, 45, 53], but image-based 2D supervision in form of UV maps [20, 23, 46], point clouds [32, 44], or sketches [55] also exist. Very recently, implicit representations have shown impressive results on learning to deform humans [3, 12, 35] and dress avatars [11, 44, 51, 54]. + +Datasets are a fundamental piece to enable supervision, and most methods [5,39,45,55] opt for synthetic data generated with physics-based simulators such as ARCSim [37] or Argus [25]. Alternatively, other methods [23, 31, 44, 50] use high-quality 3D scans obtained in expensive multi-camera setups [40, 60]. Despite the success of all these supervised methods for learning-based garments, relaying on ground-truth data to train the models is a major limitation due to the associated costs and hinders to create datasets. + +Self-supervised strategies are the ideal alternative to circumvent the need for ground-truth data in learning-based methods [48]. Instead of relying on losses that evaluate prediction error based on the difference with respect to ground-truth samples, self-supervised methods use implicit properties of the training data (or domain) as a supervision signal [64]. This strategy is nowadays very popular in data-driven methods for image-based problems [26,41,63], however, almost all state-of-the-art approaches to learn 3D garment deformations rely on ground-truth data [17, 39, 45]. For 3D deformations tasks not related to garments, many works use physics laws or constraints as a supervision signal [52, 58, 64]. For example, Tompson et al. [52] enforce incompressibility constraints to learn to solve the system of equations required in physics-based fluid simulation, Xie et + +al. [58] enforce temporal coherence of consecutive frames in fluid simulations to enhance detail, and Zhu et al. [64] incorporates the governing equations of the physical model (i.e., Partial Differential Equations, PDEs) in the loss to learn image-based flow simulations. + +Despite the significant progress in self-supervised learning, no previous works addresses the learning of 3D garments in self-supervised strategy, with just the notable and very recent exception of PBNS [6]. PBNS proposes to learn pose space deformations for garments by enforcing static physical consistency during the training of the model. We follow a similar underlying idea, but propose to use a full physics-based deformation scheme recast as an optimization problem to learn, for first time, a model for dynamic garment deformations with self-supervision only. Additionally, our approach learns shape-dependent effects and is able to cope with a material model that produces highly-realistic and finer wrinkles. + +# 3. Method + +Our goal is to find a function $M()$ that deforms a 3D garment given the underlying body parameters and motion. To this end, in Sec. 3.1, we first describe our garment model used to implement $M()$ , which is based on per-vertex dynamic 3D displacements that are added to a rigged template mesh. Then, in Sec. 3.2, we direct our attention to an optimization-based formulation of dynamic deformations. Based on this formulation, in Sec. 3.3, we introduce our main contribution and describe a physics-based deformation model that allows us to train a regressor $R()$ for 3D garment displacements. Importantly, our loss is driven by fundamental physical properties of deformable objects, not by the reconstruction of ground-truth garments, and therefore it enables self-supervised learning. In Sec. 3.4 we specify the material model used in the different terms of our loss, and define the relevant energies such as the strain, and bending energies. Finally, in Sec. 3.5 we describe the recurrent architecture used to implement the regressor $R()$ . See Figure 2 for an overview of our method. + +# 3.1. Garment Model + +Similar to state-of-the-art methods for data-driven garments [5, 17, 39, 45, 53], we leverage and extend existing human body models [13, 30] to encode garment deformations. More specifically, we build our representation on top of the popular SMPL human model [30]. SMPL encodes bodies by deforming a rigged human template according to shape and pose-dependent deformations that are learned from data. Following this idea, we define our garment model as + +$$ +M (\beta , \phi) = W (T (\beta , \phi), J (\beta), \theta , \mathbf {W} _ {\mathrm {G}}) \tag {1} +$$ + +$$ +T (\beta , \phi) = \mathbf {T} + R (\beta , \phi) \tag {2} +$$ + +where $W$ is a skinning function (e.g., linear blend skinning or dual quaternion) with skinning weights $\mathbf{W}_{\mathrm{G}}$ , joint locations $J(\beta)$ , and motion parameters $\phi$ that articulate an unposed deformed garment mesh $T(\beta, \phi)$ . The latter is computed from a garment template mesh $\mathbf{T}$ deformed by a function $R(\beta, \phi)$ that outputs per-vertex 3D displacements to encode dynamic deformations conditioned to the underlying body shape $\beta$ and body motion $\phi$ . The body motion $\phi$ contains the current body pose $\theta$ as well as the global velocity of the root joint. + +Assuming that the garment template $\mathbf{T}$ is correctly located on top of the mean SMPL body mesh [30], we define $\mathbf{W}_{\mathrm{G}}$ by borrowing the SMPL skinning weights of closest body vertex in rest pose. In the remainder of this section we introduce our novel strategy to learn the 3D displacement regressor $R(\beta, \phi)$ . + +# 3.2. Optimization-Based Dynamic Deformation + +Our goal is to learn the 3D displacement regressor $R(\beta, \phi)$ in Equation 2 using a self-supervised strategy. To this end, our first task is to find a set of physics-based properties that describe how cloth behaves. Physics-based simulators traditionally solve dynamics by applying a numerical integration scheme, e.g., backward Euler, to the differential equations of motion, and finding the roots of the resulting nonlinear discrete equations [38]. This formulation is applied independently at each simulation frame, to iteratively update the positions and velocities of garment vertices. Our key observation is to realize that the solution to the equations of motion discretized with backward Euler can also be formulated as an optimization problem [34], and the objective function for this minimization can become the central ingredient of a self-supervised learning scheme. Optimization-based dynamics have been used in the Computer Graphics literature to increase the efficiency and robustness of dynamics solvers, through quasi-Newton schemes and step-size selection [14, 29]. Instead, we propose to leverage such optimization-based formulation to define a loss for training a neural network that generalizes well to any input (i.e., any body shape and motion). + +The equations of motion can be discretized with backward Euler as + +$$ +\mathbf {M} \frac {\mathbf {x} ^ {t + 1} - \mathbf {x} ^ {t} - \Delta t \mathbf {v} ^ {t}}{\Delta t ^ {2}} = \mathbf {f} \left(\mathbf {x} ^ {t + 1}, \frac {\mathbf {x} ^ {t + 1} - \mathbf {x} ^ {t}}{\Delta t}\right), \tag {3} +$$ + +where $\mathbf{M}$ is the mass matrix, $\mathbf{f}$ are forces, and $\mathbf{x}$ and $\mathbf{v}$ are the positions and velocities of garment nodes. The solution to these equations can be recast as an optimization [14, 34]: + +$$ +\mathbf {x} ^ {t + 1} = \underset {\mathbf {x}} {\arg \min } \frac {1}{2 \Delta t ^ {2}} (\mathbf {x} - \hat {\mathbf {x}}) ^ {\top} \mathbf {M} (\mathbf {x} - \hat {\mathbf {x}}) + \boldsymbol {\Phi}, \tag {4} +$$ + +where $\hat{\mathbf{x}} = \mathbf{x}^t +\Delta t\mathbf{v}^t$ is a tentative (explicit) position update, and $\Phi$ is the potential energy due to internal and external forces $\mathbf{f}$ of the system. + +![](images/69530bf40125bf507765d21557ef4f72db831dc2a13850e244c617147199ba74.jpg) +Figure 2. Overview of our method. First, the recurrent regressor predicts per-vertex offsets as a function of body shape and motion. These offsets are added to the garment template which is then skinned to produce the final result. We train the network by optimizing a set of physical properties of the predicted garments, removing need for ground-truth data. + +# 3.3. Turning Dynamics into Self-Supervision + +The key to our method is to define a set of losses based on Equation 4 to train the regressor $R(\cdot)$ . To this end, we propose a loss with two terms + +$$ +\mathcal {L} = \mathcal {L} _ {\text {i n e r t i a}} + \mathcal {L} _ {\text {s t a t i c}}, \tag {5} +$$ + +where $\mathcal{L}_{\mathrm{inertia}}$ models the inertia of the garment and it is defined analogous to the first term of Equation 4 + +$$ +\mathcal {L} _ {\text {i n e r t i a}} = \frac {1}{2 \Delta t ^ {2}} (\mathbf {x} - \hat {\mathbf {x}}) ^ {\top} \mathbf {M} (\mathbf {x} - \hat {\mathbf {x}}). \tag {6} +$$ + +Intuitively, this term prevents the change of garment velocities over time, but garment velocities will change anyway due to the underlying body motion, which makes dynamics and wrinkle effects appear. + +$\mathcal{L}_{\mathrm{static}}$ , the second term of our loss $\mathcal{L}$ , models the potential energy $\Phi$ of Equation 4 which represents the internal and external forces that affect the garment. Inspired by works from cloth simulation literature [37, 47], we define $\mathcal{L}_{\mathrm{static}}$ as the sum of different physics-based terms that model the energies that emerge on deformable solids, including strain, bending, gravity, and collisions + +$$ +\mathcal {L} _ {\text {s t a t i c}} = \mathcal {L} _ {\text {s t r a i n}} + \mathcal {L} _ {\text {b e n d i n g}} + \mathcal {L} _ {\text {g r a v i t y}} + \mathcal {L} _ {\text {c o l l i s i o n}}. \tag {7} +$$ + +This formulation of $\mathcal{L}_{\mathrm{static}}$ is general, and the definition of each term depends on the material model used, which we detail in the next section. + +# 3.4. Material Model + +The literature of simulation of elastic solids characterizes materials using equations that relate stimuli (e.g., deformations) to material response (e.g., energies) [47]. Inspired by this, and with the goal of learning physically-correct garment behaviors, we define the terms of our static loss $\mathcal{L}_{\mathrm{static}}$ based on equations of state-of-the-art cloth simulators [37] to model the following energies: + +Membrane Strain Energy. The membrane strain term models the response of the material to in-plane deformation. Given a deformed position $x \in \mathbb{R}^3$ and an undeformed position $X \in \mathbb{R}^2$ (i.e., the garment template), it defines an internal energy based on a first-order deformation metric, typically the deformation gradient $\mathbf{F} = \frac{\partial x}{\partial X}$ . In our loss we implement it using the Saint Venant Kirchhoff (StVK) elastic material model that defines membrane strain energy as + +$$ +\Psi_ {S} = \frac {\lambda}{2} \operatorname {t r} (\mathbf {G}) ^ {2} + \mu \operatorname {t r} \left(\mathbf {G} ^ {2}\right), \tag {8} +$$ + +where $\lambda$ and $\mu$ are the Lamé constants, and $\mathbf{G} = \frac{1}{2} (\mathbf{F}^{\top}\mathbf{F} - \mathbf{I})$ is the Green strain tensor. The membrane strain energy of the mesh is computed as + +$$ +\mathcal {L} _ {\text {s t r a i n}} = \sum_ {\text {t r i a n g l e s}} \mathbf {V} \Psi_ {\mathrm {S}}, \tag {9} +$$ + +where $\mathbf{V}$ is the volume of each triangle (i.e., area $\times$ thickness). + +Bending Energy. The bending term models the energy due to the angle of two adjacent faces and we model it as + +$$ +\mathcal {L} _ {\text {b e n d i n g}} = \sum_ {\text {e d g e s}} \frac {k _ {\text {b e n d i n g}}}{2} \theta^ {2} \tag {10} +$$ + +where $\theta$ is the dihedral angle between the faces and $k_{\mathrm{bending}}$ is a bending stiffness. + +Gravity. To model the effect of gravity in the learned deformations, we add a loss term with the potential energy of each cloth vertex + +$$ +\mathcal {L} _ {\text {g r a v i t y}} = \sum_ {\text {v e r t i c e s}} - m \mathbf {g} ^ {\top} x \tag {11} +$$ + +where $m$ is the vertex mass, and $\mathbf{g}$ is the gravitational acceleration. + +![](images/6290d870fd0425c141225b6229e5504debf68adfeefc262f111193e06123cca0.jpg) +(a) StVK (Ours) +Figure 3. The material model used is crucial to obtain realistic garment behaviors. We formulate our losses using the Saint Venant Kirchoff (StVK) model, in contrast to simpler alternatives that lead to less expressive deformations. + +![](images/73d124ac6dce8de4abec6bcca74c6fce2725823d0306803ee28cb7ad5febc489.jpg) +(b) Mass-spring (PBNS [6]) + +Collision Penalty. This term is crucial to learn plausible deformations, enforcing the garment to follow the underlying body motion. We implement it as + +$$ +\mathcal {L} _ {\text {c o l l i s i o n}} = \sum_ {\text {v e r t i c e s}} k _ {\text {c o l l i s i o n}} \max (\epsilon - d (x), 0) ^ {3} \tag {12} +$$ + +where $d(x)$ is a function that computes the distance to the body, $k_{\mathrm{collision}}$ is a collision stiffness, and $\epsilon$ is a safety margin to prevent the garment from overlapping with the body surface. + +To highlight the realism of the proposed material, in Figure 3 we show a ground-truth simulation of our model, and the simpler material model used in PBNS [6] based on a traditional mass-spring formulation. Overall, our model is capable of reproducing more complex behaviors typically present in garments, including wrinkles and folds at different scales. + +# 3.5. Regressing Garment Deformations + +With our novel self-supervised loss $\mathcal{L}$ defined in Section 3.3, we are ready to train the garment displacement regressor $R()$ from Equation 2 without requiring ground-truth data. To this end, in order to model the time dependencies of the inertial term $\mathcal{L}_{\mathrm{inertia}}$ , we implement the regressor using 4 Gated Recurrent Units (GRU), each with an output of size 256, and tanh as the activation function (see Figure 2). However, the recurrent nature of GRUs combined with the lack of ground-truth values to guide the training process make the regressor converge to bad solutions if a naive recurrent training protocol is used. We need to take special care into how the hidden states of the GRUs are initialized and updated. + +Intuitively, the model should be able to learn dynamics from just 3 frames, since $\mathcal{L}_{\mathrm{inertia}}$ from Equation 6 depends only on the vertex positions and velocities of the + +previous step. Therefore, we train our network using subsequences of 3 frames. Interestingly, we found that training on longer sub-sequences also minimizes $\mathcal{L}_{\mathrm{inertia}}$ correctly, but the learned deformations do not model true dynamics. + +At runtime, the network supports sequences of arbitrary length, but results can degrade noticeably for sequences longer than those used in training if initialization of the GRU hidden states is not well handled. More specifically, we observe that for each training sub-sequence, setting the initial hidden states $\mathbf{h}_0 = 0$ hinders the network to generalize to sequences longer than 3 frames. We address this issue by sampling the initial state $\mathbf{h}_0$ of each GRU from $\mathcal{N}(\mu ,\sigma)$ (empirically, $\mu = 0$ and $\sigma = 0.1$ ), which allows the model to generalize well even for sequences with thousands of frames. Notice that at runtime the state $\mathbf{h}_t$ depends on an arbitrarily large number of previous frames, not just the last 3, hence the use of noise to initialize states on train sub-sequences is fundamental to augment variance in states. + +# 4. Evaluation + +# 4.1. Training + +To self-supervise the training process of our regressor $R()$ we need to feed it with human motions and shapes. To this end, we use a set of 52 sequences from the AMASS dataset [33], totaling 6,519 frames, which we split into subsequences of 3 frames as described in Section 3.5. We set aside 4 full sequences for validation purposes. To provide body shape variety at train time, each of the sub-sequences is assigned a different body shape $\beta$ sampled from $\mathcal{U}(-3,3)$ at each epoch. Notice that, enabled by our self-supervised approach, this strategy allows us to train using thousands of different body shapes, while competitive supervised methods are limited to a dramatically smaller shape sample ([39] uses 9 shapes, [45] uses 17) due to the computational restrictions caused by the need for a ground-truth database. + +Regarding the network hyper-parameters, we use a batch size of 16, initially train for 10 epochs using a learning rate of 0.001, and then resume the learning with a learning rate of 0.0001 until it converges. This approach is fast, works for all garments, and avoids erroneous states. The rest of the material and training parameters do not affect stability. Larger learning rates can introduce instabilities due to energy spikes that make the training struggle to recover (i.e. the predicted mesh has collisions that are too large to be resolved). Small body-garment collisions are not a problem - e.g., we can handle pants despite self-collisions in the legs on some poses. + +Our approach does not require balancing loss terms, we just need to set the material properties of the garment. To this end, we tune material parameters to produce a desired fabric behavior, hence the parameters of the loss have a physical meaning - they are not arbitrary hyperparame + +![](images/409a6ef15087876e3ad137bfae23dd8699ed9ee7d4c1d984966c6aabbfc7b381.jpg) +Figure 4. Quantitative evaluation of our approach. We evaluate the minimization error in different the physics-based terms used in our loss, in the test sequence 01_01 of AMASS [33]. Sudden motion changes (e.g., jumps) naturally produce peaks in the inertial term, due to drastic changes in the velocity of the garment. Intuitively, cloth dynamics arise when the garment resists to those changes enforced by the body, therefore lower inertial values indicates that our model better learns time-dependent effects than PBNS [6]. See the supplementary video for qualitative results of this evaluation. The significantly improved realism of our method is better appreciated looking into sequences of deformed garments. + +![](images/4db5827c804d58fef0a6a0202c9282af3f18e8da44e8727eb5ec3729b6f66159.jpg) + +![](images/2aca5ac2636c2a6c7536e8b4e1a1f655c0e2e2d4790034c01de86fb578ff59ea.jpg) + +
StrainBendingGravityInertia
PBNS [6]0.1110.0070.0440.0035
SNUG (Ours)0.0640.0040.0280.0034
+ +Table 1. To quantitative evaluate our method we compute the physics-based loss terms of our trained model, in unseen sequences, and compare to PBNS. We produce lower errors in all terms, indicating that our approach results in deformations that better match physics-based simulators. + +
W/o bendingW/o strain W/o gravityW/o inertia Full
Mean-curvature error17.319.17.52.82.7
+ +ters. To compute the mass matrix $\mathbf{M}$ we use real measurements of the thickness and density of $100\%$ cotton fabric $(0.47\mathrm{mm}$ and $426\mathrm{kg} / \mathrm{m}^3$ respectively). The rest of the material parameters have the following values: the Lamé constants are set to $\lambda = 20.9$ and $\mu = 11.1$ , the bending stiffness $k_{\text{bending}} = 3.96\mathrm{e}-5$ , the collision stiffness $k_{\text{collision}} = 250$ , and the collision margin $\epsilon = 2\mathrm{mm}$ . We use the same parameters for all our garments. + +To thoroughly validate our model, in addition to comparisons to SOTA methods, in this section we also include ablations and comparisons that use a ground-truth simulated dataset. For as fair as possible evaluations, such dataset is created using the same motions, and the same train-test split, that we use to train SNUG. + +We implement our method in a regular desktop PC equipped with an AMD Ryzen 72700 CPU, an Nvidia GTX 1080 Ti GPU, and 32GB of RAM. + +Table 2. Quantitative ablation study. Each term of our loss contributes to the accuracy of the final result. + +
Data generationTrainRuntimeMemory
TailorNet [39]29 h6.5 h10.1 ms2114 MB
Santesteban [45]180 h17 h2.5 ms109 MB
SNUG (Ours)0 h2 h2.2 ms19 MB
+ +Table 3. Timings, memory requirements, and performance of state-of-the-art methods. Our self-supervised approach avoids the expensive cost of data generation, while also achieving significantly lower training times. + +# 4.2. Quantitative Evaluation + +To quantitatively evaluate our approach, we measure the physics-based terms of our loss $\mathcal{L}$ in test motions and compare it with the predictions of PBNS [6]. Notice that the original PBNS method uses a different (and simpler) material model but, in order to get a meaningful quantitative comparison, we extended and re-trained the publicly available PBNS implementation with our material model defined in Section 3.4. Also, notice that we cannot provide this comparison for supervised state-of-the-art methods (e.g., [17, 39, 45]) because the simulation schemes, material models, and parameters used to build their datasets are different and, therefore, the ground-truth physics properties (i.e., our loss terms) might differ significantly. + +Figure 4 shows the quantitative evaluation for the most important terms of our loss, and compares it with the extended implementation of PBNS [6] using our material, in the test sequence 01_01 of AMASS [33]. Notice how our method consistently produces lower error values across all terms (strain, bending, and inertia), indicating that test samples processed with SNUG better match the behavior of physics-based solutions (i.e., the minimization of the terms). Table 1 presents a quantitative evaluation of both methods in our full test set (4 sequences, 598 frames unseen + +![](images/fa13bfb1edd503d7496860b9120479c8334b2b046fac57c590bf3e0849dc7512.jpg) +(a) Supervised + +![](images/f10bd63cd0ead1f43c69bc3a81b7a3597f168446fcb8a36d594a87602243d10b.jpg) +(b) Ours + +![](images/50da3ba409af7178d1d070d7999c7a31807b33964492397fbcab12ca4e09345d.jpg) +(c) Simulation +Figure 5. When trained using same motions and same architecture, direct supervision at the vertex level leads to smoothing artifacts (a). In contrast, our physics-based loss is able to learn more realistic details (b), as shown in this frame from a test sequence. + +at train time), which further demonstrates that our approach improves upon the method of PBNS. + +To validate each term of our formulation, in Table 2 we show an ablation of the mean-curvature error, evaluated in the test set of our ground truth simulated dataset, when leaving out some of the terms. + +Finally, in Table 3 we also evaluate the memory requirements, training time, and runtime performance of our approach and compare to existing state-of-the-art supervised methods. Even if these methods do no address exactly the same problem (e.g. TailorNet [39] models garment variations and SNUG does not, but the latter models dynamics), SNUG outperforms supervised methods by a large margin in all metrics, resulting in a compact model, only 19MB, trained in just $2\mathrm{h}$ , which opens the door to scalable learning-based garment models. + +# 4.3. Qualitative Evaluation + +We qualitatively evaluate our method in Figure 7 and, more extensively, in the supplementary video. To this end, notice that we always use body shapes and motions unseen during training. Additionally, we provide comparisons to the state-of-the-art supervised methods of Santesteban et al. [45] and TailorNet [39], as well as to the recent work PBNS [6] that uses physics-constraints as supervision. To ease the assessment of the realism of each method, we also show results computed with a physics-based simulator [37], but notice that this is a traditional offline method, several orders of magnitude slower. + +These results demonstrate that our self-supervised method SNUG produces garment deformations that are, at least, on par with the state-of-the-art supervised methods [39, 45], while we do not require any ground-truth dataset. For PBNS [6], we use a mean body shape because it does not generalize to different bodies. Because PBNS does not model an inertial term and it is limited to a simpler material model, the garment deformations are generally more stiff, less realistic, and do not change naturally as a function of body pose. This is visible in rows 1 and 3 for PBNS in Figure 7, where the overall wrinkles are the same despite the significant change in body pose. + +To further validate our model, we use the ground-truth simulated dataset (described in Section 4.1, used for validation purposes only) to retrain our neural network in a per-vertex supervised manner. In Figure 5 and in the supplementary we qualitatively demonstrate that the self-supervised method learns more detailed wrinkles than the supervised counterpart trained with exactly the same motions. + +Additionally, in Figure 6 we show more results for a variety of garments learned with our approach, including t-shirts, tops, sleeveless shirts, pants, and shorts, worn by different body shapes. Notice how our approach produces different wrinkles for each garment type, pose, and shape combination, demonstrating the generalization capabilities of our self-supervised approach. For this figure, we trained one regressor for each garment type. In the supplementary video you can see animated results of these garments, showcasing for the first time realistic dynamic deformations of self-supervised learning-based garments. + +Finally, in the supplementary video we also show an ablation study of the influence of each term of our loss function. We demonstrate that all terms of Equation 5 contribute to improve the realism of our predicted garments. + +# 5. Limitations and Conclusion + +We believe SNUG makes an important step towards efficient learning-based models for 3D garments. To improve the state-of-the-art, instead of following the standard route of training with more data, adding more explicit supervision, or designing more complex architectures, we show that self-supervision based on physical properties of deformable solids leads to simpler and smaller yet highly-realistic models. + +While our physics-based loss terms are the fundamental key to self-supervision, we also want to point out that our strategy of exploiting optimization-based schemes (originally derived for simulation problems) to train a neural network carries a few weaknesses and important considerations to take into account. + +Specifically, we notice that the self-supervised network tends to converge to simpler solutions than a traditional simulator. For example, although our approach is capable of learning pose- and shape-dependent wrinkles and overall dynamics, we struggle to predict fine-level dynamics. We hypothesize that this limitation arises from a fundamental difference in how our method works: while standard simulators solve physics for one frame at a time, our model optimizes thousands of frames simultaneously during training. This makes our approach more prone to converge to simpler local minima. Nevertheless, we want to highlight that, despite this limitation, the cloth dynamics learned by our method are on par with other data-driven approaches. + +Another aspect open to future research is the collision + +![](images/9e2f52b4f64681292ed7d74904464c8dd9448801ace562e9643a52e5706f1474.jpg) +Figure 6. Qualitative results of our self-supervised method, in validation body shapes and poses unseen during training. SNUG successfully learns highly-realistic garment deformations, including fine wrinkles, as a function of body shape and motion. + +![](images/c03cadd2a729c70f8cfde739cbe486fbe6b896a56155e14084b3a576762f19b6.jpg) +Figure 7. Qualitative comparison with state-of-the-art methods. SNUG generalizes well to unseen body shapes and motions, and produces detailed folds and wrinkles. The results of SNUG are, at least, on par with the realism of supervised methods that require large datasets [39,45], and close to state-of-the-art offline physics-based simulation [37]. + +handling. Although our loss penalizes collisions between the garment and the body in train samples, we found noticeable collisions in test motions. Although these collisions can be efficiently solved with a postprocessing step, we believe it would be valuable to explore ways to enforce this constraint on the network. Addressing self-collisions of the garment is another aspect that would be worth taking into consideration. + +To foster future research on the field, our trained models and the code to run them are available on http:// mslab.es/projects/SNUG. + +Acknowledgments. The work was funded in part by the European Research Council (ERC Consolidator Grant no. 772738 TouchDesign) and Spanish Ministry of Science (RTI2018-098694-B-I00 VizLearning). + +# References + +[1] Thiemo Alldieck, Marcus Magnor, Bharat Lal Bhatnagar, Christian Theobalt, and Gerard Pons-Moll. Learning to Reconstruct People in Clothing from a Single RGB Camera. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[2] Thiemo Alldieck, Marcus Magnor, Weipeng Xu, Christian Theobalt, and Gerard Pons-Moll. Detailed Human Avatars from Monocular Video. In Proc. of International Conference on 3D Vision (3DV), pages 98-109. IEEE, 2018. 2 +[3] Thiemo Alldieck, Hongyi Xu, and Cristian Sminchisescu. imGHUM: Implicit Generative Models of 3D Human Shape and Articulated Pose. In Proc. of IEEE International Conference on Computer Vision (ICCV), 2021. 2 +[4] David Baraff and Andrew Witkin. Large Steps in Cloth Simulation. In Proc. of Conference on Computer Graphics and Interactive Techniques (SIGGRAPH), page 43-54, 1998. 2 +[5] Hugo Bertiche, Meysam Madadi, and Sergio Escalera. CLOTH3D: Clothed 3D Humans. In Proc. of European Conference on Computer Vision (ECCV), 2020. 2, 3 +[6] Hugo Bertiche, Meysam Madadi, and Sergio Escalera. PBNS: Physically Based Neural Simulation for Unsupervised Garment Pose Space Deformation. ACM Transactions on Graphics (Proc. SIGGRAPH Asia), 40(6), dec 2021. 3, 5, 6, 7, 8 +[7] Hugo Bertiche, Meysam Madadi, Emilio Tylson, and Sergio Escalera. DeePSD: Automatic Deep Skinning and Pose Space Deformation for 3D Garment Animation. In Proc. of IEEE International Conference on Computer Vision (ICCV), 2021. 2 +[8] Bharat Lal Bhatnagar, Garvita Tiwari, Christian Theobalt, and Gerard Pons-Moll. Multi-garment net: Learning to Dress 3D People from Images. In Proc. of IEEE International Conference on Computer Vision (ICCV), pages 5420-5430, 2019. 2 +[9] Robert Bridson, Ronald Fedkiw, and John Anderson. Robust treatment of collisions, contact and friction for cloth animation. ACM Trans. Graph., 21(3):594-603, 2002. 2 +[10] Gabriel Cirio, Jorge Lopez-Moreno, David Miraut, and Miguel A Otaduy. Yarn-level simulation of woven cloth. ACM Transactions on Graphics (Proc. SIGGRAPH Asia), 33(6):1-11, 2014. 2 +[11] Enric Corona, Albert Pumarola, Guillem Alenyà, Gerard Pons-Moll, and Francesc Moreno-Noguer. SMPLicit: Topology-aware Generative Model for Clothed People. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2021. 2 +[12] Boyang Deng, John P Lewis, Timothy Jeruzalski, Gerard Pons-Moll, Geoffrey Hinton, Mohammad Norouzi, and Andrea Tagliasacchi. NASA: Neural Articulated Ahape Approximation. In Proc. of European Conference on Computer Vision (ECCV), 2020. 2 +[13] Andrew Feng, Dan Casas, and Ari Shapiro. Avatar Reshaping and Automatic Rigging Using a Deformable Model. In Proc. of ACM SIGGRAPH Conference on Motion in Games (MIG), pages 57-64, 2015. 3 + +[14] Theodore F Gast, Craig Schroeder, Alexey Stomakhin, Chenfanfu Jiang, and Joseph M Teran. Optimization Integrator for Large Time Steps. IEEE Transactions on Visualization and Computer Graphics (TVCG), 21(10):1103-1115, 2015. 3 +[15] Eitan Grinspun, Anil N. Hirani, Mathieu Desbrun, and Peter Schroder. Discrete Shells. In Proc. of ACM SIGGRAPH/Eurographics Symposium on Computer Animation (SCA), page 62-67, 2003. 2 +[16] Peng Guan, Loretta Reiss, David A Hirshberg, Alexander Weiss, and Michael J Black. DRAPE: DRessing Any PErson. ACM Transactions on Graphics (Proc. SIGGRAPH), 31(4), 2012. 2 +[17] Erhan Gundogdu, Victor Constantin, Amrollah Seifoddini, Minh Dang, Mathieu Salzmann, and Pascal Fua. GarNet: A two-stream network for fast and accurate 3D cloth draping. In Proc. of IEEE International Conference on Computer Vision (ICCV), 2019. 1, 2, 3, 6 +[18] Yuanming Hu, Luke Anderson, Tzu-Mao Li, Qi Sun, Nathan Carr, Jonathan Ragan-Kelley, and Frédo Durand. DiffTaichi: Differentiable Programming for Physical Simulation. ICLR, 2020. 2 +[19] Zeng Huang, Yuanlu Xu, Christoph Lassner, Hao Li, and Tony Tung. ARCH: Animatable Reconstruction of Clothed Humans. In Proc. of IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3093-3102, 2020. 2 +[20] Ning Jin, Yilin Zhu, Zhenglin Geng, and Ron Fedkiw. A Pixel-Based Framework for Data-Driven Clothing. Computer Graphics Forum (Proc. of SCA), 2020. 2 +[21] Jonathan M. Kaldor, Doug L. James, and Steve Marschner. Simulating knitted cloth at the yarn level. ACM Trans. Graph., 27(3):1-9, 2008. 2 +[22] Theodore Kim. A finite element formulation of baraff-witkin cloth. Computer Graphics Forum, 39(8):171-179, 2020. 2 +[23] Zorah Lahner, Daniel Cremers, and Tony Tung. Deep Wrinkles: Accurate and Realistic Clothing Modeling. In Proc. of European Conference on Computer Vision (ECCV), 2018. 2 +[24] John P Lewis, Matt Cordner, and Nickson Fong. Pose Space Deformation: A Unified Approach to Shape Interpolation and Skeleton-Driven Deformation. In Proc. of the Annual Conference on Computer Graphics and Interactive Techniques, pages 165–172, 2000. 2 +[25] Jie Li, Gilles Daviet, Rahul Narain, Florence Bertails-Descoubes, Matthew Overby, George E Brown, and Laurence Boissieux. An Implicit Frictional Contact Solver for Adaptive Cloth Simulation. ACM Transactions on Graphics (Proc. SIGGRAPH), 37(4):1-15, 2018. 2 +[26] 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 Proc. of European Conference on Computer Vision (ECCV), 2020. 2 +[27] 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 Proc. of International Conference on 3D Vision (3DV), 2021. 2 + +[28] Junbang Liang, Ming Lin, and Vladlen Koltun. Differentiable Cloth Simulation for Inverse Problems. In Advances in Neural Information Processing Systems (NeurIPS), pages 771-780, 2019. 2 +[29] Tiantian Liu, Sofien Bouaziz, and Ladislav Kavan. QuasiNewton Methods for Real-Time Simulation of Hyperelastic Materials. ACM Trans. Graph., 36(4), 2017. 3 +[30] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J Black. Smpl: A skinned multiperson linear model. ACM Transactions on Graphics (Proc. SIGGRAPH Asia), 34(6):1-16, 2015. 3 +[31] 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. of Computer Vision and Pattern Recognition (CVPR), 2020. 1, 2 +[32] Qianli Ma, Jinlong Yang, Siyu Tang, and Michael J Black. The power of points for modeling humans in clothing. In Proc. of IEEE International Conference on Computer Vision (ICCV), 2021. 2 +[33] 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 IEEE International Conference on Computer Vision (ICCV), pages 5442-5451, Oct. 2019. 5, 6 +[34] Sebastian Martin, Bernhard Thomaszewski, Eitan Grinspun, and Markus Gross. Example-Based Elastic Materials. ACM Trans. Graph., 30(4), 2011. 2, 3 +[35] Marko Mihajlovic, Yan Zhang, Michael J Black, and Siyu Tang. LEAP: Learning Articulated Occupancy of People. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2021. 2 +[36] Juan Montes, Bernhard Thomaszewski, Sudhir Mudur, and Tiberiu Popa. Computational Design of Skintight Clothing. ACM Trans. Graph., 39(4), 2020. 2 +[37] Rahul Narain, Armin Samii, and James F O'brien. Adaptive Anisotropic Remeshing for Cloth Simulation. ACM Transactions on Graphics (Proc. SIGGRAPH Asia), 31(6):1-10, 2012. 1, 2, 4, 7, 8 +[38] Andrew Nealen, Matthias Müller, Richard Keiser, Eddy Boxerman, and Mark Carlson. Physically Based Deformable Models in Computer Graphics. Computer Graphics Forum, 25(4):809-836, 2006. 1, 3 +[39] Chaitanya Patel, Zhouyingcheng Liao, and Gerard Pons-Moll. The Virtual Tailor: Predicting Clothing in 3D as a Function of Human Pose, Shape and Garment Style. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2020. 1, 2, 3, 5, 6, 7, 8 +[40] Gerard Pons-Moll, Sergi Pujades, Sonny Hu, and Michael J. Black. ClothCap: Seamless 4D clothing capture and retargeting. ACM Transactions on Graphics (Proc. SIGGRAPH), 36(4), 2017. 1, 2 +[41] Amit Raj, Patsorn Sangkloy, Huiwen Chang, Jingwan Lu, Duygu Ceylan, and James Hays. SwapNet: Image Based Garment Transfer. In Proc. of European Conference on Computer Vision (ECCV), pages 666-682, 2018. 1, 2 + +[42] Cristian Romero, Miguel A. Otabuy, Dan Casas, and Jesus Perez. Modeling and Estimation of Nonlinear Skin Mechanics for Animated Avatars. Computer Graphics Forum (Proc. Eurographics), 39(2), 2020. 2 +[43] 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 IEEE International Conference on Computer Vision (ICCV), 2019. 2 +[44] Shunsuke Saito, Jinlong Yang, Qianli Ma, and Michael J. Black. SCANimate: Weakly supervised learning of skinned clothed avatar networks. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2021. 2 +[45] Igor Santesteban, Miguel A. Otaduy, and Dan Casas. Learning-Based Animation of Clothing for Virtual Try-On. Computer Graphics Forum (Proc. Eurographics), 38(2), 2019. 1, 2, 3, 5, 6, 7, 8 +[46] Yu Shen, Junbang Liang, and Ming C. Lin. GAN-based Gar-ment Generation Using Sewing Pattern Images. In Proc. of European Conference on Computer Vision (ECCV), 2020. 1, 2 +[47] Eftychios Sifakis and Jernej Barbic. FEM simulation of 3D deformable solids: a practitioner's guide to theory, discretization and model reduction. In SIGGRAPH 2012 Courses, pages 1-50. ACM, 2012. 4 +[48] Russell Stewart and Stefano Ermon. Label-Free Supervision of Neural Networks with Physics and Domain Knowledge. In Proceedings of the AAAI Conference on Artificial Intelligence, page 2576-2582, 2017. 2 +[49] Min Tang, Tongtong Wang, Zhongyuan Liu, Ruofeng Tong, and Dinesh Manocha. I-Cloth: Incremental Collision Handling for GPU-Based Interactive Cloth Simulation. ACM Transactions on Graphics (Proc. SIGGRAPH Asia), 37(6), 2018. 2 +[50] 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 European Conference on Computer Vision (ECCV), 2020. 1, 2 +[51] Garvita Tiwari, Nikolaos Sarafianos, Tony Tung, and Gerard Pons-Moll. Neural-GIF: Neural Generalized Implicit Functions for Animating People in Clothing. In Proc. of IEEE International Conference on Computer Vision (ICCV), 2021. 2 +[52] Jonathan Tompson, Kristofer Schlachter, Pablo Sprechmann, and Ken Perlin. Accelerating Eulerian Fluid Simulation With Convolutional Networks. In International Conference on Machine Learning (ICML), pages 3424-3433, 2017. 2 +[53] Raquel Vidaurre, Igor Santesteban, Elena Garces, and Dan Casas. Fully Convolutional Graph Neural Networks for Parametric Virtual Try-On. Computer Graphics Forum (Proc. SCA), 39(8), 2020. 1, 2, 3 +[54] 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 + +[55] Tuanfeng Y Wang, Duygu Ceylan, Jovan Popovic, and Niloy J Mitra. Learning a Shared Shape Space for Multimodal Garment Design. ACM Transactions on Graphics (Proc. SIGGRAPH Asia), 37(6), 2018. 1, 2 +[56] Tuanfeng Y Wang, Tianjia Shao, Kai Fu, and Niloy J Mitra. Learning an Intrinsic Garment Space for Interactive Authoring of Garment Animation. ACM Transactions on Graphics (Proc. SIGGRAPH Asia), 38(6), 2019. 2 +[57] Zhonghua Wu, Guosheng Lin, Qingyi Tao, and Jianfei Cai. M2E-Try On Net: Fashion from Model to Everyone. In Proc. of ACM International Conference on Multimedia, 2019. 1 +[58] You Xie, Erik Franz, Mengyu Chu, and Nils Thuerey. tempoGAN: A Temporally Coherent, Volumetric GAN for Super-resolution Fluid Flow. ACM Transactions on Graphics (Proc. SIGGRAPH), 37(4), 2018. 2, 3 +[59] Tao Yu, Zerong Zheng, Yuan Zhong, Jianhui Zhao, Qionghai Dai, Gerard Pons-Moll, and Yebin Liu. Simulcap: Single-view human performance capture with cloth simulation. In Proc. of IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[60] Chao Zhang, Sergi Pujades, Michael J Black, and Gerard Pons-Moll. Detailed, accurate, human shape estimation from clothed 3d scan sequences. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 4191-4200, 2017. 2 +[61] Fuwei Zhao, Zhenyu Xie, Michael C. Kampffmeyer, Haoye Dong, Songfang Han, Tianxiang Zheng, Tao Zhang, and Xiaodan Liang. M3D-VTON: A Monocular-to-3D Virtual Try-On Network. In Proc. of IEEE International Conference on Computer Vision (ICCV), 2021. 2 +[62] Heming Zhu, Yu Cao, Hang Jin, Weikai Chen, Dong Du, Zhangye Wang, Shuguang Cui, and Xiaoguang Han. Deep Fashion3D: A Dataset and Benchmark for 3D Garment Reconstruction from Single Images. In Proc. of European Conference on Computer Vision (ECCV), 2020. 2 +[63] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks. In Proc. of IEEE International Conference on Computer Vision (ICCV), pages 2223–2232, 2017. 2 +[64] Yinhao Zhu, Nicholas Zabaras, Phaedon-Stelios Koutsourelakis, and Paris Perdikaris. Physics-constrained deep learning for high-dimensional surrogate modeling and uncertainty quantification without labeled data. Journal of Computational Physics, 394:56-81, 2019. 2, 3 \ No newline at end of file diff --git a/snugselfsupervisedneuraldynamicgarments/images.zip b/snugselfsupervisedneuraldynamicgarments/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5e8a14ba049e3d77288f7ed0e12a3eda8ed16df5 --- /dev/null +++ b/snugselfsupervisedneuraldynamicgarments/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bc3106e5b653020180daed9a5f307d0972599e1528722bde9212464c33849ed +size 374460 diff --git a/snugselfsupervisedneuraldynamicgarments/layout.json b/snugselfsupervisedneuraldynamicgarments/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3344ce317556f7a931199b99d3305af46e01fef2 --- /dev/null +++ b/snugselfsupervisedneuraldynamicgarments/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a6b8be41005679312f7c81f8aad1acf80f0bac265aff74884d26f8441212dfc +size 387900 diff --git a/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/28267e38-9e01-4d91-bd84-faeedf3e2059_content_list.json b/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/28267e38-9e01-4d91-bd84-faeedf3e2059_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..46e08c1cccd9ccc5c5ccd50af8049c4d99e41602 --- /dev/null +++ b/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/28267e38-9e01-4d91-bd84-faeedf3e2059_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba5631ab8b440f7cd6fbfef5f348ef0681e12c96e34ad465f84e6b387f33ff4e +size 75585 diff --git a/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/28267e38-9e01-4d91-bd84-faeedf3e2059_model.json b/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/28267e38-9e01-4d91-bd84-faeedf3e2059_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4d4a1af295b1e7d0c87bbb0015388fdd16b44497 --- /dev/null +++ b/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/28267e38-9e01-4d91-bd84-faeedf3e2059_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd4925f0a13cdb6e3e09f5f5ac5ee6ba6f21fd2c17b397065fea8d483c427605 +size 90325 diff --git a/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/28267e38-9e01-4d91-bd84-faeedf3e2059_origin.pdf b/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/28267e38-9e01-4d91-bd84-faeedf3e2059_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7b70684e4fb39e41cf71283f233c7740c522c44d --- /dev/null +++ b/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/28267e38-9e01-4d91-bd84-faeedf3e2059_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecdbba4c04d182b415e0ebfa0d8648c51260eab736a9a1000ed094896c4745da +size 7638228 diff --git a/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/full.md b/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0d43accbf61d4c650e6138ab0d4f4c0264573485 --- /dev/null +++ b/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/full.md @@ -0,0 +1,280 @@ +# SOMSI: Spherical Novel View Synthesis with Soft Occlusion Multi-Sphere Images + +Tewodros Habtegebrial \* Christiano Gava \* Marcel Rogge \* Didier Stricker \* Varun Jampani + +$^{\ast}$ TU Kaiserslautern †DFKI ‡Google Research + +# Abstract + +Spherical novel view synthesis (SNVS) is the task of estimating $360^{\circ}$ views at dynamic novel views given a set of $360^{\circ}$ input views. Prior arts learn multi-sphere image (MSI) representations that enable fast rendering times but are only limited to modelling low-dimensional color values. Modelling high-dimensional appearance features in MSI can result in better view synthesis, but it is not feasible to represent high-dimensional features in a large number $(>64)$ of MSI spheres. We propose a novel MSI representation called Soft Occlusion MSI (SOMSI) that enables modelling high-dimensional appearance features in MSI while retaining the fast rendering times of a standard MSI. Our key insight is to model appearance features in a smaller set (e.g. 3) of occlusion levels instead of larger number of MSI levels. Experiments on both synthetic and real-world scenes demonstrate that using SOMSI can provide a good balance between accuracy and run-time. SOMSI can produce considerably better results compared to MSI based MODS [1], while having similar fast rendering time. SOMSI view synthesis quality is on-par with state-of-the-art NeRF [24] like model while being 2 orders of magnitude faster. For code, additional results and data, please visit https://tedyhabtegebrial.github.io/somsi. + +# 1. Introduction + +The advent of low-cost $360^{\circ}$ imaging devices makes spherical images a standard choice of representation for 3D scenes in comparison to more expensive 3D modelling with artists or depth sensors. Spherical images are widely used to capture and visualize $360^{\circ}$ views of scenes with several applications in virtual tourism, navigation, advertisement, etc. However, a spherical image alone delivers a limited viewing experience with only rotations around the center. User navigation (translation) is usually enabled by capturing multiple spherical images thereby allowing the user to hop from one to another. Spherical novel view synthesis (SNVS) is the task of estimating in-between $360^{\circ}$ views making it possible for seamless continuous user navigation in a scene. See + +Fig. 1 (left) for a sample illustration of the problem setting. + +A practical SNVS system would have the following properties: 1. High-quality synthesis of disoccluded content and view-dependent effects in novel views, 2. Fast synthesis time enabling realtime user navigation in a scene and, 3. Low memory consumption to run SNVS on mobile hardware such as VR headsets. Satisfying all these properties is quite challenging. Current SNVS techniques are based on Multi-Sphere Image (MSI) representation [1, 4]. MSI can be seen as a spherical extension of Multi-Plane Images (MPI) [32, 37], which are widely adopted in view synthesis of common perspective images. More specifically, MSIs represent a scene as a set of textured spheres centered around a reference point. A key advantage of using MSIs is that rendering spheres is extremely efficient with standard rendering softwares. The simplicity of the rendering and seamless integration with graphics software makes MSIs an appealing choice for real-time rendering applications. On the other hand, current MSI based techniques such as MatryODSHkha (MODS) [1] suffer from unsatisfactory quality in synthesized novel views. + +The use of Coordinate Multi-Layer Perceptrons (CMLP) is revolutionizing the field of novel view synthesis with very high-quality results such as in NeRF [24]. A key drawback of CMLP based techniques is the requirement of large number of training views as well as slow rendering. Several very recent works try to improve NeRF-like techniques in different aspects: improving rendering speed [13, 19, 26], modelling reflectance properties [3], working with in-the-wild images [23], re-lighting [30], generalizing across scenes [36], etc. Even though one could adapt a NeRF-like technique for SNVS task, rendering novel $360^{\circ}$ views would be prohibitively slow. Several concurrent techniques to improve rendering speed of NeRFs [13, 19, 26] are either specific to perspective images or did not demonstrate their use for spherical images in the SNVS task. + +In this work, we propose a novel SNVS technique that provides a good trade-off between different favourable properties: high-quality view synthesis and fast runtime with low memory requirements. Following [1], we also make use of MSI representation for fast rendering. [1] + +![](images/4f7f961bf62c896dabc7d9049083577607dc8bb273be0d568ec3fa1d64832af5.jpg) +Figure 1. High quality view synthesis with SOMSI. (Left) Illustration of sample input and held-out target spherical views of a scene. (right) Synthesized novel views and the corresponding error maps for SOMSI (Ours), MODS [1] and S-NeRF [24]. + +learns a CNN that takes spherical images as input and produces an MSI representation where each point in each layered sphere has an RGB color and an alpha value associated with it. Several recent MPI works [17,21,34] on view synthesis demonstrate the use of high-dimensional learned features in MPI planes instead of color MPs. Following these approaches and coordinate MLPs, we propose to learn high-dimensional appearance features in MSI using coordinate MLPs. In essence, we combine the strengths of coordinate MLPs with MSI representation, thereby achieving both high quality and fast runtime (rendering). + +A key issue in representing high-dimensional features at each point in MSI is high memory consumption. For instance, representing $f$ -dimensional features in $d$ (usually $>64$ ) spheres with $m$ points each leads to a memory complexity of $\mathcal{O}(m\times d\times f)$ . Since the number of points $m$ in a $360^{\circ}$ spherical image are usually high, the memory complexity will be prohibitively high if we represent high-dimensional features in each MSI sphere. We argue that representing dense features in MSI sphere is superfluous as much of the 3D space is empty. As a remedy, we propose a novel MSI scene representation where the scene appearance and geometry are factored into two separate data structures. We call this novel MSI representation Soft Occlusion MSI (SOMSI). SOMSI represents the scene geometry with standard MSI data structure, while the scene appearance is represented as a set of layered 2D feature maps. The key in SOMSI is to represent appearance feature maps using a smaller set of scene-specific occlusion levels instead of large set of predefined MSI spheres. In essence, SOMSI representation takes $\mathcal{O}(m\times d\times k)$ memory for scene geometry with soft occlusion masks and $\mathcal{O}(m\times k\times f)$ memory to represent scene appearance features, where $k$ denotes the number of occlusion levels. This strategy scales much bet + +ter in terms of memory with increasing feature dimension as the number of occlusion levels are significantly lower ( $k = 3$ in our case) compared to spheres in MSI (usually $d > 64$ ). We also propose a novel SOMSI rendering formulation that allows the fast rendering of novel views like with standard MSI representation. + +We demonstrate the effectiveness of our SOMSI technique with results on both synthetic and real-world scenes. Fig. 1 shows sample input and held-out spherical views along with sample results of different techniques. Results show that our approach can considerably outperform previous MSI based techniques [1]. Our approach can produce high quality novel views that are on-par with spherical adaptation of NeRF [24] technique (S-NeRF) while being 2 orders of magnitude faster, with rendering time close to MSI techniques [1]. We make the following contributions: + +- We propose a novel Soft Occlusion Spherical Multi-Sphere (SOMSI) representation that can effectively scale to encode high-dimensional scene appearance features in MSI representation using learnable occlusion layers. +- We propose an efficient way to render novel views from the learned SOMSI representation. +- Our approach effectively combines the advantages of different techniques with high quality view synthesis that is on-par with implicit volumetric representations [24] while having fast runtime like with standard MSI representations [1]. + +# 2. Related Work + +View synthesis research has a long history in computer vision and graphics starting from the seminal work of image-space morphing in Chen and Williams [8], light field rendering [20], Lumigraphs [5, 15] followed by multi-view + +stereo reconstruction techniques [6, 7, 10, 14, 18]. Here, we briefly review the relevant learning based techniques. + +Novel View Synthesis. One of the earliest learning based IBR techniques is the DeepStereo method by Flynn et al. [12]. DeepStereo trains a CNN to produce novel views from input plane-sweep volumes. An important milestone for the learning based IBR research was the re-introduction of the Multi-plane Images (MPI) by Zhou et al. [37]. The view synthesis capabilities of MPIs have been pushed ever further by the DeepView [11] technique. DeepView combines the MPI scene representation with a learned gradient descent based optimization to render highly accurate novel views of challenging real world scenes. A recent extension of MPIs model view dependent effects [35]. Recently, Neural Radiance Fields (NeRF) [24] techniques uses Coordinate Multi-layer Perceptrons to model a given scene resulting in very high-quality view synthesis results. NeRF renders a scene by performing standard volumetric rendering. However, the visibility and color information for every point in the rendering volume are determined by invoking the trained MLP which is time-consuming. + +Spherical View Synthesis. Single spherical images or panoramic stereo cannot provide parallax as head movement (translation) is not possible. Rendering panoramic scenes with motion parallax is studied in several works [2, 22, 29]. Synthesizing novel views "on demand" is key to enhance user experience by allowing for head movement. Broxton et al. [4] presented a light-weight immersive light field video rendering technique by extending MPI formulation of DeepView [11] into a Multi-sphere Image (MSI) representation. Moreover, sparse set of MSI spheres are used in order to create a light-weight layered mesh representation that can be rendered on mobile and web platforms. Concurrently with Bronxton et al. [4], the MODS [1] technique showed the effectiveness of MSIs for $360^{\circ}$ view synthesis. MSIs are an attractive option for SNVS as they support real-time rendering with standard rendering softwares. In this paper we build upon the MSI scene representation and propose a novel MSI representation that can more efficiently model high-dimensional appearance features. + +# 3. Preliminaries + +Spherical Image Representation. A spherical image is an environment mapping that captures the entire visible scene from a single point in space. In other words, it comprises a $360^{\circ} \times 180^{\circ}$ panoramic view of the surroundings of the camera. Spherical images are usually stored as a 2D pixel map of dimensions $h \times w$ often referred to as Equirectangular Projection (ERP). Each ERP pixel $\mathbf{p} = [u, v]^T$ , where $u \in [0, w - 1]$ , $v \in [0, h - 1]$ , corresponds to a point on a unit sphere $[\theta, \phi, 1]^T$ expressed in spherical coordinates. This mapping between a point on the + +unit sphere and its pixel location on the ERP is given as + +$$ +u = w \left(1 - \frac {\theta}{2 \pi}\right), \quad v = h \frac {\phi}{\pi}, \tag {1} +$$ + +with x-axis pointing into the screen, y-axis to the left and z-axis up; a Cartesian point $\mathbf{x} = [x,y,z]^T$ is converted into spherical coordinates $\mathbf{x}^s = [\theta ,\phi ,r]^T$ as + +$$ +\theta = a t a n \left(\frac {y}{x}\right) \quad \phi = a c o s \left(\frac {z}{r}\right) \quad r = \sqrt {x ^ {2} + y ^ {2} + z ^ {2}}. \tag {2} +$$ + +A cartesian point $\mathbf{x}$ in 3D can be projected on to an ERP by first obtaining $\mathbf{x}^s = [\theta, \phi, r]^T$ with Equation 2, followed by mapping $\mathbf{x}^s$ to the ERP location $[u, v]^T$ via Equation 1. + +Multi-Sphere Images (MSI). This is the most commonly used representation for SNVS [1, 4]. MSI can be seen as a spherical extension of Multi-Plane Images (MPI) that are widely used in view synthesis literature [32, 37]. An MSI is composed of a set of concentric $RGB\alpha$ spheres. The use of spheres to represent a scene allows real-time rendering and easy integration with common rendering softwares such as Unity3D [16] and Blender [9]. This makes MSIs highly suitable for downstream VR applications. + +Formally, an MSI is a set of concentric spheres of radii $\{r_i\}_{i = 1}^d$ with each sphere representing a spherical image. The $r_i$ values are set by linearly sampling the inverse depth range between predefined near $r_{near}$ and far $r_{far}$ values. Each of the $d$ spheres in an MSI has transparency $\alpha \in [0,1]^{m\times 1}$ and color $C\in [0,255]^{m\times 3}$ , where $m = h\times w$ is the pixel resolution of the spherical images and $d$ is the number of spheres. The number of spheres controls the trade-off between the fidelity of the scene representation and the computational costs (rendering time and memory). Increasing $d$ yields higher fidelity but requires more memory and results in slower rendering. These spherical images can be represented either in 3D with spherical coordinates or with 2D ERP planes. + +MSI Rendering. Fig. 2 shows an illustration of MSI spheres centered around reference view $\mathbf{r}$ . Suppose we want to render a spherical image from a novel view center $\mathbf{t}$ , we shoot rays from the target center and alpha composite the colors along the intersection points w.r.t. reference-view MSI spheres. Specifically, for a sample ray direction (corresponding to a location $\mathbf{p} = [u,v]^T$ in the target ERP), we first compute the ray intersections $\mathbf{x}_i^p\in \mathbb{R}^3$ ; $i\in \{1,\dots,d\}$ with the $d$ MSI spheres using a standard sphere-ray intersection technique [25]. We then record MSI transparency and color values at these intersection points: $\{(\alpha_i^p,C_i^p)\}_{i = 1}^d$ . The final color $C^p$ for target ray $\mathbf{p}$ is calculated by overcompositing $C_i^p$ s with $\alpha_{i}^{p}$ s in a back-to-front manner (also known as alpha composition): + +$$ +C ^ {p} = \sum_ {i = 1} ^ {d} \alpha_ {i} ^ {p} C _ {i} ^ {p} \prod_ {j < i} (1 - \alpha_ {j} ^ {p}). \tag {3} +$$ + +The same process is used for all the ray directions in the target view to obtain final novel view spherical image at the target location. Since this process is trivially parallelizable, it is straightforward to use GPUs for fast rendering of novel views. One could also export MSI spheres as textured meshes to leverage standard rendering engines for real-time novel view rendering. + +# 4. Approach + +Problem. We tackle the problem of Unstructured Spherical Light-Field Interpolation also referred to as Spherical View Synthesis: Given a set of $360^{\circ}$ spherical images captured at different locations in a scene, the aim is to estimate spherical images from novel camera viewpoints. Formally, the input to our method is a set of $n$ spherical images, $I_{i} \in \mathbb{R}^{m \times 3}$ ; $i \in \{1, \dots, n\}$ each with $m$ pixels, and their $SE(3)$ camera poses, $P \in \mathbb{R}^{n \times 3 \times 4}$ . Given a set of posed spherical images, we learn a scene representation from which one can dynamically render novel views from target camera poses. + +Fig. 3 illustrates the overview of our spherical novel view synthesis (SNVS) technique. We consider one of the input camera poses as reference and optimize a coordinate MLP network that learns to estimate a novel scene representation called 'Soft Occlusion MSI' (SOMSI) at that reference location. We can then use this representation to dynamically render novel views from this scene representation at the target locations. Next, we describe the SOMSI representation and how we can render novel views from that representation. + +# 4.1. Soft Occlusion MSI (SOMSI) + +Motivation. Even though standard MSI representation is efficient in terms of rendering speed, it is limited to low-dimensional RGB appearance in each MSI sphere. Recent works on view synthesis [17, 21, 34] show that it is beneficial to represent the appearance in 3D scene with high-dimensional deep features instead of simple RGB colors. Representing higher dimensional features at each MSI sphere is memory intensive as representing $f$ -dimensional features at each point in each MSI sphere leads to a memory complexity of $\mathcal{O}(m \times d \times f)$ which is not feasible even for moderate values of $f > 10$ . + +In this work, we propose a novel MSI representation called Soft occlusion MSI (SOMSI) which scales much better with increasing appearance feature dimensionality. The key to our technique is decoupling appearance features from scene geometry in MSI representation. In SOMSI, we use standard MSI ERPs to represent geometry and soft occlusions; and use a small set of occlusion layers/ERPs to represent appearance features. Our key insight is that much of the points in MSI spheres are empty and we can represent multi-sphere appearance features with a much smaller set of + +![](images/c749e247df3fec62170aa47a4847dafd29e40a63946dcfd3986d9a51a241cc73.jpg) +Figure 2. SOMSI Rendering. Illustration of SO-Geometry and SO-Appearance planets in our SOMSI scene representation in the reference view at $\mathbf{r}$ . Rendering a target ray $p$ involves computing expected target ray termination and expectation occlusion level, using which we can composite the appearance features to estimate the final target ray color. + +occlusion appearance features. + +SOMSI Representation. As illustrated in Fig. 2, SOMSI representation has two sets of ERPs: SO-Geometry and SO-Appearance. SO-Appearance comprises of soft occlusion appearance features $S \in \mathbb{R}^{m \times k \times f}$ , where $f$ denotes the size of color/appearance descriptors and $k$ the number of occlusion layers. Each of the $k$ ERPs denotes the scene appearance at a specific occlusion layer. The first ERP represents all the visible surface appearances in the reference view; second ERP represents the appearance of occluded surfaces that are behind the visible surfaces and the third ERP represents the further occluded surfaces and so on. In practice, we observe that 3 layers ( $k = 3$ ) are enough to represent most occluded content in general scenes. In short, SO-Appearance represents the scene appearance features with much smaller set ( $k = 3$ ) of occlusion layers in comparison to larger number ( $d > 32$ ) of ERPs in a standard MSI representation. + +SO-Geometry, on other hand, represents scene geometry using all the $d$ spheres. Specifically, SO-Geometry consists of multi-sphere transparencies $\alpha \in \mathbb{R}^{m\times d}$ and soft occlusion masks $\beta \in \mathbb{R}^{m\times d\times k}$ . As the name indicates, transparencies $\alpha$ represent the sphere transparencies like in standard MSI representation. The $k$ -dimensional soft-occlusion mask $\beta_{i}^{p}$ of a 3D point at $i^{th}$ sphere along ray/pixel $^1 p$ represents the occlusion level of that 3D point $\mathbf{x}_i^p$ in a soft manner. For example, $\beta_i^p [0,1,0]$ denotes that $\mathbf{x}_i^p$ belongs + +![](images/7f935d73756d612883d4db0a086a9afd898face1506b999de1b9b80d74e68cd1.jpg) +Figure 3. Approach Overview. We learn an MLP that takes spherical locations and colors from multi-resolution reference view images; and estimates SOMSI scene representation at those locations. We can then efficiently render novel view images from the learned SOMSI. + +to second occlusion level i.e., occluded by one visible surface. The soft occlusion masks $\beta$ provide the association of planes in SO-Geometry and SO-Appearance. SO-Geometry and SO-Appearance planes have the memory complexity of $\mathcal{O}(m\times d\times k)$ and $\mathcal{O}(m\times k\times f)$ respectively. Since $k << d$ , the combined memory complexity of these two will be smaller than representing $f$ -dimensional features at each of the $d$ planes, which has $\mathcal{O}(m\times d\times f)$ memory complexity. This makes SOMSI representation scale better with higher dimensional features while retaining the fast rendering times of MSI representation. + +SOMSI Rendering. Novel view rendering with SOMSI is not a simple alpha composition process, (Eqn. 3) as we do not represent appearance features at each of the MSI planes. One can simply convert SO-Appearance features into full MSI planes, and then can use alpha composition for novel view rendering. Converting SO-Appearance features into full MSI feature planes would again incur $\mathcal{O}(m \times d \times f)$ memory complexity which we want to avoid. In contrast, we propose a technique that directly utilizes SO-Appearance features for rendering. Our SOMSI rendering along each ray from the target center has three main steps: 1. Computing expected ray termination on the target ray; 2. expected occlusion along the target ray; and then 3. using both these estimates to composite novel view appearance features from SO-Appearance layers. Let us discuss each of these steps in detail. + +1. Expected Ray Termination. Following the same notation as in Sec. 3 and as illustrated in Fig. 2, let us suppose we learn an SOMSI centered at reference $\mathbf{r}$ and we want to do the rendering from target location $\mathbf{t}$ . Consider the rendering of target appearance features along the sample target ray direction $p$ , as shown in Fig. 2. Similar to standard MSI rendering, we first compute these target ray intersections $\mathbf{x}_i^p \in \mathbb{R}^2$ ; $i \in \{1, \dots, d\}$ with the $d$ MSI spheres (in reference view) using standard sphere-ray intersection technique [25]. + +Each of these points $\mathbf{x}_i^p$ has the corresponding 2D points in SO-Geometry ERP planes with locations $G_i^p \in \mathbb{R}^2$ , transparency $\alpha_i^p$ and soft occlusion $\beta_i^p$ as shown in Fig. 2. These points $\{G_i^p\}_{i=1}^d$ lie on an epipolar line in the reference view. We compute the 2D ERP location (of ray $p$ in the reference camera) $\tilde{G}^p \in \mathbb{R}^2$ of the target ray $p$ as: + +$$ +\tilde {G} ^ {p} = \sum_ {i = 1} ^ {d} \alpha_ {i} ^ {p} G _ {i} ^ {p} \prod_ {j < i} (1 - \alpha_ {j} ^ {p}), \tag {4} +$$ + +which is an alpha composition of 2D ERP locations $\{G_i^p\}_{i = 1}^d$ instead of color values as in standard MSI rendering (Eqn. 3). The expected ray on the Epipolar line, $\tilde{G}^p$ is a 2D location in SOMSI. This point effectively computes the location of target ray termination in the reference camera (denoted as orange dots in Fig. 2). Note that, one can equivalently compute the ray termination in $3D$ by alpha compositing the ray-sphere intersection points and project the result to the reference ERP to get $\tilde{G}^p$ . + +2. Expected Occlusion. The expected ray termination $\tilde{G}^p$ at the reference view provides the correspondence, in the reference view, for the target ray $p$ . Thus, we can use this ERP location $\tilde{G}^p$ to get the corresponding appearance features from SO-Appearance. Since SO-Appearance has different occlusion layers, we also need to estimate expected occlusion level for the target ray $p$ . We compute the expected occlusion level $\tilde{S}^p \in \mathbb{R}^k$ using the same alpha compositing formulation, but compositing the soft-occlusion masks $\beta$ in back-to-front manner: + +$$ +\tilde {\beta} ^ {p} = \sum_ {i = 1} ^ {d} \alpha_ {i} ^ {p} \beta_ {i} ^ {p} \prod_ {j < i} \left(1 - \alpha_ {j} ^ {p}\right). \tag {5} +$$ + +3. Appearance Composition. To compute an appearance feature for the target ray/pixel $p$ , we first bilinearly interpolate the SO-Appearance features $S$ at the nearest grid points + +resulting in a multi-layer appearance feature $\tilde{S}^p\in \mathbb{R}^{k\times f}$ . We then multiply this feature map with the estimated soft occlusion mask $\tilde{\beta}^p$ to obtain a single appearance feature for the target ray: $\tilde{Q}^p = \tilde{S}^p\tilde{\beta}^p$ . Multiplying $\tilde{\beta}^p$ with $\tilde{S}^p$ effectively chooses the SO-Appearance feature $\tilde{Q}^p\in \mathbb{R}^f$ at the expected occlusion level in a soft manner. In summary, we render appearance features along a target ray by first computing the corresponding ERP location in the reference view and then choosing the appearance feature at that ERP location and the expected occlusion level. + +Synthesizing Novel View ERPs. We still need to convert the appearance feature $\tilde{Q}^p$ into RGB color for the target ray $p$ . We use a simple MLP to convert $\tilde{Q}^p$ into target ray color $\tilde{C}^p \in \mathbb{R}^3$ . We repeat the same SOMSI rendering processing for all the target rays followed by conversion to color values to obtain the complete novel view spherical image. + +Modeling view dependent effects. Color based MSI approaches such as MODS [1] can not robustly model view dependent effects such as specular reflections in target views as color values are baked in the reference MSI. Following the neural basis decomposition approach [35], our SO-Appearance model can also incorporate view dependent effects in a natural way. A neural basis decomposition approach replaces each RGB color value (in the MPI or MSI) by reflectance coefficients $(\omega \in \mathbb{R}^{e\times 3}$ , where $e$ is the number of reflection coefficients). The coefficient images can be combined into a single color image using learned basis functions $\{\gamma_i:\mathbb{R}^3\mapsto \mathbb{R}^1\}_{i = 1}^{e - 1}$ , as follows $C = \omega_0 + \sum_{i = 1}^{e - 1}\gamma_i\omega_i$ . $\gamma_{i}$ are the scalar outputs of MLP networks that take viewing direction as input. + +Applying this view dependent modelling scheme directly in a standard MSI representation leads to a high memory complexity of $\mathcal{O}(m\times d\times 3\times e)$ as we need to represent $e$ -dimensional reflectance coefficients for each color value at each MSI point. For MPs, to overcome this issue, NeXMPI [35] proposes a coefficient sharing strategy by grouping different MPI layers and using same reflectance coefficients within each MPI layer group. Even though one could use similar grouping strategy in MSI representation, the grouping of MSI spheres is somewhat arbitrary. Our SO-Appearance layers provides a more physically meaningful grouping of MSI spheres based on occlusions and thus provide a natural choice to efficiently represent reflectance coefficients with $\mathcal{O}(m\times k\times 3\times e)$ instead of $\mathcal{O}(m\times d\times 3\times e)$ . More specifically, just like appearance features, we need to represent reflectance coefficients only at $k$ occlusion layers in SO-Appearance instead of much larger $d$ layers in MSI. In the experiments, we observe that using modelling view dependent effects with reflectance coefficients in SO-Appearance improves the view synthesis results (Table 4). + +# 4.2. Learning SOMSI with Coordinate MLP + +We learn a scene-specific SOMSI from a given set of input spherical images captured at different 3D locations in a scene. Following the recent success of coordinate MLPs for view synthesis [23,24], we make use of MLPs that takes 2D ERP pixel locations as input and produces SOMSI scene representation at those locations w.r.t. a reference view. As illustrated in Fig. 3, MLP takes the spherical coordinates $[\theta ,\phi ]$ for a point $r$ along with reference image color $I_{ref}^{r}$ at that location as inputs, and produces SOMSI representation at that location: + +$$ +\mathcal {N}: (\zeta (\theta , \phi), I _ {r e f} ^ {r}) \mapsto (\alpha^ {r}, \beta^ {r}, S ^ {r}), \tag {6} +$$ + +where $\zeta(\theta, \phi)$ denotes the Fourier embedding of the coordinates as used in recent coordinate networks such as [24]. Contrasting to existing works that only feed Fourier embedded coordinates into MLPs, we also input RGB color values $I_{ref}$ as well to the MLP. We observe faster training convergence and better novel view synthesis quality with additional $I_{ref}$ as input to the network. Another distinction in our network is the use of multi-resolution coordinate maps. As shown in Fig. 3, we start with low-resolution grid as network input and upsample the grid locations as well as input spherical image after every few linear+ReLU layers. We again observe that this multi-resolution strategy resulted in better results compared to using a single resolution grid. Once we learn an SOMSI for a given scene, we can dynamically render spherical images from arbitrary novel view locations using the SOMSI rendering technique described in the previous section. + +Training. We train the network $\mathcal{N}$ on a specific scene by randomly sampling a mini-batch of input cameras and rendering their corresponding held-out novel views. Our rendering pipeline is fully differentiable (due to our soft occlusion formulation) and thus allows for training with backpropagation. The network parameters are learned by minimizing the $L_{2}$ distance between the predicted novel view $\hat{I}^t$ and its respective groundtruth ERP image $I^t$ for every camera in the mini-batch. + +# 5. Experiments + +We analyzed our SOMSI technique for spherical novel view synthesis on both synthetic and real-world datasets; with both structured (input views captured with cameras placed on a regular grid) and unstructured spherical light fields. + +Baselines. We compare SOMSI with two baseline techniques: MODS [1] and S-NeRF [24]. MODS is a spherical view synthesis method that renders novel views from an Omnidirectional Stereo (ODS) input pair. We adapted MODS to work with a pair of ERPs as input, like in our setting. Given a spherical light field, we train MODS by randomly sampling a triplet of spherical images where the + +![](images/a0b7188a1938ec4628c416b8ad3a0d7f87753ab9f8a60a473926bbad7e02591c.jpg) + +![](images/71658acb65efb7ed80c9e03e9a65cd991b44ac283c6b9173b2786501d262d7da.jpg) + +![](images/317b22fb6b0bef76b993c83d784b6f45d6d867309063b1969ebcda390202040f.jpg) + +![](images/194327e2e32c80b15752022f8e25f6563ce8ba0824a618e9558fc5176826deec.jpg) + +![](images/90c97ec401318d3e5a4c2598180b38006a14142239e7b27b02a7429c48bcdce7.jpg) + +![](images/f2682a2471af38019d438a037e2e04805ade6e36430afb08adb5b48e6c5905e2.jpg) + +![](images/b3d64540146c6612887a7fd6e920be99f171155e7380ba456aa0886ffd8839a2.jpg) + +![](images/92217ef1099afe73e1e6377667875ab4574fff6afba3f1adb64ba564843defb9.jpg) + +![](images/96fa22912d4f7434f7d9f2a52bea4192a9569906a267f51c8a577f21d6b5fcc4.jpg) + +![](images/e28aad1b0ce69faa9b759d8e9725f7d2a285035f737dee6596896b1a24c5518c.jpg) + +![](images/218fa1134a414d3245e7f0f2b8374e559d39c1e853cca5c04c80864440a23b1f.jpg) +Figure 4. Sample visual results. Novel views on the Sea Port (row-1), Coffee Area (row-2) and Residential (row-3) datasets. Coffee Area is a real dataset captured with Ricoh-Theta-S camera, while the rest are synthetic. In the first row, MODS produces blurred images and struggles with thin structures. S-NeRF creates images with even less details than MODS (see the cobblestones) and far away objects (eg. the tree beyond the gate) are not well reconstructed. Specular reflections (2nd row) and thin structures (3rd row) are better captured with our method. For a better visualization, we encourage the reader to zoom-in on the insets. + +![](images/f80ae56d218bf694dbb4e184a73556c5e7e96e01fd98e51764193ffc7c4d7dd6.jpg) +Ground-truth + +![](images/97281d2058b4aa9394b28c50c254f84f31c48272faef66d5d967529af6a07f58.jpg) +SOMSI (Ours) + +![](images/e1636f559ed7068c078c9dd764b8e71d6da445a1225ebcca6e45b13cfcdf9cb9.jpg) +MODS + +![](images/fa26b67f5a2a858d9f87c48c9b1e2aaa044908da6ca753fec55b0bd2059ddefe.jpg) +S-NeRF + +
SceneSOMSI (Ours) 13 msMODS [1] 10 msS-NeRF [24] 2710 ms
PSNR ↑SSIM ↑PSNR ↑SSIM ↑PSNR ↑SSIM ↑
Residential37.010.94633.370.90736.290.944
Replica39.540.98635.910.97042.510.992
Coffee Area 1,232.480.87228.730.79432.590.874
Sea Port27.670.82523.790.62627.760.825
+ +Table 1. Comparison with state-of-the-art. SOMSI (Ours) can produce considerably higher quality results compared to MODS [1] with similar runtime. SOMSI produces on-par results with S-NeRF [24] while being 2 orders of magnitude faster. + +first two serve as the input and the last one is used as target. During test, we render target novel views by using the first and last training cameras as input. We omitted the inverse-transform regularization in MODS [1] baseline as the MODS work itself noted that this adversely effects the view synthesis results. Our second baseline is a NeRF [24] based technique. The original NeRF technique is designed to work with perspective images. We trained NeRF with spherical images by changing the camera model from pin-hole (perspective) to spherical. We refer to this spherical NeRF baseline as 'S-NeRF' in the experiments. We train all three techniques (MODS, S-NeRF and SOMSI (Ours)) on a per-scene basis. + +Datsets. We experiment with a total of 20 scenes from the following 4 datasets: + +- Replica [31] public dataset contains 18 different photorealistic reconstructions of indoor scenes. We used 12 randomly selected scenes. We used the HabitatAPI [27] to render a $5 \times 5$ grid of spherical images, where cameras are placed $20~cm$ apart. +- Residential dataset consists of 3 synthetic scenes depicting residential houses that were created using + +Unity3D [16]. We create $3 \times 3$ views per scene with cameras that are $20~cm$ . + +- Coffee Area dataset consists of 4 real-world scenes that are self-captured using Ricoh-Theta-S spherical camera. The first 2 of scenes have mainly diffuse objects, while the last 2 contain reflective objects. We use COLMAP [28] to calibrate the cameras. See details in the supplementary material. +- Sea Port dataset is an synthetic 3D model of a medieval sea port. This dataset is created by improving assets that were borrowed from blendwap. This dataset consists of a $5 \times 5$ spherical light-field with $20cm$ camera baseline. + +Training and evaluation. Following MODS [1], we use $320 \times 640$ resolution spherical images for training and evaluation. Training our model takes about 18 hours on RTX-2080Ti GPU. SOMSI can be trained to up to $1024 \times 2048$ resolution images on a single RTX-A100 GPU. See the supplementary material for more details. For quantitative evaluation, we compare the predicted novel views with the held-out ground-truth views and then compute the commonly used metrics in view synthesis literature: Peak Signa-to-Noise Ratio (PSNR) and Structured Similarity Index (SSIM) [33]. Unless specified otherwise, we train our main model with: number of spheres $d = 64$ , occlusion layers $k = 3$ and the appearance features size $f = 24$ . + +Comparisons. Table 1 shows the comparison of different metrics across different datasets and techniques. As the PSNR and SSIM metrics clearly demonstrate, SOMSI has considerably and consistently better PSNR and SSIM across all the datasets when compared to MODS [1]. SOMSI has on-par metrics compared to the spherical version of NeRF (S-NeRF) [24]. S-NeRF is a strong baseline + +that stores the scene using MLPs in an implicit manner. As a result, the rendering speed is quite slow (2710ms) compared to SOMSI (13ms). Both SOMSI and MODS learn explicit scene representation enabling fast rendering. In summary, SOMSI provides a good balance between rendering speed and view synthesis quality. That is, SOMSI can produce on-par view synthesis results with S-NeRF while being two orders of magnitude faster (similar rendering time as MODS). + +Ablations. We perform ablations with the appearance feature dimensions $f$ and the number of occlusion layers $k$ in SO-Appearance features. Table 2 shows metrics with different feature dimensions $f = 3, 12, 24$ on three scenes from Replica, Residential and Sea Port. Results clearly show that both PSNR and SSIM improves with increasing feature dimensions. We observe minimal performance improvements with even higher feature dimensions $f > 24$ . This observation is inline with recent view synthesis studies [17, 34] on perspective images. These results demonstrate the use of high dimensional features to model appearance details in an MSI instead of commonly used RGB values thereby justifying the need for our efficient SOMSI representation. Using SOMSI representation makes it feasible to increase the appearance feature dimensions without incurring significant memory or runtime costs, compared to representing appearance features using standard MSI representation. + +Table 3 shows the view synthesis metrics with the different number of occlusion levels $k$ . We notice some increase in performance with using 3 levels compared to 2 levels. Using more occlusion levels did not show any considerable improvement in performance. This shows that 3 occlusions levels are usually enough to represent a scene in SOMSI representation. + +
Scenef=3f=12f=24
PSNR ↑SSIM ↑PSNR ↑SSIM ↑PSNR ↑SSIM ↑
Residential36.960.94336.820.94437.010.946
Replica38.750.98038.970.98140.230.986
CoffeArea 1,232.330.87332.440.87332.480.872
Sea-Port27.270.80227.550.82227.670.825
+ +View Dependent Effects. For the two scenes in Coffee Area that has specular objects, we experiment with learning reflectance coefficients in SO-Appearance as described at the end of Section 4.1. Table 4 shows the PSNR and SSIM metrics on the two Coffe Area scenes with different number of reflectance coefficients. Results clearly show that the view synthesis quality improves with more reflectance coefficients. Eventhough this is not a surprising result, this further demonstrates the use of learning higher dimensional + +features in MSI (either appearance features or reflectance coefficients or both) compared to only RGB color values. + +Limitations. One of the limitations of our technique is that the scene representation network is optimized independently for different scenes. This assumes a sufficient number of training views for each scene which may not be available for some scenes in practice. A more practical approach would be to learn a network prior that works across different scenes. A main challenge in learning such as dataset prior is that there exists no large scale spherical image dataset with diverse scenes to learn meaningful priors. + +Societal Impact. Given the advent of low-cost spherical imaging and VR devices, we envision that our SNVS technique would be useful for several real-world applications such as virtual tourism. Since we train our network per scene, our approach would be less prone to dataset bias compared to networks that are learned on large-scale datasets. + +Table 2. Ablation of appearance feature dimensionality $f$ . Metrics show that higher feature dimensions result in better performance thereby justifying the need for our SOMSI technique that can effectively represent higher-dimensional appearance features with occlusion layers instead of a full set of MSI layers. + +
Scenek=2k=3k=5
PSNR ↑SSIM ↑PSNR ↑SSIM ↑PSNR ↑SSIM ↑
Sea-Port27.300.80927.320.81327.440.814
Replica36.510.97737.130.97936.780.981
+ +Table 3. Ablation of occlusion levels $k$ . Metrics show that 3 occlusion levels are good enough to represent the scene and to obtain high-quality view synthesis results. Due to limited compute resources, here we used only the first 3 scenes from Replica. + +
Scenee = 1e = 4e = 6
PSNR ↑SSIM ↑PSNR ↑SSIM ↑PSNR ↑SSIM ↑
CoffeArea-333.660.89133.700.89235.860.902
CoffeArea-430.490.86530.530.86730.610.869
+ +Table 4. The effect of number of reflectance coefficients $e$ for view dependent effects. Metrics demonstrate the use of higher number of reflectance coefficients further emphasizing the need for modelling higher dimensional features in MSI representation. + +# 6. Conclusion + +In this work, we propose a novel multi-sphere representation called SOMSI that can effectively model high-dimensional appearance features in MSI representation that are commonly used for spherical novel view synthesis. The key is to represent features in occlusion layers instead of full set of MSI spheres. We presented a novel SOMSI rendering scheme that retains the fast rendering of standard MSI representation while producing high quality view synthesis. SOMSI also produces on-par results with NeRF technique, while being 2 orders of magnitude faster. + +# Acknowledgment + +We thank Koretaka Ogata and Soichiro Yokota, for preparing the Residential Area scenes. + +# References + +[1] Benjamin Attal, Selena Ling, Aaron Gokaslan, Christian Richardt, and James Tompkin. Matryodshka: Real-time 6dof video view synthesis using multi-sphere images. In European Conference on Computer Vision (ECCV), pages 441-459, 2020. 1, 2, 3, 6, 7 +[2] Tobias Bertel, Neill DF Campbell, and Christian Richardt. Megaparallax: Casual $360^{\circ}$ panoramas with motion parallax. IEEE transactions on visualization and computer graphics, 25(5):1828-1835, 2019. 3 +[3] Mark Boss, Raphael Braun, Varun Jampani, Jonathan T Barron, Ce Liu, and Hendrik Lensch. Nerd: Neural reflectance decomposition from image collections. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 12684-12694, 2021. 1 +[4] Michael Broxton, John Flynn, Ryan Overbeck, Daniel Erickson, Peter Hedman, Matthew Duvall, Jason Dourgarian, Jay Busch, Matt Whalen, and Paul Debevec. Immersive light field video with a layered mesh representation. ACM Transactions on Graphics, 39(4):86-1, 2020. 1, 3 +[5] Chris Buehler, Michael Bosse, Leonard McMillan, Steven Gortler, and Michael Cohen. Unstructured lumigraph rendering. In ACM SIGGRAPH, 2001. 2 +[6] Gaurav Chaurasia, Sylvain Duchêne, Olga Sorkine-Hornung, and George Drettakis. Depth synthesis and local warps for plausible image-based navigation. In ACM Transactions on Graphics, 2013. 3 +[7] Gaurav Chaurasia, Olga Sorkine, and George Drettakis. Silhouette-aware warping for image-based rendering. In Eurographics Symposium on Rendering, 2011. 3 +[8] Shenchang Eric Chen and Lance Williams. View interpolation for image synthesis. In ACM SIGGRAPH, 1993. 2 +[9] Blender Online Community. Blender - a 3D modelling and rendering package. Blender Foundation, Stichting Blender Foundation, Amsterdam, 2018. 3 +[10] Martin Eisemann, Bert De Decker, Marcus Magnor, Philippe Bekaert, Edilson De Aguiar, Naveed Ahmed, Christian Theobalt, and Anita Sellent. Floating textures. In Computer graphics forum, volume 27, pages 409-418. Wiley Online Library, 2008. 3 +[11] John Flynn, Michael Broxton, Paul Debevec, Matthew DuVall, Graham Fyffe, Ryan Overbeck, Noah Snavely, and Richard Tucker. DeepView: View synthesis with learned gradient descent. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 3 +[12] John Flynn, Ivan Neulander, James Philbin, and Noah Snavely. Deepstereo: Learning to predict new views from the world's imagery. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5515-5524, 2016. 3 +[13] Stephan J Garbin, Marek Kowalski, Matthew Johnson, Jamie Shotton, and Julien Valentin. Fastnerf: High-fidelity neural rendering at 200fps. arXiv Preprint, 2021. 1 +[14] Michael Goesele, Jens Ackermann, Simon Fuhrmann, Carsten Haubold, Ronny Klowsky, Drew Steedly, and Richard Szeliski. Ambient point clouds for view interpo + +lation. In ACM SIGGRAPH 2010 papers, pages 1-6. 2010. 3 +[15] Steven J Gortler, Radek Grzeszcuk, Richard Szeliski, and Michael F Cohen. The lumigraph. In Proceedings of the 23rd annual conference on Computer graphics and interactive techniques, pages 43-54, 1996. 2 +[16] John K Haas. A history of the unity game engine. 2014. 3, 7 +[17] Tewodros Habtegebrial, Varun Jampani, Orazio Gallo, and Didier Stricker. Generative view synthesis: From single-view semantics to novel-view images. Advances in Neural Information Processing Systems (NIPS), 2020. 2, 4, 8 +[18] Peter Hedman, Tobias Ritschel, George Drettakis, and Gabriel Brostow. Scalable inside-out image-based rendering. ACM Transactions on Graphics (TOG), 35(6):1-11, 2016. 3 +[19] Peter Hedman, Pratul P Srinivasan, Ben Mildenhall, Jonathan T Barron, and Paul Debevec. Baking neural radiance fields for real-time view synthesis. arXiv Preprint, 2021. 1 +[20] Marc Levoy and Pat Hanrahan. Light field rendering. In Proceedings of the 23rd annual conference on Computer graphics and interactive techniques, pages 31-42, 1996. 2 +[21] Zhengqi Li, Wenqi Xian, Abe Davis, and Noah Snavely. Crowdsampling the plenoptic function. In European Conference on Computer Vision (ECCV), pages 178-196. Springer, 2020. 2, 4 +[22] Bicheng Luo, Feng Xu, Christian Richardt, and Jun-Hai Yong. Parallax360: Stereoscopic 360 scene representation for head-motion parallax. IEEE transactions on Visualization and Computer Graphics, 24(4):1545-1553, 2018. 3 +[23] Ricardo Martin-Brualla, Noha Radwan, Mehdi SM Sajjadi, Jonathan T Barron, Alexey Dosovitskiy, and Daniel Duckworth. Nerf in the wild: Neural radiance fields for unconstrained photo collections. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 7210–7219, 2021. 1, 6 +[24] 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), pages 405-421. Springer, 2020. 1, 2, 3, 6, 7 +[25] Matt Pharr, Wenzel Jakob, and Greg Humphreys. Physically Based Rendering: From Theory to Implementation. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 3rd edition, 2016. 3, 5 +[26] Christian Reiser, Songyou Peng, Yiyi Liao, and Andreas Geiger. Kilonerf: Speeding up neural radiance fields with thousands of tiny mlp's. arXiv preprint arXiv:2103.13744, 2021. 1 +[27] Manolis Savva, Abhishek Kadian, Oleksandr Maksymets, Yili Zhao, Erik Wijmans, Bhavana Jain, Julian Straub, Jia Liu, Vladlen Koltun, Jitendra Malik, et al. Habitat: A platform for embodied ai research. In IEEE International Conference on Computer Vision (ICCV), pages 9339-9347, 2019. 7 +[28] Johannes L Schonberger and Jan-Michael Frahm. Structure-from-motion revisited. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4104-4113, 2016. 7 + +[29] Ana Serrano, Incheol Kim, Zhili Chen, Stephen DiVerdi, Diego Gutierrez, Aaron Hertzmann, and Belen Masia. Motion parallax for 360 rgbd video. IEEE Transactions on Visualization and Computer Graphics, 2019. 3 +[30] Pratul P Srinivasan, Boyang Deng, Xiuming Zhang, Matthew Tancik, Ben Mildenhall, and Jonathan T Barron. Nerv: Neural reflectance and visibility fields for relighting and view synthesis. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 7495-7504, 2021. 1 +[31] Julian Straub, Thomas Whelan, Lingni Ma, Yufan Chen, Erik Wijmans, Simon Green, Jakob J Engel, Raul Mur-Artal, Carl Ren, Shobhit Verma, et al. The replica dataset: A digital replica of indoor spaces. arXiv preprint arXiv:1906.05797, 2019. 7 +[32] Richard Szeliski and Polina Golland. Stereo matching with transparency and matting. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 1998. 1, 3 +[33] 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. 7 +[34] Olivia Wiles, Georgia Gkioxari, Richard Szeliski, and Justin Johnson. SynSin: End-to-end view synthesis from a single image. In arXiv Preprint, 2020. 2, 4, 8 +[35] Suttisak Wizadwongsa, Pakkapon Phongthawee, Jiraphon Yenphraphai, and Supasorn Suwajanakorn. Nex: Real-time view synthesis with neural basis expansion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8534-8543, 2021. 3, 6 +[36] Alex Yu, Vickie Ye, Matthew Tancik, and Angjoo Kanazawa. pixelnerf: Neural radiance fields from one or few images. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4578-4587, 2021. 1 +[37] 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, 3 \ No newline at end of file diff --git a/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/images.zip b/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c8f13427e9e14323ab6a1680fd31aed875066fcc --- /dev/null +++ b/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1d2d53a997e1dac238063969994435190fecdece98b4af3eed476711748f36e +size 407536 diff --git a/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/layout.json b/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8cbebfbfb0d2b542dc0c457870151fdaac43faf0 --- /dev/null +++ b/somsisphericalnovelviewsynthesiswithsoftocclusionmultisphereimages/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69b3ecb61df1d0e3277d28109b6dcc53d00db7c6ab7becaafb080ef183f06386 +size 427358 diff --git a/spactselfsupervisedprivacypreservationforactionrecognition/f1bd8dbf-afe0-4c73-95c2-e2b68d4d043e_content_list.json b/spactselfsupervisedprivacypreservationforactionrecognition/f1bd8dbf-afe0-4c73-95c2-e2b68d4d043e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..824f25d276568940e6deea10a2b3b376f107c040 --- /dev/null +++ b/spactselfsupervisedprivacypreservationforactionrecognition/f1bd8dbf-afe0-4c73-95c2-e2b68d4d043e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2eb4897962c3b5652e3fe48af236e8f1bde508f0300bf0bdb98e8871b2675340 +size 81686 diff --git a/spactselfsupervisedprivacypreservationforactionrecognition/f1bd8dbf-afe0-4c73-95c2-e2b68d4d043e_model.json b/spactselfsupervisedprivacypreservationforactionrecognition/f1bd8dbf-afe0-4c73-95c2-e2b68d4d043e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..caf393fec3ab114986bd090669a65835b65fa9eb --- /dev/null +++ b/spactselfsupervisedprivacypreservationforactionrecognition/f1bd8dbf-afe0-4c73-95c2-e2b68d4d043e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:587e835b3a9fe8137f19517a0307d1fd87adf7d7192f52564f16c34f2b7d5c65 +size 100001 diff --git a/spactselfsupervisedprivacypreservationforactionrecognition/f1bd8dbf-afe0-4c73-95c2-e2b68d4d043e_origin.pdf b/spactselfsupervisedprivacypreservationforactionrecognition/f1bd8dbf-afe0-4c73-95c2-e2b68d4d043e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..09e45b0e01d0e02c031491a96d8f3fd1358dd1d8 --- /dev/null +++ b/spactselfsupervisedprivacypreservationforactionrecognition/f1bd8dbf-afe0-4c73-95c2-e2b68d4d043e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb904e5435f6d258ac8effb4430c51f79a792f42770e5b4c172484d9e881ed7b +size 1450345 diff --git a/spactselfsupervisedprivacypreservationforactionrecognition/full.md b/spactselfsupervisedprivacypreservationforactionrecognition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4223bfde9f9531fb83727c491ae1434558ade5b3 --- /dev/null +++ b/spactselfsupervisedprivacypreservationforactionrecognition/full.md @@ -0,0 +1,333 @@ +# SPAct: Self-supervised Privacy Preservation for Action Recognition + +Ishan Rajendrakumar Dave, Chen Chen, Mubarak Shah +Center for Research in Computer Vision, University of Central Florida, Orlando, USA +ishandave@knights.ucf.edu, {chen.chen, shah}@crcv.ucf.edu + +# Abstract + +Visual private information leakage is an emerging key issue for the fast growing applications of video understanding like activity recognition. Existing approaches for mitigating privacy leakage in action recognition require privacy labels along with the action labels from the video dataset. However, annotating frames of video dataset for privacy labels is not feasible. Recent developments of self-supervised learning (SSL) have unleashed the untapped potential of the unlabeled data. For the first time, we present a novel training framework which removes privacy information from input video in a self-supervised manner without requiring privacy labels. Our training framework consists of three main components: anonymization function, self-supervised privacy removal branch, and action recognition branch. We train our framework using a minimax optimization strategy to minimize the action recognition cost function and maximize the privacy cost function through a contrastive self-supervised loss. Employing existing protocols of known-action and privacy attributes, our framework achieves a competitive action-privacy trade-off to the existing state-of-the-art supervised methods. In addition, we introduce a new protocol to evaluate the generalization of learned the anonymization function to novel-action and privacy attributes and show that our self-supervised framework outperforms existing supervised methods. Code available at: https://github.com/DAVEISHAN/SPAct + +# 1. Introduction + +Recent advances in action recognition have enabled a wide range of real-world applications, e.g. video surveillance camera [7, 24, 35], smart shopping systems like Amazon Go, elderly person monitor systems [2, 22, 45]. Most of these video understanding applications involve extensive computation, for which a user needs to share the video data to the cloud computation server. While sharing the videos to the cloud server for the utility action recognition task, the user also ends up sharing the private visual information like gender, skin color, clothing, background objects etc. in the videos as shown in Fig. 1. Therefore, there is a pressing + +need for solutions to privacy preserving action recognition. + +A simple-yet-effective solution for privacy preservation in action recognition is to utilize very low resolution videos (Fig. 1a) [5, 23, 37]. Although this downsampling method does not require any specialized training to remove privacy features, it does not provide a good trade-off between action recognition performance and privacy preservation. + +Another set of methods use pretrained object-detectors to detect the privacy regions and then remove or modify the detected regions using synthesis [34] or blurring [47] as shown in Fig. 1b. The detection-based approaches require the bounding-box level annotations for the privacy attributes, and removing the privacy features without an end-to-end learning framework may result in the performance drop of the action recognition task. + +Wu et al. [41] propose a novel approach to remove the privacy features via learning an anonymization function through an adversarial training framework, which requires both action and privacy labels from the video. Although the method is able to get a good trade-off of action recognition and privacy preservation, it has two main problems. First, it is not feasible to annotate a video dataset for privacy attributes. For instance, Wu et al. [41] acknowledge the issue of privacy annotation time, where it takes immense efforts for them to annotate privacy attributes for even a small-scale (515 videos) video dataset PA-HMDB. Second, the learned anonymization function from the known privacy attributes may not generalize in anonymizing the novel privacy attributes. For example, in Fig. 1 the learned anonymization function for human-related privacy attributes (e.g. gender, skin color, clothing) may still leave other privacy information like scene or background objects un-anonymized. + +The performance of the action recognition task depends on the spatio-temporal cues of the input video. Wu et al. [41] show that anonymizing the privacy features like face, gender, etc. in the input video does not lead to any reduction in the action recognition performance. Instead of just focusing on the cues based on the privacy annotations, our goal is twofold: 1) learning an anonymization function that can remove all spatial cues in all frames without significantly degrading action recognition performance; and + +![](images/452338e01ac4f74fbf0a46d51f229270884437d6451e18a3858fbaa670f8ed12.jpg) +Figure 1. Overview of the existing privacy preserving action recognition approaches. The main goals of a framework include removing privacy information and maintaining action recognition performance at low cost of annotations. + +2) learning the anonymization function without any privacy annotations. + +Recently, self-supervised learning (SSL) methods have been successfully used to learn the representative features which are suitable for numerous downstream tasks including classification, segmentation, detection, etc. Towards our goal, we propose a novel frame-level SSL method to remove the semantic information from the input video, while maintaining the information that is useful for the action recognition task. We show that our proposed Self-supervised Privacy-preserving Action recognition (SPAct) framework is able to anonymize the video without requiring any privacy annotations in the training. + +The learned anonymization function should provide a model-agnostic privacy preservation, hence, we first adopt the protocol from [41] to show the transferability of the anonymization function across different models. However, there are two aspects in terms of evaluating the generalization ability of the anonymization function, which are overlooked in previous works. + +First, in the real-world scenario, the anonymization function is expected to have generalization capability with domain shift in action and privacy classes. To evaluate the generalization capabilities of the anonymization function across novel action and privacy attributes, we propose new protocols. In our experiments, we show that since our model is not dependent on the predefined privacy features like existing supervised methods, and it achieves state-of-the-art generalization across novel privacy attributes. + +Second, prior privacy-preserving action recognition works have solely focused on privacy attributes of hu + +mans. In practical scenarios, privacy leakage can happen in terms of scene and background objects as well, which could reveal personal identifiable information. Therefore, the generalization ability of anonymization function to preserve privacy attributes beyond humans (e.g. scene and object privacy) is of paramount importance as well. To evaluate such ability, we propose $P$ -HVU dataset, a subset of LSHVU dataset [8], which has multi-label annotations for actions, objects and scenes. Compared to existing same-dataset privacy-action evaluation protocol on PA-HMDB [41], which consists of only 515 test videos, the proposed P-HVU dataset has about 16,000 test videos for robust evaluation of privacy-preserving action recognition. + +The contributions of this work are summarized as follows: + +- We introduce a novel self-supervised learning framework for privacy preserving action recognition without requiring any privacy attribute labels. +- On the existing UCF101-VISPR and PA-HMDB evaluation protocols, our framework achieves a competitive performance compared to the state-of-the-art supervised methods which require privacy labels. +- We propose new evaluation protocols for the learned anonymization function to evaluate its generalization capability across novel action and novel privacy attributes. For these protocols, we also show that our method outperforms state-of-the-art supervised methods. Finally, we propose a new dataset split $P$ -HVU to resolve the issue of smaller evaluation set and extend the privacy evaluation to non-human attributes like action scene and objects. + +# 2. Related Work + +Recent approaches for the privacy preservation can be categorized in three major groups: (1) Downsampling based approaches; (2) Obfuscation based approaches; and (3) Adversarial training based approaches. An overview of the existing privacy preserving approaches can be seen in Fig. 1. + +Downsampling based approaches utilized a very low resolution input to anonymize the personal identifiable information. Chou et al. [4] utilize low resolution depth images to preserve privacy in the hospital environment. Srivastava et al. [39] utilize low resolution images to mitigate privacy leakage in human pose estimation. Butler et al. [1] use operations like blurring and superpixel clustering to anonymize videos. There are some works [5,23,37] utilizing a downsampling based solution for privacy preserving action recognition. An example of anonymization by downsampling is shown in Fig. 1a. Although it is a simple method and does not require privacy-labels for training, one major drawback of the method is its suboptimal tradeoff between action recognition and privacy preservation. + +Obfuscation based approaches mainly involve using an off-the-shelf object detector to first detect the privacy attributes and then remove or modify the detected regions to make it less informative in terms of privacy features. An interesting solution is proposed by Ren et al. [34] for anonymizing faces in the action detection utility. They synthesise a fake image in place of the detected face. A similar approach was taken for the video domain privacy by Zhang et al. [47], where first the semantic segmentation is employed to detect the regions of interest, which is followed by a blurring operation to reduce the privacy content of a video. Although the obfuscation based methods work well in preserving the privacy, there are two main problems associated with them: (1) there is domain knowledge required to know the regions of interests, and (2) the performance of the utility task is significantly reduced since this approach is not end-to-end and involves two separate steps: private-object detection/segmentation and object removal. + +Recently, Hinojosa et al. [17] tackle the privacy preserving human pose estimation problem by optimizing an optical encoder (hardware-level protection) with a software decoder. In addition, some more work focuses on hardware level protection in the image based vision systems [19,28,29,40], however, they are not within scope of this paper. + +Pittaluga et al. [27] and Xiao et al. [43] propose adversarial optimization strategies for the privacy preservation in the images. Authors in [41, 42] introduce a novel adversarial training framework for privacy preserving action recognition. Their framework adopts a minimax optimization strategy, where action classification cost function is minimized, while privacy classification cost is maximized. Their adversarial framework remarkably outperforms prior works which are based on obfuscation and downsampling. + +Recently, self-supervised learning (SSL) based methods have demonstrated learning powerful representations for images [3, 13, 15, 44] and videos [6, 9, 11, 18, 26, 30, 32], which are useful for multiple image and video understanding downstream tasks. In this paper, we propose self-supervised privacy preservation method. Instead of using a privacy classifier to remove only the privacy attributes from the input data like [41], our approach is to remove all spatial semantic information from the video, along with keeping the useful utility action recognition information by training an anonymization function in an minimax optimization manner. To the best of our best knowledge, there is no other self-supervised privacy preserving action recognition method, which learns in an end-to-end fashion, without requiring privacy labels. + +# 3. Method + +The key idea of our proposed framework is to learn an anonymization function such that it deteriorates the privacy attributes without requiring any privacy labels in the training, and maintains the performance of action recognition task. We build our self-supervised framework upon the existing supervised adversarial training framework of [41]. A schematic of our framework is depicted in Fig. 2. In Sec 3.1, we first formulate the problem by explaining our objective. In Sec 3.2 we present details of each component of our framework, and in Sec 3.3 we explain the optimization algorithm employed in our framework. + +# 3.1. Problem Formulation + +Let's consider a video dataset $X$ with action recognition as an utility task, $T$ , and privacy attribute classification as a budget task, $B$ . The goal of a privacy preserving action recognition system is to maintain performance of $T$ , while cutting the budget $B$ . This goal is achieved by learning an anonymization function, $f_{A}$ , which transforms (anonymize) the original raw data $X$ . Assume that the final system has any action classification target model $f_{T}^{\prime}$ and any privacy target model $f_{B}^{\prime}$ . The goal of a privacy preserving training is to find an optimal point of $f_{A}$ called $f_{A}^{*}$ , which is achieved by the following two criteria: + +C1: $f_{A}^{*}$ should minimally affect the cost function of target model, $f_{T}^{\prime}$ , on raw data i.e. + +$$ +L _ {T} \left(f _ {T} ^ {\prime} \left(f _ {A} ^ {*} (X)\right), Y _ {T}\right) \approx L _ {T} \left(f _ {T} ^ {\prime} (X), Y _ {T}\right), \tag {1} +$$ + +where $T$ denotes utility Task, $L_{T}$ is the loss function which is the standard cross entropy in case of single action label $Y_{T}$ or binary cross entropy in case of multi-label actions $Y_{T}$ . C2: Cost of privacy target model, $f_{B}^{\prime}$ , should increase on the transformed (anonymized) data compared to raw data i.e. + +$$ +L _ {B} \left(f _ {B} ^ {\prime} \left(f _ {A} ^ {*} (X)\right)\right) \gg L _ {B} \left(f _ {B} ^ {\prime} (X)\right), \tag {2} +$$ + +![](images/2bb6100b65709a12f51e5656e9f406c88d118cf2991b8d6578c10499895f4ce4.jpg) +Figure 2. Minimax optimization in the proposed SPAc framework. $f_{A}$ is anonymization function, $f_{T}$ is 3D-CNN based action classifier, $f_{B}$ is 2D-CNN based self-supervised learning model, and $S_{F}$ is temporal sampler. Details of each component can be found in Sec 3.2. We first initialize $f_{A}$ to identity function and $f_{T}$ and $f_{B}$ to pretrained checkpoints optimized on raw video. The proposed minimax optimization strategy is an iterative process including two-steps per iteration. In the left figure, we first update the weights of $f_{A}$ to minimize action classification loss, $L_{T}$ , and maximize NT-Xent contrastive self-supervised loss [3] $L_{B}$ , keeping $f_{T}$ and $f_{B}$ frozen. After that as shown in the right figure, for the next batch of videos, we keep $f_{A}$ frozen and update parameters of $f_{T}$ and $f_{B}$ to minimize $L_{T}$ and $L_{B}$ , respectively. For more details see Sec 3.3. + +![](images/a0c3810eb8b7cb416cedaf5b11d74ca9bec78a20f18f6e63e98f8cb3f82d2957.jpg) + +where $B$ denotes privacy Budget, $L_{B}$ is the self-supervised loss for our framework, and binary cross entropy in case of a supervised framework, which requires privacy label annotations $Y_{B}$ . + +Increasing a self-supervised loss $L_{B}$ results in deteriorating all useful information regardless of if it is about privacy attributes or not. However, the useful information for the action recognition is preserved via criterion C1. Combining criteria C1 and C2, we can mathematically write the privacy preserving optimization equation as follows, where negative sign before $L_{B}$ indicates it is optimized by maximizing it: + +$$ +f _ {A} ^ {*} = \underset {f _ {A}} {\operatorname {a r g m i n}} [ L _ {T} \left(f _ {T} ^ {\prime} \left(f _ {A} (X)\right), Y _ {T}\right) - L _ {B} \left(f _ {B} ^ {\prime} \left(f _ {A} (X)\right)\right) ]. \tag {3} +$$ + +# 3.2. Proposed Framework + +The proposed framework mainly consists of three components as shown in Fig 2: (1) Anonymization function $(f_A)$ ; (2) Self-supervised privacy removal branch; and (3) Action recognition or utility branch. + +# 3.2.1 Anonymization Function $(f_{A})$ + +The anonymization function is a learnable transformation function, which transforms the video in such a way that the transformed information can be useful to learn action classification on any target model, $f_{T}^{\prime}$ , and not useful to learn any privacy target model, $f_{B}^{\prime}$ . We utilize an encoder-decoder neural network as the anonymization function. $f_{A}$ is initialized as an identity function by training it using $\mathcal{L}_{L1}$ reconstruction loss as given below: + +$$ +\mathcal {L} _ {L 1} = \sum_ {c = 1} ^ {C} \sum_ {h = 1} ^ {H} \sum_ {w = 1} ^ {W} | x _ {c, h, w} - \hat {x} _ {c, h, w} |, \tag {4} +$$ + +where, $x$ is input image, $\hat{x}$ is sigmoid output of $f_{A}$ logits, $C =$ input channels, $H =$ input height, and $W =$ input width. + +# 3.2.2 Self-supervised privacy removal branch + +A schematic of self-supervised privacy removal branch is shown in Fig. 3. First the video $x_{i}$ is passed through $f_{A}$ to get the anonymized video $f_{A}(x_{i})$ , which is further passed through a temporal Frame sampler $S_{F}$ . $S_{F}$ samples 2 frames out of the video with various $S_{F}$ strategies, which are studied in Section 5.5. The sampled pair of frames $(S_{F}(f_{A}(x_{i})))$ are projected into the representation space through 2D-CNN backbone $f_{B}$ and a non-linear projection head $g(\cdot)$ . The pair of frames of video $x_{i}$ corresponds to projection $Z_{i}$ and $Z_{i}'$ in the representation space. The goal of the contrastive loss is to maximize the agreement between projection pair $(Z_{i}, Z_{i}')$ of the same video $x_{i}$ , while maximizing the disagreement between projection pairs of different videos $(Z_{i}, Z_{j})$ , where $j \neq i$ . The NT-Xent contrastive loss [3] for a batch of $N$ videos is given as follows: + +$$ +L _ {B} ^ {i} = - \log \frac {h \left(Z _ {i} , Z _ {i} ^ {\prime}\right)}{\sum_ {j = 1} ^ {N} \left[ \mathbb {1} _ {[ j \neq i ]} h \left(Z _ {i} , Z _ {j}\right) + h \left(Z _ {i} , Z _ {j} ^ {\prime}\right) \right]}, \tag {5} +$$ + +where $h(u,v) = \exp \left(u^{T}v / (\| u\| \| v\| \tau)\right)$ is used to compute the similarity between $u$ and $v$ vectors with an adjustable parameter temperature, $\tau$ . $\mathbb{1}_{[j\neq i]}\in \{0,1\}$ is an indicator function which equals 1 iff $j\neq i$ . + +# 3.3. Minimax optimization + +In order to optimize the proposed self-supervised framework with the objective of Eq. 3, let's consider anonymization function $f_{A}$ parameterized by $\theta_{A}$ , and auxiliary models $f_{B}$ and $f_{T}$ respectively parameterized by $\theta_{B}$ and $\theta_{T}$ . Assume, $\alpha_{A}, \alpha_{B}, \alpha_{T}$ respectively be the learning rates for $\theta_{A}, \theta_{B}, \theta_{T}$ . First of all, $\theta_{A}$ is initialized as given below (Eq. 6), + +![](images/1e1dc7583d058e323f4bcee969c33d86d46833692dbe1aafdb5123e14a94d409.jpg) +Figure 3. Contrastive Self-supervised Loss is used to maximize the agreement between two frames of a video and maximize disagreement between frames of different videos. Please refer to Sec 3.2.2 for more details. + +unless $f_{A}$ reaches to threshold $th_{A0}$ reconstruction performance (Eq. 4) on validation set: + +$$ +\theta_ {A} \leftarrow \theta_ {A} - \alpha_ {A} \nabla_ {\theta_ {A}} \left(\mathcal {L} _ {L 1} \left(\theta_ {A}\right)\right). \tag {6} +$$ + +Once $\theta_{A}$ is initialized, it is utilized for initialization of $\theta_{T}$ and $\theta_{B}$ as shown in the following equations unless their performance reaches to the loss values of $th_{B0}$ and $th_{T0}$ : + +$$ +\theta_ {T} \leftarrow \theta_ {T} - \alpha_ {T} \nabla_ {\theta_ {T}} \left(L _ {T} \left(\theta_ {T}, \theta_ {A}\right)\right), \tag {7} +$$ + +$$ +\theta_ {B} \leftarrow \theta_ {B} - \alpha_ {B} \nabla_ {\theta_ {B}} \left(L _ {B} \left(\theta_ {B}, \theta_ {A}\right)\right). \tag {8} +$$ + +After the initialization, two step iterative optimization process takes place. The first step is depicted in the left side of Fig. 2, where $\theta_{A}$ is updated using the following equation: + +$$ +\theta_ {A} \leftarrow \theta_ {A} - \alpha_ {A} \nabla_ {\theta_ {A}} \left(L _ {T} \left(\theta_ {A}, \theta_ {T}\right) - \omega L _ {B} \left(\theta_ {A}, \theta_ {B}\right)\right), \tag {9} +$$ + +where $\omega \in (0,1)$ is the relative weight of SSL loss, $L_{B}$ , with respect to supervised action classification loss, $L_{T}$ . Here the negative sign before $L_{B}$ indicates that we want to maximize it. In implementation, it can be simply achieved by using negative gradients [10]. + +In the second step, as shown in the right part of the Fig. 2, $\theta_T$ and $\theta_B$ are updated using Eq. 7 and 8, respectively. We update $\theta_B$ to get powerful negative gradients in the next iteration's step-1. Note that there is a similarity with GAN training here; we can think of $f_A$ as the generator who tries to fool $f_B$ in the first step and, in the second step $f_B$ tries to get stronger through update of Eq. 8. This two step iterative optimization process continues until $L_B$ reaches to a maximum value $th_{Bmax}$ . + +# 3.4. Intuition: SSL Branch and Privacy removal + +Take a model $f_{b}$ initialized with self-supervised contrastive loss (SSL) pretraining. Now keeping $f_{b}$ frozen, when we try to maximize the contrastive loss, it changes the input to $f_{b}$ in such a way that it decreases agreement between frames of the same video. We know that frames of the same video share a lot of semantic information, and minimizing the agreement between them results in destroying (i.e. unlearning) most of the semantic info of the input video. In simple terms, maximizing contrastive loss results in destroying all highlighted attention map parts of Supp. + +Fig 7, 8 middle row. Since this unlearned generic semantic info contained privacy attributes related to human, scene, and objects; we end up removing private info in the input. In this process, we also ensure that semantics related to action reco remains in video, through the action reco branch. + +# 4. Training and Evaluation Protocols + +The existing training and evaluation protocols are discussed in Sec 4.1, 4.2 and a new proposed generalization protocol is introduced in Sec 4.3. + +# 4.1. Same-dataset training and evaluation protocol + +Training of supervised privacy preserving action recognition method requires a video dataset $X^t$ with action labels $Y_T^t$ , and privacy labels $Y_B^t$ , where $t$ denotes training set. Since, our self-supervised privacy removal framework does not require any privacy labels, we do not utilize $Y_B^t$ . Once the training is finished, the anonymization function is now frozen, called $f_A^*$ , and auxiliary models $f_T$ and $f_B$ are discarded. To evaluate the quality of the learned anonymization, $f_A^*$ is utilized to train: (1) a new action classifier $f_T'$ over the train set $(f_A^*(X^t), Y_T^t)$ ; and (2) a new privacy classifier $f_B'$ to train over $(f_A^*(X^t), Y_B^t)$ . For clarification, we do not utilize privacy labels for training $f_A$ in any protocol. Privacy labels are used only for the evaluation purpose to train the target model $f_B'$ . Once the target models $f_T'$ and $f_B'$ finish training on the anonymized version of train set, they are evaluated on test set $(f_A^*(X^e), Y_T^e)$ and $(f_A^*(X^e), Y_B^e)$ , respectively, where $e$ denotes evaluation/test set. Test set performance of the action classifier is denoted as $A_T^1$ (Top-1 accuracy) or $A_T^2$ (classwise-mAP), and the performance of privacy classifier is denoted as $A_B^1$ (classwise-mAP) or $A_B^2$ (classwise- $F_1$ ). Detailed figures explaining different training and evaluation protocols are provided in Supp.Sec.G. + +# 4.2. Cross-dataset training and evaluation protocol + +In practice, a trainable-scale video dataset with action and privacy labels doesn't exist. The authors of [41] remedy the supervised training process by a cross-dataset training and/or evaluating protocol. Two different datasets were utilized in [41]: action annotated dataset $(X_{action}^{t}, Y_{T}^{t})$ to optimize $f_{A}$ and $f_{T}$ ; and privacy annotated dataset $(X_{privacy}^{t}, Y_{B}^{t})$ to optimize $f_{A}$ and $f_{B}$ . Again, note that in + +this protocol, our self-supervised framework does not utilize $Y_B^t$ . After learning the $f_A$ through the different train sets, it is frozen and we call it $f_A^*$ . A new action classifier $f_T'$ is trained on anonymized version of action annotated dataset $(f_A^*(X_{action}^t), Y_T^t)$ , and a new privacy classifier $f_B'$ is trained on the anonymized version of the privacy annotated dataset $(f_A^*(X_{privacy}^t), Y_B^t)$ . Once the target models $f_T'$ and $f_B'$ finish training on the anonymized version of train sets, they are respectively evaluated on test sets $(f_A^*(X_{action}^e), Y_T^e)$ and $(f_A^*(X_{privacy}^e), Y_B^e)$ . + +# 4.3. Novel action and privacy attributes protocol + +For the prior two protocols discussed above, the same training set $X^{t}(X_{action}^{t}$ and $X_{privacy}^{t}$ ) is used for the target models $f_{T}^{\prime}, f_{B}^{\prime}$ and learning the anonymization function $f_{A}$ . However, a learned anonymization function $f_{A}^{*}$ is expected to generalize on any action or privacy attributes. To evaluate the generalization on novel actions, an anonymized verion of novel action set $f_{A}^{*}(X_{action}^{nt})$ , such that $Y_{T}^{nt} \cap Y_{T}^{t} = \phi$ , is used to train the target action model $f_{T}^{\prime}$ , and its performance is measured on the anonymized test set of novel action set $f_{A}^{*}(X_{action}^{ne})$ . For privacy generalization evaluation, a novel privacy set $f_{A}^{*}(X_{privacy}^{nt})$ (s.t. $Y_{B}^{nt} \cap Y_{B}^{t} = \phi$ ) (where $nt$ represents novel training) is used to train the privacy target model $f_{B}^{\prime}$ , and its performance is measured on novel privacy test set $f_{A}^{*}(X_{privacy}^{ne})$ (where $ne$ represents novel evaluation). Please note that novel privacy attribute protocol may not be referred as a transfer protocol for the methods, which do not use privacy attributes $Y_{B}^{t}$ in learning $f_{A}$ . + +# 5. Experiments + +# 5.1. Datasets + +UCF101 [38] and HMDB51 [20] are two of the most commonly used datasets for the human action recognition. + +PA-HMDB [41] is dataset of 515 videos annotated with video level action annotation and framewise human privacy annotations. The dataset consists of 51 different actions and 5 different human privacy attributes. + +P-HVU is a selected subset of LSHVU [8], which is a large-scale dataset of multi-label human actions, with a diverse set of auxiliary annotations provided for object, scenes, concepts, event etc. However, the all auxiliary annotations are not provided for all videos. We select a subset of action-object-scene labels based on their availability in the val set to create our train/test split. The dataset consists of 739 action classes, 1678 objects, and 248 scene categories. Train/test split of P-HVU consists of 245,212/16,012 videos to provide a robust evaluation. + +VISPR [25] is an image dataset with a diverse set of personal information in an image like skin color, face, gender, clothing, document information etc. + +Further details are provided in Supp.Sec.B. + +# 5.2. Implementation Details + +For default experiment setting, we utilize UNet [36] as $f_{A}$ , R3D-18 [14] as $f_{T}$ , and ResNet-50 [16] as $f_{B}$ . For a fair evaluation we report results of different methods with the exact same training augmentations and model architectures. Implementation details related to training setting, hyperparameters, and model architectures can be found in Supp.Sec.C. Visualization of the learned anonymization from different methods can be seen in Supp.Sec.F. + +Downsampling methods are adopted with a down-sampled versions of input resolution with a factor of $2 \times$ and $4 \times$ used in training and testing. + +Obfuscation methods are carried out using a MS-COCO [21] pretrained Yolo [33] object detector to detect person category. The detected persons are removed using two different obfuscation strategies: (1) blackening the detected bounding boxes; (2) applying Gaussian blur in the detected bounding boxes at two different strengths. + +# 5.3. Evaluating learned anonymization on known action and privacy attributes + +For known action and privacy attributes, we follow Section 4.2 to evaluate on 2 existing protocols from [41], and follow Section 4.1 to present a new protocol using P-HVU dataset for same-domain training and testing. Results are shown in Table 1. + +# UCF101-VISPR cross dataset training and evaluation + +In this protocol, $X_{action}^{t} =$ UCF101 trainset and $X_{action}^{e} =$ UCF101 testset; $X_{privacy}^{t} =$ VISPR trainset and $X_{privacy}^{e} =$ VISPR testset. + +HMDB51-VISPR cross dataset training and PA-HMDB evaluation In this protocol, $X_{action}^{t} =$ HMDB51 trainset, and $X_{action}^{e} =$ PA-HMDB, $X_{privacy}^{t} =$ VISPR trainset, and $X_{privacy}^{e} =$ PA-HMDB. + +# P-HVU same dataset training and evaluation + +In this protocol, utility task is multi-label action recognition and privacy is defined in terms of object and scene multi-label classification. In this protocol, $X^{t} = \mathrm{P - HVU}$ trainset, and $X^{e} = \mathrm{P - HVU}$ testset. + +We can observe in Table 1 that our proposed self-supervised framework achieves a comparable action-privacy trade-off in case of known action and privacy attributes. Other methods like Downsample-4×, Obf-blackening and Obf-StrongBlur get a commendable privacy removal, however, at a cost of action recognition performance. + +# 5.4. Evaluating learned anonymization on Novel action and privacy attributes + +Following Sec. 4.3, we propose 2 protocols for the novel actions and 2 protocols for the novel privacy attributes. + +Novel action and privacy attributes In this protocol, for actions $X_{action}^{t} =$ UCF101 trainset, $X_{action}^{nt} =$ HMDB51 + +
MethodUCF101 Action Top-1 (↑)VISPR1 Privacy cMAP (↓)F1 (↓)PA-HMDBP-HVU
Action Top-1 (↑)Privacy cMAP (↓)F1 (↓)Action cMAP (↑)Objects cMAP (↓)Scenes cMAP (↓)
Raw data62.3364.410.55543.670.10.40120.111.9025.8
Downsample-2×54.1157.230.48336.161.20.11110.92.458.6
Downsample-4×39.6550.070.37925.841.40.0810.780.891.76
Obf-Blackening53.1356.390.45734.263.80.3868.66.1222.1
Obf-StrongBlur55.5955.940.45636.464.40.24311.36.8922.8
Obf-WeakBlur61.5263.520.52341.769.40.39818.611.3325.4
Noise-Features [46]61.9062.400.53141.569.10.384---
Supervised [41]62.1055.32↓14%0.461↓17%42.362.3↓11%0.194↓51%18.331.98↓83%9.5↓63%
Ours62.0357.43↓11%0.473↓15%43.162.7↓11%0.176↓56%18.011.42↓88%9.91↓62%
+ +Table 1. Comparison of existing privacy preserving action recognition method on known action and privacy attributes protocol. Our framework achieves a competitive performance to the supervised method [41]. $\downarrow \%$ denotes relative drop from raw data. For a graphical view, refer to Supp.Sec.D. + +
MethodTransfer Evaluation: ActionTransfer Evaluation: PrivacyTransfer Evaluation P-HVU
UCF→HMDB Top-1(%) (↑)UCF→PA-HMDB Top-1(%) (↑)VISPR1→VISPR2 cMAP(%) (↓)F1 (↓)Action cMAP(%) (↑)Scenes → Obj cMAP(%) (↓)
Raw data35.643.657.60.49820.111.9
Downsample-2×24.136.152.20.44710.92.45
Downsample-4×16.825.841.50.3310.780.89
Obf-Blackening26.234.253.60.468.66.12
Obf-StrongBlur26.436.453.70.46211.36.89
Obf-WeakBlur33.741.755.80.48618.611.33
Noisy Features [46]31.241.553.70.458--
Supervised [41]33.240.649.6↓14%0.399↓20%18.346.43↓46%
Ours34.142.847.1↓18%0.386↓22%18.011.42↓88%
+ +Table 2. Comparison of existing privacy preserving action recognition method on novel action and privacy attributes protocol. Our framework outperforms the supervised method [41]. $\downarrow \%$ denotes relative drop from raw data. + +trainset, $X_{\text{action}}^{ne} =$ HMDB51 testset/ PA-HMDB and for privacy, $X_{\text{privacy}}^t =$ VISPR-1 trainset, $X_{\text{privacy}}^{nt} =$ VISPR-2 trainset and $X_{\text{privacy}}^{ne} =$ VISPR-2 testset. From the left part of Table 2 and Fig. 4, we can observe that our method outperforms the supervised method [41] in both action and privacy attribute generalization. + +Novel privacy attributes from Scenes to Objects In this protocol, we take known action set $X_{\text{action}}^t = \text{P-HVU trainset}$ , and $X_{\text{action}}^e = \text{P-HVU testset}$ , $X_{\text{privacy}}^t = \text{P-HVU trainset}$ . Object, $X_{\text{privacy}}^{nt} = \text{P-HVU trainset}$ . Scene and $X_{\text{privacy}}^{ne} = \text{P-HVU testset}$ . We can observe from the right most part of Table 2 that while testing the learned anonymization from scenes to objects, supervised method [41] gets a similar results like Obf-StrongBlur and removes only $\sim 46\%$ of the raw data's privacy, whereas our method removes $\sim 88\%$ object privacy of the raw data. Main reason for difference in our method's performance gain over [41] in Table 2 is due to the amount of domain shift in novel privacy attributes. In VISPR1 $\rightarrow$ 2, domain shift is very small eg SkinColor(V1) $\rightarrow$ Tattoo(V2) (Supp.Table 1), and hence [37] is still able to generalize and perform only ( $<5\%$ ) worse than our method. Whereas, in PHVU Scene $\rightarrow$ Obj, domain shift is huge eg TennisCourt + +(Scene) $\rightarrow$ TennisRacket (Obj), where [37] suffers in generalizing and performs significantly ( $>40\%$ ) poor than ours. Additional experiments can be found in Supp.Sec.D and qualitative results can be found in Supp.Sec.F. + +![](images/8fe41c8e4e6d95921d2dc0b50c02662377b675bf3315ebd584c1abbc788996f0.jpg) +Figure 4. Trade-off between action classification and privacy removal while generalizing from UCF101 $\rightarrow$ HMDB51 for action and VISPR1 $\rightarrow$ VISPR2 for privacy attributes. Our self-supervised method achieves the best trade-off among other methods. + +# 5.5. Ablation Study + +Experiments with different privacy removal branches Second row in Table 3 shows the results just using an encoder-decoder based model $f_{A}$ without using any privacy + +removal branch $f_{B}$ . However, the style changing fails to anonymize privacy information. In our next attempt, we utilize a pretrained SSL frozen model to anonymize the privacy information by Eq. 9. This method of frozen $f_{B}$ is able to remove the privacy information by a small extent ( $< 2\%$ ), however, our biggest boost in privacy removal ( $7\%$ ) comes from updating $f_{B}$ with every update in $f_{A}$ as can be seen in the second last row of Table 3. This observation shows the importance of updating the $f_{B}$ in step-2 (Eq. 8) of minimax optimization. In other words, we can say that if $f_{B}$ is not updated with $f_{A}$ , then it becomes very easy for $f_{A}$ to fool $f_{B}$ i.e. maximize $L_{B}$ , which ultimately leads to a poor privacy removal. Additionally, we also experiment with a spatio-temporal SSL framework as privacy removal branch. Details are given in Supp.Sec.C. Note that removing spatiotemporal semantics from the input video leads to severe degradation in action recognition performance, which is the main reason of choosing 2D SSL privacy removal branch in our framework in order to remove only spatial semantics from the input video. + +
fAfBUCF101VISPR1
Top-1 (↑)cMAP (↓)F1 (↓)
XX62.364.40.555
✓X63.564.10.549
✓Spatial (Frozen)62.262.20.535
✓Spatial62.157.40.473
✓Spatio-Temporal56.456.60.461
+ +Temporal sampling strategies for SSL In order to experiment with various Temporal sampler $(S_F)$ for choosing a pair of frames from a video, we change the duration (distance) between the two frames as shown in Table 4. The chosen pair of frames from a video is considered for the positive term of contrastive loss (Eq. 5). In our default setting of experiments, we randomly select a pair of frames from a video as shown in the first row. We observe that mining positive frames from further distance decreases the anonymization capability. This is because mining the very dissimilar positives in contrastive loss leads to poorly learned representation, which is also observed while taking temporally distant positive pair in [9, 31]. + +Table 3. Experiments with different privacy removal branches + +
Distance between positive framesUCF101 Top-1(%) (↑)VISPR1 cMAP(%) (↓)F1 (↓)
No constraint62.157.40.473
>64 frames62.158.70.488
<8 frames63.457.10.443
+ +Effect of different SSL frameworks As shown in Table 5, we experiment with three different 2D SSL schemes in Eq. 5. We can observe that NT-Xent [3] and MoCo [15] + +achieve comparable performances, however, RotNet [12] framework provides a suboptimal performance in both utility and privacy. Our conjecture is that this is because RotNet mainly encourages learning global representation, and heavily removing the global information from the input via privacy removal branch leads to drop in action recognition performance as well. + +Table 4. Effect of frame sampling strategy in contrastive loss of SSL privacy removal branch + +
SSL LossUCF101 +Top-1(%) (↑)VISPR1 +cMAP(%) (↓)F1 (↓)
NT-Xent [3]62.157.40.473
MoCo [15]61.457.10.462
RotNet [12]58.160.20.504
+ +Effect of different $f_{B}$ and $f_{T}$ architectures To understand the effect of auxiliary model $f_{B}$ in the training process of $f_{A}$ , we experiment with different privacy auxiliary models $f_{B}$ , and report the performance of their learned $f_{A}^{*}$ in the same evaluation setting as shown in Table 6. We can observe that using a better architecture of $f_{B}$ leads to better anonymization. There is no significant effect of using different architectures of $f_{T}$ in learning $f_{A}$ (Supp.Sec.E). + +Table 5. Effect of different SSL frameworks + +
fBarchitectureUCF101VISPR1
Top-1 (↑)cMAP (↓)F1 (↓)
MobileNetV1 (MV1)62.158.140.488
ResNet50 (R50)62.157.430.473
R50 + MV161.456.200.454
+ +Table 6. Effect of different ${f}_{B}$ in minimax optimization + +# 6. Limitation + +One limitation of our work is that it utilizes the basic frameworks for self-supervised learning, and which may be suitable only for the action recognition, and not directly suitable for other video understanding tasks like actions detection or action anticipation. Additionally, there is still room of improvement to match the supervised baseline in case of known action-privacy attributes. + +# 7. Conclusion + +We introduced a novel self-supervised privacy preserving action recognition framework which does not require privacy labels for the training. Our extensive experiments show that our framework achieves competitive performance compared to the supervised baseline for the known action-privacy attributes. We also showed that our method achieves better generalization to novel action-privacy attributes compared to the supervised baseline. Our paper underscores the benefits of contrastive self-supervised learning in privacy preserving action recognition. + +# Acknowledgments + +We thank Vishesh Kumar Tanvar, Tushar Sangam, Rohit Gupta, and Zhenyu Wu for constructive suggestions. + +# References + +[1] Daniel J Butler, Justin Huang, Franziska Roesner, and Maya Cakmak. The privacy-utility tradeoff for remotely teleoperated robots. In Proceedings of the tenth annual ACM/IEEE international conference on human-robot interaction, pages 27–34, 2015. 3 +[2] Marco Buzzelli, Alessio Albe, and Gianluigi Ciocca. A vision-based system for monitoring elderly people at home. Applied Sciences, 10(1):374, 2020. 1 +[3] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020. 3, 4, 8 +[4] Edward Chou, Matthew Tan, Cherry Zou, Michelle Guo, Albert Haque, Arnold Milstein, and Li Fei-Fei. Privacy-preserving action recognition for smart hospitals using low-resolution depth images. arXiv preprint arXiv:1811.09950, 2018.3 +[5] Ji Dai, Behrouz Saghafi, Jonathan Wu, Janusz Konrad, and Prakash Ishwar. Towards privacy-preserving recognition of human activities. In 2015 IEEE international conference on image processing (ICIP), pages 4238-4242. IEEE, 2015. 1, 3 +[6] Ishan Dave, Rohit Gupta, Mamshad Nayeem Rizve, and Mubarak Shah. TcIr: Temporal contrastive learning for video representation. Computer Vision and Image Understanding, page 103406, 2022. 3 +[7] Ishan Dave, Zacchaeus Scheffer, Akash Kumar, Sarah Shiraz, Yogesh Singh Rawat, and Mubarak Shah. Gabriellav2: Towards better generalization in surveillance videos for action detection. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV) Workshops, pages 122-132, January 2022. 1 +[8] Ali Diba, Mohsen Fayyaz, Vivek Sharma, Manohar Paluri, Jürgen Gall, Rainer Stiefelhagen, and Luc Van Gool. Large scale holistic video understanding. In European Conference on Computer Vision, pages 593-610. Springer, 2020. 2, 6 +[9] Christoph Feichtenhofer, Haoqi Fan, Bo Xiong, Ross Girshick, and Kaiming He. A large-scale study on unsupervised spatiotemporal representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 3299-3309, June 2021. 3, 8 +[10] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In International conference on machine learning, pages 1180-1189. PMLR, 2015. 5 +[11] Kirill Gavrilyuk, Mihir Jain, Ilia Karmanov, and Cees GM Snoek. Motion-augmented self-training for video recognition at smaller scale. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 10429-10438, 2021. 3 +[12] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. arXiv preprint arXiv:1803.07728, 2018. 8 +[13] Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent-a new approach + +to self-supervised learning. Advances in Neural Information Processing Systems, 33:21271-21284, 2020. 3 +[14] K. Hara, H. Kataoka, and Y. Satoh. Towards good practice for action recognition with spatiotemporal 3d convolutions. In 2018 24th International Conference on Pattern Recognition (ICPR), pages 2516-2521, 2018. 6 +[15] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9729-9738, 2020. 3, 8 +[16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 6 +[17] Carlos Hinojosa, Juan Carlos Niebles, and Henry Arguello. Learning privacy-preserving optics for human pose estimation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2573-2582, 2021. 3 +[18] Simon Jenni and Hailin Jin. Time-equivariant contrastive video representation learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9970-9980, 2021. 3 +[19] Li Jia and Richard J Radke. Using time-of-flight measurements for privacy-preserving tracking in a smart room. IEEE Transactions on Industrial Informatics, 10(1):689-696, 2013. 3 +[20] H. Kuehne, H. Jhuang, E. Garrote, T. Poggio, and T. Serre. HMDB: a large video database for human motion recognition. In Proceedings of the International Conference on Computer Vision (ICCV), 2011. 6 +[21] 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 +[22] Jixin Liu, Rong Tan, Guang Han, Ning Sun, and Sam Kwong. Privacy-preserving in-home fall detection using visual shielding sensing and private information-embedding. IEEE Transactions on Multimedia, 2020. 1 +[23] Jixin Liu and Leilei Zhang. Indoor privacy-preserving action recognition via partially coupled convolutional neural network. In 2020 International Conference on Artificial Intelligence and Computer Engineering (ICAICE), pages 292-295. IEEE, 2020. 1, 3 +[24] Wenhe Liu, Guoliang Kang, Po-Yao Huang, Xiaojun Chang, Yijun Qian, Junwei Liang, Liangke Gui, Jing Wen, and Peng Chen. Argus: Efficient activity detection system for extended video analysis. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV) Workshops, March 2020. 1 +[25] Tribhuvanesh Orekondy, Bernt Schiele, and Mario Fritz. Towards a visual privacy advisor: Understanding and predicting privacy risks in images. In IEEE International Conference on Computer Vision (ICCV), 2017. 6 +[26] Tian Pan, Yibing Song, Tianyu Yang, Wenhao Jiang, and Wei Liu. Videomoco: Contrastive video representation learning with temporally adversarial examples. In Proceedings of + +the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11205-11214, 2021. 3 +[27] Francesco Pittaluga, Sanjeev Koppal, and Ayan Chakrabarti. Learning privacy preserving encodings through adversarial training. In 2019 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 791-799. IEEE, 2019. 3 +[28] Francesco Pittaluga and Sanjeev J Koppal. Privacy preserving optics for miniature vision sensors. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 314-324, 2015. 3 +[29] Francesco Pittaluga and Sanjeev Jagannatha Koppal. Precapture privacy for small vision sensors. IEEE transactions on pattern analysis and machine intelligence, 39(11):2215-2226, 2016. 3 +[30] Rui Qian, Yuxi Li, Huabin Liu, John See, Shuangrui Ding, Xian Liu, Dian Li, and Weiyao Lin. Enhancing self-supervised video representation learning via multi-level feature optimization. In Proceedings of the International Conference on Computer Vision (ICCV), 2021. 3 +[31] Rui Qian, Tianjian Meng, Boqing Gong, Ming-Hsuan Yang, Huisheng Wang, Serge Belongie, and Yin Cui. Spatiotemporal contrastive video representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6964-6974, 2021. 8 +[32] Kanchana Ranasinghe, Muzammal Naseer, Salman Khan, Fahad Shahbaz Khan, and Michael Ryoo. Self-supervised video transformer. arXiv preprint arXiv:2112.01514, 2021. 3 +[33] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 779-788, 2016. 6 +[34] Zhongzheng Ren, Yong Jae Lee, and Michael S Ryoo. Learning to anonymize faces for privacy preserving action detection. In Proceedings of the European conference on computer vision (ECCV), pages 620-636, 2018. 1, 3 +[35] Mamshad Nayeem Rizve, Ugur Demir, Praveen Tirupattur, Aayush Jung Rana, Kevin Duarte, Ishan R Dave, Yogesh S Rawat, and Mubarak Shah. Gabriella: An online system for real-time activity detection in untrimmed security videos. In 2020 25th International Conference on Pattern Recognition (ICPR), pages 4237-4244. IEEE, 2021. 1 +[36] 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. 6 +[37] Michael S Ryoo, Brandon Rothrock, Charles Fleming, and Hyun Jong Yang. Privacy-preserving human activity recog + +nition from extreme low resolution. In Thirty-First AAAI Conference on Artificial Intelligence, 2017. 1, 3 +[38] 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. 6 +[39] Vinkle Srivastav, Afshin Gangi, and Nicolas Padoy. Human pose estimation on privacy-preserving low-resolution depth images. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 583-591. Springer, 2019. 3 +[40] Zihao W Wang, Vibhav Vineet, Francesco Pittaluga, Sudipta N Sinha, Oliver Cossairt, and Sing Bing Kang. Privacy-preserving action recognition using coded aperture videos. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 0–0, 2019. 3 +[41] Zhenyu Wu, Haotao Wang, Zhaowen Wang, Hailin Jin, and Zhangyang Wang. Privacy-preserving deep action recognition: An adversarial learning framework and a new dataset. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020. 1, 2, 3, 5, 6, 7 +[42] Zhenyu Wu, Zhangyang Wang, Zhaowen Wang, and Hailin Jin. Towards privacy-preserving visual recognition via adversarial training: A pilot study. In Proceedings of the European Conference on Computer Vision (ECCV), pages 606-624, 2018. 3 +[43] Taihong Xiao, Yi-Hsuan Tsai, Kihyuk Sohn, Manmohan Chandraker, and Ming-Hsuan Yang. Adversarial learning of privacy-preserving and task-oriented representations. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 12434-12441, 2020. 3 +[44] Jure Zbontar, Li Jing, Ishan Misra, Yann LeCun, and Stéphane Deny. Barlow twins: Self-supervised learning via redundancy reduction. In International Conference on Machine Learning, pages 12310-12320. PMLR, 2021. 3 +[45] Chenyang Zhang, Yingli Tian, and Elizabeth Capezuti. Privacy preserving automatic fall detection for elderly using rgbd cameras. In International Conference on Computers for Handicapped Persons, pages 625-633. Springer, 2012. 1 +[46] Dalin Zhang, Lina Yao, Kaixuan Chen, Guodong Long, and Sen Wang. Collective protection: Preventing sensitive inferences via integrative transformation. In 2019 IEEE International Conference on Data Mining (ICDM), pages 1498-1503. IEEE, 2019. 7 +[47] Zhixiang Zhang, Thomas Cilloni, Charles Walter, and Charles Fleming. Multi-scale, class-generic, privacy-preserving video. *Electronics*, 10(10):1172, 2021. 1, 3 \ No newline at end of file diff --git a/spactselfsupervisedprivacypreservationforactionrecognition/images.zip b/spactselfsupervisedprivacypreservationforactionrecognition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..fc408e10a77b6b0181863487cd3171489bf2c389 --- /dev/null +++ b/spactselfsupervisedprivacypreservationforactionrecognition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6e583294e7a3ba6ddcada678a8c61015d5391553d4d8d7642940ef28f2b1b72 +size 514511 diff --git a/spactselfsupervisedprivacypreservationforactionrecognition/layout.json b/spactselfsupervisedprivacypreservationforactionrecognition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..39fb2c21fcd7faa108db6659aa80a383b3dc6c0b --- /dev/null +++ b/spactselfsupervisedprivacypreservationforactionrecognition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aeb8907288debcd3ddb623b4d89b817a1c8b2ebe91ea2d1a7d85be344c95e5a4 +size 506398 diff --git a/spamsstructuredimplicitparametricmodels/42f191b3-a725-4edc-9e0c-ac5e419ce744_content_list.json b/spamsstructuredimplicitparametricmodels/42f191b3-a725-4edc-9e0c-ac5e419ce744_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..bf45759a02079ed4cf33de54ac9f556e7b41fe5b --- /dev/null +++ b/spamsstructuredimplicitparametricmodels/42f191b3-a725-4edc-9e0c-ac5e419ce744_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92050acaba4c2d12f6c91b653a8e107000d0082adc3b18f5f898e08023fdcb9c +size 75122 diff --git a/spamsstructuredimplicitparametricmodels/42f191b3-a725-4edc-9e0c-ac5e419ce744_model.json b/spamsstructuredimplicitparametricmodels/42f191b3-a725-4edc-9e0c-ac5e419ce744_model.json new file mode 100644 index 0000000000000000000000000000000000000000..33eab22f1890a5f39b78d5f4a3b2d8b5205753b1 --- /dev/null +++ b/spamsstructuredimplicitparametricmodels/42f191b3-a725-4edc-9e0c-ac5e419ce744_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afb54ea30c517fbae156389922ab2f98e7f31a167224f0c40568bf9e998286f1 +size 91958 diff --git a/spamsstructuredimplicitparametricmodels/42f191b3-a725-4edc-9e0c-ac5e419ce744_origin.pdf b/spamsstructuredimplicitparametricmodels/42f191b3-a725-4edc-9e0c-ac5e419ce744_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..edd010f2cfeb741e9154bb3fa60d98b29f933f52 --- /dev/null +++ b/spamsstructuredimplicitparametricmodels/42f191b3-a725-4edc-9e0c-ac5e419ce744_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed71bf62ace1fd42e500ad70ecef9162f30f11ad403b3b2c2cf895746fcbfd4a +size 3473058 diff --git a/spamsstructuredimplicitparametricmodels/full.md b/spamsstructuredimplicitparametricmodels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b247d13cd663d5f14bdbe199323eec989f972405 --- /dev/null +++ b/spamsstructuredimplicitparametricmodels/full.md @@ -0,0 +1,277 @@ +# SPAMs: Structured Implicit Parametric Models + +Pablo Palafox1* + +Nikolaos Sarafianos² + +Tony Tung + +Angela Dai + +$^{1}$ Technical University of Munich $^{2}$ Meta Reality Labs Research, Sausalito, USA + +![](images/991756446822a50f4f15c1590c5e2ae2ab81c5fbde1954cb30d0d9e30518b648.jpg) +Figure 1. We propose to represent deforming shapes with a structural decomposition into part-based disentangled spaces characterizing of shape and pose, as Structured-implicit PArametric Models (SPAMs). SPAMs learn estimizable local shape and pose spaces, which we can traverse at test time to fit to depth sequence observations of an unseen deforming object. Our structured part decompositions facilitate low-dimensional coarse motion correspondence through part-to-part correlation, which guides a robust joint optimization over the part-based shape and pose spaces for globally consistent, accurate tracking under complex motion sequences. + +# Abstract + +Parametric 3D models have formed a fundamental role in modeling deformable objects, such as human bodies, faces, and hands; however, the construction of such parametric models requires significant manual intervention and domain expertise. Recently, neural implicit 3D representations have shown great expressibility in capturing 3D shape geometry. We observe that deformable object motion is often semantically structured, and thus propose to learn Structured-implicit PArametric Models (SPAMs) as a deformable object representation that structurally decomposes non-rigid object motion into part-based disentangled representations of shape and pose, with each being represented by deep implicit functions. This enables a structured characterization of object movement, with part decomposition characterizing a lower-dimensional space in which we can establish coarse motion correspondence. In particular, we can leverage the part decompositions at test time to + +fit to new depth sequences of unobserved shapes, by establishing part correspondences between the input observation and our learned part spaces; this guides a robust joint optimization between the shape and pose of all parts, even under dramatic motion sequences. Experiments demonstrate that our part-aware shape and pose understanding lead to state-of-the-art performance in reconstruction and tracking of depth sequences of complex deforming object motion. + +# 1. Introduction + +Understanding non-rigidly deforming shapes is essential for perception, as we live in a 4D world where humans, animals, and other 3D objects move in a non-rigid fashion. Dynamic tracking and reconstruction remains a notable challenge, and while significant advances have been made in 4D reconstruction and tracking, they often require complex multi-view setups [5] or build on a domain-specific, + +fixed-topology template [1,4,35,36]. In the latter case, parametric 3D models in particular have made notable impact in modeling domain-specific deformable 3D objects, such as for human bodies [2,20,23], faces [22,34], hands [40], and animals [51]. However, such parametric 3D models require a complex construction process involving domain-specific knowledge and manual efforts, while remaining limited in expressability of local shape details. + +Recently, advances in learned continuous implicit representations for modeling 3D shapes have shown impressive representation power for capturing effective static 3D shape geometry at relatively high resolutions [7, 8, 17, 28, 29, 33, 39]. Such approaches have also been extended to represent 4D reconstruction of dynamic objects by efficiently disentangling learned implicit spaces representing shape and dynamic movement [31, 32]. This has proven to be a very promising direction, but these approaches characterize objects as a whole, whereas we observe that the 4D motion of an object typically maintains a strong structured correlation on a lower-level part basis. + +Thus, we propose Structured-implicit PArametric Models (SPAMs), which learn a structured, part-based, disentangled representation of deformable 3D objects. Given a set of observations of various shape identities in different poses (including a canonical pose) with coarse part annotations, we learn part-based latent spaces characterizing each part's geometry and motion. Note that we do not require comprehensive surface correspondence throughout the dataset, nor complex domain-specific knowledge (e.g., skeleton, kinematic chain). We leverage continuous implicit function representations for each part's geometry, represented as a signed distance field in its canonical space, and pose, represented as a local deformation relative to the canonical space. + +At test time, we traverse the learned latent part spaces to fit to new depth sequences. Crucially, our part-based representation allows leveraging predicted part segmentation of the new observation to establish global correspondences with our part-based latent representations. By establishing correspondence through our part priors, we can robustly track sequences with significant motion changes by discovering high-level part correspondence and leveraging it to guide our joint optimization over part-based shape and pose. Experiments on non-rigid tracking and reconstruction of single-camera depth sequences of humans from the RenderPeople dataset [12] show that the part-aware reasoning of our SPAMs can outperform the state of the art by an order of magnitude on reconstruction (Chamfer distance) and by $43\%$ on tracking (3D End-Point-Error). In summary, we present the following contributions: + +- We learn a part-based disentanglement of shape and pose, capturing local characteristics of deformable 3D objects in latent spaces representing shape and pose of each part. + +- Our learned, estimizable spaces enable part-based reasoning to guide joint optimization over parts to fit unseen test sequences. By establishing high-level part correspondence between a new observation and our learned part spaces, we can robustly guide a joint optimization over part geometry and pose, resulting in a more globally consistent non-rigid reconstruction and tracking. + +# 2. Related Work + +Parametric and Neural Parametric Models. Parametric body models [23, 48, 50] enable the representation of the human body variations with a limited number of parameters (i.e. a low-dimension descriptor). One of the most influential works in this line of research is SMPL [23], a parametric model widely-used to describe the body shape and pose with deformation blend shapes learned from a dataset of diverse 3D body scans. Parametric body models have enabled research work for modeling soft tissue [36] and clothing [1, 25, 45]. However, parametric body models [23, 48] employ deformations based on vertex-based skinning models which have limited resolution and cannot represent non-linear surface deformations of clothed bodies (e.g., wrinkles). To alleviate these limitations, Neural Parametric Models [32] learn to disentangle 4D dynamics into latent-space representations of shape and pose using implicit functions and can fit to new observations by optimizing over the pose and shape codes. However, they treat the human body as a single entity, which results in somewhat unrealistic motions. Genova et al. [16, 17] addressed this problem by introducing LDIF, a 3D representation that implicitly describes a shape as the sum of local 3D functions. LDIF outputs a structured decomposition into shape elements by encoding 3D points within each shape using PointNet [15, 37, 38] and hence enable shape encoding such as human bodies in local regions arranged in a global structure. The 3D decompositions of LDIF tend towards temporal consistency, but as tracking is not explicitly considered, surface tracking tends to become inconsistent in more challenging motion scenarios. In contrast, we learn a semantically-driven part decomposition which guides joint part-based shape and pose optimization that results in robust, consistent tracking over dynamic sequences. + +Continuous Implicit Deformable Representations. Implicit-based and generative representations for humans or clothing has been an active topic of research for the past few years [9, 10, 30, 33, 42, 43, 47, 49]. Several recent works have focused on learning identity-specific implicit representations to animate clothed people [11, 13, 19, 30, 41, 46]. Neural-GIF [46] introduced a framework to animate clothed people from scans as a function of pose directly, without the need of registration. SCANimate [41] and LEAP [30] learn a pose or shape representation of the human body surface. While promising, these methods learn + +![](images/9855551efed057a65da3e1e556d7211476880bcd2e570cd9159d886d07d53fa6.jpg) +Figure 2. Structured Implicit Parametric Model Construction. SPAMs learn a structured decomposition of shape and pose, where local shape codes $\{s_q\}$ can be decoded to represent local part geometry, and both $\{s_q\}$ and a part decoder inform local pose movement. To construct a SPAM, we first learn structural decomposition in the canonical space as a part decoder that predicts part classes, conditioned on all local shape codes $\{s_q\}$ ; we use this learned part decomposition to guide local (shape and pose) MLPs into focusing on their corresponding space partitioning. We learn a structured, latent shape space in the canonical space by conditioning a set of local shape MLPs on local shape codes $\{s_q\}$ assigned to every identity and part $q$ . We learn local deformation fields around the canonically-posed shape with local pose MLPs conditioned on a local, latent shape and pose codes $s_q$ and $p_q$ to predict $\Delta x$ for $x$ in the canonical space. + +![](images/2ec07d848b0f8547891a0780883bb3602d14712a0b0f1068192d069bece6e27a.jpg) + +![](images/07f71912ea1a1e45752af7a878cfd783a57f6e25185e300b96df1c5dd4ef0d6a.jpg) + +subject or outfit-specific models, and thus lack general characterization of deformable objects. Given a posed but unclothed body model, POP [27] represents a clothed human with a set of points in order to create pose-dependent clothing animations. New animations can then be created from an unseen scan of a person in clothing. Bhatnagar et al. [3] proposed IP-Net, a method to combine learned implicit functions and traditional parametric models to produce controllable models of humans. IP-Net predicts correspondences to SMPL and leverages a double-layered surface to represent inner and outer surfaces to better represent a clothed body. Our proposed approach also builds on the expressability of learned implicit representations, and we propose to learn from a dataset without strong requirements on surface correspondence annotations to construct a general, semantically-driven decomposition that provides strong high-level guidance for robust pose tracking under challenging motion scenarios. + +# 3. Structured Implicit Parametric Models + +We introduce Structured-implicit PArametric Models (SPAMs), a learned approach to build part-aware, implicit, parametric 3D models from a dataset of posed identities of a given object class. We do not require the dataset to have surface correspondence between each instance nor annotations for physical domain-specific properties such as the skeleton or the kinematic chain. Our SPAMs structurally decom + +pose non-rigid object motion into part-based disentangled implicit spaces representing each part's shape and pose. + +SPAMs consist of (1) learned latent spaces that characterize part geometries in the canonical shape space, (2) a part decoder conditional on the part shapes that guides a part-based structural partitioning of the canonical space, and (3) structured, latent pose spaces conditional on both part shape and pose. At test time, SPAMs not only allow for the joint optimization over the learned, local spaces of shape and pose to fit to a new observation, but, crucially, our part-based formulation enables establishing high-level correspondence between predicted parts and the part-based latent representations. This part correspondence enables robust global optimization over the part shape and pose spaces, resulting in robust, consistent non-rigid reconstruction and tracking of unseen sequences of deforming objects. + +# 3.1. Overview + +Given a dataset of shape identities from the same class category in different poses, with coarse part segmentation in the canonical space, our goal is to learn a part-based parametric model that structurally disentangles shape and pose. We leverage this structured part decomposition to fit to unseen depth sequences of new identities, where our part-based representation provides a lower-dimensional space to establish semantic part correspondences that provide strong guidance for our part-based shape and pose fitting under + +complex motions. + +Our SPAMs characterize disentangled shape and pose as sets of local, part-based shape spaces over shape codes $\{s_q\}$ , and their corresponding local pose spaces over $\{p_q\}$ . To obtain the structured partitioning of these local spaces, we first learn a part decoder that predicts a segmentation of the canonical space into a set of local parts (Sec. 3.2). Given the learned space partitioning, we can then construct the structured shape space as a set of local implicit geometric representations (Sec. 3.3). We then build the structured pose space as a set of local implicit deformation fields that characterize the motion of each local shape (Sec. 3.4). Finally, to fit to new depth sequences of unobserved identities at test time, we leverage part correspondence to the set of shape and pose spaces to obtain a robust, joint optimization that accurately represents the observed shape (Sec. 3.5). + +# 3.2. Part Decoder + +In order to establish a structural space partitioning, we learn a part decoder that segments the canonical space and guides the learning of the part-based shape and pose latent spaces. The part decoder $f_{\theta_{\mathbf{q}}}$ is characterized by an MLP that predicts part confidences for a query point $\pmb{x} \in \mathbb{R}^3$ in canonical space. We implement our part decoder in an auto-decoder fashion [33] and condition on the concatenation of $D_{\mathrm{s}}$ -dimensional local latent shape codes $s_{\mathrm{q}}$ (Sec. 3.3). Let $Q$ denote the number of parts, leading to a $QD_{\mathrm{s}}$ -dimensional concatenation of local shape codes. Formally, we have: + +$$ +f _ {\theta_ {\mathrm {q}}}: \mathbb {R} ^ {Q D _ {\mathrm {s}}} \times \mathbb {R} ^ {3} \to \mathbb {R} ^ {Q}, \quad ([ \pmb {s} _ {\mathrm {q}} ], \pmb {x}) \mapsto f _ {\theta_ {\mathrm {q}}} ([ \pmb {s} _ {\mathrm {q}} ], \pmb {x}) = \tilde {\pmb {w}}. (1) +$$ + +where $\left[s_{\mathrm{q}}\right]$ is the concatenation of all $Q$ local shape codes $\left\{s_{\mathrm{q}}\right\}$ . We train $f_{\theta_{\mathrm{q}}}$ with a binary cross entropy loss between predicted and ground-truth part labels as one-hot vectors. + +We consider six coarse parts: head, torso, right arm, right leg, left arm and left leg (see Fig. 1-center). A point $\pmb{x} \in \mathbb{R}^3$ in canonical space can belong to any of these part classes, where the $Q$ -dimensional $\tilde{\boldsymbol{w}}$ denotes the likelihoods of $\pmb{x}$ belonging to each respective part. In particular, we allow points near the boundary between two parts to belong to both parts at the same time, by indicating both parts to be one in the ground truth part vector. This allows regularization of boundary regions to ensure smooth transitions between implicit functions for shape and pose latent spaces. + +Note that $f_{\theta_{\mathrm{q}}}$ predicts part probabilities for all points $\pmb{x} \in \mathbb{R}^3$ in canonical space, not only surface points. This strategy provided more accurate part predictions for off-surface locations during our test-time optimization (Sec. 3.5). + +Groundtruth for supervising the part decoder is obtained as follows: as will be shown in Sec.3.3, to train our shape latent spaces we sample dense surface points with normals in addition to off-surface points randomly sampled in $[-1, 1]^3$ . + +We re-use these same points to train our part decoder, with part labels for each surface point obtained directly from the original scan or mesh and by nearest neighbor query for off-surface points. + +Implementation details. We use a 6-layer SIREN [44] MLP with a hidden dimension of 256 and a frequency $\omega = 30$ in the sinus activation (following [44]). As shown by [6], conditioning-by-concatenation is sub-optimal for implicit neural representations with period activations, and therefore we employ their proposed FiLM conditioning, where a mapping network takes in a latent code $z$ and outputs frequencies and phase to condition each layer of the SIREN MLP. The mapping network is a 4-layer LeakyReLU MLP with hidden dimension of 128. We use the Adam optimizer [21] and a learning rate of $1 \times 10^{-4}$ for both the decoder and the mapping network. + +# 3.3. Structured Shape Space + +Our multi-part shape space is learned by a dictionary of $Q$ local MLPs, each learning to represent a local shape part in its canonical pose, characterizing its geometry as the zero iso-surface decision boundary of a signed distance field. The structural decomposition of the $Q$ local MLPs is guided by the part decomposition predicted by the part decoder $f_{\theta_{\mathrm{q}}}$ . To extract the complete shape from our structured shape space, we query all $Q$ shape MLPs for every point in a 3D grid, average out their SDF contributions based on predicted part confidence for the given query point, and finally use Marching Cubes [24] to extract a mesh. + +Each shape MLP is trained in auto-decoder fashion [33], similar to the part decoder. We directly optimize over a latent code $s_{\mathrm{q}}$ , which is particular to the shape latent space of its assigned part $q$ . Each part $q$ of a canonically-posed shape identity $i$ in the training set is then encoded in a $D_{\mathrm{s}}$ -dimensional latent shape code $s_{\mathrm{q}}^{i}$ . In turn, each shape MLP $f_{\theta_{\mathrm{s}}^{q}}$ learns to map an input point $x \in \mathbb{R}^3$ in the canonical space, conditioned on the local shape code $s_{\mathrm{q}}^{i}$ , to a predicted SDF value $\tilde{d}_{\mathrm{q}}$ : + +$$ +f _ {\theta_ {\mathrm {s}} ^ {\mathrm {q}}} \colon \mathbb {R} ^ {D _ {\mathrm {s}}} \times \mathbb {R} ^ {3} \rightarrow \mathbb {R}, \quad \left(\boldsymbol {s} _ {\mathrm {q}} ^ {i}, \boldsymbol {x}\right) \mapsto f _ {\theta_ {\mathrm {s}} ^ {\mathrm {q}}} \left(\boldsymbol {s} _ {\mathrm {q}} ^ {i}, \boldsymbol {x}\right) = \tilde {d} _ {\mathrm {q}}. (2) +$$ + +As train data typically do not contain watertight meshes, we train directly on oriented point clouds sampled from the (potentially incomplete) train meshes, following [18]. This is accomplished by solving for an Eikonal boundary value problem that constrains the norm of spatial gradients of the SDF to be 1 almost everywhere [18,44]. In practice, we use the Eikonal loss as presented in [44]. As training data, we only require the surface points with associated normals for each identity, and randomly sampled coordinates in the unit cube. For every identity in a batch, we sample $N_{\mathrm{s}}$ points, half of which are surface points subsampled from the given identity, and the remaining half as coordinates randomly + +sampled in space. Then for every part $q$ , we train the corresponding shape MLP by minimizing the following reconstruction energy over the $S$ canonically-posed shape identities of the dataset with respect to the local shape codes $\{\pmb{s}_{\mathrm{q}}^{i}\}_{i = 1}^{S}$ and the set of shape MLP weights $\theta_{\mathrm{s}}^{\mathrm{q}}$ : + +$$ +\underset {\theta_ {\mathrm {s}} ^ {\mathrm {q}}, \left\{\boldsymbol {s} _ {\mathrm {q}} ^ {i} \right\} _ {i = 1} ^ {S}} {\arg \min } \sum_ {q = 1} ^ {Q} \sum_ {i = 1} ^ {S} \Big (\sum_ {k = 1} ^ {N _ {\mathrm {s}}} w _ {\mathrm {q}} ^ {i, k} \mathcal {L} _ {\mathrm {s}} \left(f _ {\theta_ {\mathrm {s}} ^ {\mathrm {q}}} \left(\boldsymbol {s} _ {\mathrm {q}} ^ {i}, \boldsymbol {x} _ {i} ^ {k}\right), d _ {i} ^ {k}\right) + \mathcal {L} _ {\mathrm {r}} \Big). \tag {3} +$$ + +Here $\mathcal{L}_s$ is the Eikonal loss version proposed in SIREN [44], enforcing that (1) SDF predictions for surface points are 0, (2) groundtruth surface normals match the estimated normals (computed as the spatial gradient of the SDF function at a given position), (3) the norm of the SDF gradient is 1 almost everywhere and (4) off-surface points do not have SDF values close to 0. We refer to [44] for a more detailed explanation. Additionally, we enforce a zero-mean multivariate-Gaussian distribution with spherical covariance $\sigma_{\mathrm{s}}$ over the latent shape codes, as was proposed in [33]: $\mathcal{L}_{\mathrm{r}} = \left\| s_{\mathrm{q}}^{i}\right\|_{2}^{2} / \sigma_{\mathrm{s}}^{2}$ . + +Importantly, the contribution to the loss of each point is weighted by its predicted part confidence $w_{\mathrm{q}}^{i,k}$ from $f_{\theta_{\mathrm{q}}}$ , enabling each local shape MLP to focus on its respective local region. That is, if for point $x$ , $w_{\mathrm{q}}^{i,k}$ for a class $q$ is close to 1, then $x$ likely belongs to $q$ . Then gradients from the contribution of point $x$ will back-propagate with high weight to the shape MLP of part $q$ , $\theta_{\mathrm{s}}^{\mathrm{q}}$ . On the contrary, if $w_{\mathrm{q}}^{i,k}$ is near 0, then $x$ likely does not belong to $q$ and $f_{\theta_{\mathrm{q}}}$ will not learn to generate geometry at $x$ . + +Implementation details. Each shape latent space is implemented as a 6-layer SIREN [44] MLP with a hidden dimension of 256 and a frequency $\omega = 30$ . We use 128-dimensional shape latent codes for each part ( $D_{\mathrm{s}} = 128$ ). Similar to our part decoder, we employ FiLM conditioning [6] to condition the SDF predictions on the local latent shape code, with the mapping network implemented as a 4-layer LeakyReLU MLP with 128 units per layer. We use the Adam optimizer and learning rates of $1 \times 10^{-4}$ and $1 \times 10^{-3}$ for the local shape MLPs $f_{\theta_{\mathrm{s}}^{\mathrm{q}}}$ and the local shape codes $\{s_{\mathrm{q}}^{i}\}_{i=1}^{S}$ , respectively. The latent shape codes are initialized randomly from $\mathcal{N}(0, 0.01^2)$ . + +# 3.4. Structured Pose Space + +Similar to our structured shape latent space, our structured pose space is learned by a dictionary of $Q$ local MLPs, each optimized to represent a local deformation field that maps query points $\pmb{x}$ in the canonical space of an identity $i$ to a deformed space $j$ , by predicting a flow vector $\Delta \tilde{\pmb{x}}_{\mathrm{q}}$ . This prediction is conditional on both a $D_{\mathrm{p}}$ -dimensional latent pose code $\pmb{p}_{\mathrm{q}}^{j}$ as well as on the latent shape code $\pmb{s}_{\mathrm{q}}^{i}$ of the corresponding part $q$ , as pose deformations change with respect to shape. Deformation fields are only defined for a thin layer around the shape surface, since flow vectors become less informative when further away from the surface. + +Formally, we have: + +$$ +\begin{array}{l} f _ {\theta_ {p} ^ {\mathrm {q}}} \colon \mathbb {R} ^ {D _ {\mathrm {s}}} \times \mathbb {R} ^ {D _ {\mathrm {p}}} \times \mathbb {R} ^ {3} \to \mathbb {R} ^ {3}, \\ \left(\boldsymbol {s} _ {\mathrm {q}} ^ {i}, \boldsymbol {p} _ {\mathrm {q}} ^ {j}, \boldsymbol {x}\right) \mapsto f _ {\theta_ {p} ^ {\mathrm {q}}} \left(\boldsymbol {s} _ {\mathrm {q}} ^ {i}, \boldsymbol {p} _ {\mathrm {q}} ^ {j}, \boldsymbol {x}\right) = \Delta \tilde {\boldsymbol {x}} _ {\mathrm {q}}. \\ \end{array} +$$ + +Our local pose MLPs are trained with up to $P$ deformed instances of an identity; note that this does not require different identities to appear in the same pose. + +To train these local pose spaces, we sample dense, near-surface correspondences between the canonical and posed frame, which amounts to sampling the canonical and posed raw meshes at the same barycentric coordinates, similar to [32]. Learning one of the local pose spaces $\theta_{\mathrm{p}}^{\mathrm{q}}$ amounts to minimizing the following energy term over all $P$ deformation fields with respect to the individual (and local) pose codes $\{\pmb{p}_{\mathrm{q}}^{j}\}_{j = 1}^{P}$ and pose MLP weights $\theta_{\mathrm{p}}^{\mathrm{q}}$ : + +$$ +\underset {\theta_ {\mathrm {p}} ^ {\mathrm {q}}, \left\{\boldsymbol {p} _ {\mathrm {q}} ^ {j} \right\} _ {j = 1} ^ {P}} {\arg \min } \sum_ {\substack {j = 1 \\ i (j)}} ^ {P} \Big (\sum_ {q = 1} ^ {Q} \sum_ {k = 1} ^ {N _ {\mathrm {p}}} w _ {\mathrm {q}} ^ {i, k} \mathcal {L} _ {\mathrm {p}} + \mathcal {L} _ {\mathrm {r}} \Big), \tag{4} +$$ + +where $i(j)$ is a mapping from the index $j$ of a posed shape to the corresponding index $i$ of its canonical shape and $\mathcal{L}_{\mathrm{p}}$ is an $\ell_2$ loss between predicted and ground truth flow vectors: + +$$ +\mathcal {L} _ {\mathrm {p}} := \mathcal {L} _ {\mathrm {p}} \left(f _ {\theta_ {\mathrm {p}} ^ {\mathrm {q}}} \left(\boldsymbol {s} _ {\mathrm {q}} ^ {i}, \boldsymbol {p} _ {\mathrm {q}} ^ {j}, \boldsymbol {x} _ {i} ^ {k}\right), \Delta \boldsymbol {x} _ {i j} ^ {k}\right). \tag {5} +$$ + +Similar to the structured local shape spaces, we encourage corresponding structural decomposition of the local part spaces by leveraging the predicted part confidences $w_{\mathrm{q}}^{i,k}$ from $f_{\theta_{\mathrm{q}}}$ . We also enforce an analogous zero-mean multivariate-Gaussian distribution over the latent pose codes with $\mathcal{L}_{\mathrm{r}}$ . While learning these pose latent spaces, we do not optimize over the local shape codes. + +Implementation details. We implement our structured pose latent spaces as 4-layer SIREN MLPs with hidden dimension equal to 256, $\omega = 15$ , and set $D_{\mathrm{p}} = 64$ as the dimension of our local pose codes. We employ the same training scheme as used for training the shape spaces. + +# 3.5. Test-time Optimization + +Our structured latent representations of shape and pose can be optimized over at test time to fit a SPAM to accurately reconstruct and track an input sequence of $L$ depth maps. This is achieved by solving for the set of $Q$ local latent shape codes, denoted as $[\tilde{s}]$ , and the $Q \times L$ latent pose codes ( $Q$ pose codes per frame), $\{[\tilde{\pmb{p}}_j]\}_{j=1}^L$ , that best explain the input sequence. + +Each depth map in the sequence is interpreted as a $256^{3}$ -SDF grid of its back-projected values. A volumetric mask $M_{\mathrm{o}}$ is also extracted to mask out regions that are further than 0.02 (in normalized units) from the observed surface. We additionally predict part labels for every point + +![](images/ccf5fe98f210716b5a024ff039fcdee6f7bc8532a5f4c421c7fa37cb6109756d.jpg) +Figure 3. Our part-aware $\mathcal{L}_{\mathrm{icp}}$ can establish high-level correspondences between input points (left) and posed estimates (right), even under difficult motions with poor initial pose estimates (e.g., right arm in green), thus guiding optimization to accurate tracking. + +in the input depth map using PointNet++ [38], which we pre-train to predict part labels for the $Q$ parts. + +Prior to optimization, we initialize our local shape and pose codes. To initialize each local shape code $s_{\mathrm{q}}$ , we use the average optimized train code for each part $q$ . To initialize local pose codes, we leverage a learned pose encoder that maps the input depth map to a latent code. While we find that our structured part representations of shape and pose can robustly track from a random pose initialization of all codes from $\mathcal{N}(0, 0.01^2)$ , we can obtain improved pose tracking by a learned encoder initialization (c.f. Sec. 4). + +Given the initial shape code estimates, we can extract an initial canonical shape by querying our structured shape MLPs on a 3D grid, and extracting the iso-surface with Marching Cubes [24]. We use the initial canonical shape to inform sampling near the surface, and sample $N_{t} = 500\mathrm{k}$ points, $\{\pmb{x}_k\}_{k=1}^{N_t}$ , around this initial estimate of the canonical shape; during optimization, for each frame in a minibatch, we sub-sample $N_{b} = 20\mathrm{k}$ points out of the available $N_{t}$ to minimize the following equation: + +$$ +\left[ \tilde {\boldsymbol {s}} _ {\mathrm {q}} \right], \left\{\left[ \tilde {\boldsymbol {p}} _ {\mathrm {q}} ^ {j} \right] \right\} _ {j = 1} ^ {L} = \underset {\left[ \boldsymbol {s} _ {\mathrm {q}} \right], \left\{\left[ \boldsymbol {p} _ {\mathrm {q}} ^ {j} \right] \right\} _ {j = 1} ^ {L}} {\arg \min } \sum_ {j = 1} ^ {L} \sum_ {\forall \boldsymbol {x} _ {k}} \mathcal {L} _ {\mathrm {r}} + \mathcal {L} _ {\mathrm {c}} + \mathcal {L} _ {\mathrm {t}} + \mathcal {L} _ {\mathrm {i c p}}. \tag {6} +$$ + +$\mathcal{L}_{\mathrm{c}}$ enforces shape and pose code regularization as in training, and $\mathcal{L}_{\mathrm{t}}$ enforces temporal regularization between the current frame $j$ and its neighboring frames (for more detail, we refer to the supplementary material). + +# 3.5.1 Structurally-Guided Shape & Pose Optimization + +In order to inform our reconstruction losses $\mathcal{L}_{\mathrm{r}}$ and $\mathcal{L}_{\mathrm{icp}}$ , we employ structural correspondences between parts predicted in the observed depth views as well as the part decomposition from our latent shape and pose spaces (see Fig. 3). + +We use a clamped $\ell_1$ [14] reconstruction loss $\mathcal{L}_{\mathrm{r}}$ : + +$$ +\mathcal {L} _ {\mathrm {r}} = \sum_ {q = 1} ^ {Q} M \mathcal {L} _ {\mathrm {s}} \left(f _ {\theta_ {\mathrm {s}} ^ {\mathrm {n}}} \left(\boldsymbol {s} _ {\mathrm {q}}, \boldsymbol {x} _ {k}\right), \left[ \boldsymbol {x} _ {k} + f _ {\theta_ {\mathrm {p}} ^ {\mathrm {n}}} \left(\boldsymbol {s} _ {\mathrm {q}}, \boldsymbol {p} _ {\mathrm {q}} ^ {j}, \boldsymbol {x} _ {k}\right) \right] _ {\mathrm {s d f}}\right), \tag {7} +$$ + +where $\left[\cdot\right]_{\mathrm{sdf}}$ denotes trilinear interpolation of the SDF grid and $M = M_{\mathrm{part}}^{\mathrm{q}}M_{\mathrm{o}}$ leverages part and occlusion information to inform the reconstruction. $M_{\mathrm{o}}$ denotes a mask of + +unoccluded regions, as defined in Sec. 3.5. $M_{\mathrm{part}}$ represents a grid of part label predictions, as given by the part decoder. We compute $M_{\mathrm{part}}$ by randomly sampling points in the canonical space along with their predicted part labels from $f_{\theta_{\mathrm{q}}}$ , warping these points to each frame by $f_{\theta_{\mathrm{p}}^{\mathrm{q}}}$ , and finally querying for every grid location the nearest point from the warped points to obtain the part label for the voxel. This enables focusing the reconstruction locally for each estimated part geometry and pose. + +Finally, we employ a part-guided ICP-inspired loss $\mathcal{L}_{\mathrm{icp}}$ which plays a key role in ensuring robustness to pose code initialization. That is, we establish part-driven correspondences between each estimated part $q$ from the predicted input depth map part labels and the part decoder predictions. To this end, every $I_{\mathrm{resample}}$ iterations we consider the canonically-posed shape from the current state of the shape codes, re-sample a new set of $N_{t} = 500\mathrm{k}$ points around the mesh and keep those within a distance $\epsilon_{\mathrm{icp}}$ from the implicitly represented surface. We use our part decoder (Sec. 3.2) to estimate part labels for these canonical points, and then warp them into a posed frame $j$ using our pose decoders. Then for every point in the input depth map, and given its predicted part $q$ (obtained by PointNet++, we find its nearest neighbor in the warped set of points belonging to $q$ based on $f_{\theta_{\mathrm{q}}}$ to establish correspondences. Crucially, this provides robust correspondences in challenging motion scenarios where pose initialization may be notably misaligned, as demonstrated in Sec. 4. + +# 4. Experiments + +We evaluate SPAMs on the task of model fitting to depth sequences (Sec. 4.1), and analyze the effect of our structured, part-based fitting in Sec. 4.2. + +Datasets. We train and evaluate on the public RenderPeople dataset [12], which contains real-world 3D scans of people in clothing, post-processed to be minimally noise-free 3D meshes (i.e., removing holes, self-intersection). We train on 338 identities, each rescaled to a common scale in the unit bounding box as a simple data pre-processing step. To learn the structured pose space, we collected a set of 2,446 3D human motion sequences covering a wide variety of action categories of daily activities and sports, and animated canonically-posed identities. From this set of posed, clothed people, we randomly sample scan-motion pairs and obtain 40K randomly posed instances, without requiring seeing multiple identities in the same pose. We evaluate our method on six unseen test identities performing various dancing moves, comprising to a total of 540 test frames organized in 90-frame sequences per identity. + +Evaluation metrics. To quantitatively evaluate model fitting to depth sequences, we measure reconstruction quality as well as tracking performance. To measure reconstruction quality, we follow the evaluation protocol of Occu + +
MethodIoU↑C-ℓ2↓NC↑EPE↓
IP-Net0.7290.000530.8370.168
NPMs*0.7550.001630.8560.053
Ours0.7850.000320.8830.034
+ +pancyNets [28], computing Intersection over Union, Chamfer distance, and normal consistency on a per-frame basis. Intersection over Union (IoU) measures overlap between predicted and ground truth meshes, computed over $10^{6}$ randomly sampled points in the unit bounding box. Chamfer- $\ell_{2}$ ( $C-\ell_{2}$ ) measures the bi-directional distance between the prediction and ground truth with 100k randomly sampled points on the surfaces, giving distance characterization to any potentially mismatched surface reconstruction. Normal Consistency (NC) measures surface quality as the mean absolute dot product of the normals of the predicted mesh with the normals of the corresponding nearest neighbors in the ground truth mesh. Tracking performance is evaluated as in prior non-rigid tracking works [5, 32] via the End-Point Error (EPE) as the average $\ell_{2}$ -distance between predicted and ground truth deformations. + +# 4.1. Model Fitting to Monocular Depth Sequences + +We evaluate our SPAMs model fitting to new monocular depth sequences in comparison with state of the art on sequences rendered from our Renderpeople [12]-constructed dataset, as well as on CAPE [26] (see supplemental). We compare with the state-of-the-art Neural Parametric Models (NPMs) [32] and IP-Net [3]. We train NPMs on our Renderpeople training split. Since NPMs require watertight meshes for training to determine inside/outside, and inside/outside queries on our train data tend to be unreliable in often-articulated regions such as hands, we adapt NPMs as $\mathrm{NPMs}^*$ which incorporates the Eikonal loss, SIREN activations, and FiLM conditioning of our approach. For IP-Net [3], we use a model checkpoint provided by the authors, which was also used to evaluate on RenderPeople. + +Table 1 shows a comparison with NPMs* and IP-Net on fitting to monocular depth sequences. Our structural, part-driven representation of shape and pose results in notably improved reconstruction and tracking performance. SPAM achieves higher IoU and normal consistency, as well as significantly reduced Chamfer distance and 3D End-Point-Error, indicating more globally consistent tracking and reconstruction leveraging part-based fitting. Qualitative comparisons are depicted in Figure 4. Under significant, complex motion in the input sequence, our SPAM maintains robust tracking and consistent geometry, while NPM* fails to capture more dramatic motions (e.g. in the arms). + +Table 1. Comparison with state-of-the-art NPMs* on the test set of our RenderPeople dataset. Our part-aware decomposition enables notably improved reconstruction and tracking. + +
MethodIoU ↑C-ℓ2 ↓NC ↑EPE ↓
NPMs* (w/o PE)0.2690.013970.6580.182
Ours (w/o PE, w/o PGM)0.6710.000700.8360.052
Ours (w/o PE)0.6810.000650.8390.052
Ours (w/o PGM)0.7660.000370.8740.037
Ours0.7850.000320.8830.034
Ours (w/ GT PS)0.8090.000210.8940.026
+ +Table 2. Ablation studies. We evaluate the effects of a learned pose encoder initialization (PE), using our part grid mask (PGM) in test-time fitting, and we additionally study the impact of ground truth part segmentation (GT PS) of input depth maps. Our part-driven shape and pose spaces provide significant robustness against lack of pose initializations, and leveraging part mask guidance for optimization additionally improves performance. + +# 4.2. Ablations + +Robustness to Pose Code Initialization. We observe that our part-aware disentanglement of shape and pose provides significant robustness in pose tracking, and in particular, maintains robustness in the absence of pose encoder initialization (which may not be available in scenarios such as generalizing to different sensor inputs). We demonstrate this in Table 2, comparing with a variant of our approach without pose encoder initialization (w/o PE) and instead using random initialization for pose codes. This results in very poor initial pose estimates, with an effectively random initial set of deformation fields. While this poor initialization results in slightly impaired performance, our structurally-guided SPAMs nonetheless can recover a significant portion of the reconstruction and tracking performance of using the pose encoder initialization. In contrast, we observe that the full-shape shape and pose encoding of NPMs* fails to recover from poor pose initializations. We refer to the supplementary material for further qualitative visualizations. + +Part-based Grid Masking. Table 2 additionally evaluates the effect of leveraging part information as a part grid mask (PGM) during test-time optimization; this local part focus enables more accurate reconstruction and tracking. + +Limitations. Our structured parametric modeling of deformable objects enables robust model fitting to challenging monocular depth sequences, but maintains several limitations. For instance, our local pose spaces do not characterize potential high-level motion priors given by motion very far from the local region (e.g., one hand moving back more often occurs with the other hand moving forward than not), which could provide additional global context. Additionally, very fine-scale sharp details can become oversmoothed across the global optimization, which could potentially be characterized with perceptually-oriented measures. + +![](images/b3b7ad44ac5a481f7205926e73674d07b6d98579af168861b16e32bd6553985d.jpg) +Figure 4. Comparison to the state-of-the-art NPMs* [32] and IPNet [3] on the task of model fitting to a monocular depth sequence. Our SPAMs show superior tracking performance, and better capability to capture high-frequency details (see jacket boundary on third column). + +# 5. Conclusion + +In this work we have introduced SPAMs, a deformable object representation where non-rigid object motion is structurally decomposed into part-based disentangled representations of shape and pose. Our structured characterization of object movement can be leveraged at test time to fit to input depth sequences of unseen shapes, leveraging part-based correspondences to establish robust optimization to fit to the input sequence. Our experiments show signifi + +cantly improved robustness in reconstruction and tracking, particularly in scenarios of challenging, complex motions in observed depth sequences. We believe that this representation will be useful in a variety of spatio-temporal tasks. + +Acknowledgments: This work was done during an internship at Meta. We thank Yuanlu Xu for informative discussions, as well as TUM's support from the Bavarian State Ministry of Science and the Arts, coordinated by the Bavarian Research Institute for Digital Transformation (bidt). + +# References + +[1] Thiemo Alldieck, Marcus Magnor, Bharat Lal Bhatnagar, Christian Theobalt, and Gerard Pons-Moll. Learning to reconstruct people in clothing from a single rgb camera. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1175-1186, 2019. 2 +[2] Dragomir Anguelov, Praveen Srinivasan, Daphne Koller, Sebastian Thrun, Jim Rodgers, and James Davis. Scape: shape completion and animation of people. In ACM SIGGRAPH, pages 408-416, 2005. 2 +[3] Bharat Lal Bhatnagar, Cristian Sminchisescu, Christian Theobalt, and Gerard Pons-Moll. Combining implicit function learning and parametric models for 3d human reconstruction. In European Conference on Computer Vision, 2020. 3, 7, 8 +[4] Bharat Lal Bhatnagar, Garvita Tiwari, Christian Theobalt, and Gerard Pons-Moll. Multi-garment net: Learning to dress 3d people from images. In IEEE/CVF International Conference on Computer Vision, pages 5420-5430, 2019. 2 +[5] Aljaž Božić, Pablo Palafox, Michael Zollhöfer, Justus Thies, Angela Dai, and Matthias Nießner. Neural deformation graphs for globally-consistent non-rigid reconstruction. IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021. 1, 7 +[6] Eric R Chan, Marco Monteiro, Petr Kellnhofer, Jiajun Wu, and Gordon Wetzstein. pi-gan: Periodic implicit generative adversarial networks for 3d-aware image synthesis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5799-5809, 2021. 4, 5 +[7] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5939-5948, 2019. 2 +[8] Julian Chibane, Thiemo Alldieck, and Gerard Pons-Moll. Implicit functions in feature space for 3d shape reconstruction and completion. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6970-6981, 2020. 2 +[9] Julian Chibane, Thiemo Alldieck, and Gerard Pons-Moll. Implicit functions in feature space for 3d shape reconstruction and completion. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 2 +[10] Julian Chibane, Aymen Mir, and Gerard Pons-Moll. Neural unsigned distance fields for implicit function learning. In Advances in Neural Information Processing Systems (NeurIPS), December 2020. 2 +[11] Enric Corona, Albert Pumarola, Guillem Alenya, Gerard Pons-Moll, and Francesc Moreno-Noguer. *Simplicit: Topology-aware generative model for clothed people*. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11875-11885, 2021. 2 +[12] RenderPeople Dataset. http://renderpeople.com/. 2,6,7 +[13] Boyang Deng, John P Lewis, Timothy Jeruzalski, Gerard Pons-Moll, Geoffrey Hinton, Mohammad Norouzi, and Andrea Tagliasacchi. Nasa neural articulated shape approximation. In ECCV, 2020. 2 +[14] Yueqi Duan, Haidong Zhu, He Wang, Li Yi, Ram Nevatia, and Leonidas J Guibas. Curriculum deepsdf. In European + +Conference on Computer Vision, pages 51-67. Springer, 2020. 6 +[15] Haoqiang Fan, Hao Su, and Leonidas J Guibas. A point set generation network for 3d object reconstruction from a single image. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 605-613, 2017. 2 +[16] Kyle Genova, Forrester Cole, Avneesh Sud, Aaron Sarna, and Thomas Funkhouser. Local deep implicit functions for 3d shape. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4857-4866, 2020. 2 +[17] Kyle Genova, Forrester Cole, Daniel Vlasic, Aaron Sarna, William T Freeman, and Thomas Funkhouser. Learning shape templates with structured implicit functions. In IEEE/CVF International Conference on Computer Vision, pages 7154-7164, 2019. 2 +[18] Amos Gropp, Lior Yariv, Niv Haim, Matan Atzmon, and Yaron Lipman. Implicit geometric regularization for learning shapes. arXiv preprint arXiv:2002.10099, 2020. 4 +[19] Timothy Jeruzalski, David IW Levin, Alec Jacobson, Paul Lalonde, Mohammad Norouzi, and Andrea Tagliasacchi. Nilbs: Neural inverse linear blend skinning. arXiv preprint arXiv:2004.05980, 2020. 2 +[20] Hanbyul Joo, Tomas Simon, and Yaser Sheikh. Total capture: A 3d deformation model for tracking faces, hands, and bodies. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8320-8329, 2018. 2 +[21] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 4 +[22] Tianye Li, Timo Bolkart, Michael J Black, Hao Li, and Javier Romero. Learning a model of facial shape and expression from 4d scans. ACM Transactions on Graphics, 36(6):194-1, 2017. 2 +[23] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J Black. Smpl: A skinned multi-person linear model. ACM Transactions on Graphics, 34(6):1-16, 2015. 2 +[24] William E Lorensen and Harvey E Cline. Marching cubes: A high resolution 3d surface construction algorithm. ACM siggraph computer graphics, 21(4):163-169, 1987. 4, 6 +[25] 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 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6469-6478, 2020. 2 +[26] 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 IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2020. 7 +[27] Qianli Ma, Jinlong Yang, Siyu Tang, and Michael J. Black. The power of points for modeling humans in clothing. In ICCV, 2021. 3 +[28] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3d reconstruction in function space. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4460-4470, 2019. 2, 7 + +[29] Mateusz Michalkiewicz, Jhony K Pontes, Dominic Jack, Mahsa Baktashmotlagh, and Anders Eriksson. Implicit surface representations as layers in neural networks. IEEE/CVF International Conference on Computer Vision, 2019. 2 +[30] Marko Mihajlovic, Yan Zhang, Michael J Black, and Siyu Tang. LEAP: Learning articulated occupancy of people. In Proceedings IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), June 2021. 2 +[31] Michael Niemeyer, Lars Mescheder, Michael Oechsle, and Andreas Geiger. Occupancy flow: 4d reconstruction by learning particle dynamics. In Proceedings of the IEEE International Conference on Computer Vision, pages 5379-5389, 2019. 2 +[32] Pablo Palafox, Aljaž Božić, Justus Thies, Matthias Nießner, and Angela Dai. Npms: Neural parametric models for 3d deformable shapes. IEEE/CVF International Conference on Computer Vision, 2021. 2, 5, 7, 8 +[33] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 165-174, 2019. 2, 4, 5 +[34] Pascal Paysan, Reinhard Knothe, Brian Amberg, Sami Romdhani, and Thomas Vetter. A 3d face model for pose and illumination invariant face recognition. In IEEE International Conference on Advanced Video and Signal based Surveillance, pages 296-301, 2009. 2 +[35] Gerard Pons-Moll, Sergi Pujades, Sonny Hu, and Michael J Black. Clothcap: Seamless 4d clothing capture and retargeting. ACM Transactions on Graphics, 36(4):1-15, 2017. 2 +[36] Gerard Pons-Moll, Javier Romero, Naureen Mahmood, and Michael J Black. Dyna: A model of dynamic human shape in motion. ACM Transactions on Graphics, 34(4):1-14, 2015. 2 +[37] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In CVPR, 2017. 2 +[38] 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. 2, 6 +[39] Eduard Ramon, Gil Triginer, Janna Escur, Albert Pumarola, Jaime Garcia, Xavier Giro-i Nieto, and Francesc Moreno-Noguer. H3d-net: Few-shot high-fidelity 3d head reconstruction. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 5620-5629, 2021. 2 +[40] Javier Romero, Dimitrios Tzionas, and Michael J. Black. Embodied hands: Modeling and capturing hands and bodies together. ACM Transactions on Graphics, 36(6), 2017. 2 +[41] Shunsuke Saito, Jinlong Yang, Qianli Ma, and Michael J. Black. SCANimate: Weakly supervised learning of skinned clothed avatar networks. In Proceedings IEEE/CVF Conf. on Computer Vision and Pattern Recognition (CVPR), June 2021. 2 +[42] Igor Santesteban, Miguel A Otaduy, and Dan Casas. Learning-based animation of clothing for virtual try-on. In Computer Graphics Forum, pages 355-366, 2019. 2 + +[43] Igor Santesteban, Nils Thuerey, Miguel A Otaduy, and Dan Casas. Self-supervised collision handling via generative 3d garment models for virtual try-on. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11763-11773, 2021. 2 +[44] Vincent Sitzmann, Julien Martel, Alexander Bergman, David Lindell, and Gordon Wetzstein. Implicit neural representations with periodic activation functions. Advances in Neural Information Processing Systems, 33, 2020. 4, 5 +[45] 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 European Conference on Computer Vision, 2020. 2 +[46] 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. 2 +[47] Tuanfeng Y Wang, Tianjia Shao, Kai Fu, and Niloy J Mitra. Learning an intrinsic garment space for interactive authoring of garment animation. ACM Transactions on Graphics (TOG), 38(6):1-12, 2019. 2 +[48] 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 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6184-6193, 2020. 2 +[49] Meng Zhang, Duygu Ceylan, Tuanfeng Wang, and Niloy J Mitra. Dynamic neural garments. arXiv preprint arXiv:2102.11811, 2021. 2 +[50] Silvia Zuffi and Michael J. Black. The stitched puppet: A graphical model of 3D human shape and pose. In IEEE Conf. on Computer Vision and Pattern Recognition (CVPR 2015), pages 3537-3546, June 2015. 2 +[51] Silvia Zuffi, Angjoo Kanazawa, David Jacobs, and Michael J. Black. 3D menagerie: Modeling the 3D shape and pose of animals. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2017. 2 \ No newline at end of file diff --git a/spamsstructuredimplicitparametricmodels/images.zip b/spamsstructuredimplicitparametricmodels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..becec2fbdd80bd1b2c1cf0e97616df2adb60dc7f --- /dev/null +++ b/spamsstructuredimplicitparametricmodels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec9ca49f74c56f24a290fe846c4f701c790c509f28e18721652309931860c04d +size 424790 diff --git a/spamsstructuredimplicitparametricmodels/layout.json b/spamsstructuredimplicitparametricmodels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0a938a64f631af4be4cd31bfd8cbbda33336889b --- /dev/null +++ b/spamsstructuredimplicitparametricmodels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24d4bafc6ef845cbf27c59564dde1d18451d549f162d9bea748949bf231b6047 +size 398614 diff --git a/ss3dsparselysupervised3dobjectdetectionfrompointcloud/934fec0d-11f4-43f0-a485-544e0d76a7d8_content_list.json b/ss3dsparselysupervised3dobjectdetectionfrompointcloud/934fec0d-11f4-43f0-a485-544e0d76a7d8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..90f1915d695db9c8fdc80259a078a3bdcdaa34c6 --- /dev/null +++ b/ss3dsparselysupervised3dobjectdetectionfrompointcloud/934fec0d-11f4-43f0-a485-544e0d76a7d8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df8a1a87a8a868ca5d4c401b9ca9aed42967a59f25b2e5a5b544a2affed1b99e +size 70686 diff --git a/ss3dsparselysupervised3dobjectdetectionfrompointcloud/934fec0d-11f4-43f0-a485-544e0d76a7d8_model.json b/ss3dsparselysupervised3dobjectdetectionfrompointcloud/934fec0d-11f4-43f0-a485-544e0d76a7d8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6d49b841bf4364d9b5e3f3016a5f7657991eb9ed --- /dev/null +++ b/ss3dsparselysupervised3dobjectdetectionfrompointcloud/934fec0d-11f4-43f0-a485-544e0d76a7d8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9514a30f686f5dd73585b294b32298d585150eb57e6c055ef4f94007f3cb8df +size 84025 diff --git a/ss3dsparselysupervised3dobjectdetectionfrompointcloud/934fec0d-11f4-43f0-a485-544e0d76a7d8_origin.pdf b/ss3dsparselysupervised3dobjectdetectionfrompointcloud/934fec0d-11f4-43f0-a485-544e0d76a7d8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..42815ff32db2cbb6b90ef324e7f1c97c616e23dd --- /dev/null +++ b/ss3dsparselysupervised3dobjectdetectionfrompointcloud/934fec0d-11f4-43f0-a485-544e0d76a7d8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7350d4c3cc56c0c4e008622d2d1044d57ed1476dae16ace2b9356bdd24c147bf +size 8233014 diff --git a/ss3dsparselysupervised3dobjectdetectionfrompointcloud/full.md b/ss3dsparselysupervised3dobjectdetectionfrompointcloud/full.md new file mode 100644 index 0000000000000000000000000000000000000000..78c5865d93ab28bbd8dc05d45d5cde4b5e2b8431 --- /dev/null +++ b/ss3dsparselysupervised3dobjectdetectionfrompointcloud/full.md @@ -0,0 +1,264 @@ +# SS3D: Spherely-Supervised 3D Object Detection from Point Cloud + +Chuandong Liu $^{1,2}$ Chenqiang Gao $^{1,2*}$ Fangcen Liu $^{1,2}$ Jiang Liu $^{3}$ Deyu Meng $^{4,5}$ Xinbo Gao $^{1}$ $^{1}$ School of Communication and Information Engineering, Chongqing University of Posts and Telecommunications, Chongqing, China + $^{2}$ Chongqing Key Laboratory of Signal and Information Processing, Chongqing, China + $^{3}$ Meta, Menlo Park, USA + $^{4}$ Xi'an Jiaotong University, Xi'an, China + +$^{5}$ Macau Institute of Systems Engineering, Macau University of Science and Technology, Taipa, Macau + +# Abstract + +Conventional deep learning based methods for 3D object detection require a large amount of 3D bounding box annotations for training, which is expensive to obtain in practice. Sparsely annotated object detection, which can largely reduce the annotations, is very challenging since the missing-annotated instances would be regarded as the background during training. In this paper, we propose a sparsely-supervised 3D object detection method, named SS3D. Aiming to eliminate the negative supervision caused by the missing annotations, we design a missing-annotated instance mining module with strict filtering strategies to mine positive instances. In the meantime, we design a reliable background mining module and a point cloud filling data augmentation strategy to generate the confident data for iteratively learning with reliable supervision. The proposed SS3D is a general framework that can be used to learn any modern 3D object detector. Extensive experiments on the KITTI dataset reveal that on different 3D detectors, the proposed SS3D framework with only $20\%$ annotations required can achieve on-par performance comparing to fully-supervised methods. Comparing with the state-of-the-art semi-supervised 3D objection detection on KITTI, our SS3D improves the benchmarks by significant margins under the same annotation workload. Moreover, our SS3D also outperforms the state-of-the-art weakly-supervised method by remarkable margins, highlighting its effectiveness. + +# 1. Introduction + +Three-dimensional (3D) object detection, aiming to localize and categorize objects from 3D sensor data (e.g., LiDAR point cloud), has attracted increasing attention due to its diversified applications in autonomous driving, + +![](images/5d8defc0477e0753d60cd9daaef5bc2ba3a89e82742d7828d64caa710f5b5b4a.jpg) +Figure 1. Demonstration of the required annotations of the fully-supervised method and our method. The left case shows the training stage of PV-RCNN [16] which is a high-performance detector with full annotations as input, while our model only annotates one instance for each scene. The right case shows the prediction results of PV-RCNN and our model, indicating that our model achieves comparable performance of the fully-supervised method. + +![](images/b1a3780ea243d61bb4409b84a36cec67af6d7fa2fb25a0b2f77bd29661e1729c.jpg) + +augmented/virtual reality, and indoor robotics. Recently, a number of approaches [1, 17, 18, 34, 35] based on either voxel-wise or point-wise features have been proposed and achieved high performance on large-scale benchmark datasets [2, 21]. However, most of the proposed 3D object detectors require fully supervised learning, implying a fully annotated dataset is required for the model learning. Compared to 2D image objects, annotating 3D point cloud objects is more labor-intensive: annotators have to switch viewpoints or zoom in and out throughout a 3D scene carefully for labeling each 3D object. Therefore, developing 3D detectors with on-par detection performance, while only requiring light-weighted object annotations, is a meaningful problem to tackle for practical applications. + +Recently, few works [10, 15, 24, 26, 33] have been proposed to address this issue. In [10], the weakly-supervised learning strategy was adopted. Specifically, the point annotation scheme was used to reduce the burden of annotating bounding boxes. However, the supervision information provided by the point annotation is weak, so that a certain amount of full annotations have to be provided additionally, in order to achieve optimal performance. In [24, 33], the semi-supervised learning strategy was used, where just part of the dataset was annotated with the rest unlabeled. The teacher-student framework was leveraged to transfer information from labeled data to unlabeled data. Nevertheless, the information transfer tends to be ineffective when the gap between labeled and unlabeled data is large. Besides, although just part of the dataset is annotated, it still takes non-negligible labour to label an individual scene, especially for crowded scenarios with many 3D objects, as shown as Fig. 1. + +In this paper, we adopt the sparse annotation strategy and just annotate one 3D object in a scene, as illustrated in the left of the Fig. 1. In this way, we are capable of obtaining full supervision information of one 3D object for each scene. Intuitively, this facilitates the learning of information on unlabeled objects, since infra-scene information transfer is much easier than cross-scene knowledge transfer. However, sparsely annotated object detection also raises new challenges: missing-annotated instances will bring incorrect supervision signals (i.e., as negative samples) to disturb the training of the network. During training, due to that the missing-annotated instances and the region near those instances could be incorrectly marked as background, the weight updated of the network will be misguided significantly when gradients back-propagated. This challenge has been tackled in 2D sparse object detection methods [11, 27] by utilizing overlap or hierarchical relation information among 2D objects. However, such information may be absent in 3D datasets e.g., in KITTI [2], which impedes directly applying such methods to 3D applications. + +To address the challenge, we propose a novel and effective method for sparsely annotated 3D object detection, namely SS3D, which can be applied to any advanced 3D detector. The main idea of our SS3D is to iteratively mine positive instances and background with high confidence, and further use these generated data to train the 3D detector. We design two effective modules, namely missing-annotated instance mining module and reliable background mining module, to mine reliable missing positive instances and background, respectively. This ensures the 3D detector to be trained with confident supervision data. By this design, compared with the 3D detector trained with the fully annotated dataset, our SS3D can achieve comparable performance, where only $20\%$ annotation is required for the sparsely annotated dataset. + +To summarize, our contributions are as follows: + +- We propose a novel method for sparsely annotated 3D object detection from point cloud which can be used as a general framework to train any existing 3D fully-supervised detector. To the best of our knowledge, this is the first work to explore the sparsely annotated strategy for the 3D object detection task. +- We design two effective modules to mine reliable missing positive instances and background, respectively, which ensures the 3D detector to be trained with confident supervision data. +- Experimental results show that our method with sparse annotations can achieve comparable performance with fully-supervised methods and highly outperforms state-of-the-art semi-supervised and weakly-supervised 3D object detection methods. + +# 2. Related Work + +# 2.1. Fully-Supervised 3D Object Detection + +The existing 3D detection methods can be broadly categorized into two types: voxel-based methods [4,5,28,34,35] and point-based methods [12,17,19,29,30,32]. + +For voxel-based methods, voxelization is a common measure for irregular point clouds to apply traditional 2D or 3D convolution. In voxelNet [36], voxel feature encoding layer was adopted for unified feature representation extraction from point cloud. SECOND [28] effectively extracted features from 3D voxels by modifying the sparse convolution algorithm [3, 7]. TANet [8] leveraged the stacked attention module to exploit the multi-level feature relation. Part-A² [18] proposed a two-stage network to explore the spatial relationship by grouping intra-object part features. SE-SSD [35] adopted a pair of teacher and student detectors to improve the performance without introducing extra computation in the inference. Voxel R-CNN [1] designed a voxel RoI pooling to directly aggregate spatial context from 3D voxel feature volumes. + +Point-based methods directly take the raw irregular points as input to extract local and global features [13, 14]. PointRCNN [17] fused extracted features and raw points from 3D proposals generated in a bottom-up manner for refinement. STD [30] proposed a novel spherical anchor to reduce the number of anchors and exploited the sparse to dense idea to improve the performance. 3DSSD [29] proposed a fusion sampling strategy based on feature distance for rich information preservation. PV-RCNN [16] utilized voxel-to-keypoint scene encoding and keypoint-to-grid feature aggregation to improve the performance. + +Although prior works have made significant progress and show impressive performance, such results deeply depend on the large-scale manual annotations, which are + +![](images/a4972efb4e00b10c5ba7861b33dc8378dde700010ab67edf29ec883954c9687b.jpg) +Figure 2. Our SS3D pipeline. The missing-annotated instance mining module searches the missing-annotated instances and stores them in the instance bank. The reliable background mining module leverages the instance bank to further obtain broken scenes with reliable background. Then the point cloud filling data augmentation strategy is used to generate confident data for iteratively learning the detector. + +time-consuming and labor-intensive. Our proposed method adopts the sparse annotation strategy which just annotates one object for each scene, while achieving comparable performance with these fully-supervised methods. Moreover, whether voxel-based or point-based detectors, our SS3D can be directly applied. + +# 2.2. Weakly/Semi-Supervised 3D Object Detection + +To reduce annotations of 3D objects, the weakly-supervised learning strategy is adopted in WS3D [24], which is achieved by a two-stage architecture based on the click-annotated scheme. WS3D [10] generated cylindrical object proposals by click-annotated scenes in stage-1 and refined the proposals to get cuboids using slight well-labeled instances in stage-2. However, the supervision information provided by the weakly-supervised point annotation is weak, so that a certain amount of full annotations have to be provided additionally. Meanwhile, based on VoteNet [12], SESS [33] firstly proposed a semi-supervised 3D object detection, which leveraged a mutual teacher-student [22] framework to enforce three kinds of consistency losses. Following SESS, 3DIoUMatch [24] was proposed to estimate 3D IoU as a localization metric and set a self-adjusted threshold to filter pseudo labels. + +Different from these methods, our proposed method makes precise supervision information of an object existing in each scene, which enables us to transfer reliable supervision information within a scene. Intuitively, this would be superior to transferring supervision information across scenes, especially for largely variable scenes. + +# 2.3. Sparsely-Supervised 2D Object Detection + +The sparsely annotated object detection is another way to reduce the dependence of networks on data annotation which only annotates a part of objects. Due to that a part of instances are missing annotated, weight updated of the network may be misguided significantly when gradients backpropagated. To address this issue, existing advanced meth + +ods employed re-weight or re-calibrates strategy on the loss of RoIs (regions of interest) to eliminate the effect of unlabeled instances. Soft sampling [27] utilized overlaps between RoIs and annotated instances to re-weight the loss. Background recalibration loss [31] based on focal loss [6] regarded the unlabeled instances as hard-negative samples and re-calibrates their losses, which is only applicable to single-stage detectors. Especially, part-aware sampling [11] ignored the classification loss for part categories by using human intuition for the hierarchical relation between labeled and unlabeled instances. Co-mining [25] proposed a co-generation module to convert the unlabeled instances as positive supervisions. + +Above sparsely annotated object detection methods are all for 2D image objects. Due to the modal difference between 2D images and 3D point cloud, these methods can not be applied to our 3D object detection task. For example, in KITTI [2], 3D objects are naturally separated, which means the overlaps among objects are zero and the hierarchical relation between objects does not exist. Comparing with the re-weight and re-calibrates methods, in this paper, we propose a novel method for sparsely annotated 3D object detection which leverages a missing-annotated instance mining module and a simple but effective background mining module to mine confident positive instances and backgrounds, which is key for training detectors with high performance. + +# 3. Method + +# 3.1. Overall Framework + +As a general framework, the proposed SS3D aims at facilitating the learning of a 3D detector to obtain the optimal detection performance when training from the scratch based on the sparsely annotated dataset. As shown in Fig. 2, the proposed SS3D is mainly composed of a missing-annotated instance mining module, a reliable background mining module, a point cloud filling data augmentation, + +![](images/0896ee1d80470870333734db66675ecd91d111f8faef76e029bf808634206b4e.jpg) +Figure 3. The illustration of our proposed missing-annotated instance mining module. The training data and corresponding augmented data are two different inputs for the detector. Then we leverage the score-based filtering to remove the augmented predictions of raw training data and predictions of augmented data with a low confidence score. Further, the IoU-guided suppression is proposed to filter out low-quality predictions. Lastly, we store the remained predictions as pseudo instances in the instance bank. + +and an instance bank. Given a 3D detector, initially, we train the detector from the scratch on the sparsely annotated dataset. Then, we use the detector to mine reliable missing-annotated instances from the point cloud in training data through the missing-annotated instance mining module with strict filtering strategies. We store the mined instances (orange color) and original annotated instances (red color) into the instance bank. Relying on the instance bank, we further use the detector to mine reliable background through the reliable background mining module. Based on the results of these two modules, we leverage the proposed point cloud filling data augmentation to construct a confident data set, which can be further used to retrain the detector. By this iteratively learning style, we can finally obtain a 3D detector with high performance. Details are introduced below. + +# 3.2. Architecture of Detector + +Our method is a general framework for training 3D object detectors with the sparsely annotated dataset, which can be directly applied to kinds of detectors. In this paper, we verify our SS3D with state-of-the-art 3D detectors of PointRCNN [17], Part-A2 [18], PV-RCNN [16], and Voxel-RCNN [1]. We take PV-RCNN as an example and briefly review this method. PV-RCNN is a high-performance and efficient two-stage point cloud detector that deeply integrates both the multi-scale 3D voxel Convolutional Neural Network (CNN) features and the PointNet++-based set abstraction features to a small set of keypoints by the novel voxel set abstraction module. + +# 3.3. Missing-Annotated Instance Mining Module + +As shown in Fig. 3, we design a missing-annotated instance mining module, which combines IoU-guided suppression and a score-based filtering scheme as a strengthening measure for mining the unlabeled positive instances + +as high-quality pseudo instances. Then, selected pseudo instances are stored in the instance bank to further guide the reliable background mining module. + +Score-based filtering As shown in Fig. 3, to start, the raw input point cloud $x$ goes through the top detector to generate the predictions $p_t$ . Then, we perform a set of global augmentation, which includes a random rotation, flipping, and scaling on $x$ to generate augmented point cloud $\hat{x}$ , in synchronizing with $p_t$ to produce augmented predictions $\hat{p_t}$ , and the bottom detector generates predictions $p_b$ based on $\hat{x}$ . Finally, we set a classification confidence threshold $\tau_{cls}$ to filter out predictions of $p_b$ and $\hat{p_t}$ that may contain a wrong category and then obtain the filtered predictions. + +IoU-guided suppression Note that only a score-based filtering strategy can not get reliable predictions. Inspired by FixMatch [20], we further propose an effective IoU-guided suppression strategy. After we get the filtered predictions, we calculate the IoU matrix between every pair of bounding boxes from $\hat{p_t}$ and $p_b$ , aiming to match the boxes of two predictions from the irregular point cloud. Then we filter out unmatched paired bounding boxes with IoUs less than threshold $\tau_{IoU}$ , thus further improving the quality of pseudo instances. + +Final-step instance bank processing Combining score-based filtering and IoU-guided suppression, we can avoid low-quality pseudo instances generation effectively and finally obtain a set of bounding boxes $\{b^{r}\}_{n = 1}^{N}$ , where $N$ and $r$ are the numbers of training scenes and bounding boxes remained in a scene, respectively. Then, we compute the IoU between boxes $b_{n}^{r}$ and $b_{n}^{\mathcal{B}}$ (bounding boxes from the instance bank $\mathcal{B}$ ) of the same scene of index $n$ , and choose $b_{n}^{r}$ which does not overlap with $b_{n}^{\mathcal{B}}$ . Finally, the chosen bounding boxes (orange color) along with corresponding predicted class labels and point cloud are stored in the instance bank which also contains all sparsely annotated in + +![](images/34d1e776c7622c6eef171c6878ccf789c625a2a0c463c462b73975b0828b12c2.jpg) +Figure 4. The illustration of our proposed reliable background mining module. To start, we feed the original point cloud to the detector without NMS to produce near-duplicate predictions, and leverage the instances stored in the instance bank to filter out unreliable object points. This will lead to broken scene which is further processed through the point cloud filling strategy. + +stances (red color). By this design, with the iteration of the network, our instance bank can store more and more positive instances to guide the reliable background mining module for mining more reliable background. + +# 3.4. Reliable Background Mining Module + +Relying on the updated instance bank, we leverage the proposed reliable background mining module to mine background points and further eliminate the negative supervision information due to missing-annotated instances. Compared to the existing re-scale strategy [11, 31] for incorrect supervision, our approach is more simple and effective. + +As shown in Fig. 4, to get reliable background point cloud, we adopt the strategy of finding potential foreground points as far as possible. Specifically, we use the detector with a low confidence score threshold $\tau_{l}$ to obtain object detection results. Meanwhile, we remove the Non-Maximum Suppression (NMS) operation from the detector. In this way, we make sure that the results contain potential foreground points as far as possible, which thus means that the rest of the original point cloud tend to be reliable background point cloud. For producing new training data, we remove the point data inside the 3D bounding boxes of the detected objects which do not overlap with the instances within the instance bank. + +# 3.5. Point Cloud Filling Data Augmentation + +After the reliable background selection processing, the point cloud scene is broken. Meanwhile, the instances in the scene may be very sparse. These issues will degrade the performance of the network significantly. Inspire by ground truth (GT) sampling augmentation proposed by [28], we further propose a point cloud filling data augmentation strategy to address these issues. For each remained bounding box, we randomly select a bounding box from the instance bank and place the corresponding point cloud inside the selected bounding box at the center of the remained bounding box, if the selected bounding box does not overlap with existing bounding boxes in the broken scene. Then we leverage the GT sampling augmentation [28] to further enhance the current scene. Finally, we obtain the merged point cloud + +Algorithm 1 Our SS3D Algorithm. +Input: Detector $F$ trained from the scratch on the sparsely annotated training data $D$ , instance bank $\mathcal{B}$ , low score threshold $\tau_{l}$ , iteratively learning times $M$ , training epoch $E$ ; +1: for $m = 1,2,\ldots,M$ do +2: for point cloud $x$ in $D$ do +3: Preform missing-annotated mining on $x$ ; +4: Update instance bank $\mathcal{B}$ ; +5: end for +6: for $e = 1,2,\ldots,E$ do +7: Shuffle the point cloud in training data $D$ ; +8: for mini-batch $D_{k}$ in $D$ do +9: for point cloud $x$ in $D_{k}$ do +10: $P = F(x,W)$ , with $\tau_{l}$ and no NMS; +11: boxgt = boxes from $\mathcal{B}_{x}$ ; +12: for boxi in $P$ do +13: if IoU( $box_{i},box_{gt}$ ) = 0 then +14: Delete points inside boxi in $x$ ; +15: end if +16: end for +17: Point cloud filling data augmentation on $x$ ; +18: end for +19: Calculate the loss $\mathcal{L}$ on $D_{k}$ ; +20: Update the weight $W$ of detector $F$ by $\mathcal{L}$ ; +21: end for +22: end for +23: end for +Output: Updated weight parameter $W$ + +with confident positive instances and reliable background. By this design, we can fix the density unevenness caused by deleting the points before, in the meantime, more ground truth boxes also reduce the negative impact on the network when only a small amount of instances are sparsely annotated in each scene. + +Through the previous processing, ambiguous points that may cause negative impact on the network are largely removed, including those missing-annotated instances and not + +
MethodDataCar - 3D DetectionCar - BEV DetectionCyclist - 3D DetectionCyclist - BEV Detection
EasyModHardEasyModHardEasyModHardEasyModHard
1. PointRCNN [17]Full88.8878.6377.3890.2187.8985.5186.1369.7065.4087.1673.4767.61
2. PointRCNN [17]Sparse (20%)63.7153.7451.8774.0369.7066.2373.8362.8158.2675.8665.4260.26
3. Ours (PointRCNN-based)Sparse (20%)87.1877.1076.1389.7487.4185.7186.6273.2266.9287.2174.2771.54
4. Improvements 2 → 1--25.17-24.89-25.51-16.18-18.19-19.28-12.30-6.89-7.14-11.30-8.05-8.90
5. Improvements 3 → 1--1.70-1.53-1.25-0.47-0.48+0.20+0.49+3.52+1.52+0.05+0.80+3.93
1. Part-A² [18]Full89.4779.4778.5490.4288.6187.3185.5069.9064.4886.9273.3570.77
2. Part-A² [18]Sparse (20%)72.9264.4160.4979.3875.3871.8174.5263.3958.9176.2366.2661.91
3. Ours (Part-A²-based)Sparse (20%)89.2683.1078.4190.0987.7387.2585.1571.7469.2187.1174.6071.81
4. Improvements 2 → 1--16.55-15.06-18.05-11.04-13.23-15.50-10.98-6.51-5.57-10.69-7.09-8.86
5. Improvements 3 → 1--0.21+3.63-0.13-0.33-0.88-0.06-0.35+1.84+4.73+0.19+1.25+1.04
1. PV-RCNN [16]Full89.3583.9078.7090.0887.9087.4086.0669.4764.5088.5273.3270.36
2. PV-RCNN [16]Sparse (20%)76.3866.6766.0982.2478.5072.8074.6561.4056.9477.1965.2060.09
3. Ours (PV-RCNN-based)Sparse (20%)89.4979.3078.2890.4587.9887.0088.0170.3567.4089.7272.3370.14
4. Improvements 2 → 1--12.97-17.23-12.61-7.84-9.40-14.60-11.41-8.07-7.56-11.33-8.12-10.27
5. Improvements 3 → 1-+0.14-4.60-0.42+0.37+0.08-0.40+1.95+0.88+2.90+1.20-0.99-0.22
1. Voxel-RCNN [1]Full89.4184.5278.9390.2188.2887.77------
2. Voxel-RCNN [1]Sparse (20%)65.7057.0557.5671.6770.0963.60------
3. Ours (Voxel-RCNN-based)Sparse (20%)89.3084.2878.2390.3288.4287.47------
4. Improvements 2 → 1--23.71-27.4721.37-18.54-18.19-24.17------
5. Improvements 3 → 1--0.11-0.24-0.70+0.11+0.14-0.30------
+ +Table 1. Comparison with different detectors trained with full annotations and extremely sparse split (20% instances of full annotations) on KITTI val split. The 3D object detection and bird's eye view detection are evaluated by mean average precision with 11 recall positions. + +mined by our missing-annotated instance mining module. Moreover, confident data is generated, which provides vital supervision information to retrain the detector in an iterative manner. Algorithm 1 summarizes our SS3D. + +# 4. Experiments + +# 4.1. Datasets and Evaluation Metrics + +Following the state-of-the-art methods [4, 8, 17, 18, 34, 35], we evaluate our SS3D on the KITTI 3D and BEV object detection benchmark [2]. This is a popular dataset widely used for performance evaluation and consists of full annotations for 3D object detection. There are 7,481 samples for training and 7,518 samples for test and we further divide the training samples into train split of 3,712 samples and val split of 3,769 samples as a common practice [16]. In addition, due to the occlusion and truncation levels of objects, the KITTI benchmark has three difficulty levels in the evaluation: easy, moderate, and hard. Following sparsely annotated dataset generation in [31], we randomly keep one annotated object in each 3D scene from train split to generate the extremely sparse split. Compared with the full annotation of all objects on KITTI, the extremely sparse split only need to be annotated with $20\%$ objects. For fair comparisons, we report the mAP with 40 and 11 recall positions, with a 3D overlap threshold of 0.7, 0.5, 0.5 for the three classes: car, pedestrian and cyclist, respectively. + +# 4.2. Implementation Details + +At first, we train our detector in a supervised manner following PCDet [23] with the extremely sparse split, and keep + +the same supervised loss as the used detector. At the training stage, we adopt the ADAM optimizer and cosine annealing learning rate [9] with a batch size of 8 for 6 epochs. We set the low score threshold $\tau_{l}$ as 0.01 in reliable background selection. For score-based filtering and IoU-guided suppression, we set both the confidence score threshold $\tau_{cls}$ and the IoU threshold $\tau_{IoU}$ as 0.9. Note that we set the times of iteratively learning $M = 10$ . In our global augmentation, we randomly flip each scene along X-axis and Y-axis with 0.5 probability, and then scale it with a uniformly sampled factor from [0.8, 1.2]. Finally, we rotate the point cloud around Z-axis with a random angle sampled from $\left[-\frac{\pi}{4}, \frac{\pi}{4}\right]$ . + +# 4.3. Comparisons with State-of-the-art Methods + +Comparison with fully-supervised methods We compare the proposed method with four state-of-the-art fully-supervised methods: PointRCNN [17], Part-A2 [18], PV-RCNN [16], Voxel-RCNN [1], with fully-annotated train split and the extremely sparse train split, respectively, where these detectors trained on the extremely sparse split are used as the initial detectors of our method. The results of different methods are shown in Tab. 1. + +It can be seen from the table, due to the negative impact of missing-annotated instances, the performance of the four detectors trained on extremely sparse split decrease by more than $10\%$ on average. Our method significantly improves the performance of these detectors and makes them close to the performance of full supervision, which indicates that our method has a good effect on mining missing-annotated instances and reliable background. + +The visualizations of our SS3D prediction results are il- + +
DataMethod (PV-RCNN-based)Car - 3D DetectionPedstrian - 3D DetectionCyclist - 3D Detection
EasyModHardEasyModHardEasyModHard
semi-1%3DIoUMatch [24]89.076.070.837.031.729.160.436.434.3
sparse-1%Ours SS3D96.288.186.961.758.754.585.662.858.4
semi-2%3DIoUMatch [24]-78.7--48.2--56.2-
sparse-2%Ours SS3D98.2889.288.367.562.361.090.172.268.3
+ +Table 2. Comparison with 3DIOUMatch on KITTI val split under $1\%$ or $2\%$ labeled data. Both our SS3D and 3DIOUMatch are based on PV-RCNN. We report the mAP with 40 recall positions, under IoU thresholds 0.5, 0.25, 0.25 for car, pedestrian, and cyclist, respectively. + +
DataMethodCar - 3D Detection
EasyModHard
weakly* + 534 precisely#WS3D [10]84.0475.1073.29
534 precisely#Ours (Voxel-RCNN-based)88.8578.5376.92
Ours (PointRCNN-based)85.5975.8573.93
Ours (Part-A2-based)88.6778.1776.86
Ours (PV-RCNN-based)88.2978.0776.77
+ +Table 3. Comparison with WS3D on KITTI val split. We report the mAP with 11 recall positions. \* denotes the scenes with center-click and $\#$ denotes precisely-annotated instance. + +lustrated in Fig. 5. For a better view of results, we project the prediction of 3D point cloud onto the corresponding color images. As we can see from this figure, the proposed method has high-quality prediction results. + +Comparison with the semi-supervised method We compare the proposed method with the semi-supervised method 3D IoUMatch [24], which is based on the advanced detector PV-RCNN [16]. To make a fair comparison, we also adopt the PV-RCNN as the detector and keep all methods with the same number of annotated objects for training. In KITTI train split, there are 3,712 scenes and these scenes contain a total of 17,289 objects for cars, pedestrians, and cyclists. For semi-supervised methods, $1\%$ labeled data means 37 $(3712\times 1\%)$ scenes, which include an average of 172 $(17289\times 1\%)$ labeled objects used for training. So as for $1\%$ labeled data in our extremely sparse split, we randomly select 172 scenes including 172 labeled objects for training. We also test the case of $2\%$ labeled training data for both methods. The results with different ratios of labeled data can be seen from Tab. 2, which illustrates that our SS3D significantly outperforms the current state-of-the-art, 3D IoUMatch, under three classes with all three difficulty levels. Compared with 3D IoUMatch, the greater advantage of our network is that only 172 scenes are used during training. We abandon the remaining scenes, while 3D IoUMatch uses all 3712 scenes in the train split for information transfer. + +Comparison with the weakly-supervised method In the weakly-supervised method, WS3D [10], 500 scenes with center-click labels and 534 precisely-annotated instances are used to train the network. Since the standard detectors are not applicable with center-click labels, we only use the same 534 precisely-annotated instances to train our + +![](images/163c242ee6ee2f83f6aa49a761fa1e17dc3773a34be178c71e49e7e03e4ed06e.jpg) + +![](images/4bb6826995c46c2d55fa4df0e9c7e08e7ba44c86c313625e7e917793a5ea2cb1.jpg) + +![](images/4c8a674de9d5dd043208c152cb4f580d5582a1ff05f41659f209cf58d82f843d.jpg) +Figure 5. Qualitative results of our SS3D (PV-RCNN-based) on KITTI val dataset. The ground truth 3D bounding boxes of cars, cyclists, and pedestrians are drawn in green, yellow, and cyan, respectively. We set the predicted bounding boxes in red and project boxes in point cloud back onto the color images for visualization. + +![](images/4e0a73f74e138dbbb1b5f53623ec5aef2986ee1c06a5bbc7c8c8aa86a6e785f3.jpg) + +proposed SS3D. Tab. 3 shows the comparison results. Obviously, our SS3D with different 3D detectors achieves the highest results for all difficulty levels, outperforming WS3D by a large margin with less labeled efforts. + +# 4.4. Ablation Study + +In this section, we present a series of ablation studies to analyze the effects of our proposed modules in SS3D. Following the general principles, all models are trained on KITTI extremely sparse split and evaluated on val split. We take Voxel-RCNN [1] as our detector to conduct our ablation study due to the fast training speed, and our methods with other detectors are similar. Tab. 4 summarizes the ablation results on our IoU-guided suppression (IoU-GS), score-based filtering (Score-BF), reliable background mining module (RBMM), and point cloud filling data augmentation (PCFD) strategy. All results are with 11 recall points. + +Effect of the reliable background mining module In the $1^{st}$ row of Tab. 4, we remove all modules, so it represents the standard Voxel-RCNN detector trained on the extremely sparse split. In the $2^{nd}$ , we add the RBMM and replace PCFD with the GT sampling [28]. Moreover, the instance bank only contains sparsely annotated instances without updating. Our reliable background mining module + +
IoU-GSScore-BFRBMMPCFDCar-3D Detection
EasyModHard
----65.7057.0557.56
--✓-86.8378.0375.32
--✓✓87.4278.1275.72
-✓✓✓88.5782.7876.12
✓-✓✓88.2783.9577.68
✓✓✓✓89.3084.2878.23
+ +Table 4. Effects of the different components on our designed SS3D network. We report the mAP with 11 recall positions. + +significantly boosts the performance in all three difficulty levels. This large improvement shows that mining reliable background can contribute to a better negative supervision removal caused by the missing-annotated instances. + +Effect of the point cloud filling data augmentation strategy In the $3^{rd}$ row of Tab. 4, by combining RBMM and PCFD, our SS3D further improves the performance. This demonstrates our PCFD outperforms GT sampling data augmentation by fixing the structure information of the raw point cloud due to the previous points removal operation. + +Effect of the missing-annotated instance mining module As shown in the $4^{th}$ and $5^{th}$ rows from Tab. 4, whether to use IoU-GS or Score-BF alone for pseudo instances filtering, it has a certain improvement compared with only using the reliable background mining module, indicating that more positive instances can contribute to a better model optimization. Further, by combining IoU-GS with Score-BF to obtain high-quality pseudo instances, our SS3D boosts the performance of the easy, moderate, and hard by about 1.88, 6.16, and 2.51 percentage points, respectively, as shown in the $3^{rd}$ and $6^{th}$ rows. This verifies the effectiveness of the jointly filtering strategy and also shows the importance of high-quality pseudo instances for the network. + +# 4.5. Quality Analysis + +In this section, we explore how our SS3D trains on the extremely sparse split and further analyze the quality of pseudo instances in the instance bank. The curves in Fig. 6 show that the coverage rate of the generated pseudo instances increases on the missing-annotated instances during the training process. Here coverage rate at a preset threshold means the percentage of missing-annotated instances that can pair a pseudo label with an IoU larger than the threshold [24]. As we can see from Fig. 6, in the beginning, the coverage rate of the pseudo instances is relatively low due to the strict filtering mechanism. As the training goes on, the improved detector leads to a higher passing rate of filter and hence a higher coverage of the pseudo instances, which in return fuels SS3D. At the end of training, the coverage rate at IoU@0.7 can achieve 0.75, which means our network effectively mines $75\%$ of unlabeled instances. + +![](images/02483e3710e874dfb768518aceaba6bbc2eda63d26e56f6c817a68587353f01b.jpg) +Figure 6. Pseudo instances coverage rate during the training process on extremely sparse split on KITTI. + +# 4.6. Limitation + +In principle, the performance of the fully-supervised method is the ceiling of our SS3D. However, in Tab. 1, our method even surpasses the fully-supervised methods in some cases, which may be due to that our method can mine some missing-annotated instances in the original dataset, and these missing instances may cause a negative impact on the training of the fully-supervised methods. For future work, we plan to validate the above hypotheses. + +# 5. Conclusion + +In this paper, we propose a novel method, called SS3D, to iteratively learn a 3D object detector from the sparsely annotated point cloud. Through the combination of our missing-annotated instance mining module and reliable background mining module, we largely ensure that each scene possesses confident supervision information when iteratively training the detector, hence eliminating the negative impact of missing-annotated instances of the sparsely annotated strategy. In addition, our SS3D is a general method that can be applied to learn any advanced detector. Extensive experiments validate the effectiveness of our proposed method with only $20\%$ annotations, where our network achieves impressive results, which are close to the detector trained with the fully annotated dataset. Besides, our method exceeds the current semi-supervised and weakly-supervised methods on KITTI by a large margin. + +Acknowledgments This work was supported in part by the National Key R&D Program of China (2020YFA0713900), in part by the National Natural Science Foundation of China under Grant 62176035, 61906025, 61721002, U1811461 and 62036007, in part by the Science and Technology Research Program of Chongqing Municipal Education Commission under Grant KJZD-K202100606, in part by the Macao Science and Technology Development Fund under Grant 061/2020/A. + +# References + +[1] 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, volume 35, pages 1201-1209, 2021. 1, 2, 4, 6, 7 +[2] Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets robotics: The kitti dataset. Int. J. Rob. Res., 32(11):1231-1237, 2013. 1, 2, 3, 6 +[3] Benjamin Graham, Martin Engelcke, and Laurens Van Der Maaten. 3d semantic segmentation with submanifold sparse convolutional networks. In CVPR, pages 9224-9232, 2018. 2 +[4] Chenhang He, Hui Zeng, Jianqiang Huang, Xian-Sheng Hua, and Lei Zhang. Structure aware single-stage 3d object detection from point cloud. In CVPR, pages 11873-11882, 2020. 2, 6 +[5] 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, pages 12697-12705, 2019. 2 +[6] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. In ICCV, pages 2980-2988, 2017. 3 +[7] Baoyuan Liu, Min Wang, Hassan Foroosh, Marshall Tappen, and Marianna Pensky. Sparse convolutional neural networks. In CVPR, pages 806-814, 2015. 2 +[8] Zhe Liu, Xin Zhao, Tengteng Huang, Ruolan Hu, Yu Zhou, and Xiang Bai. Tanet: Robust 3d object detection from point clouds with triple attention. In AAAI, volume 34, pages 11677-11684, 2020. 2, 6 +[9] Ilya Loshchilov and Frank Hutter. SGDR: stochastic gradient descent with warm restarts. In *ICLR*, 2017. 6 +[10] Qinghao Meng, Wenguan Wang, Tianfei Zhou, Jianbing Shen, Luc Van Gool, and Dengxin Dai. Weakly supervised 3d object detection from lidar point cloud. In ECCV, pages 515-531, 2020. 2, 3, 7 +[11] Yusuke Niitani, Takuya Akiba, Tommi Kerola, Toru Ogawa, Shotaro Sano, and Shuju Suzuki. Sampling techniques for large-scale object detection from sparsely annotated objects. In CVPR, pages 6510-6518, 2019. 2, 3, 5 +[12] Charles R Qi, Or Litany, Kaiming He, and Leonidas J Guibas. Deep hough voting for 3d object detection in point clouds. In ICCV, pages 9277-9286, 2019. 2, 3 +[13] 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 +[14] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J. Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In NeurIPS, pages 5099-5108, 2017. 2 +[15] Zengyi Qin, Jinglu Wang, and Yan Lu. Weakly supervised 3d object detection from point clouds. In ACM MM, pages 4144-4152, 2020. 2 +[16] 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, pages 10529–10538, 2020. 1, 2, 4, 6, 7 + +[17] Shaoshuai Shi, Xiaogang Wang, and Hongsheng Li. Pointr-cnn: 3d object proposal generation and detection from point cloud. In CVPR, pages 770-779, 2019. 1, 2, 4, 6 +[18] 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. IEEE TPAMI, 43(8):2647-2664, 2021. 1, 2, 4, 6 +[19] Weijing Shi and Raj Rajkumar. Point-gnn: Graph neural network for 3d object detection in a point cloud. In CVPR, pages 1711-1719, 2020. 2 +[20] 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. NeurIPS, 33:596-608, 2020. 4 +[21] 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 CVPR, pages 2446-2454, 2020. 1 +[22] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In NeurIPS, pages 1195–1204, 2017. 3 +[23] OpenPCDet Development Team. Openpcdet: An opensource toolbox for 3d object detection from point clouds. https://github.com/open-mmlab/OpenPCDet, 2020.6 +[24] He Wang, Yezhen Cong, Or Litany, Yue Gao, and Leonidas J Guibas. 3dioumatch: Leveraging iou prediction for semi-supervised 3d object detection. In CVPR, pages 14615-14624, 2021. 2, 3, 7, 8 +[25] Tiancai Wang, Tong Yang, Jiale Cao, and Xiangyu Zhang. Co-mining: Self-supervised learning for sparsely annotated object detection. In AAAI, volume 35, pages 2800-2808, 2021. 3 +[26] Yi Wei, Shang Su, Jiwen Lu, and Jie Zhou. Fgr: Frustum-aware geometric reasoning for weakly supervised 3d vehicle detection. In ICRA, pages 4348-4354, 2021. 2 +[27] Zhe Wu, Navaneeth Bodla, Bharat Singh, Mahyar Najibi, Rama Chellappa, and Larry S. Davis. Soft sampling for robust object detection. In BMVC, page 225, 2019. 2, 3 +[28] Yan Yan, Yuxing Mao, and Bo Li. Second: Sparsely embedded convolutional detection. Sensors, 18(10):3337, 2018. 2, 5, 7 +[29] Zetong Yang, Yanan Sun, Shu Liu, and Jiaya Jia. 3dssd: Point-based 3d single stage object detector. In CVPR, pages 11040-11048, 2020. 2 +[30] Zetong Yang, Yanan Sun, Shu Liu, Xiaoyong Shen, and Jiaya Jia. Std: Sparse-to-dense 3d object detector for point cloud. In ICCV, pages 1951-1960, 2019. 2 +[31] Han Zhang, Fangyi Chen, Zhiqiang Shen, Qiqi Hao, Chenchen Zhu, and Marios Savvides. Solving missing-annotation object detection with background recalibration loss. In ICASSP, pages 1888–1892, 2020. 3, 5, 6 +[32] Yanan Zhang, Di Huang, and Yunhong Wang. Pc-rgnn: Point cloud completion and graph neural network for 3d object detection. In AAAI, volume 35, pages 3430-3437, 2021. 2 + +[33] Na Zhao, Tat-Seng Chua, and Gim Hee Lee. Sess: Self-ensembling semi-supervised 3d object detection. In CVPR, pages 11079–11087, 2020. 2, 3 +[34] Wu Zheng, Weiliang Tang, Sijin Chen, Li Jiang, and Chi-Wing Fu. Cia-ssd: Confident iou-aware single-stage object detector from point cloud. In AAAI, volume 35, pages 3555–3562, 2021. 1, 2, 6 +[35] Wu Zheng, Weiliang Tang, Li Jiang, and Chi-Wing Fu. Sessd: Self-ensembling single-stage object detector from point cloud. In CVPR, pages 14494–14503, 2021. 1, 2, 6 +[36] Yin Zhou and Oncel Tuzel. Voxelnet: End-to-end learning for point cloud based 3d object detection. In CVPR, pages 4490-4499, 2018. 2 \ No newline at end of file diff --git a/ss3dsparselysupervised3dobjectdetectionfrompointcloud/images.zip b/ss3dsparselysupervised3dobjectdetectionfrompointcloud/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..669ff48ada8f97f594b294695c735e6cbe9a147d --- /dev/null +++ b/ss3dsparselysupervised3dobjectdetectionfrompointcloud/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8202d5527e0d0f8700dd80901062b46808267d98d7870ad8454ddf7a45844f46 +size 493012 diff --git a/ss3dsparselysupervised3dobjectdetectionfrompointcloud/layout.json b/ss3dsparselysupervised3dobjectdetectionfrompointcloud/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..08dc91f931c0114553b08dcd2dcfd83f380c7747 --- /dev/null +++ b/ss3dsparselysupervised3dobjectdetectionfrompointcloud/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3eccb2b9faf326d8cc1b75d82d7d3efcb8b1bb8c82d20c743b0acd930c807b8 +size 330641 diff --git a/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/c9c33908-676d-4913-8bdc-5248b9e1ccaf_content_list.json b/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/c9c33908-676d-4913-8bdc-5248b9e1ccaf_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..334b7abc389fd8a19cb89fdfa79433ef300d38f3 --- /dev/null +++ b/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/c9c33908-676d-4913-8bdc-5248b9e1ccaf_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:438a3fa782502d25ba84b47359cbc81b8f7b6e42d3f32acd2127c6987e9f4c51 +size 79687 diff --git a/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/c9c33908-676d-4913-8bdc-5248b9e1ccaf_model.json b/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/c9c33908-676d-4913-8bdc-5248b9e1ccaf_model.json new file mode 100644 index 0000000000000000000000000000000000000000..808d2bebe0747bc42236efb8a7684a8629ca0edd --- /dev/null +++ b/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/c9c33908-676d-4913-8bdc-5248b9e1ccaf_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c63d3ced4f5e84c74024be45ad4af33d54beceff9840fb48698ee3286bd59a33 +size 99783 diff --git a/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/c9c33908-676d-4913-8bdc-5248b9e1ccaf_origin.pdf b/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/c9c33908-676d-4913-8bdc-5248b9e1ccaf_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6225f25f3478520118866fca3230c7a184bde9a1 --- /dev/null +++ b/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/c9c33908-676d-4913-8bdc-5248b9e1ccaf_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d099b60514cd1f603c0cad70be1e845b5f4100b4a04713f0df22504b21d574ec +size 7159150 diff --git a/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/full.md b/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/full.md new file mode 100644 index 0000000000000000000000000000000000000000..83fc99e7f925dfec57bddec04c940b282c300b11 --- /dev/null +++ b/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/full.md @@ -0,0 +1,347 @@ +# STCrowd: A Multimodal Dataset for Pedestrian Perception in Crowded Scenes + +Peishan Cong $^{1}$ , Xinge Zhu $^{2}$ , Feng Qiao $^{3}$ , Yiming Ren $^{1}$ , Xidong Peng $^{1}$ , Yuenan Hou $^{4}$ , Lan Xu $^{1,7}$ , Ruigang Yang $^{5}$ , Dinesh Manocha $^{6}$ , Yuexin Ma $^{1,7\dagger}$ + +1ShanghaiTech University 2The Chinese University of Hong Kong + +$^{3}$ RWTH Aachen University $^{4}$ Shanghai AI Laboratory + +$^{5}$ University of Kentucky $^{6}$ University of Maryland at College Park + +$^{7}$ Shanghai Engineering Research Center of Intelligent Vision and Imaging + +1{congpsh, renyml, pengxd, mayuexin}@shanghaiitech.edu.cn + +# Abstract + +Accurately detecting and tracking pedestrians in 3D space is challenging due to large variations in rotations, poses and scales. The situation becomes even worse for dense crowds with severe occlusions. However, existing benchmarks either only provide 2D annotations, or have limited 3D annotations with low-density pedestrian distribution, making it difficult to build a reliable pedestrian perception system especially in crowded scenes. To better evaluate pedestrian perception algorithms in crowded scenarios, we introduce a large-scale multimodal dataset, STCrowd. Specifically, in STCrowd, there are a total of $219\ K$ pedestrian instances and 20 persons per frame on average, with various levels of occlusion. We provide synchronized LiDAR point clouds and camera images as well as their corresponding 3D labels and joint IDs. STCrowd can be used for various tasks, including LiDAR-only, image-only, and sensor-fusion based pedestrian detection and tracking. We provide baselines for most of the tasks. In addition, considering the property of sparse global distribution and density-varying local distribution of pedestrians, we further propose a novel method, Density-aware Hierarchical heatmap Aggregation (DHA), to enhance pedestrian perception in crowded scenes. Extensive experiments show that our new method achieves state-of-the-art performance for pedestrian detection on various datasets. https://github.com/4DVLab/STCrowd.git + +# 1. Introduction + +Accurate pedestrian perception in 3D space plays a crucial role in thorough scene understanding. Many applications also benefit from reliable and accurate pedestrian + +![](images/590951669a37b589ac953bbb8909be713340f0b5fc163853626fa4a67585d3b0.jpg) +(a) Image annotation + +![](images/8a62e8ed662976fb64bdb078572349a5662eed01f3ab410befa4cfffca7143b6.jpg) +(b) LiDAR annotation + +![](images/13a54a09bf80af3a72371856799c292d4b999b91323d1f32ddd1f6494687cf94.jpg) +(c) LiDAR projection on image +Figure 1. STCrowd provides 2D/3D image annotations, 3D point cloud annotations, and joint annotations for consecutive frames. Note that STCrowd contains a large quantity of crowded scenes with severe occlusions, which pose great challenges to pedestrian detection and tracking. + +![](images/a1798c18bd272542ea10932a523c221676579cfcc31c75d45606d2f08751a663.jpg) +(d) LiDAR tracking + +perception [2, 4, 61], including surveillance, serving robots, autonomous driving, etc. However, pedestrian perception is intractable for three reasons. First, pedestrians are not rigid bodies and they can have various poses. Second, humans are relatively small for sensors to capture compared with other agents, such as vehicles. For instance, in LiDAR point clouds, pedestrians in the distance are usually represented as a few sparse points. Third, people tend to congregate when walking, which makes the detection of each individual person harder. Occlusion in crowded scenarios is a thorny problem for pedestrian perception. + +Many datasets [4,9,14,16,19,23,32,36,39,53,54] have been collected to accelerate the research on the pedestrian perception field. Previous pedestrian perception datasets can be classified into two groups: image-based pedestrian datasets and multimodal traffic datasets. The former [5-7, 9, 14, 16, 23, 32, 36, 52-54] focus on pedestrian detection and tracking on 2D images and merely provide + +2D bounding box annotations, which is insufficient for deep models to infer accurate 3D positions of the pedestrians. The urgent demand for precise pedestrian perception in 3D space has given rise to a suit of 3D annotated datasets [4,8,19,24,33,39,58]. However, these datasets all focus on the traffic scenes, where most objects on the roads are vehicles and pedestrians are distributed sparsely, which limits the exploration and evaluation of learning-based perception methods, especially for crowded scenes. + +Specifically targeting 3D pedestrian perception in challenging crowded scenarios, we introduce a large-scale multimodal dataset, STCrowd, with manually labeled 3D annotations for both images and point clouds. There are a total number of $219\mathrm{K}$ pedestrian instances in STCrowd with 20 persons per frame on average and more than 30 persons per frame in extremely crowded scenes. Specifically, there are 8 pedestrians in 5 meters on average centered on each person, which is much denser than contemporary 3D detection benchmarks, e.g., nuScenes [4] and KITTI [19]. Due to the lack of crowded 3D pedestrian datasets, perception algorithms always suffer from severe occlusions when dealing with crowded scenarios. STCrowd is very useful for exploring more effective methods and testing their robustness. In addition, we capture the data in 9 different scenes, covering different weather, light conditions and road conditions. With rich annotations, STCrowd is applicable for different tasks, including LiDAR-only, image-only, and sensor-fusion based detection, tracking and even trajectory prediction. We also provide baselines for most of the tasks in this paper to facilitate further research. + +For LiDAR-captured outdoor scenes, pedestrians typically account for a small portion of the whole scene. For crowded scenarios, pedestrians gather together, which causes different degrees of occlusion and makes it difficult to distinguish each individual pedestrian accurately in the crowd. Considering the sparse global distribution and density-varying local distribution of the pedestrians, we propose a novel method, Density-aware Hierarchical heatmap Aggregation (DHA), to enhance pedestrian perception especially in crowded scenes. Specifically, DHA is comprised of the spatial attention module and the hierarchical heatmap aggregation module. The former makes the network focus on the pertinent foreground regions and the latter helps distinguish individuals in density-varying scenes via multi-level heatmaps. We evaluate our method on STCrowd and achieve state-of-the-art performance. The extension of the proposed DHA to tracking problem and ablation studies on various backbones also demonstrate its effectiveness and good generalization capability. Our contribution is summarized as below: + +1) We propose a large-scale multimodal pedestrian-oriented dataset in crowded scenarios with 3D manual annotations. High-density distributions of pedestrians result in severe oc + +clusion, which bring challenges for accurate perception. + +2) Our dataset can be used for various tasks, including LiDAR-only, image-only, and sensor-fusion based pedestrian detection and tracking. We provide baselines and metrics for most of the tasks to facilitate further research. +3) We propose a novel method to enhance LiDAR-based pedestrian perception in crowded scenes and achieve state-of-the-art performance on the STCrowd benchmark. + +# 2. Related Work + +Image-based Datasets Many datasets have been proposed over the last decade for pedestrian detection. Early datasets, like INRIA [15], ETH [18], TUD-Brussels [44], and Daimler [17] are too small for the training and generalization of deep learning-based methods. Caltech [16] is a widely-used pedestrian dataset with plenty of annotations. After that, more and more datasets were proposed for boosting data-driven human detection techniques, including KAIST [23], CityPersons [53], WiderPerson [54], NightOwls [32], etc. Especially, CrowdHuman [36] and DensePeds [5] provide many crowded scenes. In addition, there are also some datasets with traffic scenes containing pedestrians, such as CamVid [3], Vistas [31] Cityscapes [14], $D^2$ -City [9], BDD100k [52], METEOR [7], etc. Note that all of them annotate pedestrians with 2D annotations, which is not applicable for real-world 3D perception. + +Multimodal Datasets With the rapid development of autonomous driving, there is a growing demand for large-scale datasets with 3D annotations. Apolloscape Detection/Tracking [30] is a challenging urban traffic scenes dataset. It only has 3D annotations for the LiDAR point cloud. Because almost all the autonomous vehicles have both cameras and LiDAR sensors for perception, there are many multimodal datasets containing synchronized images and LiDAR point cloud, such as KITTI [19], nuScenes [4], Waymo Open [39], H3D [33], A2D2 [20], KAIST [13], A*3D [58], Argoverse [8], Lyft L5 [24], etc. However, they all focus on the driving scenes, where vehicles account for most of the scene, and pedestrians are distributed sparsely. In fact, pedestrians have free rotations and diverse poses, and they are much smaller than vehicles, which dramatically increases the difficulty in the detection and tracking. Furthermore, high-density crowd scenes are much more challenging due to the existence of severe occlusion. Our dataset provides diverse scenes with various densities and distributions of pedestrians, which is significant for testing perception methods' generalization. + +3D Detection and Tracking LiDAR-only-based 3D detection methods aim to classify and locate the 3D bounding boxes in the given point cloud. Most of them [10,34,35,38, 41,47,56,57,59,60] first project the point cloud into a 3D or 2D representation, such as voxel and pillar. After that, the standard 2D convolution and 3D convolution are uti + +![](images/b01b278a1e20735474e5c5b696f16deff5a8bc927b1a60f508590b17f3a905e2.jpg) +Figure 2. Scene examples of STCrowd with different backgrounds and weather, including clear weather (the first row), cloudy and rainy conditions (the second row). Note that the last figure shows the poor captured LiDAR point cloud due to the rainy conditions. + +![](images/eb373b48127ef5e49b5475f46592d6d201902b0c4bc02a10cc1c9a679a723703.jpg) + +![](images/d149062453421ea895bf8250b19b92eaaae4031c5d5996aea280992c015b31a3.jpg) + +![](images/888dbdab4ef5f450596147b7f4d21ee5772993147420383b62388e7d3e9f4222.jpg) + +![](images/862234905b593550af1ed81b524895e34e1437c61f5b10a39ed4371c69f7847a.jpg) + +![](images/301f18d6245a709a884c5760801244007d32b5bf926d3ee9acffe0e84047e9c4.jpg) + +lized to process these structured representations. Another group of existing methods [37, 48, 49] aims to process the point cloud in the raw data, which better preserves the 3D geometric information but has a high computational cost for the large-scale point clouds. Because of the complementary roles of point clouds and images, the LiDAR and camera fusion methods have gained much attention in recent years. PointPainting [41] makes the sensor fusion in the point level with a hard-association. PointAugmenting [42] performs the point-wise fusion in the feature level. Furthermore, MV3D [11] and AVOD [26] perform fusion at the region proposal level. Similarly, [28, 29, 46, 51] project the point cloud onto the bird's eye view (BEV) and then fuse the image features in the BEV level. For the 3D tracking [22], existing methodologies for 2D tracking can be easily adapted to 3D space [2, 45]. A common pipeline is to combine the 3D detectors and 3D Kalman filters to perform 3D tracking [12, 43]. However, most of them often struggle with the challenging crowded scenes with severe occlusions. Using spatial attention and hierarchical heatmaps, our method can focus on pedestrians in large-scale scenes and distinguish individuals well for density-varying crowds. + +# 3. Dataset + +STCrowd is collected by a 128-beam LiDAR and a monocular camera, which are synchronized and mounted at a fixed position on the vehicle. The detailed set-up of the sensors is shown in the supplementary materials. The annotated dataset is comprised of 84 sequences and the total number of frames is 10, 891. Each sequence contains a variable number of continuously recorded frames, ranging from 50 to 800. There are $219\mathrm{K}$ and $158\mathrm{K}$ instance-level bounding box annotations in point clouds and images, respectively. Joint annotations of point clouds and images in sequences are also provided. In particular, we get official permission for collecting the data and we protect personal privacy by blurring faces shown in images. The data annotation project involved 20 people with professional skills and took 960 man-hours effort. And we have two rounds of quality inspection for each batch of data. + +![](images/7f80b11f15595cca00948fef73f47a3950a224fa59c01e53651bca7ed236071b.jpg) + +![](images/7c7ee5856f849c0d47cc3d0218cb670cfdbd2bf694634e9c021d1fe4ba8c7f69.jpg) +(a) Occlusion in image + +![](images/0632c6cd0d75fbf403acb0ab9d5382c671b03c824f0630eeaffe69ec61775948.jpg) + +![](images/67d0c29311eac25eda0db137a1fece7a8b7b18816449737bf45fcb18985949db.jpg) + +![](images/a600c4103bf78b64808c79911bcf26999dd3ae6d66af2e713009a8769bb5cf09.jpg) + +![](images/a54a31c9d15b879836d30727449806e30ff2432cd19d7b455afb32a850613315.jpg) + +![](images/7e04ab64a7be09c197a0be83518b386985f74e17d4a61f008d925f84d5bfc631.jpg) + +![](images/c6f86a87f36ce9254c8f1f01a9385bd2a07408ef68a8cf3147cbdce6975c9d64.jpg) + +![](images/db2860f9c1a5f6457501e3139da449341297194e46b13529b5bf7ed8e6dbe286.jpg) + +![](images/9c4562a3e222329fedbc8f34e151c80a5f35b1306784a7574f9a65440e81ebb5.jpg) + +![](images/41dcd3694c979d031906564ffa4b1f3b4d753239a7c5fccc5a6597eb2fa24e58.jpg) +(b) Occlusion in LiDAR point cloud + +![](images/5878c66273ccb39fa07532fc8bf23e82e7c676acfba49b0cdf09a0a23d61231c.jpg) +Figure 3. Occlusion cases in STCrowd. (a) shows occlusion cases in image. (b) demonstrates examples in LiDAR point cloud from different views (front, top, and side view) from left to right, in which severely occluded pedestrians are marked by yellow boxes. + +# 3.1. Characteristics + +Diverse scenes and weather. We collect data in different scenes and weather conditions as shown in Figure. 2. Our scenes include rich background with bridges, trees, buildings and designed architectures. Unlike traffic scenes in which pedestrians gather around junctions or roadsides, the distribution of pedestrians in our scenes is more diverse. The weather also varies to include clear, cloudy and rainy days. Different lighting conditions will influence the color information of the image, and the rainy or wet conditions will affect the reflection from the LiDAR sensor, resulting in fewer points on objects and the background (eg. for the last picture shown in Figure. 2, it is clear to see that the captured points are very limited), which is challenging for perception algorithms. + +Diverse crowd densities. STCrowd contains crowd scenar- + +Table 1. Comparison of STCrowd with popular multimodal datasets, where Fr denotes frames, PerFr denotes per frame of LiDAR point cloud, - represents unknown. Density-2/5/10 shows the average number of pedestrians within 2, 5, and 10 meters respectively centered on each pedestrian. Person/Range is the ratio of the number of pedestrians in each frame and the LiDAR scan diameter. The last three indicators measure the density of the dataset from different aspects. + +
LiDAR Fr3D BoxesBeamPerson NumPerson PerFrPerson/RangeDensity-2/5/10
PedX [25]2.5k0-14k5.6--
Argoverse [8]22k993k32110k5--
Lyft L5 [24]46k1.3M64210k4.6--
A*3D [58]39k230k6420k0.5--
KITTI [19]15k80k644.5k0.30.0060.5/1.3/2.3
nuScenes [4]40k1.4M32208k50.050.7/1.6/2.7
H3D [33]27k1M64280k100.11.5/4.0/7.2
Waymo Open [39]230k12M642.8M120.161.0/2.9/5.6
ours11k219k128219k200.42.4/8.0/15.8
+ +![](images/a780d005a4ea87db49d4fbcf7075ae5191425b8a97e634bbdf32c394c4fe4683.jpg) +Figure 4. Wide-span point cloud densities for instances with the distance to LiDAR sensor increasing. + +ios of various densities, which are divided into four levels, including fewer than $10$ , $10 \sim 20$ , $20 \sim 30$ , and more than 30 pedestrians. High-density is the most important characteristic of STCrowd. Table. 1 shows the comparison with related datasets, which are widely-used for the 3D perception of large-scale outdoor scenes. STCrowd is notable on three evaluation values. The first is the number of pedestrians per frame. Our dataset has 20 pedestrians on average, which obviously exceeds others. The second is the ratio of pedestrians and the scene range captured by LiDAR, which can show the density of the distribution of pedestrians in the whole scene. Statistics show that the value of our dataset is 2.5 times the density in Waymo and more than 4 times others. The last evaluation is to illustrate the degree of the crowd gathering by computing the average number of pedestrians in 2, 5, and 10 meters centered on each pedestrian. There are 2.4, 8, and 15.8 persons under such measurements for our dataset, which reveals the local high-density characteristic of STCrowd. When people gather, point clouds of different instances always stick with each other, which makes it difficult for perception methods to distinguish individuals accurately. + +Dense crowds lead to severe occlusions in both images and LiDAR point cloud. As shown in Figure. 3, many pedestrians only have a partial body or only one arm or a + +head, which makes accurate perception difficult due to limited partial features. We annotate occlusion labels (from 0 to 2) for each pedestrian, measuring how much it is occluded, where 0, 1, and 2 denote none of the body, no more than half the body and over half the body occluded, respectively. Hierarchically dividing the dataset according to occlusion situations can help test the performance of methods in dealing with challenging cases. + +Besides various scene-level densities, we also demonstrate diverse instance-level densities. As shown in Figure. 4, the point clouds of pedestrians become sparser as the distance to the LiDAR sensor increasing. Long-distance instances are hard to detect because the shape and scale information may loss on sparse points. + +Diverse human poses. Our dataset has a diversity of human poses. Figure 5 shows some examples, like walking in person or in group, running, taking bicycles, taking balance cars, sitting, holding an umbrella, etc. The diversity in pedestrian poses further increases the difficulty of accurate perception. + +# 3.2. Annotations + +We provide high-quality manually labeled ground truth for both LiDAR point clouds and images. For annotations in point clouds, we labeled each pedestrian using a 3D bounding box $(x,y,z,l,w,h,\theta)$ , where $x,y,z$ denotes the center coordinates and $l,w,h$ are the length, width, and height along the x-axis,y-axis and z-axis, respectively. Pedestrians with fewer than 15 points in the LiDAR point cloud are not annotated. For annotations of images, besides 3D bounding box, we also label the 2D bounding box with $x,y,w,h$ for general 2D detection and tracking. For the objects captured by both the camera and LiDAR, we annotate the joint ID in sequences, which facilitates tracking and sensor-fusion tasks. The frequency of our annotation is 2.5HZ. We also provide annotations for the level of density and occlusion, which is mentioned above. + +![](images/d2c9651aea0811cc2afe414e34b0bcf376303ae74a9b27880f811582031cbce8.jpg) +Figure 5. Diverse human poses in STCrowd. The same pedestrian in the image and the point cloud is marked by yellow boxes. + +# 3.3. Tasks & Metrics + +Our multi-modal dataset supports detection, tracking, and prediction tasks. We give evaluation metrics in this section to provide benchmarks on our dataset. + +# 3.3.1 Detection Metric + +Average Precision metric. Following [4], we use Average Precision (AP) metric with the 3D center distance threshold. For crowded scenes, the distance thresholds are chosen from $D = \{0.25, 0.5, 1\}$ meters and the mean Average Precision (mAP) is calculated by: + +$$ +m A P = \frac {1}{| D |} \sum_ {d \in D} A P _ {d} +$$ + +Average Recall with different occlusion levels. In addition to AP, for crowded scenes, the performance on occluded instances are also considered, and we calculate the average recall with different center distance thresholds $D = \{0.25, 0.5, 1\}$ for different levels of occlusion $i$ : + +$$ +A R _ {i} = \frac {1}{| D |} \sum_ {d \in D} \operatorname {R e c a l l} _ {i, d}, i \in \{0, 1, 2 \} +$$ + +# 3.3.2 Tracking Metric + +MOTA We use traditional Multi-Object Tracking Accuracy (MOTA) to measure the tracking result: + +$$ +M O T A = 1 - (F P + I D S + F N) / G T +$$ + +where FP and FN are false positive and false negative, IDS denotes the false ID matching for tracking in different timesteps, and GT is the number of ground truth tracked instances. + +ML & MT ML(mostly loss) is the proportion of successful track matching of ground truth in less than $20\%$ of the time in all tracking targets. MT(mostly track) is the proportion of successful track matching of ground truth in more than $80\%$ of the time in all tracking targets. + +# 3.3.3 Prediction Metric + +FDE & MDE Final displacement error (FDE) is the Euclidean distance between the predicted output and the ground truth at the last time step and Mean displacement error (MDE) is the average Euclidean distance between the predicted output and the ground truth for each time step. + +# 4. DHA: Density-aware Hierarchical Heatmap Aggregation + +For pedestrian detection in crowded scenarios, pedestrians are always walking together, resulting in local high density and occlusion in both the point cloud and the image. Moreover, the density distribution and pose types of pedestrians vary. These challenges narrow down the capability of existing methods for accurate pedestrian detection in such conditions. To tackle these problems, we propose the density-aware hierarchical heatmap aggregation (DHA) module shown in Figure. 6, which makes the model learn the attention on the location of individuals and produces multi-scale predictions covering regions with different densities, in which the proposed module could mitigate too much background influence and tackle the problem of pedestrian clustering at various densities levels. + +In what follows, we give detailed explanations for these two main components, i.e., the spatial attention module focusing on the pertinent regions of pedestrians and the multilevel heatmap loss covering varying density conditions. + +# 4.1. Spatial Attention Module + +Crowds of pedestrians tend to be clustered, presenting locally high density and globally sparse distribution. Hence, attention to these foreground regions is crucial to the performance of pedestrian detection. To this end, we follow [40] to model the global attention with a transformer. As shown in Figure. 6, we apply the triplet $<$ Query, Key, Value $>$ attention layer to extract the correlation among different locations and reweight these locations. For the final output $X$ , + +$$ +\bar {X} = \operatorname {s o f t m a x} \left(Q K ^ {T}\right) \times V, +$$ + +where $Q, K, V$ denote the output of Query, Key and Value layer. + +![](images/0bd8b606117de65ca5d7a192b50bef164ae551963071036780b02b51472253b0.jpg) +Figure 6. Density-aware hierarchical heatmap aggregation. We design the spatial attention with multi-level Gaussian score map supervision to tackle the problem of various density distribution and background influences, where it can also act as a plug-in for different backbones. + +![](images/33b3af70a9e471d62449f7bb1fa5dcacabb236b732b70db85bd0733c0f98bee1.jpg) +Figure 7. Hierarchical heatmaps. We design the spatial Hierarchical Gaussian score heatmap supervision to tackle the problem of various density distributions and background influences. The coarse-level heatmap is downsampled from the regular one, in which the positive regions occupy a larger portion targeting a balanced foreground / background ratio. For the fine-grained level heatmap, it can clearly distinguish the closer pedestrians for accurate one-to-one assignment (as shown in the rectangle). + +# 4.2. Hierarchical Heatmaps + +Balanced positive and negative samples also have a great impact on high-performance 3D detection. However, unlike big objects (like truck covering a large portion of heatmap), pedestrians only occupy a limited space, resulting in most of the heatmap being zero (or negative region). The density-varying property also worsens the condition. We thus introduce hierarchical heatmaps to construct the multi-level detection targets, where the coarse-level heatmap could balance the ratio of positive and negative samples and the fine-grained heatmap can better tackle the clustering pedestrians with an accurate one-to-one assignment (avoid one grid in the heatmap representing more than two persons). + +Specifically, we use a modified CenterHead [50] to classify and localize the pedestrians. The ground truth heatmap is a Gaussian map produced based on 3D centers of annotated bounding boxes. As shown in Figure 7, the features generated from Spatial attention module are first upsampled to get the fine-grained feature maps and corresponding heatmaps, and then down-sampled to obtain the coarse-level features, where fine-grained level heatmap delivers an accurate one-to-one assignment for close and crowded pedestrians and coarse-level heatmap balances the ratio of foreground and background samples. Gaussian focal loss is calculated on each pair of prediction and target heatmaps. + +With the cooperation of these two components, i.e., spatial attention module and hierarchical heatmaps, DHA handles the crowd scenarios with varying density well. + +# 5. Experiments + +In this section, we first provide the detailed experimental setup, then evaluate extensive methods and our proposed DHA for 3D detection on STCrowd. Furthermore, we demonstrate the performance of DHA on 3D tracking and prove its generalization capability by ablation study. Finally, the benchmark of trajectory prediction on our dataset is provided to facilitate the research of crowd prediction. Moreover, we provide more analyses and qualitative results in the supplementary material. + +# 5.1. Baseline + +We present several popular baselines with different modalities for 3D detection. For image-based method, CenterNet [55] regresses 3D bounding boxes in the world-coordinate system from only monocular images. For LiDAR-only 3D detectors, anchor based and anchor-free methods are used to evaluate the performance on our dataset, including PointPillar [27] and CenterPoint [50]. Furthermore, we also evaluate two point encoding methods for CenterPoint, i.e., Voxel-CenterPoint and Pillar-CenterPoint. Our method takes the Voxel-CenterPoint as the backbone and employs DHA as the classification head. For LiDAR-image-fusion-based 3D detectors, we show current SOTA PointPainting [41] and PointAugmenting [42], where pixel-wise prediction and pixel-wise image features are used to represent the image. Note that all the backbone for these fusion-based methods is the Voxel-CenterPoint. + +# 5.2. Implementation Details + +For experiments on STCrowd, we set the detection range to $[0, 30.72\mathrm{m}]$ for the X axis, $[-20.48\mathrm{m}, 20.48\mathrm{m}]$ for Y axis, and $[-4\mathrm{m}, 1\mathrm{m}]$ for Z axis. Voxel-CenterPoint employs a $(0.12\mathrm{m}, 0.16\mathrm{m}, 0.2\mathrm{m})$ voxel size, and Pillar-CenterPoint and PointPillars utilize a $(0.12\mathrm{m}, 0.16\mathrm{m})$ grid. For the anchor-based method, the anchor is set as $[0.57\mathrm{m}, 0.6\mathrm{m}$ , + +Table 2. Benchmarks for image-only, LiDAR-only, and LiDAR-image-fusion-based 3D detection on validation set of STCrowd. AP(d) denotes that different meters are used as matching thresholds of 3D center distance $d$ . $AR_{i}$ represents the average recall on easy, moderate, and hard cases respectively with different occlusion levels $i$ . + +
MethodsModalityAP(0.25)AP(0.5)AP(1.0)mAP\( AR_0 \)\( AR_1 \)\( AR_2 \)
CenterNet [55]+ResNet18RGB0.0090.0910.3970.1660.4560.3500.285
CenterNet [55]+ResNet101RGB0.0560.1120.4860.2030.4780.3610.273
CenterNet [55]+DLA34RGB0.0410.2000.4670.2360.5780.4510.349
PointAugmenting [42]RGB+LiDAR0.4830.6290.6490.5870.9320.8660.800
PointPainting [41]RGB+LiDAR0.5090.6380.6560.6010.9290.8670.783
PointPillar [27]LiDAR0.0910.2760.3680.2450.5760.3990.238
Pillar-Center [50]LiDAR0.4560.5740.5920.5410.8660.8110.706
Voxel-Center [50]LiDAR0.5050.6130.6280.5820.8590.8340.740
OursLiDAR0.4980.6670.6850.6170.9020.8730.782
+ +Table 3. Mean Average Precision (mAP) for 3D pedestrian detection on Waymo ( $W_{range}^{level}$ ) [39], H3D [33], and nuScenes [4] datasets. + +
DatasetW130W230W150W250H3DnuScenes
Pillar-Center0.6970.6520.5350.4720.4780.719
Voxel-Center0.7010.6490.5980.5320.5950.783
Ours0.7260.6730.6380.5690.6090.795
+ +1.7m] which is calculated as the average size of pedestrian 3D ground truth bounding boxes. For post-processing of detection results, we use a circle NMS method which keeps only one instance prediction within radiance fewer than $0.3\mathrm{m}$ to reduce redundant bounding boxes and drops the predicted box which has fewer than 5 points. + +# 5.3. Results + +LiDAR-only 3D detection We compare the results of our proposed method with existing anchor-based and anchor-free methods in Table.2. Specifically, the anchor-free methods perform much better than anchor-based methods. The various human poses and densities become a hindrance for anchor-based methods, making it difficult for these anchors to cover pedestrian locations well. Moreover, the proposed DHA achieves state-of-art performance compared with anchor-free methods, demonstrating that DHA can tackle the issue of density-varying and unbalanced samples well, while vanilla anchor-free methods do not well attend. + +For crowded scenes, we show the result of average recall $AR_{i}$ (as shown in Section 3.3.1) for different occlusion levels in Table.2 to evaluate the performance when facing key challenges in pedestrian detection. Consistently, the proposed method achieves about $4\%$ and $6\%$ improvement for each level compared with the Voxel-CenterPoint and Pillar-CenterPoint backbone, respectively. + +We further provide the visualization results for the detection task in crowded scenes in Figure. 8. It can be observed that in crowded scenes, our method performs much better, even covering these challenging pedestrians when they are extremely close to each other and occluded severely (as shown in rectangles), while the baseline cannot distinguish these boxes clearly and misses some dense predictions. + +We also conduct experiments in Table. 3 for 3D pedestrian detection on three other large-scale datasets. Obviously, our method consistently outperforms baselines (current SOTAs) on contemporary benchmarks, demonstrating good generalization capability of our method on 3D pedestrian detection. + +Multimodal fusion-based 3D detection As shown in Table. 2, both fusion methods perform better than LiDAR-only baselines, which demonstrates the image features play a complementary role compared with LiDAR point clouds. Although our method only unitize LiDAR features, it is still comparable to sensor-fusion-based methods. + +Image-only 3D detection It is obvious that there is a big gap between the image-only method and others. Because it is difficult to estimate the depth information from monocular images and severe occlusions of the crowd in images make things worse. In this manner, LiDAR point clouds provide an appealing option and act as a complementary function to tackle these occlusions to some extent. + +# 5.4. Ablation studies + +First, we perform ablation experiments to investigate the generalization ability of the proposed modules on various backbones. The results on the validation set are reported in Table 4 and we test our DHA module on pillar-based and voxel-based LiDAR-only-based detection backbones. The results demonstrate that it consistently improves the performance with a large margin, i.e., $5\%$ and $3.5\%$ , re + +![](images/bd2b408e99d8622acc28884b7b954385f277a982414938f2e708eccdfd08d58f.jpg) +Figure 8. The detection visualization on crowded scenes. The first row is the prediction results from the baseline method [50] and the bottom shows our results. The blue boxes are ground truth, and the red boxes are predictions. It can be found that for some crowded regions and pedestrians (as shown in rectangles), the baseline method often omits and mismatches, while our method achieves better results on such cases because the proposed DHA can focus more on the foreground and distinguish the crowded regions with fine-grained heatmaps. + +Table 4. Ablation studies for DHA block on different backbones on STCrowd validation set. + +
Pillar-CenterVoxel-CenterPointAugmentingDHAmAP
✓0.541
✓✓0.591
✓0.582
✓✓0.617
✓0.587
✓✓0.594
+ +Table 5. Ablation study of DHA on STCrowd. + +
Methodsoursw/o SAMw/o HHVoxel-Center
mAP0.6170.6010.6030.582
+ +spectively, compared to the baseline. We also test DHA on LiDAR-image-fusion-based detection backbone, PointAugmenting, and still get improvement (because image features already provide a remedy for the crowded scene, DHA only achieves a slight gain). We also conduct the ablation study for Spatial Attention Module (SAM) and Hierarchical Heatmaps (HH) (Table. 5). Results show the effectiveness of two modules in improving the performance. + +# 5.5.3D Tracking + +For tracking tasks, we learn to predict a two-dimensional velocity estimation for each detected object as an additional regression output following the methodology of Cen- + +terPoint [50]. We mainly conduct experiments on CenterPoint [50] with pillar and voxel representation, respectively. The proposed DHA module is also incorporated to investigate its generalization ability on the tracking task (Table.6). It can be found that our proposed DHA consistently achieves the better results. + +Table 6. Results of LiDAR point cloud tracking on validation set of STCrowd. + +
MethodsMOTA ↑MT ↑ML ↓
Pillar-Center0.2450.2950.102
Voxel-Center0.3420.3550.084
Ours0.3680.3630.086
+ +# 5.6. Trajectory Prediction + +As shown in Table. 7, we also provide the baselines of trajectory prediction on our crowd dataset, including popular vanilla-LSTM [21], social-LSTM [1], and StarNet [62]. Our dataset can boost the research of action and trajectory prediction in crowd scenes by involving more multimodal inputs or features. + +Table 7. Results on trajectory prediction task. + +
MethodsFDE ↓MDE ↓
LSTM [21]1.1330.648
Social-LSTM [1]1.1220.638
StarNet [62]0.9830.404
+ +# 5.7. More Applications + +Accurate pedestrian perception leads to wider applications, like the on-campus delivery robots and intelligent patrols for stations, for which dense and crowded campus scene would be the major challenges. Our dataset can provide a benchmark and challenging metrics for them. + +# 6. Conclusion + +Focusing on 3D perceptions in crowded scenarios, we propose a new multimodal dataset with diverse crowd densities, multiple scenes, various weather, and different human poses. In particular, our dataset contains situations with high density and severe occlusions, which is challenging for current 3D perception methods. Based on multimodal data and annotations, our dataset can facilitate many perception tasks. Benchmarks on most of the tasks are provided in the paper. In addition, we propose a novel method to achieve more accurate perception on crowded scenes by considering the properties of pedestrian distribution. Experiments illustrate the superiority and generalization capability of our method. + +# References + +[1] Alexandre Alahi, Kratarth Goel, Vignesh Ramanathan, Alexandre Robicquet, Li Fei-Fei, and Silvio Savarese. Social lstm: Human trajectory prediction in crowded spaces. In CVPR, pages 961–971, 2016. 8 +[2] Philipp Bergmann, Tim Meinhardt, and Laura Leal-Taixe. Tracking without bells and whistles. In ICCV, pages 941-951, 2019. 1, 3 +[3] Gabriel J Brostow, Jamie Shotton, Julien Fauqueur, and Roberto Cipolla. Segmentation and recognition using structure from motion point clouds. In European conference on computer vision, pages 44-57. Springer, 2008. 2 +[4] Holger Caesar, Varun Bankiti, Alex H. Lang, Sourabh Vora, Venice Erin Liong, Qiang Xu, Anush Krishnan, Yu Pan, Giancarlo Baldan, and Oscar Beijbom. nuscenes: A multimodal dataset for autonomous driving. CVPR, 2020. 1, 2, 4, 5, 7 +[5] Rohan Chandra, Uttaran Bhattacharya, Aniket Bera, and Dinesh Manocha. Densepeds: Pedestrian tracking in dense crowds using front-rvo and sparse features. In IROS, pages 468-475. IEEE, 2019. 1, 2 +[6] Rohan Chandra, Uttaran Bhattacharya, Aniket Bera, and Dinesh Manocha. Traphic: Trajectory prediction in dense and heterogeneous traffic using weighted interactions. In CVPR, pages 8483-8492, 2019. 1 +[7] Rohan Chandra, Mridul Mahajan, Rahul Kala, Rishitha Palugulla, Chandrababu Naidu, Alok Jain, and Dinesh Manocha. Meteor: A massive dense & heterogeneous behavior dataset for autonomous driving. arXiv preprint arXiv:2109.07648, 2021. 1, 2 +[8] Ming-Fang Chang, John Lambert, Patsorn Sangkloy, Jagjeet Singh, Sławomir Bak, Andrew Hartnett, De Wang, Peter Carr, Simon Lucey, Deva Ramanan, and James Hays. Argov-verse: 3d tracking and forecasting with rich maps. CVPR, pages 8740-8749, 2019. 2, 4 +[9] Zhengping Che, Max Guangyu Li, Tracy Li, Bo Jiang, Xuefeng Shi, Xinsheng Zhang, Ying Lu, Guobin Wu, Yan Liu, and Jieping Ye. D2-city: A large-scale dashcam video dataset of diverse traffic scenarios. ArXiv, abs/1904.01975, 2019. 1, 2 +[10] Qi Chen, Lin Sun, Zhixin Wang, K. Jia, and A. Yuille. Object as hotspots: An anchor-free 3d object detection approach via firing of hotspots. ECCV, 2020. 2 +[11] Xiaozhi Chen, Huimin Ma, Jixiang Wan, B. Li, and Tian Xia. Multi-view 3d object detection network for autonomous driving. CVPR, 2017. 3 +[12] Hsu-kuang Chiu, Antonio Prioletti, Jie Li, and Jeannette Bohg. Probabilistic 3d multi-object tracking for autonomous driving. arXiv preprint arXiv:2001.05673, 2020. 3 +[13] Yukyung Choi, Namil Kim, Soonmin Hwang, Kibaek Park, Jae Shin Yoon, Kyounghwan An, and In So Kweon. Kaist multi-spectral day/night data set for autonomous and assisted driving. IEEE Transactions on Intelligent Transportation Systems, 19(3):934-948, 2018. 2 +[14] 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. CVPR, pages 3213-3223, 2016. 1, 2 +[15] Navneet Dalal and Bill Triggs. Histograms of oriented gradients for human detection. In CVPR, volume 1, pages 886-893. IEEE, 2005. 2 +[16] Piotr Dollar, Christian Wojek, Bernt Schiele, and Pietro Perona. Pedestrian detection: An evaluation of the state of the art. TPAMI, 34(4):743-761, 2011. 1, 2 +[17] Markus Enzweiler and Dariu M Gavrila. Monocular pedestrian detection: Survey and experiments. TPAMI, 31(12):2179-2195, 2008. 2 +[18] Andreas Ess, Bastian Leibe, Konrad Schindler, and Luc Van Gool. A mobile vision system for robust multi-person tracking. In CVPR, pages 1-8. IEEE, 2008. 2 +[19] Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets robotics: The kitti dataset. The International Journal of Robotics Research, 32:1231 - 1237, 2013. 1, 2, 4 +[20] Jakob Geyer, Yohannes Kassahun, Mentar Mahmudi, Xavier Ricou, Rupesh Durgesh, Andrew S. Chung, Lorenz Hauswald, Viet Hoang Pham, Maximilian Muhlegg, Sebastian Dorn, Tiffany Fernandez, Martin Janicke, Sudesh Mirashi, Chiragkumar Savani, Martin Sturm, Oleksandr Vorobiov, Martin Oelker, Sebastian Garreis, and Peter Schuberth. A2D2: Audi Autonomous Driving Dataset. 2020. 2 +[21] Klaus Greff, Rupesh K Srivastava, Jan Koutnik, Bas R Steunebrink, and Jürgen Schmidhuber. Lstm: A search space odyssey. IEEE transactions on neural networks and learning systems, 28(10):2222-2232, 2016. 8 +[22] Hou-Ning Hu, Qi-Zhi Cai, Dequan Wang, Ji Lin, Min Sun, Philipp Krahenbuhl, Trevor Darrell, and Fisher Yu. Joint monocular 3d vehicle detection and tracking. In CVPR, pages 5390-5399, 2019. 3 +[23] Soonmin Hwang, Jaesik Park, Namil Kim, Yukyung Choi, and In So Kweon. Multispectral pedestrian detection: Benchmark dataset and baseline. In CVPR, pages 1037-1045, 2015. 1, 2 +[24] R. Kesten, M. Usman, J. Houston, T. Pandya, K. Nadhamuni, A. Ferreira, M. Yuan, B. Low, A. Jain, P. Ondruska, S. Omari, S. Shah, A. Kulkarni, A. Kazakova, C. Tao, L. Platinsky, W. Jiang, and V. Shet. Level 5 perception dataset 2020. 2019. 2, 4 +[25] Wonhui Kim, Manikandasriram Srinivasan Ramanagopal, Charles Barto, Ming-Yuan Yu, Karl Rosaen, Nick Goumas, Ram Vasudevan, and Matthew Johnson-Roberson. Pedx: Benchmark dataset for metric 3-d pose estimation of pedestrians in complex urban intersections. IEEE Robotics and Automation Letters, 4(2):1940-1947, 2019. 4 +[26] Jason Ku, Melissa Mozifian, Jungwook Lee, Ali Harakeh, and Steven L. Waslander. Joint 3d proposal generation and object detection from view aggregation. IROS, 2018. 3 +[27] Alex H. Lang, Sourabh Vora, Holger Caesar, Lubing Zhou, Jiong Yang, and Oscar Beijbom. Pointpillars: Fast encoders for object detection from point clouds. CVPR, 2019. 6, 7 +[28] Ming Liang, Binh Yang, Yun Chen, Rui Hu, and R. Urtasun. Multi-task multi-sensor fusion for 3d object detection. CVPR, 2019. 3 + +[29] Ming Liang, Binh Yang, Shenlong Wang, and R. Urtasun. Deep continuous fusion for multi-sensor 3d object detection. ECCV, 2018. 3 +[30] Yuexin Ma, Xinge Zhu, Sibo Zhang, Ruigang Yang, Wenping Wang, and Dinesh Manocha. Trafficpredict: Trajectory prediction for heterogeneous traffic-agents. In AAAI, 2019. 2 +[31] 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. 2 +[32] Lukás Neumann, Michelle Karg, Shanshan Zhang, Christian Scharfenberger, Ericiegert, Sarah Mistr, Olga Prokofyeva, Robert Thiel, Andrea Vedaldi, Andrew Zisserman, and Bernt Schiele. Nightowls: A pedestrians at night dataset. In ACCV, 2018. 1, 2 +[33] Abhishek Patil, Srikanth Malla, Haiming Gang, and Yi-Ting Chen. The h3d dataset for full-surround 3d multi-object detection and tracking in crowded urban scenes. 2019 International Conference on Robotics and Automation (ICRA), pages 9552-9557, 2019. 2, 4, 7 +[34] C. Qi, Xinlei Chen, O. Litany, and L. Guibas. Imvotenet: Boosting 3d object detection in point clouds with image votes. CVPR, 2020. 2 +[35] C. Qi, O. Litany, Kaiming He, and L. Guibas. Deep hough voting for 3d object detection in point clouds. ICCV, 2019. 2 +[36] Shuai Shao, Zijian Zhao, Boxun Li, Tete Xiao, Gang Yu, Xiangyu Zhang, and Jian Sun. Crowdhuman: A benchmark for detecting human in a crowd. arXiv preprint arXiv:1805.00123, 2018. 1, 2 +[37] Shaoshuai Shi, Xiaogang Wang, and Hongsheng Li. Pointr-cnn: 3d object proposal generation and detection from point cloud. CVPR, 2019. 3 +[38] 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, 2021. 2 +[39] Pei Sun, Henrik Kretzschmar, Xerxes Dotiwalla, and etc. Scalability in perception for autonomous driving: Waymo open dataset. CVPR, pages 2443-2451, 2020. 1, 2, 4, 7 +[40] 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 +[41] Sourabh Vora, Alex H. Lang, Bassam Helou, and Oscar Bei-jbom. Pointpainting: Sequential fusion for 3d object detection. CVPR, 2020. 2, 3, 6, 7 +[42] Chunwei Wang, Chao Ma, Ming Zhu, and Xiaokang Yang. Pointaugmenting: Cross-modal augmentation for 3d object detection. CVPR, 2021. 3, 6, 7 +[43] Xinshuo Weng and Kris Kitani. A baseline for 3d multi-object tracking. arXiv preprint arXiv:1907.03961, 1(2):6, 2019.3 +[44] Christian Wojek, Stefan Walk, and Bernt Schiele. Multicue onboard pedestrian detection. In CVPR, pages 794-801. IEEE, 2009. 2 + +[45] Nicolai Wojke, Alex Bewley, and Dietrich Paulus. Simple online and realtime tracking with a deep association metric. In ICIP, pages 3645-3649. IEEE, 2017. 3 +[46] Liang Xie, Chao Xiang, Zhengxu Yu, Guodong Xu, Zheng Yang, Deng Cai, and Xiaofei He. Pi-rcnn: An efficient multisensor 3d object detector with point-based attentive contour fusion module. AAAI, 2020. 3 +[47] Binh Yang, Wenjie Luo, and R. Urtasun. Pixor: Real-time 3d object detection from point clouds. CVPR, 2018. 2 +[48] Zetong Yang, Y. Sun, Shu Liu, and Jiaya Jia. 3dssd: Point-based 3d single stage object detector. CVPR, 2020. 3 +[49] Zetong Yang, Y. Sun, Shu Liu, Xiaoyong Shen, and Jiaya Jia. Std: Sparse-to-dense 3d object detector for point cloud. ICCV, 2019. 3 +[50] Tianwei Yin, Xingyi Zhou, and Philipp Krahenbuhl. Center-based 3d object detection and tracking. CVPR, 2021. 6, 7, 8 +[51] Jin Hyeok Yoo, Yeocheol Kim, Ji Song Kim, and J. Choi. 3d-cvf: Generating joint camera and lidar features using cross-view spatial feature fusion for 3d object detection. ECCV, 2020. 3 +[52] 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. CVPR, pages 2633-2642, 2020. 1, 2 +[53] Shanshan Zhang, Rodrigo Benenson, and Bernt Schiele. Citypersons: A diverse dataset for pedestrian detection. In CVPR, pages 3213-3221, 2017. 1, 2 +[54] Shifeng Zhang, Yiliang Xie, Jun Wan, Hansheng Xia, Stan Z. Li, and Guodong Guo. Widerperson: A diverse dataset for dense pedestrian detection in the wild. IEEE Transactions on Multimedia (TMM), 2019. 1, 2 +[55] Xingyi Zhou, Dequan Wang, and Philipp Krahenbuhl. Objects as points. ArXiv, abs/1904.07850, 2019. 6, 7 +[56] Yin Zhou, Pei Sun, Y. Zhang, Dragomir Anguelov, J. Gao, Tom Y. Ouyang, James Guo, Jiquan Ngiam, and Vijay Vasudevan. End-to-end multi-view fusion for 3d object detection in lidar point clouds. CoRL, 2019. 2 +[57] Benjin Zhu, Zhengkai Jiang, Xiangxin Zhou, Zeming Li, and Gang Yu. Class-balanced grouping and sampling for point cloud 3d object detection. ArXiv, 2019. 2 +[58] Sijie Zhu, Taojiannan Yang, Mat'ias Mendieta, and Chen Chen. A3d: Adaptive 3d networks for video action recognition. ArXiv, abs/2011.12384, 2020. 2, 4 +[59] Xinge Zhu, Yuexin Ma, Tai Wang, Yan Xu, Jianping Shi, and Dahua Lin. Ssn: Shape signature networks for multi-class object detection from point clouds. ECCV, 2020. 2 +[60] Xinge Zhu, Hui Zhou, Tai Wang, Fangzhou Hong, and etc. Cylindrical and asymmetrical 3d convolution networks for lidar segmentation. In CVPR, pages 9939-9948, 2021. 2 +[61] Xinge Zhu, Hui Zhou, Tai Wang, Fangzhou Hong, Wei Li, Yuexin Ma, Hongsheng Li, Ruigang Yang, and Dahua Lin. Cylindrical and asymmetrical 3d convolution networks for lidar-based perception. TPAMI, 2021. 1 +[62] Yanliang Zhu, Deheng Qian, Dongchun Ren, and Huaxia Xia. Starnet: Pedestrian trajectory prediction using deep neural network in star topology. In IROS, pages 8075-8080. IEEE, 2019. 8 \ No newline at end of file diff --git a/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/images.zip b/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6e2c81d33fc42f3dd05047918bf5977cd38391c8 --- /dev/null +++ b/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbb5f779457867b9915b0fc08fae488e7bae2437e174e44a7d8afa0cf6b97510 +size 652716 diff --git a/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/layout.json b/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9022f12e83218534e4fb6852c0a549b08e5fb992 --- /dev/null +++ b/stcrowdamultimodaldatasetforpedestrianperceptionincrowdedscenes/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27fd137f9437d1dc635220264f4f0e8e439b081371b3ffc6e4a9d1603bd273c1 +size 391750 diff --git a/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/8fbd6e92-b18b-4ff2-baa6-bea3f56cd10a_content_list.json b/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/8fbd6e92-b18b-4ff2-baa6-bea3f56cd10a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..977e3a527930e3dfdd80a76ac1dd09a0c2e92158 --- /dev/null +++ b/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/8fbd6e92-b18b-4ff2-baa6-bea3f56cd10a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:370d5fca00423610872b5e8453185ff2e0a59239ba1b7740acba81f156a031b1 +size 81050 diff --git a/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/8fbd6e92-b18b-4ff2-baa6-bea3f56cd10a_model.json b/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/8fbd6e92-b18b-4ff2-baa6-bea3f56cd10a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c32b9394e6d411538cebc4bd592e3aa6224f79c6 --- /dev/null +++ b/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/8fbd6e92-b18b-4ff2-baa6-bea3f56cd10a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a00af657432dba84aa4fed83116b53e70f3ddd59d42d1e717d0f7630fae09d62 +size 103741 diff --git a/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/8fbd6e92-b18b-4ff2-baa6-bea3f56cd10a_origin.pdf b/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/8fbd6e92-b18b-4ff2-baa6-bea3f56cd10a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..56b50d9f0bbb8b54e6c1b442443a073f03f7d58c --- /dev/null +++ b/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/8fbd6e92-b18b-4ff2-baa6-bea3f56cd10a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8265ec24479b44db0f8df987d5043f74995231ce05f8cb2f1fc8948430a6803c +size 360285 diff --git a/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/full.md b/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..db6767b1cf890f4aaa18c43b7807f9b2103dd467 --- /dev/null +++ b/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/full.md @@ -0,0 +1,337 @@ +# ST++: Make Self-training Work Better for Semi-supervised Semantic Segmentation + +Lihe Yang $^{1}$ Wei Zhuo $^{3}$ Lei Qi $^{4,1}$ Yinghuan Shi $^{1,2*}$ Yang Gao $^{1}$ + +$^{1}$ State Key Laboratory for Novel Software Technology, Nanjing University $^{2}$ National Institute of Healthcare Data Science, Nanjing University + +$^{3}$ Tencent $^{4}$ Southeast University + +lihe.yang.cs@gmail.com weizhuo@tencent.com qilei@seu.edu.cn {syh,gaoy}@nju.edu.cn + +# Abstract + +Self-training via pseudo labeling is a conventional, simple, and popular pipeline to leverage unlabeled data. In this work, we first construct a strong baseline of self-training (namely ST) for semi-supervised semantic segmentation via injecting strong data augmentations (SDA) on unlabeled images to alleviate overfitting noisy labels as well as decouple similar predictions between the teacher and student. With this simple mechanism, our ST outperforms all existing methods without any bells and whistles, e.g., iterative retraining. Inspired by the impressive results, we thoroughly investigate the SDA and provide some empirical analysis. Nevertheless, incorrect pseudo labels are still prone to accumulate and degrade the performance. To this end, we further propose an advanced self-training framework (namely $ST++$ ), that performs selective re-training via prioritizing reliable unlabeled images based on holistic prediction-level stability. Concretely, several model checkpoints are saved in the first stage supervised training, and the discrepancy of their predictions on the unlabeled image serves as a measurement for reliability. Our image-level selection offers holistic contextual information for learning. We demonstrate that it is more suitable for segmentation than common pixel-wise selection. As a result, $ST++$ further boosts the performance of our ST. Code is available at https://github.com/LiheYoung/ST-PlusPlus. + +# 1. Introduction + +Fully-supervised semantic segmentation learns to assign pixel-wise semantic labels via generalizing from numerous densely annotated images. Despite the rapid progress [9, 60], the pixel-wise manual labeling is costly, labori + +![](images/1e9244ce0f8a78bc9bd18026f92c65f717de0e1bd6a01632dedba8223f94a179.jpg) +Figure 1. Performance comparisons between our ST/ST++ and the state-of-the-art methods on the Pascal. It is worth noting that the proposed ST and $\mathrm{ST} + +$ surpass previous best results significantly, especially in the extremely scarce-label regime, e.g., 92 labels. + +ous, and even infeasible, precluding its deployment in some scenes such as medical image analysis. To avert the labor-intensive procedure, semi-supervised semantic segmentation has been proposed to learn a model from a handful of labeled images along with abundant unlabeled images. + +The core challenge in semi-supervised setting lies in how to effectively utilize the unlabeled images. Prior works in semi-supervised learning (SSL) propose to apply entropy minimization [33, 53] or consistency regularization [21, 52] on unlabeled images. With increasingly sophisticated mechanisms introduced to this field, FixMatch [47] breaks the trend and achieves inspiring results via integrating both strategies into a hybrid framework with few hyper-parameters. Motivated by the tremendous progress in SSL, recent works in semi-supervised semantic segmentation have evolved from GANs-based methods [20, 38] to delving into consistency regularization from the segmentation perspective, such as enforcing consistent predictions of the same unlabeled image under strong-weak perturbations [66], of the same local patch from different contextual crops [31], and of the same unlabeled image between dual differently initialized models [12, 17]. + +Nevertheless, are the delicate mechanisms indispensable for semi-supervised semantic segmentation? More importantly, is the straightforward self-training scheme [33] proposed around a decade ago already out-of-date for this task? In this work, we intuitively and empirically present two simple and effective techniques to bring back the classical self-training method as a strong competitor again. + +The self-training [33] is commonly regarded as a form of entropy minimization in SSL, since the re-trained student is supervised with hard labels produced by the teacher which is trained on labeled data. However, they suffer severe coupling issue, i.e., making similar predictions on the same input. We notice that, however, injecting strong data augmentations (SDA) on unlabeled images is extremely beneficial to decouple their predictions as well as alleviate overfitting on noisy pseudo labels. Despite the simplicity, self-training with SDA significantly surpasses existing methods without any bells and whistles, e.g., without the need of iterative retraining [55], manually choosing a threshold for filtering incorrect labels [66], or repetitively producing pseudo labels for each training minibatch [12, 25, 66]. Inspired by the impressive results, we thoroughly investigate the SDA and find that it is fully compatible with the off-the-shelf augmentation strategies in contrastive learning [10], e.g., colorjitter, grayscale, and blur, which deteriorate clean data distribution but perform surprisingly well for unlabeled data. Besides, we examine individual effectiveness of each data augmentation, and observe that the simple colorjitter plays most effectively and different augmentations are complementary to each other. Formally, this basic self-training framework with SDA is named as ST in this work, serving as a strong baseline for our full method. + +Another longstanding but underestimated issue is that the classical self-training framework utilizes all unlabeled images at the same time. Nevertheless, different unlabeled images cannot be equally easy [34, 44, 50] and the corresponding pseudo labels cannot be equally reliable, leading to severe confirmation bias [2] and potential performance degradation when iteratively optimizing the model with those ill-posed pseudo labels. To this end, we further propose an advanced $\mathrm{ST}++$ framework based on our ST, that automatically selects and prioritizes more reliable images in the re-training phase to produce higher-quality artificial labels on the remaining less reliable images. The measurement for the reliability or uncertainty of an unlabeled image is to compute the holistic stability of the evolving pseudo masks in different iterations during the entire training course. Note that, different from the common practice of manually setting a fixed confidence threshold to filter low-confidence pixels [66], we demonstrate that our image-level selection based on the stability of evolving predictions can provide holistic contextual regions for model training, which is more appropriate to the segmentation task. + +It is worth noting that the classical self-training pipeline [33] is attracting increasing attention [43, 53] in the semisupervised setting. Our work differs from them in that we empirically and systematically study the effectiveness of strong data augmentations on unlabeled data and further propose an advanced self-training framework with selective re-training property. More concrete differences are discussed in detail in the related work. Our main findings and contributions are summarized as follows: + +- We construct a strong baseline (ST) of self-training in semi-supervised semantic segmentation via injecting strong data augmentations on unlabeled images during re-training. Motivated by the promising performance, we provide intuitive explanations and systematically investigate the role of SDA and each augmentation. +- Built on our ST, to alleviate the potential performance degradation incurred by incorrect pseudo labels, we further propose an advanced self-training framework $\mathrm{ST}++$ , that performs selective re-training via prioritizing reliable images based on holistic prediction-level stability in the entire training course. We demonstrate that the image-level selection is more suitable for segmentation task compared with pixel-wise selection. +- The ST and $\mathrm{ST} + +$ both outperform previous methods across extensive settings and architectures on the Pascal and Cityscapes dataset, with few hyper-parameters. + +# 2. Related Work + +Semi-supervised learning. Two main branches of methods are proposed in recent years, namely consistency regularization [4, 21, 32, 39, 45, 51, 52] and entropy minimization [7, 33, 42, 53]. Consistency regularization enforces the current optimized model to yield stable and consistent predictions under various perturbations [45, 52], e.g., shape and color, on the same unlabeled data. Earlier works also save several checkpoints [32] or maintain a teacher whose parameters are the exponential moving average of the updating student [51] to produce more reliable artificial labels for student model. On the other hand, entropy minimization, popularized by the self-training pipeline [21, 33], leverages unlabeled data in an explicit bootstrapping manner, where unlabeled data is assigned with pseudo labels to be jointly trained with manually labeled data. Different from prior works, MixMatch [6] harvests advantages of both methodologies and proposes a hybrid framework to exploit the unlabeled data from the two perspectives. FixMatch [47] inherits the spirit from MixMatch but simplifies unnecessary mechanisms. As a further extension, the most recent work FlexMatch [58] utilizes the inherent learning status to filter low-confidence labels with class-wise thresholds. + +Semi-supervised semantic segmentation. Slightly different from the trend in SSL, preliminary works [26, 38, 49] in + +Algorithm 1: ST Pseudocode +Input: Labeled training set $\mathcal{D}^l = \{(x_i,y_i)\}_{i = 1}^M$ Unlabeled training set $\mathcal{D}^u = \{u_i\}_{i = 1}^N$ Weak/strong augmentations $\mathcal{A}^w /\mathcal{A}^s$ Teacher/student model $T / S$ + +Output: Fully trained student model $S$ +Train $T$ on $\mathcal{D}^l$ with cross-entropy loss $\mathcal{L}_{ce}$ Obtain pseudo labeled $\hat{\mathcal{D}}^u = \{(u_i,T(u_i))\}_{i = 1}^N$ + +Over-sample $\mathcal{D}^l$ to around the size of $\mathcal{D}^u$ +for $k\in \{1,\ldots ,B\}$ do +```txt +for minibatch $\{(x_k,y_k)\}_{k = 1}^B\subset (\mathcal{D}^l\cup \hat{\mathcal{D}}^u)$ do +``` + +```txt +if $x_{k}\in \mathcal{D}^{u}$ then +``` + +else +```latex +$x_{k},y_{k}\gets \mathcal{A}^{s}(\mathcal{A}^{w}((x_{k},y_{k}))$ +``` + +```latex +$x_{k},y_{k}\gets \mathcal{A}^{w}(x_{k},y_{k})$ +``` + +$\hat{y}_k = S(x_k)$ +return $S$ +```txt +Update $S$ to minimize $\mathcal{L}_{ce}$ of $\{(\hat{y}_k,y_k)\}_{k = 1}^B$ +``` + +semi-supervised semantic segmentation tend to utilize the Generative Adversarial Networks (GANs) [20] as an auxiliary supervision signal for the unlabeled data. However, GANs are not easy to optimize and may suffer the problem of mode collapse [46]. Therefore, also inspired by the success in SSL, subsequent methods [1, 12, 18, 24, 25, 31, 41, 55, 59, 61, 62, 66] manage to tackle this task with simpler mechanisms, such as enforcing similar predictions under multiple perturbed embeddings [41], under two different contextual crops [31], and between dual differently initialized models [12]. As an extension of FixMatch [47], PseudoSeg [66] adapts the weak-to-strong consistency to segmentation scenario and further applies a calibration module to refine the pseudo masks. Despite fancy mechanisms proposed and rapid progress made, nevertheless, we hope to raise a new observation to this field that, the plainest self-training framework coupled with strong data augmentations (SDA) is indeed effective enough to obtain state-of-the-art performance without any bells and whistles, e.g., iterative re-training or setting a threshold to filter unreliable pixels. + +Self-training. The self-training via pseudo labeling is an explicit and classical method originating from around a decade ago [33]. Recently, it is increasingly attracting attention from multiple fields, such as fully-supervised image recognition [43, 53, 54, 63], semi-supervised learning [7, 17, 48, 55], and domain adaptation [30, 64, 65]. In the semi-supervised setting, particularly, it has been revisited in several tasks, including image classification [7], object detection [48], and semantic segmentation [17, 55]. Among them, the most related ones to us are [48, 55]. Nevertheless, our work is fundamentally different from [55] in that we demonstrate appropriate SDA on unlabeled data are extremely beneficial to the semi-supervised learner, while [55] designs their method based on the assumption that excess- + +Algorithm 2: $\mathrm{ST}++$ Pseudocode +Input: Same as Algorithm 1 +Output: Same as Algorithm 1 +Train $T$ on $\mathcal{D}^l$ and save $K$ checkpoints $\{T_j\}_{j=1}^K$ +for $u_i \in \mathcal{D}^u$ do + for $T_j \in \{T_j\}_{j=1}^K$ do + Pseudo mask $M_{ij} = T_j(u_i)$ + Compute $s_i$ with Equation 4 and $\{M_{ij}\}_{j=1}^K$ +Select $R$ highest scored images to compose $\mathcal{D}^{u_1}$ $\mathcal{D}^{u_2} = \mathcal{D}^u - \mathcal{D}^{u_1}$ $\mathcal{D}^{u_1} = \{(u_k, T(u_k))\}_{u_k \in \mathcal{D}^{u_1}}$ +Train $S$ on $(\mathcal{D}^l \cup \mathcal{D}^{u_1})$ with ST re-training + $\mathcal{D}^{u_2} = \{(u_k, S(u_k))\}_{u_k \in \mathcal{D}^{u_2}}$ +Re-initialize $S$ +Train $S$ on $(\mathcal{D}^l \cup \mathcal{D}^{u_1} \cup \mathcal{D}^{u_2})$ with ST re-training +return $S$ + +sive data augmentations are destructive to clean data distribution. Another work [48] addresses object detection task via manually designing task-relevant augmentations, whereas our SDA is common in image recognition but previously neglected in semi-supervised segmentation. Moreover, both aforementioned works adopt the plain training pipeline, whereas we further propose the $\mathrm{ST}++$ to safely exploit unlabeled images in a curriculum learning manner [5]. + +Uncertainty estimation. Previous method [29] estimates model uncertainty with a Bayesian analysis. However, limited by the computational burden of Bayesian inference, some other methods adopt Dropout [19, 35] and data augmentations [3] to measure the uncertainty. In the semisupervised setting, FixMatch [47] simply sets a confidence threshold to filter uncertain samples, and DMT [17] maintains two differently initialized networks to highlight disagreed regions. Compared with them, our method estimates image-level uncertainty via measuring the holistic prediction stability of evolving masks without the need of training extra networks or manually choosing the threshold, making it universal to other scenes. Also, the model learns holistic contextual regions in high-confidence images, which is more stable and appropriate to the segmentation task. + +# 3. Method + +# 3.1. Problem Definition + +Semi-supervised semantic segmentation aims to generalize from a combination set of pixel-wise labeled images $\mathcal{D}^l = \{(x_i,y_i)\}_{i = 1}^M$ and unlabeled images $\mathcal{D}^u = \{u_i\}_{i = 1}^N$ , where in most cases $N\gg M$ . In most works, the overall optimization target is formalized as: + +$$ +\mathcal {L} = \mathcal {L} ^ {s} + \lambda \mathcal {L} ^ {u}, \tag {1} +$$ + +where $\lambda$ acts as a tradeoff between labeled and unlabeled data. It can be a fixed value [47, 48] or be scheduled during training [27]. The unsupervised loss $\mathcal{L}^u$ is the key point to distinguish different semi-supervised methods, while the supervised loss $\mathcal{L}^s$ is typically the cross-entropy loss between predictions and manually annotated masks. + +# 3.2. Plainest Self-training Scheme + +We simplify the plainest form of self-training from [33]. It includes three steps without the need of iterative training: + +1. [Supervised Learning] Train a teacher model $T$ on $\mathcal{D}^l$ with cross-entropy loss. +2. [Pseudo Labeling] Predict one-hot hard pseudo labels on $\mathcal{D}^u$ with $T$ to obtain $\dot{\mathcal{D}}^u = \{(u_i, T(u_i))\}_{i=1}^N$ . +3. [Re-training] Re-train a student model $S$ on the union set $\mathcal{D}^l\cup \hat{\mathcal{D}}^u$ for final evaluation. + +Here, the unsupervised loss $\mathcal{L}^u$ can be formulated as: + +$$ +\mathcal {L} _ {\text {p l a i n}} ^ {u} = \mathrm {H} (T (x), S (\mathcal {A} ^ {w} (x))), \tag {2} +$$ + +where $T$ and $S$ map the image $x$ to the output space. $\mathcal{A}^w$ applies random weak data augmentations to the raw image. H denotes entropy minimization between student and teacher. + +Discussion. Since self-training has largely lagged behind consistency based methods in SSL [47], we provide intuitive explanations for the promising performance it might achieve in semantic segmentation. Self-training is deemed to heavily rely on the initial model trained with labeled data, which cannot be well satisfied in the scarce-label regime of SSL. However, the situation is different in our task, since all labeled images are densely annotated and supervised, which means that even only tens of labeled images are available, millions of pixel-level samples can be utilized for training, yielding a well-performed model for pseudo labeling. + +# 3.3. ST:Inject SDA on Unlabeled Images + +The above self-training scheme has long been criticized for its ill-posed property that errors in pseudo labels will accumulate and considerably degrade student performance when iteratively overfitting the incorrect supervision. Moreover, in such a bootstrapping process, inadequate information is introduced during re-training, leading to severe coupling issue between the teacher and re-trained student. Concretely, the re-trained $S$ is enforced to learn the pseudo labels from $T$ in a supervised manner. However, considering the same network structure and similar initialization of $T$ and $S$ , they are prone to make similar true or false predictions on the unlabeled images, hence the student $S$ fails to learn extra information except entropy minimization. + +In order to break out of the aforementioned two dilemmas, i.e., overfitting noisy labels and prediction coupling between the student and teacher, we propose to inject strong + +data augmentations (SDA) on unlabeled images during the re-training phase to pose a more challenging optimization target for the student model. The SDA here is named opposite to the weak or basic augmentations adopted in regular fully-supervised semantic segmentation, including random resizing, random cropping and random flipping. As for specific choices of SDA, we manage to maintain a universal strategy across different datasets or settings, rather than searching for the most appropriate ones in each dataset. To simplify the choice, we adopt the off-the-shelf SDA in [10, 11], which includes colorjitter, grayscale, and blur. Apart from these color transformations, we introduce another spatial transformation Cutout [15] to compose our full SDA. In our ST, the unsupervised objective is formalized as: + +$$ +\mathcal {L} _ {S T} ^ {u} = \mathrm {H} \left(T (x), S \left(\mathcal {A} ^ {s} \left(\mathcal {A} ^ {w} (x)\right)\right)\right), \tag {3} +$$ + +where $\mathcal{A}^s$ applies strong data augmentations to the input. + +Previous works adjust the impact of labeled and unlabeled data through non-uniform sampling within a minibatch [47] or selecting a hyper-parameter to re-weight the supervised and unsupervised loss [17]. In our ST, we simplify this choice via directly over-sampling $\mathcal{D}^l$ to around the same scale as $\mathcal{D}^u$ and then sampling uniformly from the combined dataset. With this modification, no extra hyperparameters are introduced and the semi-supervised learner is optimized in a totally fully-supervised fashion. The pseudocode of our ST framework is present in Algorithm 1 and it works as a strong baseline for our full method. + +Discussion. Despite the simplicity of our ST, it surpasses existing state-of-the-art methods even without iterative retraining [55]. Compared with other online methods [12,25, 66] that repetitively assign pseudo labels for each coming minibatch, our ST annotates unlabeled images only once and the training is conducted in a fully-supervised fashion. Besides, we do not manually fine-tune the choice of SDA. The SDA, harmful to the clean data distribution, but is vital to unlabeled images, please refer to Table 5 for detail. + +# 3.4. $\mathrm{ST} + + :$ Select and Prioritize Reliable Images + +Despite the impressive results obtained by the straightforward ST framework, however, it treats each unlabeled sample equally and leverages them in the same way without considering the inherent reliability and difficulty of individual sample. The incorrect predictions in some hard examples may incur negative impact of the training process. Therefore, in current advanced $\mathrm{ST} + +$ framework, we further propose a selective re-training scheme via prioritizing reliable unlabeled samples to safely exploit the whole unlabeled set in an easy-to-hard curriculum learning manner [5]. + +Previous works estimate the reliability or uncertainty of an image or pixel from different perspectives, such as taking the final softmax output as the confidence distribution + +
NetworkMethod1/16 (662)1/8 (1323)1/4 (2645)NetworkMethod1/16 (662)1/8 (1323)1/4 (2645)
PSPNet ResNet-50SupOnly63.867.269.6DeepLabv3+ ResNet-50SupOnly64.868.370.5
CCT [41]62.268.871.2ECS [37]-70.272.6
DCC [31]67.171.372.5DCC [31]70.172.474.0
ST69.173.073.2ST71.673.375.0
ST++69.973.273.4ST++72.674.475.4
DeepLabv2 ResNet-101SupOnly64.367.669.5DeepLabv3+ ResNet-101SupOnly66.370.673.1
AdvSSL [26]62.668.469.9S4GAN [38]69.172.474.5
S4L [57]61.867.268.4GCT [28]67.272.575.1
GCT [28]65.270.671.5DCC [31]72.474.676.3
ST68.671.672.5ST72.975.776.4
ST++69.372.072.8ST++74.576.376.6
+ +Table 1. Results on Pascal VOC. Labeled images are selected from augmented training set. The fraction (e.g., 1/16) and number (e.g., 662) denote the proportion and number of labeled images. SupOnly (supervised baseline): no unlabeled data are leveraged, thus the model is only trained with labeled data. The best results are marked in bold, while the second best ones are in italic bold. + +and filtering low-confidence pixels by pre-defined threshold [47, 63], as well as training two differently initialized models to predict the same unlabeled sample and re-weighting the uncertainty-aware loss with their disagreements [17]. In our $\mathrm{ST} + +$ , we hope to measure the reliability with a single training model without manually choosing the confidence threshold. And for a more stable evaluation of reliability, we filter out unreliable samples based on image-level information rather than widely adopted pixel-level information. The image-level selection also enables the model to learn more holistic contextual patterns during training. + +Specifically, we observe that there is a positive correlation between the segmentation performance and the evolving stability of produced pseudo masks during the supervised training phase. Therefore, the more reliable and better predicted unlabeled images can be selected based on their evolving stability during training. More formally, considering an unlabeled image $u_{i} \in \mathcal{D}^{u}$ , for $K$ checkpoints $\{T_j\}_{j=1}^K$ saved during training, we predict the pseudo masks of $u_{i}$ with them to obtain $\{M_{ij}\}_{j=1}^K$ . Since training model tends to converge and achieve the best performance in the late training stage, we evaluate the meanIOU between each earlier pseudo mask and the final mask. The meanIOU can serve as a measurement for stability and further reflect the reliability of the unlabeled image along with pseudo mask: + +$$ +s _ {i} = \sum_ {j = 1} ^ {K - 1} \text {m e a n I O U} \left(M _ {i j}, M _ {i K}\right), \tag {4} +$$ + +where $s_i$ is the stability score, reflecting the reliability of $u_i$ . + +Obtaining the stability score of all unlabeled images, we sort the whole unlabeled set based on these scores, and select the top $R$ images with the highest scores for the first retraining phase. With a better optimized student model, the remaining unreliable images are re-labeled and the second re-training phase is conducted on the full combination of + +manually labeled and pseudo labeled data. The pseudocode of our $\mathrm{ST} + +$ method is illustrated in Algorithm 2. + +# 4. Experiments + +# 4.1. Setup + +Dataset. The Pascal VOC 2012 [16] is composed of 1464 images for training and 1449 images for validation originally. And the training set can be augmented via introducing relatively lower-quality annotations from the SBD dataset [22], resulting in 10582 training images. The Cityscapes [13] contains 2975 images with fine-grained masks for training and 500 images for validation. + +Network structure. In the past few years, different models and backbones are utilized. In order to conduct a comprehensive comparison, we evaluate four network structures, namely PSPNet [60] with ResNet-50 [23], DeepLabv3+ [9] with ResNet-50/101, and DeepLabv2 [8] with ResNet-101. The DeepLabv2 model is initialized with the MS COCO [36] pre-trained parameters following [28], while the other backbones are pre-trained on ImageNet [14]. + +Implementation details. We maintain the same hyperparameters between supervised pre-training of the teacher and semi-supervised re-training of the student. Specifically, the batch size is set as 16 for both Pascal and Cityscapes with two and four NVIDIA V100 GPUs respectively (actually, two 2080Ti GPUs are already enough for all experiments on Pascal). We use the SGD optimizer for training, where the initial base learning rate of the backbones is set as 0.001 on Pascal and 0.004 on Cityscapes. The learning rate of the randomly initialized segmentation head is 10 times larger than that of backbones. We use the poly scheduling to decay the learning rate during the training process: $lr = \text{base} r \times (1 - \frac{\text{iter}}{\text{total\_iter}})^{0.9}$ . The model is trained for 80 epochs on Pascal and 240 epochs on Cityscapes. For + +
MethodResNet-50 / ResNet-101
1/16 (662)1/8 (1323)1/4 (2645)
SupOnly64.0 / 68.469.0 / 73.371.7 / 74.7
CCT [41]65.2 / 67.970.9 / 73.073.4 / 76.2
CutMix-Seg [18]68.9 / 72.670.7 / 72.772.5 / 74.3
GCT [28]64.1 / 69.870.5 / 73.373.5 / 75.3
CPS [12]68.2 / 72.273.2 / 75.874.2 / 77.6
\( \text{CPS}^\dagger \)[12]72.0 / 74.573.7 / 76.474.9 / 77.7
ST72.2 / 74.074.8 / 76.975.5 / 77.6
ST++73.2 / 74.775.5 / 77.976.0 / 77.9
+ +weak data augmentations, the training images are randomly flipped and resized between 0.5 and 2.0. They are further cropped to $321 \times 321$ on Pascal and $721 \times 721$ on Cityscapes. For the strong data augmentations on unlabeled images, we use colorjitter with the same intensity as [66], grayscale, blur same as [11], and Cutout with random values filled. The Cutout regions are ignored in loss computation. In the pseudo labeling phase, all unlabeled images are predicted with test-time augmentation, which contains five scales and horizontal flipping. The testing images are evaluated on their original resolution and no post-processing techniques are adopted. The reliable images are measured with three checkpoints that are evenly saved at $1/3$ , $2/3$ , $3/3$ total iterations during training. We simply treat the top $50\%$ highest scored images as reliable ones and the remaining ones as unreliable. It is worth noting that, for fair comparison with most existing works, we do not incorporate any advanced optimization strategies, such as OHEM in [25], auxiliary supervision in [12, 25], nor SyncBN into our method. We also choose a relatively smaller cropping size during training to save memory, compared with CPS [12] (321 vs. 512 on Pascal and 721 vs. 800 on Cityscapes). + +# 4.2. Comparison with State-of-the-Art Methods + +Two frameworks based on classical self-training scheme are proposed in this work, namely ST and $\mathrm{ST} + +$ . In this section, we extensively compare both of our frameworks with previous methods across a variety of datasets and settings. + +Pascal VOC 2012. Most previous works uniformly sample labeled images from the augmented training set, which contains 10,582 images in total. As shown in Table 1, our proposed ST already outperforms existing methods remarkably with the four network architectures across extensive settings. Moreover, with the advanced $\mathrm{ST}++$ , the performance is further boosted consistently. Besides, the significant margin between our $\mathrm{ST} / \mathrm{ST}++$ and the supervised only (SupOnly) results proves our successful and effective exploitation on the abundant unlabeled images. Among most + +![](images/d43a399471e5c9faecd3b8c4d10ae60ef467257a0ace8999d982bb442855d1cc.jpg) +Figure 2. Effectiveness of each data augmentation. All strong data augmentations contribute to the final success. The inferior result of further applying Cutout on labeled images (73.2 vs. 73.3) demonstrates that Cutout in SDA works as a strong regularization for unlabeled data rather than a common trick for training. + +Table 2. Results on Pascal VOC using a modified ResNet with the deep stem block, following CPS [12]. †: CPS also adopts CutMix [56] to further boost the performance. + +
Method# Labeled images (Total: 10582)
921833667321464
SupOnly50.759.165.070.674.1
GCT [28]46.055.064.770.7-
CutMix-Seg [18]55.663.268.469.8-
PseudoSeg [66]57.665.569.172.473.2
CPS [12]64.167.471.775.9-
PC2Seg [61]57.066.369.873.174.2
ST61.368.273.576.378.9
ST++65.271.074.677.379.1
Fully-supervised setting (10582 images): 78.2
+ +Table 3. Results on Pascal VOC using DeepLabv3+ with ResNet-101. Labeled images are selected from original training set. + +recent methods, CPS [12] adopts a stronger ResNet with the deep stem block, therefore we also modify our backbone to conduct a fair comparison in Table 2. + +Some recent works sample labeled images from the high-quality original training set. We evaluate our method under this setting in Table 3. Without iterative training adopted as [55], our ST and $\mathrm{ST} + +$ framework surpass the previous state-of-the-art methods impressively, even outperform the fully-supervised setting with only 1464 labeled images. + +Cityscapes. As shown in Table 4, across a wide range of the number of labeled images, e.g., from 744 to mere 100, both of our methods obtain the state-of-the-art results under a fair comparison with previous methods. It is worth noting that, our method with ResNet-50 backbone even surpasses other works with ResNet-101 backbone by a large margin. + +Discussion with previous works. [18] explores the strong, varied perturbations in the semi-supervised semantic segmentation and finds that Cutout and CutMix play an important role in the consistency regularization. Besides, [66] inherits the spirit from FixMatch [47] and applies strong-weak perturbations for consistency regularization. Differ + +![](images/1b24ef25481ba7f128710a9659513418b8add9b0148dec0336e505d51574e8f8.jpg) +Figure 3. Pseudo mask quality of the reliable and unreliable images selected by $\mathrm{ST} + +$ . The Boosted means the improved mIOU when re-labeling the unreliable images with the model trained on reliable images compared with only trained with labeled images. + +
Method1/30 (100)1/8 (372)1/4 (744)
DeepLabv3+, ResNet-101
DMT [17]54.863.0-
CutMix-Seg [18]55.765.868.3
ClassMix [40]-61.463.6
PseudoSeg [66]61.069.872.4
DeepLabv3+, ResNet-50
SupOnly55.165.868.4
DCC [31]-69.772.7
ST60.971.673.4
ST++61.472.773.8
+ +ent from these one-stage works, we find that a simple offline self-training scheme produces more stable and consistent artificial masks. Moreover, coupled with strong data augmentations which are uncommon in supervised scenarios, e.g., colorjitter, grayscale, and blur on unlabeled data, the offline two-stage pipeline can enforce the consistency across various strong perturbations in a broader stage-wise scope, without the limitation from current minibatch. And empirically, according to extensive validations, our proposed ST surpasses all the prior methods impressively. + +# 4.3. Ablation Studies + +The main findings and contributions of this work lie in 1) strong data augmentations (SDA) on unlabeled data and 2) selective re-training. In this section, we examine the actual effectiveness of the two components in detail. We conduct our ablation studies with DeepLabv3+ and ResNet-50 on the Pascal VOC. Unless otherwise specified, 1323 (1/8) labeled images are sampled from the augmented training set. + +Effectiveness of the SDA in ST. As aforementioned, SDA is composed of colorjitter, grayscale, blur, and Cutout. Here + +![](images/ab8fc11df6a42c0c7d134e7acddce9b9e9a9a1643752a0f18701957d2b5d2a4a.jpg) +Figure 4. Training process of our proposed $\mathrm{ST}++$ . $\mathrm{ST}++$ first trains the model on reliable images (Re-train #1) and then on all re-labeled images (Re-train #2). It can be seen the first stage retraining already obtains competitive results as our ST, further proving that the image-level selection is appropriate and necessary. + +Table 4. Results on Cityscapes. It is worth noting that our method with ResNet-50 already surpasses others with ResNet-101. + +
Apply SDA on labeled data1/16 (662)1/8 (1323)1/4 (2645)
70.971.4
✓✓71.073.0
✓71.673.3
75.0
+ +Table 5. Effectiveness of full SDA. The first line without applying SDA is the plainest self-training [33]. The best results of only applying SDA on unlabeled data indicate that a more challenging optimization target for unlabeled data is vital to the success. And SDA on labeled data may destroy the clean data distribution. + +we validate their effectiveness from three perspectives. (1) Firstly, we show the results when no SDA is adopted in Table 5. It can be seen that the model performance degrades across all settings, proving that SDA is vital to the success of self-training. (2) Following this, we further examine the effect of SDA on labeled images. According to the results in Table 5, the labeled images are negatively affected by SDA, indicating that it may deteriorate the clean distribution of labeled images. (3) Finally, in order to gain a better intuition of the individual benefit of the four data augmentations, we add each of them to unlabeled images in Figure 2. + +Besides these, since Cutout is proposed as a common trick in image recognition, we attempt to also apply it to labeled images (gray column in Figure 2). The inferior results prove that our proposed ST benefits from the strong perturbations on unlabeled images rather than common tricks. + +Effectiveness of selective re-training in $\mathbf{ST} + +$ .We first measure the quality of the pseudo masks from reliable and unreliable set respectively. As shown in Figure 3, the meanIOU gap between pseudo masks from reliable set and unreliable set is all larger than $15\%$ , indicating that it is reasonable to select and prioritize the reliable set. The obtained better student can produce more accurate pseudo masks on the remaining unreliable images. The improvement of un + +
Method1/16 (662)1/8 (1323)1/4 (2645)
One-stage re-training (our ST)71.673.375.0
Random two-stage re-training71.373.974.7
Selective re-training (our ST++)72.674.475.4
+ +Table 6. Effectiveness of the selective re-training in $\mathrm{ST}++$ . $\mathrm{ST}++$ does not benefit from random two-stage re-training process, but the progressive reliable-to-unreliable selective re-training pipeline. + +
Proportion of reliable images25%50% (default)75%
mIOU (%)74.074.474.5
+ +reliable image masks is remarkable as the Boosted column. + +We further check whether our pipeline benefits from the correct selection of reliable unlabeled images or merely the two-stage training pipeline. We randomly divide the whole unlabeled training set into two parts, training with one part first and then re-labeling the remaining ones. The model is finally jointly optimized on the full combination of manually labeled and pseudo labeled images. As shown in Table 6, the semi-supervised model does not benefit from the random two-stage training, in some cases even inferior to its one-stage counterpart. As a comparison, our selective retraining based on image-level stability and reliability consistently outperforms the one-stage re-training pipeline. + +Since the re-training phase is conducted in a two-stage manner in our $\mathrm{ST}++$ , we examine the improvement after each stage in Figure 4. It can be easily seen that after the first stage, where only half the unlabeled images are exploited, the $\mathrm{ST}++$ already obtains competitive results as ST, revealing the high quality of the selected reliable images. + +We also conduct ablation studies on the proportion of selected reliable images. As shown in Table 7, the default hyper-parameter $50\%$ is effective enough. Our $\mathrm{ST}++$ is also robust to other values and the $75\%$ is even slightly better. + +Comparison between image-level and pixel-level selective re-training. The contribution in our $\mathrm{ST}++$ is image-level selective re-training, where we decompose the retraining phase into two sub-phases and prioritize reliable images for the first phase re-training. We argue that image-level selection is more stable and provides complete context information for training. Therefore, we compare it with pixel-level selection, where high-confidence pixels are selected for the first phase re-training, and the remaining pixels are re-labeled with a better student for the second phase re-training. Following [63, 66], we set the confident threshold as 0.5. As demonstrated in Table 8, the image-level selection brings consistent improvements over our ST framework and is superior to the pixel-level counterpart. + +![](images/3109a409bd81cd216d0f1cb586c1c363429d6854fa50e34aea15cb1b6d88c873.jpg) +Figure 5. Effectiveness of iterative training. We also show results of PseudoSeg [66] and CutMix-Seg [18] for a clear comparison. + +Table 7. Ablation study on the proportion of reliable images. The default hyper-parameter $50\%$ is effective enough. + +
Method1/16 (662)1/8 (1323)1/4 (2645)
our ST (w/o iterative re-train)71.673.375.0
Image-level re-train (our ST++)72.674.475.4
Pixel-level re-train phase #171.373.574.9
Pixel-level re-train phase #271.373.874.7
+ +Table 8. Comparison between image-level (our ST++) and common pixel-level selective re-training (setting a threshold). + +Effectiveness of iterative training. As aforementioned, for simplicity and efficiency, we choose not to conduct iterative training. However, it is possible to further boost the final performance via switching the teacher-student role and re-labeling unlabeled images for several times. Therefore, we examine the effectiveness of iterative training in our $\mathrm{ST}++$ in Figure 5. An extra stage (Re-train #3 in the figure) is conducted, where all the unlabeled images are re-labeled with the best learned model in the second re-training stage and the student is re-trained. In the extremely scarce-label regime of only 92 and 366 labeled images, with the extra retraining stage, the performance can be further boosted from $65.2\%$ to $68.3\%$ and $74.6\%$ to $75.2\%$ respectively. + +# 5. Conclusion + +In this work, we firstly construct a strong self-training baseline for semi-supervised semantic segmentation via introducing strong data augmentations to unlabeled images, in hope of alleviating overfitting noisy labels as well as decoupling similar predictions between the teacher and student. Moreover, an advanced framework is proposed to progressively leverage the unlabeled images. With extensive experiments conducted across a variety of benchmarks and settings, both of our ST and $\mathrm{ST} + +$ framework outperform previous methods by a large margin. Based on the inspiring results, we further examine the effectiveness of each component in detail and provide some empirical analysis. We hope this simple yet effective framework can serve as a strong baseline or competitor for future works in this field. + +# 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. 3 +[2] Eric Arazo, Diego Ortego, Paul Albert, Noel E O'Connor, and Kevin McGuinness. Pseudo-labeling and confirmation bias in deep semi-supervised learning. In IJCNN, 2020. 2 +[3] Murat Seckin Ayhan and Philipp Berens. Test-time data augmentation for estimation of heteroscedastic aleatoric uncertainty in deep neural networks. In MIDL, 2018. 3 +[4] Philip Bachman, Ouais Alsharif, and Doina Precup. Learning with pseudo-ensembles. In NeurIPS, 2014. 2 +[5] Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In ICML, 2009. 3, 4 +[6] David Berthelot, Nicholas Carlini, Ian Goodfellow, Nicolas Papernot, Avital Oliver, and Colin Raffel. Mixmatch: A holistic approach to semi-supervised learning. In NeurIPS, 2019. 2 +[7] Paola Cascante-Bonilla, Fuwen Tan, Yanjun Qi, and Vicente Ordonez. Curriculum labeling: Revisiting pseudo-labeling for semi-supervised learning. In AAAI, 2021. 2, 3 +[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. 5 +[9] 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. 1, 5 +[10] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020. 2, 4 +[11] Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv:2003.04297, 2020. 4, 6 +[12] Xiaokang Chen, Yuhui Yuan, Gang Zeng, and Jingdong Wang. Semi-supervised semantic segmentation with cross pseudo supervision. In CVPR, 2021. 1, 2, 3, 4, 6 +[13] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. 5 +[14] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. 5 +[15] Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout. arXiv:1708.04552, 2017. 4 +[16] Mark Everingham, SM Ali Eslami, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The Pascal visual object classes challenge: A retrospective. *IJCV*, 2015. 5 +[17] Zhengyang Feng, Qianyu Zhou, Qiqi Gu, Xin Tan, Guangliang Cheng, Xuequan Lu, Jianping Shi, and Lizhuang Ma. + +Dmt: Dynamic mutual training for semi-supervised learning. arXiv:2004.08514, 2020. 1, 3, 4, 5, 7 +[18] Geoff French, Timo Aila, Samuli Laine, Michal Mackiewicz, and Graham Finlayson. Semi-supervised semantic segmentation needs strong, high-dimensional perturbations. In BMVC, 2020. 3, 6, 7, 8 +[19] Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In ICML, 2016. 3 +[20] Ian J Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial networks. In NeurIPS, 2014. 1, 3 +[21] Yves Grandvalet and Yoshua Bengio. Semi-supervised learning by entropy minimization. In NeurIPS, 2005. 1, 2 +[22] Bharath Hariharan, Pablo Arbeláez, Lubomir Bourdev, Subhransu Maji, and Jitendra Malik. Semantic contours from inverse detectors. In ICCV, 2011. 5 +[23] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 5 +[24] Ruifei He, Jihan Yang, and Xiaojuan Qi. Re-distributing biased pseudo labels for semi-supervised semantic segmentation: A baseline investigation. In ICCV, 2021. 3 +[25] Hanzhe Hu, Fangyun Wei, Han Hu, Qiwei Ye, Jinshi Cui, and Liwei Wang. Semi-supervised semantic segmentation via adaptive equalization learning. In NeurIPS, 2021. 2, 3, 4, 6 +[26] Wei-Chih Hung, Yi-Hsuan Tsai, Yan-Ting Liou, Yen-Yu Lin, and Ming-Hsuan Yang. Adversarial learning for semi-supervised semantic segmentation. In BMVC, 2018. 2, 5 +[27] Jisoo Jeong, Seungeui Lee, Jeesoo Kim, and Nojun Kwak. Consistency-based semi-supervised learning for object detection. In NeurIPS, 2019. 4 +[28] Zhanghan Ke, Kaican Li Di Qiu, Qiong Yan, and Rynson WH Lau. Guided collaborative training for pixel-wise semi-supervised learning. In ECCV, 2020. 5, 6 +[29] Alex Kendall and Yarin Gal. What uncertainties do we need in bayesian deep learning for computer vision? In NeurIPS, 2017. 3 +[30] Ananya Kumar, Tengyu Ma, and Percy Liang. Understanding self-training for gradual domain adaptation. In ICML, 2020. 3 +[31] Xin Lai, Zhuotao Tian, Li Jiang, Shu Liu, Hengshuang Zhao, Liwei Wang, and Jiaya Jia. Semi-supervised semantic segmentation with directional context-aware consistency. In CVPR, 2021. 1, 3, 5, 7 +[32] Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. In ICLR, 2017. 2 +[33] Dong-Hyun Lee et al. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In ICML Workshop, 2013. 1, 2, 3, 4, 7 +[34] Xiaoxiao Li, Ziwei Liu, Ping Luo, Chen Change Loy, and Xiaou Tang. Not all pixels are equal: Difficulty-aware semantic segmentation via deep layer cascade. In CVPR, 2017. 2 + +[35] Xiaobo Liang, Lijun Wu, Juntao Li, Yue Wang, Qi Meng, Tao Qin, Wei Chen, Min Zhang, and Tie-Yan Liu. R-drop: Regularized dropout for neural networks. arXiv:2106.14448, 2021. 3 +[36] 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. 5 +[37] 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. 5 +[38] Sudhanshu Mittal, Maxim Tatarchenko, and Thomas Brox. Semi-supervised semantic segmentation with high-and low-level consistency. TPAMI, 2019. 1, 2, 5 +[39] Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. TPAMI, 2018. 2 +[40] Viktor Olsson, Wilhelm Tranheden, Juliano Pinto, and Lennart Svensson. Classmix: Segmentation-based data augmentation for semi-supervised learning. In WACV, 2021. 7 +[41] Yassine Ouali, Céline Hudelot, and Myriam Tami. Semi-supervised semantic segmentation with cross-consistency training. In CVPR, 2020. 3, 5, 6 +[42] Hieu Pham, Zihang Dai, Qizhe Xie, and Quoc V Le. Meta-pseudo labels. In CVPR, 2021. 2 +[43] Ilija Radosavovic, Piotr Dollar, Ross Girshick, Georgia Gkioxari, and Kaiming He. Data distillation: Towards omnisupervised learning. In CVPR, 2018. 2, 3 +[44] Zhongzheng Ren, Raymond Yeh, and Alexander Schwing. Not all unlabeled data are equal: learning to weight data in semi-supervised learning. In NeurIPS, 2020. 2 +[45] Mehdi Sajjadi, Mehran Javanmardi, and Tolga Tasdizen. Regularization with stochastic transformations and perturbations for deep semi-supervised learning. In NeurIPS, 2016. 2 +[46] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In NeurIPS, 2016. 3 +[47] 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 NeurIPS, 2020. 1, 2, 3, 4, 5, 6 +[48] Kihyuk Sohn, Zizhao Zhang, Chun-Liang Li, Han Zhang, Chen-Yu Lee, and Tomas Pfister. A simple semi-supervised learning framework for object detection. arXiv:2005.04757, 2020.3,4 +[49] Nasim Souly, Concetto Spampinato, and Mubarak Shah. Semi supervised semantic segmentation using generative adversarial network. In ICCV, 2017. 2 +[50] Ruoqi Sun, Xinge Zhu, Chongruo Wu, Chen Huang, Jianping Shi, and Lizhuang Ma. Not all areas are equal: Transfer learning for semantic segmentation via hierarchical region selection. In CVPR, 2019. 2 + +[51] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In NeurIPS, 2017. 2 +[52] Qizhe Xie, Zihang Dai, Eduard Hovy, Minh-Thang Luong, and Quoc V Le. Unsupervised data augmentation for consistency training. In NeurIPS, 2020. 1, 2 +[53] Qizhe Xie, Minh-Thang Luong, Eduard Hovy, and Quoc V Le. Self-training with noisy student improves imagenet classification. In CVPR, 2020. 1, 2, 3 +[54] I Zeki Yalniz, Hervé Jégou, Kan Chen, Manohar Paluri, and Dhruv Mahajan. Billion-scale semi-supervised learning for image classification. arXiv:1905.00546, 2019. 3 +[55] Jianlong Yuan, Yifan Liu, Chunhua Shen, Zhibin Wang, and Hao Li. A simple baseline for semi-supervised semantic segmentation with strong data augmentation. In ICCV, 2021. 2, 3, 4, 6 +[56] 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. 6 +[57] Xiaohua Zhai, Avital Oliver, Alexander Kolesnikov, and Lucas Beyer. S4l: Self-supervised semi-supervised learning. In ICCV, 2019. 5 +[58] Bowen Zhang, Yidong Wang, Wenxin Hou, Hao Wu, Jindong Wang, Manabu Okumura, and Takahiro Shinozaki. Flexmatch: Boosting semi-supervised learning with curriculum pseudo labeling. In NeurIPS, 2021. 2 +[59] Pan Zhang, Bo Zhang, Ting Zhang, Dong Chen, and Fang Wen. Robust mutual learning for semi-supervised semantic segmentation. arXiv:2106.00609, 2021. 3 +[60] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In CVPR, 2017. 1, 5 +[61] Yuanyi Zhong, Bodi Yuan, Hong Wu, Zhiqiang Yuan, Jian Peng, and Yu-Xiong Wang. Pixel contrastive-consistent semi-supervised semantic segmentation. In ICCV, 2021. 3, 6 +[62] Yanning Zhou, Hang Xu, Wei Zhang, Bin Gao, and Pheng-Ann Heng. C3-semiseg: Contrastive semi-supervised segmentation via cross-set learning and dynamic classbalancing. In ICCV, 2021. 3 +[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. 3, 5, 8 +[64] Yang Zou, Zhiding Yu, BVK Kumar, and Jinsong Wang. Unsupervised domain adaptation for semantic segmentation via class-balanced self-training. In ECCV, 2018. 3 +[65] Yang Zou, Zhiding Yu, Xiaofeng Liu, BVK Kumar, and Jinsong Wang. Confidence regularized self-training. In CVPR, 2019. 3 +[66] Yuliang Zou, Zizhao Zhang, Han Zhang, Chun-Liang Li, Xiao Bian, Jia-Bin Huang, and Tomas Pfister. Pseudoseg: Designing pseudo labels for semantic segmentation. In ICLR, 2021. 1, 2, 3, 4, 6, 7, 8 \ No newline at end of file diff --git a/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/images.zip b/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7a96650fc7bf528c0f1b7b116c8f87d4adc0c84c --- /dev/null +++ b/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:332ebd9685e4abf973f42b89c906c6bc5e331c55a9db72ffa00eb457fe2dfa61 +size 428782 diff --git a/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/layout.json b/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..355aef762e329943abb3c6a1ab7c84c446e19ff3 --- /dev/null +++ b/stmakeselftrainingworkbetterforsemisupervisedsemanticsegmentation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb8f6e2a7210150c3a4e2ab32bcea59363b737c8bdd894f35865eb9b47cae735 +size 443320 diff --git a/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/3e3e7d5c-c8ff-457d-b595-cdb5db9e849a_content_list.json b/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/3e3e7d5c-c8ff-457d-b595-cdb5db9e849a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..95451d1fb63bb8365c4b06eee91bf531cf7068f6 --- /dev/null +++ b/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/3e3e7d5c-c8ff-457d-b595-cdb5db9e849a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e7b0af4319b51913381e5e7632320a3811f3472b266bf4357663f0b5f41335a +size 84868 diff --git a/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/3e3e7d5c-c8ff-457d-b595-cdb5db9e849a_model.json b/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/3e3e7d5c-c8ff-457d-b595-cdb5db9e849a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..920eb477b16535a757f2037c904e499ef2627d1b --- /dev/null +++ b/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/3e3e7d5c-c8ff-457d-b595-cdb5db9e849a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ed132b8ddd1dc97eee938e4f0290fbde5445082def13c91934c554dd2c41f96 +size 109151 diff --git a/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/3e3e7d5c-c8ff-457d-b595-cdb5db9e849a_origin.pdf b/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/3e3e7d5c-c8ff-457d-b595-cdb5db9e849a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..323f5a2e9fb04296e3d3c92429e47457bbf62b30 --- /dev/null +++ b/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/3e3e7d5c-c8ff-457d-b595-cdb5db9e849a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6b14630acdde2729b94035468e689842d0d90a9a22e3fe73f1f60fd9a34a424 +size 1094743 diff --git a/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/full.md b/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e269a7a157f12845e997ccf19546b90b31248a7d --- /dev/null +++ b/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/full.md @@ -0,0 +1,359 @@ +# ST-MFNet: A Spatio-Temporal Multi-Flow Network for Frame Interpolation + +Duolikun Danier + +Fan Zhang + +University of Bristol + +{duolikun.danier, fan.zhang, dave.bull}@bristol.ac.uk + +# Abstract + +Video frame interpolation (VFI) is currently a very active research topic, with applications spanning computer vision, post production and video encoding. VFI can be extremely challenging, particularly in sequences containing large motions, occlusions or dynamic textures, where existing approaches fail to offer perceptually robust interpolation performance. In this context, we present a novel deep learning based VFI method, ST-MFNet, based on a Spatio-Temporal Multi-Flow architecture. ST-MFNet employs a new multi-scale multi-flow predictor to estimate many-to-one intermediate flows, which are combined with conventional one-to-one optical flows to capture both large and complex motions. In order to enhance interpolation performance for various textures, a 3D CNN is also employed to model the content dynamics over an extended temporal window. Moreover, ST-MFNet has been trained within an ST-GAN framework, which was originally developed for texture synthesis, with the aim of further improving perceptual interpolation quality. Our approach has been comprehensively evaluated - compared with fourteen state-of-the-art VFI algorithms - clearly demonstrating that ST-MFNet consistently outperforms these benchmarks on varied and representative test datasets, with significant gains up to 1.09dB in PSNR for cases including large motions and dynamic textures. Our source code is available at https://github.com/danielism97/ST-MFNet. + +# 1. Introduction + +Video frame interpolation (VFI) has been extensively employed to deliver an improved user experience across a wide range of important applications. VFI increases the temporal resolution (frame rate) of a video through synthesizing intermediate frames between every two consecutive original frames. It can mitigate the need for costly high frame rate acquisition processes [27], enhance the rendering of slow-motion content [26], support view synthesis [16] and improve rate-quality trade-offs in video coding [56]. + +![](images/3cf4759b50463b135dd48b53a4b8f103b687a59fb5f7d5c9c2dcc788924c5d94.jpg) +Figure 1. High-level architecture of ST-MFNet, which employs a two-stage workflow to interpolate an intermediate frame. + +In recent years, deep learning has empowered a variety of VFI algorithms. These methods can be categorized as flow-based [26, 59] or kernel-based [30, 41]. While flow-based methods use the estimated optical flow maps to warp input frames, kernel-based methods learn local or shared convolution kernels for synthesizing the output. To handle challenging scenarios encountered in VFI applications, various techniques have been employed to enhance these methods, including non-linear motion models [43, 48, 59], coarse-to-fine architectures [9, 42, 48, 64], attention mechanisms [11, 27], and deformable convolutions [20, 30]. + +Although these methods have significantly improved performance compared with conventional VFI approaches [3], their performance can still be inconsistent, especially for content exhibiting large motions, occlusions and dynamic textures. Large motion typically means large pixel displacements, which are difficult to capture using Convolutional Neural Networks (CNNs) with limited receptive fields [40, 41]. In the case of occlusion, pixels relating to occluded objects will not appear in all input frames, thus preventing interpolation algorithms from accurately estimating the intermediate locations of those + +pixels [11, 27]. Finally, dynamic textures (e.g. water, fire, foliage, etc.) exhibit more complex motion characteristics compared to the movements of rigid objects [13, 63]. Typically, they are spatially irregular and temporally stochastic, causing most existing VFI methods to fail, especially those based on optical flow [26, 32]. + +To solve these problems, we propose a novel video frame interpolation model, the Spatio-Temporal Multi-Flow Network (ST-MFNet), which decouples the handling of large and complex motions using single- and multi-flows respectively in a multi-branch structure to offer improved interpolation performance across a wide range of content types. Specifically, ST-MFNet employs a two-stage architecture, as shown in Figure 1. In Stage I, the Multi-InterFlow Network (MIFNet) first predicts multi-interflows [12, 30] at multiple scales (including an up-sampling scale simulating sub-pixel motion estimation), using a customized CNN architecture, UMSResNext, with variable kernel sizes. The multi-flows here correspond to a many-to-one mapping which enables more flexible transformation, facilitating the modeling of complex motions. To further improve the performance for large motions, a Bi-directional Linear Flow Network (BLFNet) is employed to linearly approximate the intermediate flows based on the bi-directional flows between input frames, which are estimated using a coarse-to-fine architecture [51]. In the second stage, inspired by recent work on texture synthesis [57, 62], we integrate a 3D CNN, Texture Enhancement Network (TENet) that performs spatial and temporal filtering to capture longer-range dynamics and to predict textural residuals. Finally, we trained our model based on the ST-GAN [62] methodology, which was originally proposed for texture synthesis. This ensures both spatial consistency and temporal coherence of interpolated content. Extensive quantitative and qualitative studies have been performed which demonstrate the superior performance of ST-MFNet over current state-of-the-art VFI methods on a wide range of test data including large and complex motions and dynamic textures. + +The primary contributions of this work are: + +- A novel VFI method where multi-flow based (MIFNet) and single-flow based warping (BLFNet) are combined to enhance the capturing of complex and large motions. +- A new CNN architecture (UMSResNext) for the MIFNet, which predicts multiple intermediate flows at various scales, including an up-sampling scale for high precision sub-pixel motion estimation. +- The use of a spatio-temporal CNN (TENet) and ST-GAN, which were originally designed for texture synthesis, to enhance the interpolation of complex textures. +- Validation, through comprehensive experiments, that our model consistently outperforms state-of-the-art VFI methods on various scenarios, including large and complex motions and various texture types. + +# 2. Related Work + +In this section, we summarize recent advances in video frame interpolation (VFI) and then briefly introduce examples of dynamic texture synthesis, which have inspired the development of our method. + +# 2.1. Video Frame Interpolation + +Most existing VFI methods can be classified as: + +Flow-based VFI. This class typically involves two steps: optical flow estimation and image warping. Input frames, $I_{1}$ and $I_{2}$ , are warped to a target temporal location $t$ based on either the intermediate optical flows $F_{t\rightarrow 1}, F_{t\rightarrow 2}$ (backward warping [25]), or $F_{1\rightarrow t}, F_{2\rightarrow t}$ (forward warping [38]). These flows can be approximated from bidirectional optical flows $(F_{1\rightarrow 2}$ and $F_{2\rightarrow 1}$ ) between the input frames [4, 5, 26, 31, 38, 39, 45, 48, 59]. Such approximations often assume motion linearity, and hence are prone to errors in non-linear motion scenarios. Various efforts have been made to alleviate this issue, including the use of depth information [4], higher order motion models [31, 59], and adaptive forward warping [39]. A second group of methods [24, 32, 42, 43, 60, 64] have been developed to improve approximation by directly predicting intermediate flows. These approaches typically employ a coarse-to-fine architecture, which supports a larger receptive field for capturing large motions. In all of the above methods, the predicted flows correspond to a one-to-one pixel mapping, which inherently limits the ability to capture complex motions. + +Kernel-based VFI. In these methods, various convolution kernels [9-11, 14, 20, 27, 30, 33, 40, 41, 47] are learned as a basis for synthesizing interpolated pixels. Earlier approaches [40, 41] predict a fixed-size kernel for each output location, which is then convolved with co-located input pixels. This limits the magnitude of captured motions to the kernel size used, while more memory and computational capacity are required when larger kernel sizes are adopted. To overcome this problem, deformable convolution (DefConv) [12] was adapted to VFI in AdaCoF [30], which allows kernels to be convolved with any input pixels pointed by local offset vectors. This can be considered as multi-interflows, representing a many-to-one mapping. Further improvements to AdaCoF have been achieved by allowing space-time sampling [47], feature pyramid warping [14], and using a coarse-to-fine architecture [9]. + +# 2.2. Dynamic Texture Synthesis + +Dynamic textures (e.g. water, fire, leaves blowing in the wind etc.) generally exhibit high spatial frequency energy alongside temporal stochasticity, with inter-frame motions irregular in both the spatial and temporal domains. Classic synthesis methods rely on mathematical models such as Markov random fields [55] and auto-regressive moving av + +erage model [15] to capture underlying motion characteristics. More recently, deep learning techniques, in particular 3D CNNs and GAN-based training [18,54,57,61,62], have been adopted to achieve more realistic synthesis results. It should be noted that both dynamic texture synthesis and VFI require accurate modeling of spatio-temporal characteristics. However the techniques developed specifically for texture synthesis have not yet been fully exploited in VFI methods. This is a focus of our work. + +# 3. Proposed Method: ST-MFNet + +Figure 1 shows the architecture of ST-MFNet. While conventionally VFI is formulated as generating the intermediate frame $I_{t}$ ( $t = 1.5$ ) between two given consecutive frames $I_{1}, I_{2}$ , we instead employ two more frames $I_{0}, I_{3}$ to improve the modeling of motion dynamics. Given the frames $I_{0}, I_{1}, I_{2}, I_{3}$ , our model first processes $I_{1}, I_{2}$ in two branches. The Multi-InterFlow Network (MIFNet) branch estimates the multi-scale multi-flows from $I_{t}$ to $I_{1}, I_{2}$ , where the many-to-one pixel correspondence allows complex transformation, benefiting interpolation of highly complex motion, such as dynamic textures (e.g. water, fire etc.). As the fixed receptive field of MIFNet may lead to limited ability to capture large motion, we also included the Bi-directional Linear Flow Network (BLFNet) branch to approximate one-to-one optical flows from $I_{1}, I_{2}$ to $I_{t}$ using a coarse-to-fine approach, enhancing large motion capturing. The input frames are warped based on the flows generated by MIFNet and BLFNet, and then fused by the Multi-Scale Fusion module to obtain an intermediate result $\tilde{I}_{t}$ . This multi-branch structure combines the advantages of both single-flow and multi-flow based methods and was found to offer enhanced interpolation performance. In the second stage, $\tilde{I}_{t}$ is combined with all the inputs $I_{0}, I_{1}, I_{2}, I_{3}$ in temporal order and fed into the Texture Enhancement Network (TENet), which captures longer-range dynamic and generates residual signals for the final output. + +# 3.1. Multi-InterFlow Network + +Multi-InterFlow warping. For self-completeness, we first briefly describe the multi-interflow warping operation [30]. Given two images $I_A, I_B$ with size $H \times W$ , conventional optical flow $F_{A \to B} = (\mathbf{f}_x, \mathbf{f}_y)$ from $I_A$ to $I_B$ specifies the x- and y-components of pixel-wise offset vectors, where $\mathbf{f}_x, \mathbf{f}_y \in \mathbb{R}^{H \times W}$ . The pixel value at each location $(x,y)$ of the corresponding backwarped [25] $\hat{I}_A$ is defined as + +$$ +\hat {I} _ {A} (x, y) = I _ {B} \left(x + \mathbf {f} _ {x} (x, y), y + \mathbf {f} _ {y} (x, y)\right) \tag {1} +$$ + +where the values at non-integer grid locations are obtained via bilinear interpolation. The multi-interflow proposed in [30] can be defined as $G_{A\rightarrow B} = (\alpha ,\beta ,\mathbf{w})$ but now $\alpha ,\beta \in \mathbb{R}^{H\times W\times N}$ represent a collection of + +the $x$ - and $y$ -components of $N$ flow vectors respectively and $\mathbf{w} \in [0,1]^{H \times W \times N}$ is their weighting kernels $(\sum_{i=1}^{N} \mathbf{w}(x,y,i) = 1)$ . That is, for each location $(x,y)$ , $G_{A \to B}$ contains $N$ flow vectors and $N$ weights. The corresponding warping is defined as follows. + +$$ +\hat {I} _ {A} (x, y) = \sum_ {i = 1} ^ {N} \mathbf {w} (x, y, i) \cdot I _ {B} (x + \boldsymbol {\alpha} (x, y, i), y + \boldsymbol {\beta} (x, y, i)) \tag {2} +$$ + +Such multi-flow warping corresponds to a many-to-one mapping, which allows flexible sampling of source pixels, enabling the capture of more complex motions. + +Given input frames $I_{1}, I_{2}$ , the MIFNet predicts the multi-interflows $\{G_{t\rightarrow 1}^{l}, G_{t\rightarrow 2}^{l}\}$ from the intermediate frame $I_{t}$ to the inputs at three scale levels: $l = -1, 0, 1$ , where $l = i$ means spatial down-sampling by $2^{i}$ (i.e. $l = -1$ denotes upsampling), so that re-sampled inputs $I_{1}^{l}, I_{2}^{l}$ can be warped to time $t$ using Equation (2) to produce $\hat{I}_{t1}^{l}, \hat{I}_{t2}^{l}$ respectively. + +Architecture. Figure 2 (a) shows the architecture of the MIFNet. In order to capture pixel movements at multiple scales, we devise a U-Net style feature extractor, U-MultiScaleResNext (UMSResNext), consisting of eight MSResNext blocks (shown in Figure 3). Each MSResNext block employs two ResNext blocks [58] in parallel with different kernel sizes in the middle layer, $3 \times 3$ and $7 \times 7$ , which further increases the network cardinality [35, 58]. The outputs of these two ResNext blocks are then concatenated and connected to a channel attention module [23], which learns adaptive weighting of the feature maps extracted by the two ResNext blocks. Such feature selection mechanism has also been found to enhance motion modeling [11, 27]. In UMSResNext, the up-sampling operation is performed by replacing the $\mathrm{k} \times \mathrm{k}$ grouped convolutions in the middle layer with $(\mathrm{k} + 1) \times (\mathrm{k} + 1)$ grouped transposed convolutions. + +The features extracted by UMSResNext are then passed to the multi-flow heads for multi-interflow prediction. In contrast to [30], multi-flows here are predicted at various scales $l = -1, 0, 1$ , and occlusion maps are not generated (occlusion is handled by the BLFNet). As shown in Figure 2 (b), each multi-flow head contains 6 sub-branches, predicting the x-, y-components $(\alpha, \beta)$ and the kernel weights $(\mathbf{w})$ of $G_{t\rightarrow 1}^{l}, G_{t\rightarrow 2}^{l}$ . The predicted flows are then used to backward the inputs $I_1, I_2$ at corresponding scales using Equation (2). Here a bilinear filter is used for down-sampling input frames, and an 8-tap filter originally designed for sub-pixel motion estimation [50] is employed for up-sampling. The down-sampled scale used here encourages the motion search in a larger region, while the up-sampled scale allows the motion vectors to point to finer sub-pixel locations, increasing the precision of multi-flow warping. + +# 3.2. Bi-directional Linear Flow Network + +To improve large motion interpolation, bi-directional flows $F_{1\rightarrow 2},F_{2\rightarrow 1}$ between inputs $I_{1},I_{2}$ are also predicted + +![](images/0f1f1d696e43dfde7dc825a9ab1ca4d8a1cd12b6707cf9d8b03e98a3093d4173.jpg) +(a) MIFNet + +![](images/6251a4d0ce33659fcd2931ff7ec89e577387ed942194e3d5cee031a7bda07da0.jpg) +(b) Multi-flow head + +![](images/80cae5e5bebe58504f508bf8c543e17238dd6a209c6af8413231ba501d4a5cf0.jpg) +Figure 3. Illustration of the MSResNext block, which consists of two ResNext branches with different kernel sizes, followed by a channel attention module. + +using a pre-trained flow estimator [51], which is based on a coarse-to-fine architecture. The intermediate flows are then linearly approximated as follows. + +$$ +F _ {1 \rightarrow t} = 0. 5 F _ {1 \rightarrow 2} \quad F _ {2 \rightarrow t} = 0. 5 F _ {2 \rightarrow 1} \tag {3} +$$ + +According to the intermediate flows, the frames $I_{1}, I_{2}$ are forward warped using the efficient softplat operator [39], which learns occlusion-related softmax-alike weighting of reference pixels in the forward warping process. Another advantage of softplat is that it is differentiable, allowing the flow estimator to be end-to-end optimized. Finally, BLFNet branch outputs warped frames $\hat{I}_{t1}^{\mathrm{soft}}, \hat{I}_{t2}^{\mathrm{soft}}$ . The employment of the BLFNet branch was found to be essential for handling large motion and occlusion and improving the overall capacity of the proposed model. + +# 3.3. Multi-Scale Fusion Module + +The Multi-Scale Fusion Module is employed to produce an intermediate interpolation result using the frames warped at multiple scales in the previous steps. Here we adopt the + +![](images/209f62adbeb71816cded0261b68ef99bc58f88248c2b9083fe1b4e2006dcd4e4.jpg) +Figure 2. Illustration of the MIFNet. (a) The overall architecture of MIFNet, with a U-Net style backbone and multi-flow estimation heads at three scales. (b) The convolutional layers inside the multi-flow head at each scale. +Figure 4. The architecture of the Texture Enhancement Network. + +GridNet [17] architecture due to its superior performance on fusing multi-scale information [38, 39]. The GridNet is configured here to have 4 columns and 3 rows, with the first, second and third rows corresponding to scales of $l = -1,0,1$ respectively. The first and third rows take $\{\hat{I}_{t1}^{-1},\hat{I}_{t2}^{-1}\}$ and $\{\hat{I}_{t1}^{1},\hat{I}_{t2}^{1}\}$ as inputs, while the second row takes $\{\hat{I}_{t1}^{0},\hat{I}_{t2}^{0},\hat{I}_{t1}^{\mathrm{soft}},\hat{I}_{t2}^{\mathrm{soft}}\}$ , where $\{\cdot \}$ denotes channel-wise concatenation. Finally, this module outputs the intermediate result $\tilde{I}_t$ at the original spatial resolution $(l = 0)$ . + +# 3.4. Texture Enhancement Network + +At the end of the first stage, the output of the Multi-Scale Fusion module, $\tilde{I}_t$ , is concatenated with four original inputs to form $\{I_0, I_1, \tilde{I}_t, I_2, I_3\}$ , which are then fed into the Texture Enhancement Network (TENet). Including additional frames here allows better modeling of higher-order motions and also provides more information on longer-term spatiotemporal characteristics. Motivated by recent work in dynamic texture synthesis [57, 62], where spatio-temporal filtering was found to be effective for generating coherent video textures, we integrate a 3D CNN for texture enhancement. This CNN architecture (shown in Figure 4) is a modified version of the network developed in [27], but with reduced layer widths. This is based on the consideration that the intermediately warped frame $\tilde{I}_t$ has already been produced which is relatively close to the target. It is different from the original scenario in [27], where the network is expected to directly synthesize the interpolated output using the four original input frames. Finally, the TENet is expected to output a residual signal containing textural difference between $\tilde{I}_t$ and the target frame, which contributes to the final output of ST-MFNet. + +# 3.5. Loss Functions + +We trained two versions of ST-MFNet in this work. For the distortion oriented model, a Laplacian pyramid loss [7] $(\mathcal{L}_{lap})$ was used as the objective function. This model was further fine-tuned using an ST-GAN based perceptual loss $(\mathcal{L}_p)$ to obtain the perceptually optimized version. + +Laplacian pyramid loss. ST-MFNet was trained end-to-end by matching its output $I_{t}^{out}$ with the ground-truth intermediate frame $I_{t}^{gt}$ using the Laplacian pyramid loss [7], which has been previously used for VFI in [31, 38, 39]. The loss function is defined below. + +$$ +\mathcal {L} _ {l a p} = \sum_ {s = 1} ^ {S} 2 ^ {s - 1} \left\| L ^ {s} \left(I _ {t} ^ {\text {o u t}}\right) - L ^ {s} \left(I _ {t} ^ {g t}\right) \right\| _ {1} \tag {4} +$$ + +Here $L^{s}(I)$ denotes the $s^{\mathrm{th}}$ level of the Laplacian pyramid of an image $I$ , and $S$ is the maximum level. + +Spatio-temporal adversarial loss. To further improve the perceptual quality of the ST-MFNet output, we also trained our model using the Spatio-Temporal Generative Adversarial Networks (ST-GAN) training methodology [62]. Different from the conventional GAN [19] focusing on a single image, the discriminator $D$ here also processes adjacent video frames which improves temporal consistency. This is key for video frame interpolation. The architecture of the discriminator is provided in the Supplementary. This discriminator was trained with the following loss. + +$$ +\mathcal {L} _ {D} = - \log \left(1 - D \left(I _ {t} ^ {\text {o u t}}, I _ {1}, I _ {2}\right)\right) - \log \left(D \left(I _ {t} ^ {g t}, I _ {1}, I _ {2}\right)\right) \tag {5} +$$ + +The corresponding adversarial loss for the generator (STMNet) is given below. + +$$ +\mathcal {L} _ {a d v} = - \log \left(D \left(I _ {t} ^ {\text {o u t}}, I _ {1}, I _ {2}\right)\right) \tag {6} +$$ + +This is then combined with the Laplacian pyramid loss to form the perceptual loss for ST-MFNet fine-tuning, + +$$ +\mathcal {L} _ {p} = \mathcal {L} _ {l a p} + \lambda \mathcal {L} _ {a d v} \tag {7} +$$ + +where $\lambda$ is a weighting hyper-parameter that controls the perception-distortion trade-off [6]. + +# 4. Experimental Setup + +Implementation details. In our implementation, we set the number of flows $N = 25$ (the default value in [30]) for the MIFNet branch. The maximum level $S$ for $\mathcal{L}_{lap}$ was set to 5, and the weighting hyper-parameter $\lambda = 100$ . We used the AdaMax optimizer [28] with $\beta_{1} = 0.9$ , $\beta_{2} = 0.999$ . The learning rate was set to 0.001 and reduced by a factor of 0.5 whenever the validation performance stops improving for 5 epochs. The pre-trained flow estimator [51] in the BLFNet branch was frozen for the first 60 epochs and then fine-tuned for 10 more epochs to further improve VFI performance. + +The network was trained for a total number of 70 epochs using a batch size of 4. All training and evaluation were executed with NVIDIA P100 [52] and RTX 3090 GPUs. + +Training datasets. We used the training split of Vimeo-90k (septuplet) dataset [60] which contains 91,701 frame septuplets $(448\times 256)$ . As Vimeo-90k was produced with constrained motion magnitude and complexity, to further enhance the VFI performance on large motion and dynamic textures, we used an additional dataset, BVI-DVC [34], which covers a wide range of texture/motion types, frame rates (24 to 120 FPS) and spatial resolutions (2160p, 1080p, 540p, and 270p). We randomly sampled 12800, 6400, 800, 800 septuplets from videos at each of these resolutions respectively, leaving out a subset of frames for validation. We augmented all septuplets from both datasets by randomly cropping $256\times 256$ patches and performing flipping and temporal order reversing. This resulted in more than 100,000 septuplets of $256\times 256$ patches. In each septuplet, the $1^{\mathrm{st}}$ , $3^{\mathrm{rd}}$ , $5^{\mathrm{th}}$ and $7^{\mathrm{th}}$ frames were used as inputs and the $4^{\mathrm{th}}$ as the training target. The test split of Vimeo-90k together with unused subset of BVI-DVC was utilized as the validation set for hyper-parameter tuning and training monitoring. + +Evaluation dataset. Since our model takes four frames as input, the evaluation dataset should be able to provide frame quintuplets $I_0, I_1, I_t^{gt}, I_2, I_3$ ( $t = 1.5$ ). In this work, we used the test quintuplets in [59], which were extracted from the UCF-101 [49] (100 quintuplets) and DAVIS [44] (2847 quintuplets) datasets. We also evaluated on the SNU-FILM dataset [11], which specifies a list of 310 triplets at four motion magnitude levels. As original sequences are provided in the SNU-FILM dataset, we extended its pre-defined test triplets into quintuplets for the evaluation here. + +To further test interpolation performance on various texture types, we developed a new test set, VFITex, which contains twenty 100-frame UHD or HD videos at 24, 30 or 50 FPS, collected from the Xiph [37], Mitch Martinez Free 4K Stock Footage [1], UVG database [36] and the Pexels website [2]. This dataset covers diverse textured scenes, including crowds, flags, foliage, animals, water, leaves, fire and smoke. Based on the computational capacity available, we center-cropped HD patches from the UHD sequences, preserving the original UHD characteristics. All frames in each sequence were used for evaluation, totaling 940 quintuplets. More details of the training and evaluation datasets and their license information are provided in the Supplementary. + +Evaluation Methods. Two most commonly used quality metrics, PSNR and SSIM [53], were employed here for objective assessment of the interpolated content. We note that these metrics do not always correlate well with video quality as perceived by a human observer [22, 27]. Therefore, a more perceptually motivated metric, LPIPS [65], were used. Furthermore, in order to directly compare the perceptual quality of the video frames interpolated by our method + +![](images/bf2c9d42f2140bfa825c2d35855f8a7943a1a28025f5af103d334bcf8c756613.jpg) +(a) Overlay + +![](images/b0b3a4c583a9c0c782fe3c171490230b93e029754de520d236b263362ce84d36.jpg) +(b) GT + +![](images/e415b236640d07052fe99566c49652cb0e81a63eeb2ca3242d8882c7f90e5282.jpg) +(c) w/o MIFNet + +![](images/8a7109373e8397491c08ef2fb3cf285a3562625466d968895cea6da562000084.jpg) +(d) w/ MIFNet + +![](images/ca004bc8d2f8e1e899fbe86259a3052b10a6af399f95bedc7abb797ebb541980.jpg) +(i) Overlay + +![](images/79df015963e63c62c6f759d965b65ba0238bf1576617692cded7470c33819fe7.jpg) +(j) GT + +![](images/8265e66b165495e61a88558f7438b0e01c3b0812803e2cc8d6e946459a6e06bf.jpg) +(k) U-Net + +![](images/79c293705b54822d3e438f94f5e50c8a3a16a6816a7b0a59b95b669be3b3bdc5.jpg) +(1) UMSResNext + +![](images/6b5ffd17cad1f917d2a232aa9a12de96de2f252cff198f22dece7ac3a1414557.jpg) +(e) Overlay + +![](images/ad98ef5961fb0c9daa3eba96ae201e12f365e08042271d3d0db8007465fc939f.jpg) +(f) GT + +![](images/7c3c5682c926ebd6a2eb87011ce1642d05ec3373ee87ad93ca8e4291d04b78e4.jpg) +(g) w/o BLFNet + +![](images/54d5d4dd69a03878bfbb4daedc622e740e455e74dac881dd41ed16ea8f5abf2b.jpg) +(h) w/ BLFNet + +![](images/cf47c33275d4a91d44ea9fccf069307c0f9ba7bde238c0fee01885ac32b84d9f.jpg) + +![](images/d2470fd48bb46b4d9f20571891d084e28dc8694e84506c9438e27fc2a1012357.jpg) +(q) Overlay + +![](images/0e722a52e0c0a673272f7c53fcf61795486202bed223bbddd8c75725002e5e2e.jpg) +(r) GT + +![](images/d18f6881dee7503f770089d4f68981413f29d6eb721a2fa2af9dc2749434efd1.jpg) +(s) Ours- $\mathcal{L}_{lap}$ +Figure 5. Qualitative results interpolated by different variants of our method. Here "Overlay" means the overlaid adjacent frames. Figures (a)-(d): w/ MIFNet vs w/o MIFNet; figures (e)-(h): w/ BLFNet vs w/o BLFNet; figures (i)-(j): UMSResNext vs U-Net; figures (m)-(p): w/ TENet vs w/o TENet; figures (q)-(v): comparison of different GANs. + +![](images/e598f0923de1a9e92246325bb99fd09b84e1d0b66c8732b554c797842e23163e.jpg) +(t) TGAN + +![](images/f33ef9b0dd9135070b14693eba9b68fa7d824b6d857099912d81c7f8f251fcb1.jpg) +(u) FIGAN + +![](images/46c79abc89fe5164ba92affd8e2ab7fbd8981450c37838c865c0ae0cd422b6f2.jpg) +(p) w/ TENet +(v) Ours- $\mathcal{L}_p$ + +
UCF101DAVISVFITex
Ours-w/o BLFNet33.218/0.97027.767/0.88128.498/0.915
Ours-w/o MIFNet33.202/0.96927.886/0.88928.357/0.911
Ours-w/o TENet32.895/0.97027.484/0.88028.241/0.910
Ours-unet33.378/0.97028.096/0.89228.898/0.925
Ours33.384/0.97028.287/0.89529.175/0.929
+ +Table 1. Ablation study results (PSNR/SSIM) for ST-MFNet. + +and the benchmark references, a user study was conducted based on a psychophysical experiment. The details of the user study are described in Section 5.3. + +# 5. Results and Analysis + +In this section, we analyze our proposed model through ablation studies, and compare it with 14 state-of-the-art methods both quantitatively and qualitatively. + +# 5.1. Ablation Study + +The key ablation study results are summarized in Table 1, where five versions of ST-MFNet have been evaluated. Figure 5 provides a visual comparison between the frames generated by each test variant and the full ST-MFNet model. Additional ablation study results, visualizations and analyses are available in the Supplementary. + +MIFNet and BLFNet branches. To verify that the MIFNet and BLFNet branches are both effective, two variants of ST-MFNet, Ours- $w/o$ MIFNet and Ours- $w/o$ BLFNet, were created by removing the two branches respectively. Both variants were trained and evaluated using the same configurations described above. It is observed that, firstly, both Ours- $w/o$ MIFNet and Ours- $w/o$ BLFNet achieve lower overall performance compared to the full ST-MFNet (Ours). Sec- + +ondly, compared to Ours, the model performance on large motion (DAVIS) drops more significantly when BLFNet is removed, and that on complex motion (VFITex) degrades more severely when MIFNet is removed. It can also be observed in Figure 5, for the case without MIFNet (sub-figures (a-d)), that the model fails to capture the complex motion of the wave. When BLFNet was removed from the original ST-MFNet (sub-figures (e-h)), the occluded region which is also undergoing a large movement has not been interpolated properly. These observations mean that the contribution of each branch aligns well with our original motivation, hence implying the unique advantages of both multiflow (for complex motion) and single-flow (for large motion) branches have been enabled. + +UMSResNext for multi-flow estimation. To measure the efficacy of the new UMSResNext, we replaced the UMSResNext described in Section 3.1 with the U-Net used in [30] to predict similar multi-flows. This is denoted as Ours-unet. As shown in Table 1, ST-MFNet with UMSResNext achieves enhanced performance on all test sets, and this is also demonstrated by the visual comparison example in Figure 5 (i-l). Another advantage of UMSResNext is that it has much fewer parameters ( $\sim$ 4M) than U-Net ( $\sim$ 21M). + +Texture Enhancement. The importance of the TENet was also analyzed by training another variant Ours- $w/o$ TENet, where the TENet is removed. Table 1 shows that there is a significant performance decrease compared to the full version, especially on DAVIS and VFITex. This demonstrates the contribution of the spatio-temporal filtering on frames over a wider temporal window for content with large and complex motions. Figure 5 (m-p) also shows an example, + +
UCF101DAVISSNU-FILMVFTexRT (sec)#P (M)
EasyMediumHardExtreme
DVF [32]32.251/0.96520.403/0.67327.528/0.87624.091/0.81721.556/0.76019.709/0.70519.946/0.7090.1573.82
SuperSloMo [26]32.547/0.96826.523/0.86636.255/0.98433.802/0.97329.519/0.93024.770/0.85527.914/0.9110.10739.61
SepConv [41]32.524/0.96826.441/0.85339.894/0.99035.264/0.97629.620/0.92624.653/0.85127.635/0.9070.06221.68
DAIN [4]32.524/0.96827.086/0.87339.280/0.98934.993/0.97629.752/0.92924.819/0.85027.314/0.9090.89624.03
BMBC [42]32.729/0.96926.835/0.86939.809/0.99035.437/0.97829.942/0.93324.715/0.85627.337/0.9041.42511.01
AdaCoF [30]32.610/0.96826.445/0.85439.912/0.99035.269/0.97729.723/0.92824.656/0.85127.639/0.9040.05121.84
FeFlow [20]32.520/0.96726.555/0.85639.591/0.99035.014/0.97729.466/0.92824.607/0.852OOM1.385133.63
CDFI [14]32.653/0.96826.471/0.85739.881/0.99035.224/0.97729.660/0.92924.645/0.85427.576/0.9060.3214.98
CAIN [11]32.537/0.96826.477/0.85739.890/0.99035.630/0.97829.998/0.93125.060/0.85728.184/0.9110.07142.78
SoftSplat [39]32.835/0.96927.582/0.88140.165/0.99136.017/0.97930.604/0.93725.436/0.86428.813/0.9240.20612.46
EDSC [10]32.677/0.96926.689/0.86039.792/0.99035.283/0.97729.815/0.92924.872/0.85427.641/0.9040.0678.95
XVFI [48]32.224/0.96626.565/0.86338.849/0.98934.497/0.97529.381/0.92924.677/0.85527.759/0.9090.1085.61
QVI [59]32.668/0.96727.483/0.88336.648/0.98534.637/0.97830.614/0.94725.426/0.86628.819/0.9260.25729.23
FLAVR [27]33.389/0.97127.450/0.87340.135/0.99035.988/0.97930.541/0.93725.188/0.86028.487/0.9150.69542.06
ST-MFNet (Ours)33.384/0.97028.287/0.89540.775/0.99237.111/0.98531.698/0.95125.810/0.87429.175/0.9290.90121.03
+ +Table 2. Quantitative comparison results (PSNR/SSIM) for ST-MFNet and 14 tested methods. In some cases, underlined scores based on the pre-trained models are provided in the table, when they outperform their re-trained counterparts. OOM denotes cases where our GPU runs out of memory for the evaluation. For each column, the best result is colored in red and the second best is colored in blue. The average runtime (RT) for interpolating a $480\mathrm{p}$ frame as well as the number of model parameters (#P) for each method are also reported. + +where the full ST-MFNet with the TENet produces richer textural detail compared to the version without TENet. + +ST-GAN. To investigate the effectiveness of the ST-GAN training, we compared the perceptual quality of the interpolated content generated by the fine-tuned network Ours- $\mathcal{L}_p$ and the distortion-oriented model Ours- $\mathcal{L}_{lap}$ . We also replaced the ST-GAN with two existing GANs used for VFI, FIGAN [30] and TGAN [46]. Example frames produced by these variants are shown in Figure 5 (q-v), where the result generated by Ours- $\mathcal{L}_p$ exhibits sharper edges and clearer structures compared to those produced by other variants. Quantitative evaluation results of these variants based on LPIPS are provided in the Supplementary. + +# 5.2. Quantitative Evaluation + +We compared the proposed ST-MFNet with 14 state-of-the-art VFI models including DVF [32], SuperSloMo [26], SepConv [41], DAIN [4], BMBC [42], AdaCoF [30], FeFlow [20], CDFI [14], CAIN [11], Softsplat [39], EDSC [10], XVFI [48], QVI [59] and FLAVR [27]. For fair comparison, we re-trained all benchmark models with the same training and validation datasets used for ST-MFNet under identical training configurations. The comprehensive evaluation results are summarized in Table 2. For all these models, we additionally evaluated their pre-trained versions provided in the original literature (where applicable). If the pre-trained results are better than the re-trained counterparts, the former are presented and underlined. + +Two key observations can be made from Table 2. Firstly, by using our training set (Vimeo-90k+BVI-DVC), the retrained performance of all compared models has been improved over their pre-trained versions on large and complex motions, i.e. on DAVIS, SNU-FILM (medium, hard, ex + +treme) and VFITex. For seven models, the pre-trained versions achieved higher PSNR and SSIM values on the UCF101 dataset. This may be due to the similar characteristics between their pre-training dataset, Vimeo-90k and UCF101. We also noted that our ST-MFNet offers the best results for DAVIS, SNU-FILM (all subsets) and VFITex, with a significant improvement of 0.36-1.09dB (PSNR) over the runner-up for each test set. It is only outperformed by the pre-trained FLAVR on UCF101 with marginal difference of 0.005dB (PSNR) and 0.001 (SSIM). This demonstrates the excellent generalization ability of the proposed ST-MFNet. Additional evaluation results in terms of LPIPS, and results on $4 \times /8 \times$ interpolation can be found in the Supplementary Complexity. The model complexity was measured on the 480p sequences from DAVIS test set. The average runtime (RT, in seconds) for interpolating one frame is reported in Table 2 for each tested network, alongside its total number of parameters. We noticed that ST-MFNet has a relatively high computational complexity among all tested models. The reduction of model complexity remains one of our future works. + +# 5.3. Qualitative Evaluation + +Visual comparisons. Examples frames interpolated by our model and several best-performing state-of-the-art methods are shown in Figure 6. It can be observed that the results generated by the perceptually trained ST-MFNet $(\mathsf{Ours} - \mathcal{L}_p)$ are closer to the ground truth, containing fewer visual artifacts and exhibiting better perceptual quality. + +User Study. As single frames cannot fully reflect the perceptual quality of interpolated content, we conducted a user study where our method was compared against three competitive benchmark approaches, QVI, FLAVR and Softsplat + +![](images/14886a64dc57da75a839bb31d9d4634f6aa01520e20ecdecf26a223b8a885cf3.jpg) +Figure 6. Qualitative interpolation examples by different methods. The first column (a) shows the overlaid adjacent frames. Columns (b-f) correspond to some of the best-performing benchmark methods. The results of our distortion-oriented model (g) and perception-oriented model (h) are also included, along with the ground truth frames (i). Video comparison examples can be found in the Supplementary. + +![](images/296d8a20ff8128597f11effd62463d2806d82483386a5b2af8b284ee9cad3108.jpg) +Figure 7. Results of the user study showing preference ratios for the tested interpolation methods. The error bars denote standard deviation over test videos. + +(re-trained using its original perceptual loss [39]). For this study, 20 videos randomly selected from DAVIS, SNU-FILM and VFITex were used as the test content for the three tested models. In each trial of a test session, participants were shown a pair of videos including one interpolated by perceptually optimized ST-MFNet and the other one by QVI, FLAVR or Softsplat. This results in a total of 60 trials in each test session. The order of video presentation was randomized in each trial (the order of trials was also random), and the subject in each case was asked to choose the sequence with higher perceived quality. Twenty subjects were paid to participate in this study. See more details of the user study in the Supplementary. + +The collected user study results are summarized in Figure 7. We observed that approaching $70\%$ of users on average preferred ST-MFNet against QVI, and this figure is statistically significant for $95\%$ confidence based on a t-test experiment $(p < .00000003)$ . The average preference difference between our method and FLAVR is smaller, with $56\%$ users in favor of ST-MFNet results. This was also significant at a $95\%$ confidence level $(p < .0001)$ . Finally, when comparing against Softsplat, around $60\%$ of subjects favored our method, where the significance holds again at $95\%$ level $(p < .000005)$ . + +# 6. Limitations and Potential Negative Impacts + +Although superior interpolation performance has been observed from the proposed method, we are aware of the relatively low inference speed associated with this model. This is mainly due to its large network capacity. Training such large models can also potentially introduce negative impact on the environment due to the significant power consumption of computational hardware [29]. This can be mitigated through model complexity reduction based on network compression [8] and knowledge distillation [21]. + +# 7. Conclusion + +In this paper, we propose a novel video frame interpolation algorithm, ST-MFNet, which consistently achieved improved interpolation performance (up to a 1.09dB PSNR gain) over state-of-the-art methods on various challenging video content. The proposed method features three main innovative design elements. Firstly, flexible many-to-one multi-flows were combined with conventional one-to-one optical flows in a multi-branch fashion, which enhances the ability of capturing large and complex motions. Secondly, a novel architecture was designed to predict multi-interflows at multiple scales, leading to reduced complexity but enhanced performance. Thirdly, we employed a 3D CNN architecture and the ST-GAN originally proposed for texture synthesis to enhance the visual quality of textures in the interpolated content. Our quantitative and qualitative experiments showed that all of these contribute to the final performance of our model, which consistently outperforms many state-of-the-art methods with significant gains. + +Acknowledgment. This work was funded by the China Scholarship Council, University of Bristol, and the UKRI MyWorld Strength in Places Programme (SIPF00006/1). + +# References + +[1] Mitch Martinez free 4k stock footage. http://mitchmartinez.com/free-4k-red-epic-stock-footage/. 5 +[2] Pexels videos. https://www.pexels.com/videos/. 5 +[3] Simon Baker, Daniel Scharstein, JP Lewis, Stefan Roth, Michael J Black, and Richard Szeliski. A database and evaluation methodology for optical flow. International journal of computer vision, 92(1):1-31, 2011. 1 +[4] Wenbo Bao, Wei-Sheng Lai, Chao Ma, Xiaoyun Zhang, Zhiyong Gao, and Ming-Hsuan Yang. Depth-aware video frame interpolation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3703-3712, 2019. 2, 7 +[5] Wenbo Bao, Wei-Sheng Lai, Xiaoyun Zhang, Zhiyong Gao, and Ming-Hsuan Yang. MEMC-Net: Motion estimation and motion compensation driven neural network for video interpolation and enhancement. IEEE transactions on pattern analysis and machine intelligence, 2019. 2 +[6] Yochai Blau and Tomer Michaeli. The perception-distortion tradeoff. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6228-6237, 2018. 5 +[7] Piotr Bojanowski, Armand Joulin, David Lopez-Paz, and Arthur Szlam. Optimizing the latent space of generative networks. arXiv preprint arXiv:1707.05776, 2017. 5 +[8] 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, 2006. 8 +[9] Zhiqi Chen, Ran Wang, Haojie Liu, and Yao Wang. PDWN: Pyramid deformable warping network for video interpolation. IEEE Open Journal of Signal Processing, pages 1-1, 2021. 1, 2 +[10] Xianhang Cheng and Zhenzhong Chen. Multiple video frame interpolation via enhanced deformable separable convolution. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021. 2, 7 +[11] Myungsub Choi, Heewon Kim, Bohyung Han, Ning Xu, and Young Mu Lee. Channel attention is all you need for video frame interpolation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 10663-10671, 2020. 1, 2, 3, 5, 7 +[12] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In Proceedings of the IEEE international conference on computer vision, pages 764-773, 2017. 2 +[13] Duolikun Danier and David Bull. Texture-aware video frame interpolation. In IEEE Picture Coding Symposium (PCS), 2021. 2 +[14] Tianyu Ding, Luming Liang, Zhihui Zhu, and Ilya Zharkov. CDFI: Compression-driven network design for frame interpolation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8001-8011, 2021. 2, 7 +[15] Gianfranco Doretto, Alessandro Chiuso, Ying Nian Wu, and Stefano Soatto. Dynamic textures. International Journal of Computer Vision, 51(2):91-109, 2003. 3 + +[16] John Flynn, Ivan Neulander, James Philbin, and Noah Snavely. Deepstereo: Learning to predict new views from the world's imagery. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5515-5524, 2016. 1 +[17] Damien Fourure, Rémi Emonet, Elisa Fromont, Damien Muselet, Alain Tremeau, and Christian Wolf. Residual conv-deconv grid network for semantic segmentation. arXiv preprint arXiv:1707.07958, 2017. 4 +[18] Leon Gatys, Alexander S Ecker, and Matthias Bethge. Texture synthesis using convolutional neural networks. Advances in neural information processing systems, 28:262-270, 2015. 3 +[19] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial networks. Communications of the ACM, 63(11):139–144, 2020. 5 +[20] Shurui Gui, Chaoyue Wang, Qihua Chen, and Dacheng Tao. Featureflow: Robust video interpolation via structure-to-texture generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14004-14013, 2020. 1, 2, 7 +[21] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. 8 +[22] Alain Hore and Djemel Ziou. Image quality metrics: PSNR vs. SSIM. In 2010 20th international conference on pattern recognition, pages 2366-2369. IEEE, 2010. 5 +[23] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 3 +[24] Zhewei Huang, Tianyuan Zhang, Wen Heng, Boxin Shi, and Shuchang Zhou. RIFE: Real-time intermediate flow estimation for video frame interpolation. arXiv preprint arXiv:2011.06294, 2020. 2 +[25] Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. Advances in neural information processing systems, 28:2017-2025, 2015. 2, 3 +[26] Huaizu Jiang, Deqing Sun, Varun Jampani, Ming-Hsuan Yang, Erik Learned-Miller, and Jan Kautz. Super slomo: High quality estimation of multiple intermediate frames for video interpolation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9000-9008, 2018. 1, 2, 7 +[27] Tarun Kalluri, Deepak Pathak, Manmohan Chandraker, and Du Tran. Flavr: Flow-agnostic video representations for fast frame interpolation. arXiv preprint arXiv:2012.08512, 2020. 1, 2, 3, 4, 5, 7 +[28] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.5 +[29] Alexandre Lacoste, Alexandra Luccioni, Victor Schmidt, and Thomas Dandres. Quantifying the carbon emissions of machine learning. arXiv preprint arXiv:1910.09700, 2019.8 +[30] Hyeongmin Lee, Taeoh Kim, Tae-young Chung, Daehyun Pak, Yuseok Ban, and Sangyoun Lee. Adacof: Adaptive col + +laboration of flows for video frame interpolation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5316-5325, 2020. 1, 2, 3, 5, 6, 7 +[31] Yihao Liu, Liangbin Xie, Li Siyao, Wenxiu Sun, Yu Qiao, and Chao Dong. Enhanced quadratic video interpolation. In European Conference on Computer Vision, pages 41-56. Springer, 2020. 2, 5 +[32] Ziwei Liu, Raymond A Yeh, Xiaou Tang, Yiming Liu, and Aseem Agarwala. Video frame synthesis using deep voxel flow. In Proceedings of the IEEE International Conference on Computer Vision, pages 4463-4471, 2017. 2, 7 +[33] Gucan Long, Laurent Kneip, Jose M Alvarez, Hongdong Li, Xiaohu Zhang, and Qifeng Yu. Learning image matching by simply watching video. In European Conference on Computer Vision, pages 434-450. Springer, 2016. 2 +[34] Di Ma, Fan Zhang, and David Bull. BVI-DVC: A training database for deep video compression. IEEE Transactions on Multimedia, pages 1-1, 2021. 5 +[35] Di Ma, Fan Zhang, and David R Bull. CVEGAN: A perceptually-inspired gan for compressed video enhancement. arXiv preprint arXiv:2011.09190, 2020. 3 +[36] Alexandre Mercat, Marko Viitanen, and Jarno Vanne. UVG dataset: 50/120fps 4k sequences for video codec analysis and development. In Proceedings of the 11th ACM Multimedia Systems Conference, pages 297-302, 2020. 5 +[37] Chris Montgomery et al. Xiph.org video test media (derf's collection), the xiph open source community, 1994. Online, https://media.xiph.org/video/derf, 3.5 +[38] Simon Niklaus and Feng Liu. Context-aware synthesis for video frame interpolation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1701-1710, 2018. 2, 4, 5 +[39] Simon Niklaus and Feng Liu. Softmax splatting for video frame interpolation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5437-5446, 2020. 2, 4, 5, 7, 8 +[40] Simon Niklaus, Long Mai, and Feng Liu. Video frame interpolation via adaptive convolution. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 670-679, 2017. 1, 2 +[41] Simon Niklaus, Long Mai, and Feng Liu. Video frame interpolation via adaptive separable convolution. In Proceedings of the IEEE International Conference on Computer Vision, pages 261-270, 2017. 1, 2, 7 +[42] Junheum Park, Keunsoo Ko, Chul Lee, and Chang-Su Kim. BMBC: Bilateral motion estimation with bilateral cost volume for video interpolation. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XIV 16, pages 109-125. Springer, 2020. 1, 2, 7 +[43] Junheum Park, Chul Lee, and Chang-Su Kim. Asymmetric bilateral motion estimation for video frame interpolation. In International Conference on Computer Vision, 2021. 1, 2 +[44] Federico Perazzi, Jordi Pont-Tuset, Brian McWilliams, Luc Van Gool, Markus Gross, and Alexander Sorkine-Hornung. A benchmark dataset and evaluation methodology for video + +object segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 724-732, 2016. 5 +[45] Fitssum A Reda, Deqing Sun, Aysegul Dundar, Mohammad Shoeybi, Guilin Liu, Kevin J Shih, Andrew Tao, Jan Kautz, and Bryan Catanzaro. Unsupervised video interpolation using cycle consistency. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 892–900, 2019. 2 +[46] Masaki Saito, Eiichi Matsumoto, and Shunta Saito. Temporal generative adversarial nets with singular value clipping. In Proceedings of the IEEE international conference on computer vision, pages 2830-2839, 2017. 7 +[47] Zhihao Shi, Xiaohong Liu, Kangdi Shi, Linhui Dai, and Jun Chen. Video interpolation via generalized deformable convolution. arXiv e-prints, pages arXiv-2008, 2020. 2 +[48] Hyeonjun Sim, Jihyong Oh, and Munchurl Kim. XVFI: extreme video frame interpolation. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2021. 1, 2, 7 +[49] 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.5 +[50] Gary J Sullivan, Jens-Rainer Ohm, Woo-Jin Han, and Thomas Wiegand. Overview of the high efficiency video coding (HEVC) standard. IEEE Transactions on circuits and systems for video technology, 22(12):1649-1668, 2012. 3 +[51] Deqing Sun, Xiaodong Yang, Ming-Yu Liu, and Jan Kautz. Pwc-net: Cnns for optical flow using pyramid, warping, and cost volume. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8934-8943, 2018. 2, 4, 5 +[52] University of Bristol. Bluecystal phase 4. http://www.acrc.bris.ac.uk/acrc/phase4.htm. 5 +[53] 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. 5 +[54] Zi-Ming Wang, Meng-Han Li, and Gui-Song Xia. Conditional generative convnets for exemplar-based texture synthesis. IEEE Transactions on Image Processing, 30:2461-2475, 2021. 3 +[55] Li-Yi Wei and Marc Levoy. Fast texture synthesis using tree-structured vector quantization. In Proceedings of the 27th annual conference on Computer graphics and interactive techniques, pages 479–488, 2000. 2 +[56] Chao-Yuan Wu, Nayan Singhal, and Philipp Krahenbuhl. Video compression through image interpolation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 416-431, 2018. 1 +[57] Jianwen Xie, Song-Chun Zhu, and Ying Nian Wu. Learning energy-based spatial-temporal generative convnets for dynamic patterns. IEEE transactions on pattern analysis and machine intelligence, 2019. 2, 3, 4 +[58] Saining Xie, Ross Girshick, Piotr Dolkar, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep + +neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1492-1500, 2017. 3 +[59] Xiangyu Xu, Li Siyao, Wenxiu Sun, Qian Yin, and Ming-Hsuan Yang. Quadratic video interpolation. In NeurIPS, 2019. 1, 2, 5, 7 +[60] Tianfan Xue, Baian Chen, Jiajun Wu, Donglai Wei, and William T Freeman. Video enhancement with task-oriented flow. International Journal of Computer Vision, 127(8):1106-1125, 2019. 2, 5 +[61] Feng Yang, Gui-Song Xia, Liangpei Zhang, and Xin Huang. Stationary dynamic texture synthesis using convolutional neural networks. In 2016 IEEE 13th International Conference on Signal Processing (ICSP), pages 1135-1139. IEEE, 2016. 3 +[62] Kun Yang, Dong Liu, Zhibo Chen, Feng Wu, and Weiping Li. Spatiotemporal generative adversarial network-based dynamic texture synthesis for surveillance video coding. IEEE Transactions on Circuits and Systems for Video Technology, 2021. 2, 3, 4, 5 +[63] Fan Zhang and David R Bull. A parametric framework for video compression using region-based texture models. IEEE Journal of Selected Topics in Signal Processing, 5(7):1378-1392, 2011. 2 +[64] Haoxian Zhang, Yang Zhao, and Ronggang Wang. A flexible recurrent residual pyramid network for video frame interpolation. In European Conference on Computer Vision, pages 474-491. Springer, 2020. 1, 2 +[65] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 586-595, 2018. 5 \ No newline at end of file diff --git a/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/images.zip b/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..81ff81103a17017dc1d42aec2e082ab1a0a2df67 --- /dev/null +++ b/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16a38946f278a8540eb258a59a06afa3122f3b61c44689a8612038cbd33870b3 +size 576459 diff --git a/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/layout.json b/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..35730550c1165c4f74b7267956c335176c5ec7ed --- /dev/null +++ b/stmfnetaspatiotemporalmultiflownetworkforframeinterpolation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:413d78ff0fc1ea0dcd5cd4cf13c659787c3de426164dd308c7cf870fe2df4a8a +size 475295 diff --git a/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/bcc38fc6-9464-4ca6-9ca8-a81ba13e587c_content_list.json b/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/bcc38fc6-9464-4ca6-9ca8-a81ba13e587c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..57b5ae845cd217e7740e89f2e2454e8d4e73051b --- /dev/null +++ b/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/bcc38fc6-9464-4ca6-9ca8-a81ba13e587c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:654b9992de356a2fb553bd806f3554cf1869a5801cceec4d709c94a5142e421a +size 71253 diff --git a/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/bcc38fc6-9464-4ca6-9ca8-a81ba13e587c_model.json b/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/bcc38fc6-9464-4ca6-9ca8-a81ba13e587c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a27355ec858f7b9c2ae8d8f4bd2b96ad3aede545 --- /dev/null +++ b/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/bcc38fc6-9464-4ca6-9ca8-a81ba13e587c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce257c6e3f266883e93de9c5fe9e0f428992fef243ed3978186026642889dc33 +size 86007 diff --git a/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/bcc38fc6-9464-4ca6-9ca8-a81ba13e587c_origin.pdf b/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/bcc38fc6-9464-4ca6-9ca8-a81ba13e587c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..281e7a1130ed9583b1d2d0c3b07d2cd0af22e3f8 --- /dev/null +++ b/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/bcc38fc6-9464-4ca6-9ca8-a81ba13e587c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3d05fddc909f6ce5d4f85036d4c179967b1885971200582643b0fe2bfdb49ca +size 3916711 diff --git a/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/full.md b/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/full.md new file mode 100644 index 0000000000000000000000000000000000000000..76005a7ab8a36eb2686a6c7fe1f0a520324d7323 --- /dev/null +++ b/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/full.md @@ -0,0 +1,338 @@ +# STRPM: A Spatiotemporal Residual Predictive Model for High-Resolution Video Prediction + +Zheng Chang $^{1,2}$ , Xinfeng Zhang $^{1}$ , Shanshe Wang $^{3*}$ , Siwei Ma $^{3}$ , and Wen Gao $^{1,3}$ + +$^{1}$ School of Computer Science and Technology, + +University of Chinese Academy of Sciences, Beijing, China + +$^{2}$ Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China + +$^{3}$ National Engineering Research Center of Visual Technology, + +School of Computer Science, Peking University, Beijing, China + +changzheng18@mails.ucas.ac.cn,xfzhang@ucas.ac.cn,{sswang,swma,wgao}@pku.edu.cn + +# Abstract + +Although many video prediction methods have obtained good performance in low-resolution (64~128) videos, predictive models for high-resolution (512~4K) videos have not been fully explored yet, which are more meaningful due to the increasing demand for high-quality videos. Compared with low-resolution videos, high-resolution videos contain richer appearance (spatial) information and more complex motion (temporal) information. In this paper, we propose a Spatiotemporal Residual Predictive Model (STRPM) for high-resolution video prediction. On the one hand, we propose a Spatiotemporal Encoding-Decoding Scheme to preserve more spatiotemporal information for high-resolution videos. In this way, the appearance details for each frame can be greatly preserved. On the other hand, we design a Residual Predictive Memory (RPM) which focuses on modeling the spatiotemporal residual features (STRF) between previous and future frames instead of the whole frame, which can greatly help capture the complex motion information in high-resolution videos. In addition, the proposed RPM can supervise the spatial encoder and temporal encoder to extract different features in the spatial domain and the temporal domain, respectively. Moreover, the proposed model is trained using generative adversarial networks (GANs) with a learned perceptual loss (LP-loss) to improve the perceptual quality of the predictions. Experimental results show that STRPM can generate more satisfactory results compared with various existing methods. + +![](images/f4fa97b54d70f1612cdf6373f4761b8a746751bbdfc96725dda766dcbc387ca1.jpg) +CrevNet (ICLR2020) + +![](images/c56fb01d4c0181e525e3bae47cbbff135049c1aa29705db74980d287164efb18.jpg) +STRPM + +![](images/36a560aa382b56e756007ea33b7f929596c84cfa5fe6b5f6db5edc6ed09573a5.jpg) +Ground Truth +Figure 1. Qualitative results between the proposed STRPM and the state-of-the-art method CrevNet [29] on the SJTU4K dataset (4K: $2160 \times 3840$ resolution, 4 frames $\rightarrow 1$ frame). STRPM has generated much better visual details compared with CrevNet. + +# 1. Introduction + +Video prediction is a key component of representation learning due to its great ability in modeling meaningful representations for natural videos and has been applied to various video processing applications, such as video coding [14], precipitation nowcasting [20], robotic control [6], autonomous driving [2] and so on. Different from video interpolation [16,17], video prediction (extrapolation) is more challenging by merely utilizing limited information from previous frames to predict the unknown future frames. Motivated by the advantages of deep learning technologies in extracting deep features, in recent years, various learning-based methods have been proposed for video prediction which can be summarized into three types. + +The first type of methods [20, 22, 25-27, 29] utilize Recurrent neural networks (RNN) to progressively predict video frames due to their unique advantages in sequence learning and have obtained some satisfactory results. However, the predictions from RNN-based methods are typically blurry due to the standard mean square error based loss function. To solve this problem, the second type of meth + +ods [1,5,7,23,28] utilize deep stochastic models to predict different futures instead of an averaged future for different samples and the third type of methods [4,8,12,13,15] employ generative adversarial networks (GANs) [8] and additional perceptual loss functions to augment the visual qualities of the predictions. + +Although the above methods have obtained some satisfactory results, the resolutions of video datasets utilized in the above methods are usually low (64~128), and the performance in high-resolution (512~4K) videos is still hardly satisfactory (shown in Figure 1), preventing their adaptability and practicability into real scenarios. There are mainly two challenges restricting the resolution of predictions. The first challenge is that high-resolution videos usually contain more complex visual details. However, limited by the computation resources, videos are usually encoded to low-dimensional features and then decoded back to the video frames, during which, lots of visual details can be abandoned. The second challenge is that the motion information in high-resolution videos typically involves multiple objects, which is much more complex and hard for traditional predictive memory to predict. To deal with the above two problems in high-resolution video prediction, the appearance information in the spatial domain and the motion information in the temporal domain need to be carefully reconsidered. + +In this paper, we propose a Spatiotemporal Residual Predictive Model (STRPM) to deal with the above two challenges. Firstly, to predict more satisfactory appearance details for each frame, we novelly propose the spatiotemporal encoding-decoding scheme, which utilizes independent encoders to extract deep features in both spatial and temporal domains. In this way, both the spatial and temporal information can no longer affect each other and more visual details can be preserved. Secondly, to accurately model the complex motion information in high-resolution videos, we designed a Residual Predictive Memory (RPM) to focus on modeling the inter-frame spatiotemporal residual features (STRF) with a relatively low computation load and fewer parameters. Moreover, since the encoded spatial and temporal features will be fed into the spatial and temporal modules in RPM for transitions in vertical (spatial domain) and horizontal (temporal domain) directions, the RPM can indirectly supervise the spatial encoder and the temporal encoder to extract corresponding features in the spatial domain and the temporal domain. + +By jointly using the encoded spatiotemporal features and STRF, more reliable spatiotemporal features for future frames can be predicted, which will be further decoded back to the high-dimensional data space with the help of spatiotemporal decoders. Furthermore, in the training stage, the standard MSE loss, the adversarial loss as well as the learned perceptual loss are jointly utilized to improve the + +visual quality of the predictions. Experimental results show that the proposed model can achieve state-of-the-art performance compared with other methods. + +# 2. Related Work + +In recent years, many learning-based predictive models have been applied in video prediction. [18] first utilized language modeling for video prediction, which was further improved by [22] using Long Short-Term Memories (LSTMs) [9], denoted as FC-LSTM. To improve the model perception to visual data, [20] integrated convolutional operations to FC-LSTMs (ConvLSTM) and achieved significant improvements on the Moving MNIST dataset. + +However, the above works only focus on the interframe temporal information (motion information) and ignored intra-frame spatial information (appearance information). To preserve the appearance information for videos, [26] designed an appearance-preserving block for ConvLSTM (PredRNN). [24] further improved PredRNN by solving the gradient propagation difficulties in deep predictive models (PredRNN++) and integrating 3D convolution operations and RECALL gate to enhance the ability to capture both long-term and short-term dependencies of the predictive model (E3D-LSTM). To further improve the visual quality of the predictions, [29] proposed a conditionally reversible network (CrevNet) to preserve the spatiotemporal information for the inputs and [11] leveraged the high-frequency information to preserve visual details for videos. + +However, the above works can only generate an averaged future for all samples due to the standard MSE loss function and the predictions are usually blurry. To solve this problem, a variety of methods have been proposed. On the one hand, some methods aim to predict different futures for different samples. [1] proposed a stochastic variational video prediction (SV2P) method to predict a different possible future for each sample based on the latent variables. [5, 28] proposed video generation models with a learned prior over stochastic latent variables for video prediction. [7] proposed a stochastic temporal model for video prediction whose dynamics are governed in a latent space by a residual update rule. + +On the other hand, some works aim to improve the standard MSE-based loss function. [15] proposed three different and complementary feature learning strategies to predict naturalistic videos. Besides, motivated by the great power in generating naturalistic images, generative adversarial networks (GANs) were employed by [13] to generate realistic results and [12] utilized CycleGAN [31] to further improve the perceptual quality of the predictions. Although some improvements have been achieved in above works and the resolutions of the predicted videos have been improved in [3, 29] (256~512), the unacceptable computation load and quality distortions prevent them from predicting + +![](images/96b14c04b72d3101244521497a0902fd9c5f49f166e34ba9eead16c4770ff255.jpg) +Figure 2. The structure of the proposed spatiotemporal residual predictive model (STRPM). The green arrows denote the input information flows and the red arrows denote the predicted information flows. + +videos with higher resolution (512~4K). To solve the above problems, we propose a spatiotemporal residual predictive model (STRPM) for high-resolution video prediction with an acceptable computation load. Moreover, by using the proposed learned perceptual loss, more naturalistic videos can be generated from the proposed method. + +# 3. The Spatiotemporal Residual Predictive Model + +In this section, we introduce the proposed Spatiotemporal Residual Predictive Model (STRPM) in detail. The overall structure of the proposed model is shown in Figure 2. Different from low-resolution videos, high-resolution videos contain more complex texture details and more variable motion information, motivated by which, two problems for high-resolution video prediction urgently need to be solved: + +- How to preserve more visual details for each frame? +- How to predict more accurate motion information between frames? + +We propose the Spatiotemporal Residual Predictive Model (STRPM) to solve the above problems. + +# 3.1. Spatiotemporal Encoding-Decoding Scheme + +To reduce the computation resources, video frames are typically encoded to low-dimensional features using a single encoder in video prediction. However, the temporal information and the spatial information will affect each other and the predictive memories have to further extract the temporal and spatial information to predict future frames, during which, lots of spatiotemporal information may be lost, making it very difficult to reconstruct satisfactory visual details for each frame. To solve this problem (the first problem), we novelly utilize multiple spatiotemporal encoders to independently extract deep features in both temporal and spatial domains. In this way, the spatial information and the temporal information will no longer affect each other, making it easier for the predictive memories to utilize the spatiotemporal information for video prediction. The encoding process can be expressed as follows, + +$$ +\left(T _ {E}, S _ {E}, O _ {E}\right) = \left(\operatorname {E n c} _ {T} \left(v _ {t}\right), \operatorname {E n c} _ {S} \left(v _ {t}\right), \operatorname {E n c} _ {O} \left(v _ {t}\right)\right), \tag {1} +$$ + +where $v_{t}$ denotes the $t^{th}$ frame in source video $V$ . $Enc_{T}(\cdot), Enc_{S}(\cdot), Enc_{O}(\cdot)$ denote the temporal, spatial and spatiotemporal encoders respectively. $T_{E}, S_{E}, O_{E}$ denote the encoded low-dimensional temporal, spatial and spatiotemporal features at time step $t$ , respectively. + +In particular, the above encoded features $T_{E},S_{E},O_{E}$ + +![](images/91f56d9ad0363985b3ce1bfb35db8e1aaee64338e7ae88e94bba13028f803896.jpg) +(a): The structure of the residual predictive memory: RPM. + +![](images/db5abba2e40e95bcebddc0a02ba25de14e4927f398e91adaf0736ab6bc68be81.jpg) +(b): The structure of STRPM with stacked RPMs. +Figure 3. The structure of the proposed residual predictive memory: RPM. The temporal module and the spatial module can indirectly supervise the temporal encoder and the spatial encoder to extract different features in the temporal domain and the spatial domain. + +will be fed into the corresponding modules in the proposed residual predictive memory: RPM, which will be dually introduced in section 3.2. In this way, the RPM can indirectly supervise different encoders to extract different features in different domains. And the predicted spatiotemporal features can be represented as follows, + +$$ +\left(T _ {P}, S _ {P}, O _ {P}\right) = R P M \left(T _ {E}, S _ {E}, O _ {E}, \mathcal {T}, \mathcal {S}\right), \tag {2} +$$ + +where $T_{P}, S_{P}, O_{P}$ denote the predicted temporal, spatial and spatiotemporal features at time step $t$ from RPM, respectively. $\mathcal{T},\mathcal{S}$ are the preserved temporal and spatial information. + +Similar as the encoding process, to decode more spatiotemporal details, we also utilize multiple spatiotemporal decoders to decode the predicted features from low-dimensional feature space back to high-dimensional temporal and spatial data space respectively, which can be expressed as follows, + +$$ +\left(T _ {D}, S _ {D}, O _ {D}\right) = \left(\operatorname {D e c} _ {T} \left(T _ {P}\right), \operatorname {D e c} _ {S} \left(S _ {P}\right), \operatorname {D e c} _ {O} \left(O _ {P}\right)\right), \tag {3} +$$ + +where $Dec_{T}(\cdot), Dec_{S}(\cdot), Dec_{O}(\cdot)$ denote the temporal, spatial and spatiotemporal decoders, respectively. $T_{D}, S_{D}, O_{D}$ denote the decoded high-dimensional temporal, spatial and spatiotemporal features, respectively. + +By jointly utilizing the decoded high-dimensional features, the predicted frame at time step $t$ can be represented as follows, + +$$ +\hat {v} _ {t + 1} = O _ {D} \odot \tanh \left(W _ {1 \times 1} * \left[ T _ {D}, S _ {D} \right]\right), \tag {4} +$$ + +where $\hat{v}_{t + 1}$ denotes the predicted frame at time step $t$ , $\odot, *$ denote the hadamard product and convolutional operators. + +# 3.2. The Residual Predictive Memory: RPM + +Current predictive memories aim to predict future frames by learning a single representation for the whole frame, containing both the spatial representation and the temporal representation, which is efficient to predict simple motions. However, high-resolution videos usually contained much more complex motion information compared with low-dimensional videos. To deal with this special characteristic in high-resolution videos (the second problem), we design a Residual Predictive Memory (RPM) to focus on modeling inter-frame motion information by predicting the spatiotemporal residual features (STRF) between previous and future frames in the feature space, which is shown in Figure 3(a). In addition, compared with traditional STLSTM structure [26], the proposed RPM also benefits from more efficient state-to-state transitions (fewer gates) and wider spatiotemporal receptive field (simultaneously utilizing multiple spatiotemporal states). To further extract more efficient deep spatiotemporal features, multiple RPMs are typically stacked into a single model, as shown in Figure 3(b). For RPM at time step $t$ in layer $k$ , the encoded features $T_{E}, S_{E}, O_{E}$ are fed into the corresponding modules of RPM. In this way, the proposed RPM can indirectly supervise the spatial encoder and the temporal encoder to extract different deep features in the spatial domain and the temporal domain. In particular, for $k > 1$ , the encoded fea + +tures are represented with the hidden state from the previous layer, i.e., $T_{E}, S_{E}, O_{E} = H_{t}^{k - 1}$ . + +For each RPM, there are seven inputs: $T_{E}$ , the encoded features for the temporal module; $S_{E}$ , the encoded features for the spatial module; $O_{E}$ , the encoded spatiotemporal features for the output module; $H_{t - 1}^{k}$ , the hidden state from previous time step; $S_{t}^{k - 1}$ , the previous spatial state from previous layer $k - 1$ ; $\mathcal{T}:T_{t - \tau :t - 1}^{k}$ , the previous $\tau$ temporal states; $\mathcal{S}:S_t^{k - \theta ;k - 1}$ , the previous $\theta$ spatial states. To further improve local perception to videos, the input states are typically preprocessed using convolutional layers: + +$$ +\left(T F _ {t} ^ {k}, S F _ {t} ^ {k}, O F _ {t} ^ {k}\right) = \left(W _ {t} * T _ {E}, W _ {s} * S _ {E}, W _ {o} * O _ {E}\right), +$$ + +$$ +\left(H F _ {t} ^ {k}, M F _ {t} ^ {k}\right) = \left(W _ {h} * H _ {t - 1} ^ {k}, W _ {m} * S _ {t} ^ {k - 1}\right), \quad (5) +$$ + +where $W$ denotes the parameters of the integrated convolutional layers. $TF_{t}^{k}$ , $SF_{t}^{k}$ , $OF_{t}^{k}$ , $HF_{t}^{k}$ , $MF_{t}^{k}$ denote the extracted deep features from $T_{E}$ , $S_{E}$ , $O_{E}$ , $H_{t-1}^{k}$ , $S_{t}^{k-1}$ , respectively. Then the extracted features will be fed into RPM at time step $t$ in layer $k$ . + +For both the temporal and spatial module, two residual gates are designed to model the inter-frame residual information, which is shown as follows, + +$$ +R _ {T} = \sigma (T F _ {t} ^ {k} + H F _ {t} ^ {k}), +$$ + +$$ +R _ {S} = \sigma \left(S F _ {t} ^ {k} + M F _ {t} ^ {k}\right), \tag {6} +$$ + +where $R_{T}, R_{S}$ denote the temporal and spatial residual gates, respectively. + +As shown in Figure 3(a), the temporal module (blue block) of RPM is utilized to capture reliable motion information between frames. To preserve more useful temporal information from the past, RPM jointly utilizes multiple temporal states, and the transitions can be expressed as follows, + +$$ +T _ {t} ^ {k} = R _ {T} \odot \left(\tanh \left(T F _ {t} ^ {k} + H F _ {t} ^ {k}\right) + A T T _ {T} (\mathcal {T})\right). \tag {7} +$$ + +The predicted temporal residual state $T_{t}^{k}$ consists of two terms, where the first term $R_{T} \odot \tanh (TF_{t}^{k} + HF_{t}^{k})$ represents the encoded features from current input and the second term $R_{T} \odot ATT_{t}(\mathcal{T})$ represents the preserved temporal information from previous $\tau$ time steps. In this way, more useful temporal information can be kept from a longer past. In particular, $ATT_{T}(\cdot)$ denotes the temporal attention network which is constructed with convolutional layers and can help merge the multiple temporal states to a single one. + +In the spatial module (orange block), by utilizing the multiple spatial states $S: S_{t}^{k - \theta : k - 1}$ , both low-level texture information and high-level semantic information can be jointly utilized, and similar to the temporal module, the state-to-state transitions can be represented as follows, + +$$ +S _ {t} ^ {k} = R _ {S} \odot \left(\tanh \left(S F _ {t} ^ {k} + M F _ {t} ^ {k}\right) + A T T _ {S} (S)\right), \tag {8} +$$ + +where $S_{t}^{k}$ denotes the predicted spatial residual state and $ATT_{S}$ denotes the spatial attention network. + +The predicted temporal residual state $T_{t}^{k}$ and the predicted spatial residual state $S_{t}^{k}$ will be further aggregated to the final hidden state in the output module (gray block): + +$$ +R _ {O} = \sigma \left(O F _ {t} ^ {k} + H F _ {t} ^ {k} + W _ {o s} * S _ {t} ^ {k} + W _ {o t} * T _ {t} ^ {k}\right), +$$ + +$$ +S T R F _ {t} = R _ {O} \odot \tanh \left(W _ {1 \times 1} * \left[ T _ {t} ^ {k}, S _ {t} ^ {k} \right]\right), +$$ + +$$ +S T I F _ {t} = W _ {1 \times 1} * \left[ T _ {E}, S _ {E} \right], +$$ + +$$ +H _ {t} ^ {k} = S T I F _ {t} ^ {k} + S T R F _ {t} ^ {k}, \tag {9} +$$ + +where $R_O$ denotes the output residual gate, which is utilized to aggregate the predicted temporal and spatial residual information. $H_t^k$ denotes the final hidden state. In particular, the hidden state $H_t^k$ consists of two terms, where the first term $STIF_t^k$ denotes the spatiotemporal input features and the second term $STRF_t^k$ denotes the predicted spatiotemporal residual features between previous and future frames. + +# 3.3. Training Details + +In training stage, to predict more naturalistic results, the proposed model is trained with the help of GANs and the whole model consists of two submodules: predictor $P$ which is utilized to generate future frames and discriminator $D$ which is utilized to judge whether the input frames are real or generated. The adversarial loss for both modules can be expressed as follows, + +$$ +\mathcal {L} _ {G A N} (D) = - \sum_ {t = 2} ^ {T} [ \log (D (v _ {t})) + \log (1 - D (\hat {v} _ {t})) ], +$$ + +$$ +\mathcal {L} _ {G A N} (P) = - \sum_ {t = 2} ^ {T} \left[ \log \left(D \left(\hat {v} _ {t}\right)\right), \right. \tag {10} +$$ + +where $T$ denotes total number of the time steps. $v$ and $\hat{v}$ denote the input and predicted frames respectively. + +Since the discriminators in GANs can model the distribution of the input data (fake or real), we utilize the feature map from the layer $k$ of the discriminator as the learned perceptual representations for current input. And a learned perceptual loss, which can indicate the perceptual distribution of the inputs, is represented as follows (Figure 2), + +$$ +\mathcal {L} _ {L P} = \sum_ {t = 2} ^ {T} \mathcal {L} _ {2} \left[ D _ {k} \left(v _ {t}\right), D _ {k} \left(\hat {v} _ {t}\right) \right], \tag {11} +$$ + +where $D_{k}$ denotes the $k^{th}$ layer of the discriminator $D$ (the bottom layer in our method). $\mathcal{L}_2(\cdot)$ denotes the standard MSE loss function. By using the additional loss functions, more naturalistic results can be predicted and the final loss function for the predictor can be expressed as follows, + +$$ +\mathcal {L} _ {P} = \mathcal {L} _ {M S E} + \lambda_ {1} \mathcal {L} _ {L P} + \lambda_ {2} \mathcal {L} _ {G A N} (P), \tag {12} +$$ + +where $\lambda_1, \lambda_2$ control the relative importance. + +![](images/cb7a07e51aac843fd1d6153e2ecf6404fab3738c9785685651f66a58d28bc8a7.jpg) +Figure 4. The generated examples on the UCF Sports test set (4 frames $\rightarrow$ 6 frames). + +# 4. Experiments + +In this section, we evaluate all models on three high-resolution datasets, UCF Sports dataset $(480\times 720)$ [19], Human3.6M dataset $(1000\times 1000)$ [10] and SJTU4K dataset $(2160\times 3840)$ [21]. We stack 16 RPMs to the proposed STRPM and the integrated convolutional operations are set with a kernel size $5\times 5$ . The stride is set to 1 for each dimension. We set the number of previous spatiotemporal states $\tau$ , $\theta$ to 5. The hidden states for STRPM and the discriminator are set with 128 channels. All models are implemented using Pytorch and trained with Adam optimizer. In the training stage, models are trained to predict the next frame with 4 successive frames as the input on all datasets. In the testing stage, models are evaluated to predict multiple frames. The balance weights $\lambda_{1}$ , $\lambda_{2}$ are set to 0.01, 0.001 for UCF Sports and Human3.6M datasets, and 0.005, 0.0005 for SJTU4K dataset. + +# 4.1. UCF Sports Dataset + +The UCF Sports dataset contains a series of human actions collected from various sports events and are typically captured on broadcast television channels such as the BBC and ESPN. A total of 150 videos with resolution of $480 \times 720$ are contained in the UCF Sports dataset. We resize each frame to $512 \times 512$ . 6,288 sequences are for training and 752 for testing. Figure 4 shows the qualitative results generated from different methods, where the proposed method obviously outperforms others with more naturalistic predictions. In Table 1, we utilize the Peak Signal to Noise Ratio (PSNR) to represent the objective quality and + +![](images/f06392bdeaa0a39d5f82d0db51a62fdf6eb6de3096a8e73dab73e49f09d3e324.jpg) +Figure 5. The visualization results of the spatiotemporal encoding scheme and the residual predictive memory. Temporal Features and Spatial Features denote the encoded features from the temporal encoder and the spatial encoder. Input Information and Residual Information denote $STIF$ and $STRF$ in Equation 9. + +the Learned Perceptual Image Patch Similarity (LPIPS) [30] to represent the perceptual quality. The quantitative results show that the proposed method achieves the best PSNR score and LPIPS scores. + +To further evaluate the efficiency of the proposed spatiotemporal encoding scheme and the residual predictive memory, we visualize the temporal features $T_{E}$ , the spatial features $S_{E}$ , the input information and the spatiotemporal residual information (STRF). The visualized results are shown in Figure 5, where the temporal features contain a wider motion area while the spatial features focus on the appearance area of the person with greater weight values. The differences between the temporal features and the spatial features indicate that the spatiotemporal encoding scheme can help extract different features from the temporal domain and the spatial domain, respectively. Moreover, compared with the temporal features, the weights of the learned spatiotemporal residual features are much greater, indicating the proposed residual structure can help the predictive memory pay more attention to modeling the complex motion information instead of the appearance information (the weights of the appearance information is less than the spatial features). + +# 4.2. Human3.6M and SJTU4K Datasets + +The Human3.6M dataset consists of 3.6 million 3D human poses and corresponding images acted by 11 profes + +Table 1. Quantitative results of different methods on the UCF Sports (4 frames $\rightarrow$ 6 frames) and Human3.6M (4 frames $\rightarrow$ 4 frames) datasets. Lower LPIPS(10 $^{-2}$ ) and higher PSNR(dB) scores indicate better results. + +
MethodUCF SportsHuman3.6M
t=5t=10t=5t=8
PSNR↑/LPIPS↓PSNR↑/LPIPS↓PSNR↑/LPIPS↓PSNR↑/LPIPS↓
BeyondMSE (ICLR2016) [15]26.42 / 29.0118.46 / 55.28--
PredRNN (NeurIPS2017) [26]27.17 / 28.1519.65 / 55.3431.91 / 12.6225.65 / 14.01
PredRNN++ (ICML2018) [24]27.26 / 26.8019.67 / 56.7932.05 / 13.8527.51 / 14.94
SAVP (arXiv 2018) [13]27.35 / 25.4519.90 / 49.91--
SV2P (ICLR2018) [1]27.44 / 25.8919.97 / 51.3331.93 / 13.9127.33 / 15.02
HFVP (NeurIPS2019) [23]--32.11 / 13.4127.31 / 14.55
E3D-LSTM (ICLR2019) [25]27.98 / 25.1320.33 / 47.7632.35 / 13.1227.66 / 13.95
CycleGAN (CVPR2019) [12]27.99 / 22.9519.99 / 44.9332.83 / 10.1828.26 / 11.03
CrevNet (ICLR2020) [29]28.23 / 23.8720.33 / 48.1533.18 / 11.5428.31 / 12.37
MotionRNN (CVPR2021) [27]27.67 / 24.2320.01 / 49.2032.20 / 12.1128.03 / 13.29
STRPM28.54 / 20.6920.59 / 41.1133.32 / 9.7429.01 / 10.44
+ +![](images/1d4b8402ba73e9d5f86f6a8c476d68b92cd9b6ee5c8dfde67a5b47b2137afa29.jpg) +PredRNN++ (ICML2018) + +![](images/2d6a3ea3b060c33132ce005d5b7609dc30b285fa9243dffa0ec730c57fbb072e.jpg) +CrevNet (ICLR2020) + +![](images/7cb347fc11d3df55ac3e1c164bfdd535ec59789bb9f5c718b2d9ea89e92364a6.jpg) +STRPM + +![](images/4d1a5fafbb3d9f00cea74434127729feb1f0abb330c35c3a16e710ab9f423d2a.jpg) +Ground Truth + +![](images/103b7691697a64a38248cfb121a6b60802ee16dcda961064f96d9d8d821e0f64.jpg) +Figure 6. The generated examples on the Human3.6M dataset (4 frames $\rightarrow$ 1 frame). + +![](images/622dd3277cde500d6fe490fc70a00e650fd67935a99f694e58967cf6a0cd525f.jpg) +PredRNN++ (ICML2018) + +![](images/4d460f24d9c41b26a7cd6aaa542fcb450a391963608027db15962b4ae0e00190.jpg) +Figure 7. The generated examples on the SJTU4K dataset (4 frames $\rightarrow$ 1 frame). + +![](images/719e096fdff2048e086403137747a843255b02ceecc103904f289ce655fac2ef.jpg) + +![](images/f1305a3946d08071cad52295a3c48a9dc7f3941a304d74ccb61d3fe24f0fde45.jpg) +CrevNet (ICLR2020) + +![](images/b7b2a9a7a82382aaca6147c7b98cd0d25de768e1597c18dbaeadded2715791a8.jpg) + +![](images/5dc1411027fbbe5d7087ae656cbe19ecb2fabd99aa549384dc67a08ccd1ef06c.jpg) + +![](images/036b9dc0d35acc0649a4b0aca7e024caab6713b1bd1157b0dc7b7f2be52b98d7.jpg) +STRPM + +![](images/0b4aabed285d0cc9c1263a45748b47a59f422bbcc0caf7536cef4c4bd1ce6452.jpg) + +![](images/3c24973a86a68da239ed111e48638c9b14a78dd877e758b409afaaa459b62578.jpg) + +![](images/e25a79b0b89d709d1592d1780fe667064b150bb07fe0ddb63f05ee2eaeddde0d.jpg) +Ground Truth + +sional actors in 17 scenarios, including discussion, smoking, taking photos and so on. All videos are recorded with 4 calibrated cameras with a resolution $1000 \times 1000$ , which are further resized to $1024 \times 1024$ in this paper. 73,404 sequences are for training and 8,582 for testing. + +Figure 6 shows the generated examples from the proposed method and other state-of-the-art methods, where the proposed STRPM significantly outperforms others and the predicted results are more naturalistic. In Table 1, the proposed method achieves the best PSNR and LPIPS scores + +compared with other state-of-the-art methods. + +The SJTU4K dataset consists of 15 ultra-high resolution 4K videos with a wide variety of contents. The resolution for each video is $2160 \times 3840$ . To evaluate the performance on ultra-high resolution videos, the inputs and outputs are all 4K videos without being down-sampled. 3,873 sequences are for training and 445 for testing. To the best of our knowledge, the proposed STRPM is the first one predicting 4K videos. Figure 7 shows the predicted 4K video frames from different methods. The quantitative results are summarized in Table 2. As shown in Figure 7 and Table 2, the proposed method has achieved the best qualitative and quantitative results on ultra-high-resolution videos with a satisfactory inference speed. + +Table 2. Quantitative results of different methods on the SJTU4K test set (4 frames $\rightarrow$ 4 frames). The inference time over 10 samples have also been summarized. + +
Methodt=5t=8Inference
PSNR↑/LPIPS↓PSNR↑/LPIPS↓Time
ConvLSTM [20]22.74 / 67.8117.91 / 86.8439.38s
PredRNN [26]23.25 / 66.6018.20 / 87.0440.06s
PredRNN++ [24]23.43 / 64.0718.55 / 86.3453.11s
SAVP [13]23.41 / 61.4418.63 / 80.45100.23s
CrevNet [29]24.35 / 62.3119.61 / 80.9152.98s
MotionRNN23.47 / 65.2119.72 / 81.3961.87s
STRPM24.37 / 57.1219.77 / 66.6839.84s
+ +Table 3. Ablation studies on the proposed residual predictive memory and the spatiotemporal encoding-decoding scheme (STED) on the Human3.6M dataset (4 frames $\rightarrow$ 4 frames). PSNR and LPIPS scores are averaged over all 4 predictions. For a fair comparison, the encoders and decoders for all models are with the same structure and the number of the hidden state channels for all the memories is set to 128. We stack 16 memories into each model. All models are trained with MSE loss functions. The floating point operations (FLOPs) are recorded over 1 sample. + +
MethodPSNR↑LPIPS↓ParametersFLOPs
Casual-LSTM [24]29.6114.42131.35M36.19G
E3D-LSTM [25]29.9313.23501.37M128.82G
Reversible-PM [29]30.1312.62114.35M35.07G
RPM w/o residual30.1112.64108.29M30.55G
RPM (θ = 1, τ = 1)30.1412.5845.95M14.96G
RPM (θ = 5, τ = 1)30.5611.9877.09M22.75G
RPM (θ = 1, τ = 5)30.3212.3177.09M22.75G
RPM31.1011.89108.29M30.55G
RPM + STED31.8111.72109.13M34.24G
+ +Table 4. Ablation studies on STRPM with different loss functions. Performance scores are averaged over all predictions. + +
MethodUCF sports 4 → 6Human3.6M 4 → 4
PSNR↑LPIPS↓PSNR↑LPIPS↓
LMSE24.8938.8131.8111.72
LMSE+LGAN23.9835.0130.5310.98
LMSE+LGAN+LLP24.3031.5031.0010.11
+ +# 4.3. Ablation Study + +In this section, a series of ablation studies are conducted. Table 3 shows the results of different models with different structures. For a fair comparison, all models without STED (the spatiotemporal encoding-decoding scheme) are built with the same structure except the predictive memory. Experimental results show that the proposed residual predictive memory outperforms other state-of-the-art memories with the lowest computation load and fewest parameters. In addition, the residual structure, the broadened temporal receptive field $(\tau >1)$ , and the broadened spatial receptive field $(\theta >1)$ can help improve the performance of RPM. Moreover, RPM with STED also helps improve the model performance. Furthermore, results from methods trained with different loss functions are summarized in Table 4, where the proposed perceptual loss can help obtain a better trade-off between the objective quality (PSNR) and the perceptual quality (LPIPS). + +# 5. Conclusion and Discussions + +We proposed a Spatiotemporal Residual Predictive Model (STRPM) for High-Resolution Video Prediction. We designed the Spatiotemporal Encoding-Decoding Scheme and the Residual Predictive Memory (RPM) to model the much more complex appearance information and motion information in high-resolution videos. In addition, we proposed a Learned Perceptual loss to generate more naturalistic frames compared with the standard MSE loss. Experimental results showed that the proposed model can predict high-resolution videos with the best objective and subjective quality compared with various existing methods. + +Although the model performance is better than current methods, the practicality is still far from satisfactory, especially for videos with ultra-high resolutions $(\geq 1080\mathrm{p})$ . In addition, the model efficiency also needs to be improved for multi-step predictions. Considering the above limitations, current predictive models maybe not reliable enough to be applied into decision-making systems that require data with high accuracy and real-time interactions, such as autonomous driving, robot control, etc. Further works are highly-encouraged to solve the above potential problems. + +# References + +[1] Mohammad Babaeizadeh, Chelsea Finn, Dumitru Erhan, Roy H Campbell, and Sergey Levine. Stochastic variational video prediction. In Int. Conf. Learn. Represent., 2018. 2, 7 +[2] Apratim Bhattacharyya, Mario Fritz, and Bernt Schiele. Long-term on-board prediction of people in traffic scenes under uncertainty. In IEEE Conf. Comput. Vis. Pattern Recog., pages 4194-4202, 2018. 1 +[3] Zheng Chang, Xinfeng Zhang, Shanshe Wang, Siwei Ma, Yan Ye, and Wen Gao. Stae: A spatiotemporal auto-encoder for high-resolution video prediction. In Int. Conf. Multimedia and Expo, pages 1-6. IEEE, 2021. 2 +[4] Xinyuan Chen, Chang Xu, Xiaokang Yang, and Dacheng Tao. Long-term video prediction via criticization and retrospection. IEEE Trans. Image Process., 29:7090-7103, 2020. 2 +[5] Emily Denton and Rob Fergus. Stochastic video generation with a learned prior. In Int. Conf. Mach. Learn., pages 1174-1183, 2018. 2 +[6] Chelsea Finn, Ian Goodfellow, and Sergey Levine. Unsupervised learning for physical interaction through video prediction. In Adv. Neural Inform. Process. Syst., pages 64-72, 2016. 1 +[7] Jean-Yves Franceschi, Edouard Delasalles, Mickaël Chen, Sylvain Lamprier, and Patrick Gallinari. Stochastic latent residual video prediction. In Int. Conf. Mach. Learn., pages 3233-3246. PMLR, 2020. 2 +[8] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Adv. Neural Inform. Process. Syst., pages 2672–2680, 2014. 2 +[9] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735-1780, 1997. 2 +[10] 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 Trans. Pattern Anal. Mach. Intell., 2014. 6 +[11] Beibei Jin, Yu Hu, Qiankun Tang, Jingyu Niu, Zhiping Shi, Yinhe Han, and Xiaowei Li. Exploring spatial-temporal multi-frequency analysis for high-fidelity and temporal-consistency video prediction. In IEEE Conf. Comput. Vis. Pattern Recog., pages 4554-4563, 2020. 2 +[12] Yong-Hoon Kwon and Min-Gyu Park. Predicting future frames using retrospective cycle gan. In IEEE Conf. Comput. Vis. Pattern Recog., pages 1811-1820, 2019. 2, 7 +[13] Alex X Lee, Richard Zhang, Frederik Ebert, Pieter Abbeel, Chelsea Finn, and Sergey Levine. Stochastic adversarial video prediction. arXiv preprint arXiv:1804.01523, 2018. 2, 7, 8 +[14] Siwei Ma, Xinfeng Zhang, Chuanmin Jia, Zhenghui Zhao, Shiqi Wang, and Shanshe Wang. Image and video compression with neural networks: A review. IEEE Trans. Circuit Syst. Video Technol., 2019. 1 +[15] Michael Mathieu, Camille Couprie, and Yann LeCun. Deep multi-scale video prediction beyond mean square error. In Int. Conf. Learn. Represent., 2016. 2, 7 + +[16] Simone Meyer, Abdelaziz Djelouah, Brian McWilliams, Alexander Sorkine-Hornung, Markus Gross, and Christopher Schroers. Phasenet for video frame interpolation. In IEEE Conf. Comput. Vis. Pattern Recog., pages 498-507, 2018. 1 +[17] Simon Niklaus and Feng Liu. Context-aware synthesis for video frame interpolation. In IEEE Conf. Comput. Vis. Pattern Recog., pages 1701-1710, 2018. 1 +[18] MarcAurelio Ranzato, Arthur Szlam, Joan Bruna, Michael Mathieu, Ronan Collobert, and Sumit Chopra. Video (language) modeling: a baseline for generative models of natural videos. arXiv preprint arXiv:1412.6604, 2014. 2 +[19] Mikel D Rodriguez, Javed Ahmed, and Mubarak Shah. Action mach a spatio-temporal maximum average correlation height filter for action recognition. In IEEE Conf. Comput. Vis. Pattern Recog., pages 1-8, 2008. 6 +[20] Xingjian Shi, Zhourong Chen, Hao Wang, Dit-Yan Yeung, Wai-Kin Wong, and Wang-chun Woo. Convolutional LSTM network: A machine learning approach for precipitation nowcasting. In Adv. Neural Inform. Process. Syst., pages 802-810, 2015. 1, 2, 8 +[21] Li Song, Xun Tang, Wei Zhang, Xiaokang Yang, and Pingjian Xia. The sjtu 4k video sequence dataset. In International Workshop on Quality of Multimedia Experience, pages 34-35. IEEE, 2013. 6 +[22] Nitish Srivastava, Elman Mansimov, and Ruslan Salakhudinov. Unsupervised learning of video representations using lstms. In Int. Conf. Mach. Learn., pages 843-852, 2015. 1, 2 +[23] Ruben Villegas, Arkanath Pathak, Harini Kannan, Dumitru Erhan, Quoc V Le, and Honglak Lee. High fidelity video prediction with large stochastic recurrent neural networks. In Adv. Neural Inform. Process. Syst., 2019. 2, 7 +[24] Yunbo Wang, Zhifeng Gao, Mingsheng Long, Jianmin Wang, and S Yu Philip. Predrnn++: Towards a resolution of the deep-in-time dilemma in spatiotemporal predictive learning. In Int. Conf. Mach. Learn., pages 5123-5132, 2018. 2, 7, 8 +[25] Yunbo Wang, Lu Jiang, Ming-Hsuan Yang, Li-Jia Li, Mingsheng Long, and Li. Fei-Fei. Eidetic 3d lstm: A model for video prediction and beyond. In Int. Conf. Learn. Represent., 2019. 1, 7, 8 +[26] Yunbo Wang, Mingsheng Long, Jianmin Wang, Zhifeng Gao, and S Yu Philip. Predrnn: Recurrent neural networks for predictive learning using spatiotemporal lstms. In Adv. Neural Inform. Process. Syst., pages 879-888, 2017. 1, 2, 4, 7, 8 +[27] Haixu Wu, Zhiyu Yao, Jianmin Wang, and Mingsheng Long. Motionrnn: A flexible model for video prediction with spacetime-varying motions. In IEEE Conf. Comput. Vis. Pattern Recog., pages 15435-15444, 2021. 1, 7 +[28] Jingwei Xu, Huazhe Xu, Bingbing Ni, Xiaokang Yang, and Trevor Darrell. Video prediction via example guidance. In Int. Conf. Mach. Learn., pages 10628-10637. PMLR, 2020. 2 +[29] Wei Yu, Yichao Lu, Steve Easterbrook, and Sanja Fidler. Efficient and information-preserving future frame prediction and beyond. In Int. Conf. Learn. Represent., 2020. 1, 2, 7, 8 + +[30] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In IEEE Conf. Comput. Vis. Pattern Recog., pages 586-595, 2018. 6 +[31] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Int. Conf. Comput. Vis., pages 2223-2232, 2017. 2 \ No newline at end of file diff --git a/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/images.zip b/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..730486b6db58e11d323c97ed26ee05225b3b76f0 --- /dev/null +++ b/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a277c1238cdf9d080be2f466a7ab7936e05c6f47b127576ff4de8238d6c0b4a5 +size 805864 diff --git a/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/layout.json b/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..b81ca259cfbb8ababd90b676c092a66cabd7fea1 --- /dev/null +++ b/strpmaspatiotemporalresidualpredictivemodelforhighresolutionvideoprediction/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:734c71639740db9d9dd466df2c6ff31dfeb63eddc4cc15f43513609fd4d77a73 +size 389782 diff --git a/svipsequenceverificationforproceduresinvideos/494a0a92-9325-44de-8114-ba0064c8c401_content_list.json b/svipsequenceverificationforproceduresinvideos/494a0a92-9325-44de-8114-ba0064c8c401_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d669c518d2fb7695d362fb98373ca7dde0210463 --- /dev/null +++ b/svipsequenceverificationforproceduresinvideos/494a0a92-9325-44de-8114-ba0064c8c401_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd3e02504efe947ed408af0cf21396a53689ca664edbc06f60117b59394b5155 +size 94572 diff --git a/svipsequenceverificationforproceduresinvideos/494a0a92-9325-44de-8114-ba0064c8c401_model.json b/svipsequenceverificationforproceduresinvideos/494a0a92-9325-44de-8114-ba0064c8c401_model.json new file mode 100644 index 0000000000000000000000000000000000000000..39a0797a4e0a52d2079137b2f56b17b18d505f82 --- /dev/null +++ b/svipsequenceverificationforproceduresinvideos/494a0a92-9325-44de-8114-ba0064c8c401_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71616b35f3269f3b62e2730bce29dc2cce1f003dee91a5d3f84637bb6b07fc44 +size 125135 diff --git a/svipsequenceverificationforproceduresinvideos/494a0a92-9325-44de-8114-ba0064c8c401_origin.pdf b/svipsequenceverificationforproceduresinvideos/494a0a92-9325-44de-8114-ba0064c8c401_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..67dd1b99ad82d837dcffb6c74ae0d3b0a8502de6 --- /dev/null +++ b/svipsequenceverificationforproceduresinvideos/494a0a92-9325-44de-8114-ba0064c8c401_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0413e8be88c869ab493983355d64f5cf37d40c44eb56cbedaacf9cd130ff918 +size 5419505 diff --git a/svipsequenceverificationforproceduresinvideos/full.md b/svipsequenceverificationforproceduresinvideos/full.md new file mode 100644 index 0000000000000000000000000000000000000000..46549ef04ef7989586c28ed063e9317606261abe --- /dev/null +++ b/svipsequenceverificationforproceduresinvideos/full.md @@ -0,0 +1,384 @@ +# SVIP: Sequence Verification for Procedures in Videos + +Yicheng Qian $^{1}$ , Weixin Luo $^{2}$ , Dongze Lian $^{1,5}$ , Xu Tang $^{3}$ , Peilin Zhao $^{4}$ , Shenghua Gao $^{1,6,7\dagger}$ + +$^{1}$ ShanghaiTech University, $^{2}$ Meituan, $^{3}$ Xiaohongshu Inc., $^{4}$ Tencent AI Lab + $^{5}$ National University of Singapore, $^{6}$ Engineering Research Center of Intelligent Vision and Imaging + $^{7}$ Shanghai Engineering Research Center of Energy Efficient and Custom AI IC + +{qianych, luowx, liandz, gaoshh}@shanghaiitech.edu.cn, tangshen@xiaohongshu.com, masonzhao@tencent.com + +# Abstract + +In this paper, we propose a novel sequence verification task that aims to distinguish positive video pairs performing the same action sequence from negative ones with step-level transformations but still conducting the same task. Such a challenging task resides in an open-set setting without prior action detection or segmentation that requires event-level or even frame-level annotations. To that end, we carefully reorganize two publicly available action-related datasets with step-procedure-task structure. To fully investigate the effectiveness of any method, we collect a scripted video dataset enumerating all kinds of step-level transformations in chemical experiments. Besides, a novel evaluation metric Weighted Distance Ratio is introduced to ensure equivalence for different step-level transformations during evaluation. In the end, a simple but effective baseline based on the transformer encoder with a novel sequence alignment loss is introduced to better characterize long-term dependency between steps, which outperforms other action recognition methods. Codes and data will be released1. + +# 1. Introduction + +In recent years, short-form videos filming people's daily life widely disseminated on social media, which leads to the spurt of activity videos and greatly facilitated the research on video understanding [6, 14, 32, 55, 69, 85] as well. One can see from these videos that most daily activities are accomplished by serial steps instead of a single step. Such sequential steps form a procedure of which key-steps obey intrinsic consistency, while different participants may accomplish the same activity by different procedures with step + +![](images/f7343ce813617c546881fabbed423d047553145713b09377dfc3bfd16862b441.jpg) +(a) Action Recognition + +![](images/ee1ea350967972f4bf13a357f383dab08d658e9e21c7bcc4c3ce6aeed2a7c8b7.jpg) +(b) Action Detection + +![](images/920834245711bdc0cac3e231173aacd63dc708cc6f4019568d3c6920b59689f3.jpg) +(c) Sequence Verification +Figure 1. Comparison between traditional action tasks and sequence verification. (a) Action recognition datasets generally consist of various action categories containing videos; (b) Results of action detection methods on different datasets in recent years. $[a / b]$ means the corresponding dataset contains $a$ action classes and $b$ action instances per video; (c) Sequence verification dataset aims to verify the procedures in the same task. Cross-task verification is dropped due to its simplicity. + +level divergence, as shown in Figure 1 (c). In this paper, we advocate a novel action task sequence verification which intends to verify whether the procedures in two videos are step-level consistent, which can be applied to multiple potential tasks such as instructional training and performance + +scoring. To better demonstrate this task, we define related terms specifically. Step: a human-action or human-object-interaction atomic unit that is always labeled by a verb, a noun, and even prepositions, e.g., 'remove the old wrapper'; procedure: a sequence of steps performed in the chronological order to accomplish a certain goal, e.g., 'remove the old wrapper - wrap with the new wrapper'; task: an activity that needs to be accomplished within a defined period of time or by a deadline, e.g., 'Rewrap battery' and 'Change the car tire' in COIN. We note that a task can be accomplished by various procedures; video: each video performs one procedure of a certain task; $P/N$ pairs: two videos performing an identical procedure form a positive pair, while those performing different procedures from the same task form a negative pair. + +Why do we need sequence verification? Traditional action tasks such as action recognition [52, 90, 104], action localization [11, 50, 75] and action segmentation [24, 47, 100] have achieved significant progress due to the development of CNN as well as recently prevalent visual transformer [20]. However, most of these tasks follow a close-set setting with a limitation of predefined categories, illustrated in Figure 1 (a). Besides, accurate annotations of steps in numerous videos are extremely time-consuming and labor-intensive, followed by boundary ambiguities that have been studied in recent work [46, 72, 85, 107] though. However, our proposed sequence verification task circumvents both of these problems by verifying any video pair according to their distance in embedding space. In this way, the sequence verification task neither requires the predefined labels nor consumes the intensive step annotations, which can easily handle the open-set setting. + +As shown in Figure 1 (c), our proposed sequence verification aims to verify those procedures with semantic-similar steps rather than being associated with totally irrelevant tasks, which enables it to concentrate more on action step association rather than background distinction. Thus, an appropriate dataset is crucial to perform this task well. However, existing trimmed video datasets such as UCF101 [82], Kinetics [10], and Moments in Time [59] etc. are leveraged to carry out single-label action recognition. On the other hand, untrimmed video datasets like EPIC-KITCHENS [15], Breakfast [43], Hollywood Extended [7], ActivityNet [8] provide videos composed by multiple sub- actions and the corresponding step annotations, but they do not collect videos that especially performs similar or identical procedures. Thus, they cannot be used directly for sequence verification. To this end, we rearrange some datasets such as COIN [85] and Diving48 [51] where each task contains multiple videos recording different procedures, and each video has step-level annotations. Generally, videos with the same procedure are assigned to an individual category for training. Positive pairs and negative ones for test + +ing are collected within the same procedure and cross different procedures in the same task, respectively. It should be noticed that these unscripted videos in the same procedure could be with a large appearance variance due to background divergence and personal preference, which makes sequence verification more challenging. Apart from that, we introduce a scripted filming dataset performing chemical procedures, where it includes all kinds of step-level transformations such as deletions, additions, and order exchanges. Thus, the effectiveness of any algorithm can be well justified by this newly proposed dataset. Additionally, since more step transformations may lead to larger feature distances which is unfair compared to less ones, we introduce a new evaluation metric Weighted Distance Ratio to make sure that every negative pair will be counted equally regardless of its step-level difference during evaluation. + +As an unprecedented task, sequence verification may be solved by off-the-shelf action detectors [10, 13, 25, 30, 39, 49, 57, 62–64, 77, 83, 84, 94, 96]. However, their performance on Charades [78] or AVA [32], shown in Figure 1 (b), is not satisfactory to conduct step-level detection before verification. Although [3, 5, 11, 28, 53, 54, 74, 75, 91, 95–97, 99, 101, 102] perform well on ActivityNet [8] or THUMOS14 [38], it lacks persuasion since the two datasets either contain a few action classes or action instances per video. Thus, we introduce a simple but effective baseline CosAlignment Transformer (abbreviated as CAT), which leverages 2D convolution to extract discriminative features from sampled frames and utilizes a transformer encoder to model inter-step temporal correlation in a video clip. Whereas representing the whole video with multiple steps as a single feature vector may lose information corresponding to the order of steps in a procedure. Thus, we introduce a sequence alignment loss that aligns each step in a positive video pair via the cosine similarities between two videos. The results show that our proposed method significantly outperforms other action recognition methods in the sequence verification task. + +# We summarize our contributions as follows: + +i) Problem setting: We propose a new task, sequence verification. To our knowledge, this is the first task focusing on procedure-level verification between videos. +ii) Benchmark: We rearrange two unscripted video datasets with significant diversity and propose a new scripted dataset with multiple step-level transformations to support this task. Moreover, a new evaluation metric is introduced especially for this novel task. +iii) Technical contributions: We propose a simple but effective baseline that contains a transformer encoder to explicitly model the correlations between steps. Besides, a sequence alignment loss is introduced to improve the sensitivity to step disorder and absence. This novel baseline significantly outperforms other action recognition methods. + +
Dataset# Tasks# Videos# Steps# Procedures# Split Videos# Split Samples
COIN-SV362,11474937 / 268 / 2851,221 / 451 / 44221,741 / 1,000 / 400
Diving48-SV116,9972420 / 20 / 86,035 / 7,938 / 3,02450,000 / 1,000 / 400
CSV141,94010645 / 25 / -901 / 1,039 / -8,531 / 1,000 / -
+ +Table 1. The statistical information of three datasets. It is listed with an order of training, testing, and validation. + +# 2. Related Work + +Action Tasks. Traditional action-related tasks such as action recognition, action detection, and action segmentation have been greatly developed due to the advances in CNNs. i) As a means of general video representation, deep-learning-based action recognition can be generally summarized to stream-based methods [10, 12, 17, 19, 26, 52, 65, 79, 87, 88, 90, 104] and skeleton-based [21, 80, 92, 98] methods. Both kinds of methods aim to produce a feature representation for each trimmed video, to which a video-level label over predefined action categories is predicted according. ii) To seek the interested sub-actions in untrimmed videos, action detection [13, 25, 39, 53, 54, 57, 62–64, 83, 96, 103] are proposed to detect the start and end of sub-action instances and predict their categories. iii) To conduct dense action predictions in untrimmed videos, action segmentation is designed to label each frame including background in videos. With dense annotations, fully-supervised methods [23, 48, 58, 66, 68, 73, 75, 99] rely on sliding windows, Markov models, or temporal convolutional networks to model the temporal relations. However, dense annotations in videos require expensive human-labors as well as consume much time, though the weakly-supervised methods [7, 18, 36, 45, 67] with order labels of actions only have achieved satisfactory performance. Last but not least, it still remains a concern if these action-related tasks are able to generalize well to unknown classes in the wild. Different from them, our task has no restriction during inference, so it can easily tackle an open-set setting. + +Video datasets. Multiple existing video datasets [1, 8, 15, 31, 40, 41, 44, 60, 78, 82] have been dominated on video understanding during a long period. To begin with, HMDB51 [44] and UCF101 [82] that contains 51 and 101 classes of actions, respectively, are introduced for action recognition. Next, Something-Something [31] collects 147 classes of interactions between humans and objects in daily life. In addition, ActivityNet [8] and Kinetics [41] collect videos from YouTube and builds large-scale action recognition datasets. Other datasets for instructional video summarization and analysis [68,81,85] that are annotated with texts and temporal boundaries of a series of steps, contributes to the understanding of language and vision. EPIC-KITCHENS dataset [15] collects the human actions such as washing glass or cutting bell pepper in kitchen scenes and targets at the first-person perspective to reflect people's goals and motivations. + +![](images/6cc881634aa8095665c96957ae92df89d29c48650298970c887957d4786ad982.jpg) +Figure 2. Dataset illustration. COIN-SV contains 36 daily life tasks such as 'Replace rearview mirror glass', 'Make burger', leading to high background diversity. Diving48-SV and CSV consist of videos in the diving competition and chemical experiments scene, respectively. Every video in three datasets is categorized by the sequence of steps it performs, as known as the procedure in the video. Note that only COIN-SV provides temporal annotation for steps, while Diving48-SV and CSV only provide the procedure-level annotation for each video. + +Instructional videos analysis. Instructional videos are generally accompanied with explanations such as audio or narrations matching the timestamps of sequential actions which has attracted the research interest in the video understanding community. For instance, step localization [58, 85, 105] as well as action segmentation [27, 29, 61, 85] in instructional videos have been widely studied in the early stage. With the growing attention paid to this research topic, various kinds of tasks related to instructional videos have been proposed, e.g., video captioning [37, 56, 86, 105] which generates the description of a video based on the actions and events, visual grounding [35, 76] which locates the target in an image according to the language description, and procedure learning [2, 22, 27, 71, 72, 105] which extracts key-steps. + +# 3. Data Preparation + +Due to the intrinsic step-procedure-task structure in the publicly available datasets COIN [85], and Diving48 [51], we reorganize these two datasets to support our proposed sequence verification task focusing on verifying various + +step-level transformations. However, the procedures in the same task may lack enough diversity in these datasets to fully verify the effectiveness of our proposed method for sequence verification. Thus, we collect a novel scripted dataset, Chemical Sequence Verification, enumerating all kinds of procedures in the same task, which will be introduced later. The statistics of these three datasets can be found in Table 1. We visualize some samples in Figure 2. + +The rest of this section introduces the common structure, specific processing and basic information of these datasets. + +# 3.1. Common Structure + +As shown in Figure 1 (c), each dataset used in this paper contains videos completing various tasks, e.g., the original COIN dataset contains 180 tasks common in daily life. In practice, each individual task can be accomplished by different procedures of which steps as atomic actions still obey certain orders. Meanwhile, the steps of two procedures with different task-orientations will not overlap each other at most times. Thus, we will not introduce sequence verification cross tasks to ensure the challenge. + +# 3.2.COIN-SV + +COIN [85] is a comprehensive instructional video dataset that contains 180 tasks such as 'Replace the door knob', 'Change the car tire', and 'Install a ceiling fan'. This recently proposed dataset is quite challenging due to its background diversity and even significant distinctions between videos of the same procedures, which benefits our proposed sequence verification task. In total, it contains 11827 videos over 4715 procedures, which means COIN is followed by a long-tail distribution where most procedures have one or two videos only. To facilitate the classifier training, we preserve 36 tasks that contain at least one procedure with more than 20 videos and discard the other tasks. Procedures with more than 20 videos are used for training, and the rest are assigned to the validation and testing sets randomly. Since the original split in this dataset is reorganized, we name it COIN-SV. + +# 3.3. Diving48-SV + +Diving48 [51] dataset records diving competition videos with 48 kinds of diving procedures standardized by the international federation FINA, which consists of around 18,000 trimmed videos. Each diving procedure is a sub-action sequence of one-step takeoff, two-step movements in flight, and one-step entry. In total, 16997 videos over 48 procedures are publicly available up to now. Obviously, this dataset is less challenging than COIN due to its dual background including a board, a pool, and spectators and less step-level divergence. We assign 20, 8, 20 procedures for the training, validation, and testing sets, respectively. Similar to COIN-SV, we name it Diving48-SV. + +# 3.4. Chemical Sequence Verification + +Since the videos in COIN-SV and Diving48-SV are gathered from the internet, it is difficult to include all kinds of step-level transformations without predefined scripts, which is crucial for the sequence verification task. To this end, we collect a new dataset named Chemical Sequence Verification (CSV) containing videos with all kinds of step-level transformations such as deletions, additions, and order exchanges. Concretely, volunteers from an egocentric perspective are asked to conduct chemical experiments with predefined scripts. In a word, the CSV dataset includes 14 tasks, and each consists of 5 procedures. We select 45 procedures for training and 25 procedures for testing. CSV has no validation set due to its limited number of procedures/videos. Data gathering process, video annotations, and statistics information are available in the supplementary material. + +# 4. Method + +Classical models for video action recognition [10, 12, 17, 19, 26, 65, 79, 87, 88, 90] aim to predict action categories without paying attention to sub-action orders as many as possible due to simple frame feature aggregation such as pooling. Nevertheless, our task intends to verify two videos with large as well as subtle step-level transformations. For instance, a video performing A, then B, and finally C is treated as a negative sample to another video carrying out A and finally C, while both of them may be successfully predicted by a traditional action classifier. To fit our proposed task, we introduce two remedies over the traditional action classification during training: i) procedures rather than tasks in the training set are regarded as training classes, in order to enable the model to distinguish those procedures even with tiny step-level transformations in the same task; ii) since pooling over frame features may bring order insensitivity to the model, we remain the temporal dimension without any down-sampling operation and it is finally reshaped to the channel dimension, followed by a fully-connected layer with order-sensitivity. + +# 4.1. Preliminary + +For a certain dataset $D = \{(V_i, S_i)\}_{i=1}^n$ , a set of $n$ video clips $V$ are given with corresponding procedure annotations $S$ . Here we do not use the timestamp annotations of steps since action detectors will not be used in this paper. We denote the model as $f: \mathbb{R}^{3 \times H \times W \times K} \to \mathbb{R}^C$ . $K$ is the number of sampled frames in a video. $H$ and $W$ are frames' height and width, respectively. $C$ is the total number of procedures in the training set. Following the paradigm in face verification [4, 16, 70], we treat sequence verification as a multi-category classification task during training, and videos performing the same procedure + +![](images/cb88eeea7ae876cbcd9662a880c2441ee61de47b9fe75984032a323e107e16a0.jpg) +(a) Intra-step module + +![](images/749d815971ec6acb567d39bad2b1b5dbe3a808a899f91ea1cce0bed36ce2ca34.jpg) +(b) Inter-step module +(c) Alignment module +Figure 3. Pipeline overview. a) Applying a 2D backbone on the sampled frames (colored in the input frames) to capture features of individual steps, which we called intra-step features. The output of this module is a sequence of feature maps that are temporally modeled from the sampled frames. b) Applying a transformer encoder to aggregate the sequential feature maps. c) This module aims at imposing the two sequences of feature maps to be matched. + +are classified into the same category. In the testing phase, we collect the videos from the same procedure to form positive pairs and the videos from different procedures but still in the same task to form negative pairs. Then embedding distance between two videos in a pair indicates the verification score of this pair. The procedure classification loss $L_{\mathrm{cls}}$ is as follows. + +$$ +L _ {\mathrm {c l s}} = \sum_ {i = 1} ^ {n} \delta (f (V _ {i}), Y _ {i}) \tag {1} +$$ + +where $\delta$ is the cross-entropy function, $Y_{i}$ is the $C$ -dim one-hot vector whose entry corresponding to $S_{i}$ is 1. + +# 4.2. Baseline + +We utilize a ResNet [34] backbone followed by a fully-connected layer to aggregate temporal information and a softmax classification layer as our baseline. Following TSN [90], we divide each input video into $K$ segments ( $K = 16$ in our experiments). One frame in each segment is randomly selected to form the input tensor $x \in \mathbb{R}^{3 \times H \times W \times K}$ , which is fed into the backbone and outputs a tensor with a shape of $D \times K$ where $D$ is feature dimension. Then it is flattened into a vector for order-sensitivity. Finally, a procedure classifier with $C$ categories is appended for training. + +# 4.3. Transformer Encoder + +Transformer [89] has achieved great success in Natural Language Process and it has been applied in multiple computer vision tasks such as image recognition [20, 93] and object detection [9, 106]. To better characterize inter-step correlations, we follow [20] and integrate the transformer + +encoder into the backbone by replacing the global average pooling. As Figure 3 describes, we firstly flatten the spatial feature maps and apply a trainable linear projection layer on these flattened vectors, resulting in feature vectors $\mathbf{E}_i\in \mathbb{R}^D,i = 1,2,\dots ,K$ .Further, randomly initialized position embedding is added to retain order information. In conclusion, the input I of a standard transformer encoder is + +$$ +\mathbf {I} = \left[ \mathbf {E} _ {1}; \mathbf {E} _ {2}; \dots ; \mathbf {E} _ {K} \right] + \mathbf {E} _ {\text {p o s}}, \in \mathbb {R} ^ {K \times D}. \tag {2} +$$ + +The output $\mathbf{O} \in \mathbb{R}^{K \times 1024}$ is flattened and fed into a fully-connected layer for a global representation of the input video. We adopt the sequential features instead of the CLS token since the former explicitly remains order information. + +# 4.4. Sequence Alignment + +So far, our proposed method aims to extract a global video representation supervised by the procedure classifier. However, the step order in a procedure is especially important in sequence verification. To make sure two positive procedures are step-level consistent, we propose a Sequence Alignment loss that explicitly imposes feature consistency step-by-step. Specifically, we extract the last spatial feature maps in the backbone and use global average pooling to produce feature vectors for all the frames in a given positive pair $(seq_{1}, seq_{2})$ , where $seq_{i}$ is the frame sequence sampled from video $i$ . Then cosine similarity is calculated for all the frame pairs formed by the two sequences, resulting in a correlation matrix: + +$$ +\operatorname {c o r r} _ {i j} = \frac {f _ {1 i}}{\| f _ {1 i} \|} \cdot \frac {f _ {2 j} ^ {T}}{\| f _ {2 j} \|}, \tag {3} +$$ + +where $\mathrm{corr}_{ij}$ denotes the similarity value at the $i$ -th row and the $j$ -th column of the matrix corr, while $f_{1i}$ and $f_{2j}$ represent the $i$ -th feature of $seq_1$ and $j$ -th feature of $seq_2$ , respectively. Next, we perform a softmax function on each row of the similarity matrix to produce $\mathrm{corr}^1$ , whose $i$ -th row is composed of cosine similarities between the $i$ -th feature of $seq_1$ and every feature of $seq_2$ . Similarly, we perform a softmax function on each column of the similarity and produce $\mathrm{corr}^2$ . We average these two matrices and denote the result as $\mathrm{corr}_{avg}$ . The diagonal values of $\mathrm{corr}_{avg}$ are then expected to be close to 1 while other values are expected to be close to 0, since both $\mathrm{corr}^1$ and $\mathrm{corr}^2$ have been normalized by softmax. In other words, we impose two videos in a positive pair to be similar in the feature space frame-by-frame, to some extent step-by-step. Mathematically, our proposed Sequence Alignment loss $L_{\mathrm{seq}}$ can be defined as: + +$$ +L _ {\mathrm {s e q}} = \left\| \mathbf {1} - h \left(\frac {\operatorname {c o r r} ^ {1} + \operatorname {c o r r} ^ {2}}{2}\right) \right\| _ {1}, \tag {4} +$$ + +where $\mathbf{1}$ is a vector whose entries are all one and $h$ is a function to extract the diagonal entries of a matrix. + +# 4.5. Training Loss + +Now, we train the network by the procedure classification loss and the sequence alignment loss in an end-to-end manner. Thus, the total loss $L$ can be summarized: + +$$ +L = L _ {\mathrm {c l s}} + \lambda L _ {\mathrm {s e q}} \tag {5} +$$ + +Here $\lambda$ is a hyper-parameter and it sets to 1 by default. + +# 4.6. Testing phase + +During inference, the goal of sequence verification is to distinguish positive pairs from negative pairs. We denote each pair as $P_{i} = (V_{i_{1}}, V_{i_{2}})$ . The model takes each video in $P_{j}$ as input and produces one $d$ -dimension visual embedding before the classification layer, which is denoted by $f': \mathbb{R}^{K \times H \times W \times 3} \to \mathbb{R}^{D'}$ . Next, we calculate the normalized Euclidean distance between the two procedures in the embedding space and the verification score $y_{i}$ is defined: + +$$ +d _ {i} = g \left(f ^ {\prime} \left(V _ {i _ {1}}\right), f ^ {\prime} \left(V _ {i _ {2}}\right)\right) \tag {6} +$$ + +$$ +y _ {i} = \left\{ \begin{array}{l l} 1, & d _ {i} \leq \tau , \\ 0, & o t h e r w i s e. \end{array} \right. \tag {7} +$$ + +where $g$ is a function that does $l_{2}$ normalization over two embeddings firstly and then calculates their Euclidean distance, $\tau$ is a threshold to decide whether the procedures are consistent. $y = 1$ means the procedures in two videos are consistent, otherwise inconsistent. + +# 5. Experiments + +# 5.1. Experimental Details + +Datasets and setup. We conduct experiments on COINSV, Diving48-SV, and CSV. The specific information of each dataset is available in Section 3. Since this novel task is proposed to solve the open-set setting, there exists no procedure-level overlapping among the training, validation, and testing sets. However, step-level overlapping is unavoidable since different procedures can still contain several common steps. + +Implementation Details. The ResNet-50 we employ is pre-trained on Kinetics-400 [41] to avoid over-fitting, while the new layers adopt Kaiming uniform initialization [33]. The experiments are conducted on 4 NVIDIA Titan RTX GPUs with batch size 16, a cosine learning rate scheduler with a base learning rate of 0.0001, and weight decay 0.01. Adam [42] is used to optimize the whole network. For efficiency, we resize the raw images to $180 \times 320$ . We also leverage horizontal flip, cropping, and color jittering for data augmentation. The feature dimension $D'$ before the classifier layer is set to 128 for all experiments. + +Baselines. Since we are the first to introduce the sequence verification task, there are no existing methods that are specially designed for this task. Considering that we learn video representation during training, which is similar to the action recognition task, we compare our proposed method with some advanced action recognition baselines: Random, TSN [90], TRN [104], TSM [52], and Video Swin [55]. + +Evaluation Metrics. (1) AUC. We adopt the Area Under ROC Curve (abbreviated as AUC) as one of the measurements, which is commonly used to evaluate the performance of face verification. Higher AUC denotes better performance. (2) WDR. It is short for Weighted Distance Ratio. To begin with, we calculate the mean embedding distance per unit Levenshtein distance for negative pairs in order to guarantee the equivalence of each pair during evaluation because larger step-level transformations always lead to larger embedding distance, discussed in Section 5.5. The mean embedding distance over positive pairs is then computed. In the end, we use the ratio between negative distance and positive distance, namely the Weighted Distance Ratio, as an indicator of performance for all methods. Obviously, its higher value means better performance the methods arrive at. Mathematically, we define WDR as: + +$$ +\mathrm {W D R} = \frac {\sum_ {i = 1} ^ {N} w d _ {i} / N}{\sum_ {j = 1} ^ {P} d _ {j} / P}, \tag {8} +$$ + +where $P$ and $N$ are number of positives and negatives, respectively. $d_{i}$ and $d_{j}$ can be easily calculated by Equation 6. $wd_{i}$ is defined as: + +$$ +w d _ {i} = \frac {d _ {i}}{e d _ {i}} \tag {9} +$$ + +
MethodPretrain#Param(M)AUC / WDR
COIN-SVDiving48-SVCSV
ValTestValTestTestTest
Random--50.00 / -50.00 / -50.00 / -50.00 / -50.00 / -50.00 / -
TSN [90]K-40022.6753.38 / 0.365147.01 / 0.399991.00 / 1.083581.87 / 0.670759.85 / 0.3447
TRN [104]K-40023.7454.92 / 0.366557.19 / 0.371990.17 / 1.143880.69 / 0.587680.32 / 0.4677
TSM [52]K-40022.6752.12 / 0.294851.25 / 0.387289.41 / 1.003578.19 / 0.553162.38 / 0.3308
Swin [55]K-40026.6647.27 / 0.389543.70 / 0.349589.35 / 1.106673.10 / 0.531654.06 / 0.3141
CAT(ours)K-40072.3256.81 / 0.400551.13 / 0.409891.91 / 1.064283.11 / 0.600583.02 / 0.4193
+ +Table 2. Comparison with action recognition methods on the validation and testing set of COIN-SV, Diving48-SV, and CSV dataset. + +
Dataset+TE+SAAUC (%)WDR
COIN-SV✓52.310.3677
✓✓55.460.3839
✓✓56.810.4005
Diving48-SV✓90.511.0093
✓✓90.911.0308
✓✓91.911.0642
CSV✓81.970.4403
✓✓82.070.4193
✓✓83.020.4193
+ +Table 3. Comparison between different model structures of our method on the testing set of the CSV dataset. + +where $ed_{i}$ represents the text Levenshtein distance of pair $i$ . Levenshtein distance, defined as the minimum number of operations required to transform one string into the other can be used as a measurement of how different in terms of steps two procedures are. More explanations and evaluations can be found in Section 5.5. + +# 5.2. Comparison of Different Methods + +The quantitative results of all the methods on the three datasets are shown in Table 2. We can find that our proposed CAT exceeds all other baselines in most cases, evaluated on the AUC metric. It is worth noticing that CAT does not achieve the best WDR in all datasets since the best model is selected by the highest AUC in the validation set. Apart from that, AUC on COIN-SV is extremely inferior compared to the other two datasets, which indicates its significant challenge due to its complex background and procedure diversity. Surprisingly, Video Swin Transformer is inferior to other baselines. We conjecture that it suffers from data insufficiency. + +# 5.3. Ablation Study + +In this section, we investigate the effectiveness of the transformer encoder (TE) and sequence alignment (SA) module. The experiments are conducted on the testing set of the CSV dataset if not specially stated. Specifically, we + +![](images/5e1c895df3b21861852bb7b020084475b84cad9de4edcdadd7c21ebeb6b0d9e0.jpg) +Figure 4. Visualizations of embeddings predicted by different model structures. Three kinds of colored points represent different procedures from the same task. The values above each sub-figure are the averaged intra-procedure variance and the inter-procedure variance, respectively. + +![](images/37e7694d8ae32f50a18261f5af1fe52a095fdcfaec13bfe3e80596b446701b2e.jpg) + +![](images/5d6c16925efcaebab1cdbba4f27e4df4b586256d308cff25bc1376a66450247c.jpg) + +gradually add TE and SA module to the ResNet-50. The results in Table 3 show that both of the module improve the AUC performance on three datasets. As for WDR, CAT achieves the best performance on COIN-SV and Diving48-SV but it is inferior to the vanilla on CSV. + +We also visualize the 128-d embedding vectors extracted by different models via PCA in Figure 4. Concretely, we select the first three procedures in the first task of the CSV dataset. Since they only differ in the order of steps but hold the same step set, we can evaluate the effectiveness of the sequence alignment module for handling the order consistency. As shown, the embeddings extracted by the entire CAT model in sub-figure (c) have the largest inter-procedure variance and the smallest averaged intra-procedure variance. + +# 5.4. Performance on Different Splits + +As a reminder, the step-level transformation contains deletions, additions, and order exchange of steps. To verify the order-sensitivity of the sequence alignment module, we further re-divide the testing set of CSV into two splits of which one consists of video pairs containing step additions and deletions, and the other consists of pairs containing order exchange of steps, which refers to alter-number split and alter-order split, respectively. + +The results shown in Table 4 indicate that CAT without SA module achieves inferior performance on both alter + +
Test SplitCAT w/o SACAT w/ SA
alter-number73.0175.82 (+2.81)
alter-order80.2486.32 (+6.08)
+ +Table 4. Results on different test splits. (metric: AUC (%)) + +![](images/449e3d7f286f6f665259b54feff50d39108d275266a68021dc0c3380a5710b9d.jpg) +Figure 5. Left: Euclidian Distance between procedures with different degrees of step-level divergence in the embedding space; Right: Curve of WDR versus AUC on the testing split of CSV. + +![](images/e509bf4198c9990de986a4b731f880b7aec6239283eabd74c2f3e1788fe3c8e1.jpg) + +number split and alter-order split while introducing the SA module brings more performance gain on alter-order split, which strongly supports the motivation of our proposed SA module that enables the model to be more order-sensitive. + +# 5.5. WDR Curve + +To carefully explore the character of our proposed evaluation metric WDR, we conduct two experiments to study the relationship between embedding distance and Levenshtein distance, and the relationship between WDR and AUC. First of all, the curve in Figure 5 Left describes a fact that the embedding distance between two procedures increases when the step-level difference denoted by Levenshtein distance gets larger. It is not surprising because the step order is preserved to some extent by all the methods, and large modifications in procedures will lead to distinct embedding differences. Thus, negative pairs with large step-level transformations will dominate the evaluation, which is unfair to those with small ones. To remedy this issue, WDR is introduced and it aims to evaluate embedding distance with respect to unit step-level transformation. Additionally, the curve in Figure 5 Right proves the positive correlation between WDR and AUC. The proposed WDR is then expected to be a complementary measurement metric in this new task. + +# 5.6. Scoring Demo + +As a potential solution to action assessment, sequence verification is able to act as a judge to score two procedures with fine-grained divergence. Here we show a diving scoring demo in Figure 6. The procedure in $V_{0}$ is chosen as the standard reference. We then calculate the cosine similarity as the score between the standard and each candidate video. One can easily tell that $V_{1}$ achieves the highest score since it performs the same procedure as $V_{0}$ , while the scores of $V_{2}$ and $V_{3}$ decrease with the enlargement of their step-level + +![](images/44c8c8791ab4a4b1feef85501242e9a80b91b539e52bb8e03bf39e9e3ba61827.jpg) + +![](images/1dc873b516a25139f133ad0b06145a968bcaa8fc8e547927a556f561951f5e8a.jpg) + +![](images/237f33e3127c83ac21bad0a3ee0364416f0552117a32255f91f168c9026ce227.jpg) +Figure 6. Videos with procedure annotation to be scored. $S(\cdot)$ is the scoring function, which calculates the cosine similarity between two videos in the embedding space. + +![](images/0e567b06a857598558aca7a82ffb78d7fffa34823c667750fc70dd9e150118f8.jpg) + +difference compared to the standard. More demos are available in the supplementary material. + +# 5.7. Limitation and Impact + +Though we have introduced two reorganized datasets and collected one scripted dataset for this new task, it still suffers from data insufficiency leading to an unsatisfactory performance on Video Swin Transformer. Also, it may prevent this promising task from being applied to the real application considering the generalization ability in the wild. The transformer encoder is introduced to aggregate temporal information, but it brings a parameter explosion as shown in Table 2. Except for these, we hope this promising task could provide a novel insight for video understanding. + +# 6. Conclusion + +In this work, we advocate a novel and interesting task sequence verification developed to verify two procedures with step-level differences when performing the same task. To that end, we reorganize two publicly available action-related datasets with step-procedure-task structure and collect an egocentric dataset asking volunteers to perform various scripted procedures. In addition to that, we develop a new evaluation metric that has been well verified to be a complement to the existing AUC metric. Finally, our proposed transformer-based method has been wildly studied and acts as a strong baseline for this new task. + +# 7. Acknowledgements + +The work was supported by National Key R&D Program of China (2018AAA0100704), NSFC #61932020, #62172279, Science and Technology Commission of Shanghai Municipality (Grant No.20ZR1436000), and 'Shuguang Program' supported by Shanghai Education Development Foundation and Shanghai Municipal Education Commission. + +# References + +[1] Sami Abu-El-Haija, Nisarg Kothari, Joonseok Lee, Paul Natsev, George Toderici, Balakrishnan Varadarajan, and Sudheendra Vijayanarasimhan. Youtube-8m: A large-scale video classification benchmark. arXiv preprint arXiv:1609.08675, 2016.3 +[2] Jean-Baptiste Alayrac, Piotr Bojanowski, Nishant Agrawal, Josef Sivic, Ivan Laptev, and Simon Lacoste-Julien. Unsupervised learning from narrated instruction videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4575-4583, 2016. 3 +[3] Humam Alwassel, Silvio Giancola, and Bernard Ghanem. Tsp: Temporally-sensitive pretraining of video encoders for localization tasks. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3173-3183, 2021. 2 +[4] Brandon Amos, Bartosz Ludwiczuk, Mahadev Satyanarayanan, et al. Openface: A general-purpose face recognition library with mobile applications. CMU School of Computer Science, 6(2), 2016. 4 +[5] Anurag Bagchi, Jazib Mahmood, Dolton Fernandes, and Ravi Kiran Sarvadevabhatla. Hear me out: Fusional approaches for audio augmented temporal action localization. arXiv preprint arXiv:2106.14118, 2021. 2 +[6] 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/CVF Conference on Computer Vision and Pattern Recognition, pages 13075-13085, 2020. 1 +[7] Piotr Bojanowski, Rémi Lajugie, Francis Bach, Ivan Laptev, Jean Ponce, Cordelia Schmid, and Josef Sivic. Weakly supervised action labeling in videos under ordering constraints. In European Conference on Computer Vision, pages 628-643. Springer, 2014. 2, 3 +[8] 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, 3 +[9] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. arXiv preprint arXiv:2005.12872, 2020. 5 +[10] 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. 2, 3, 4 +[11] 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1130–1139, 2018. 2 +[12] RPW Christoph and Feichtenhofer Axel Pinz. Spatiotemporal residual networks for video action recognition. Advances in Neural Information Processing Systems, pages 3468-3476, 2016. 3, 4 + +[13] Rui Dai, Srijan Das, Luca Minciullo, Lorenzo Garattoni, Gianpiero Francesca, and Francois Bremond. Pdan: Pyramid dilated attention network for action detection. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 2970-2979, 2021. 2, 3 +[14] Dima Damen, Hazel Doughty, Giovanni Farinella, Sanja Fidler, Antonino Furnari, Evangelos Kazakos, Davide Moltisanti, Jonathan Munro, Toby Perrett, Will Price, et al. The epic-kitchens dataset: Collection, challenges and baselines. IEEE Transactions on Pattern Analysis & Machine Intelligence, (01):1-1, 2020. 1 +[15] Dima Damen, Hazel Doughty, Giovanni Maria Farinella, Sanja Fidler, Antonino Furnari, Evangelos Kazakos, Davide Moltisanti, Jonathan Munro, Toby Perrett, Will Price, et al. Scaling egocentric vision: The epic-kitchens dataset. In Proceedings of the European Conference on Computer Vision (ECCV), pages 720-736, 2018. 2, 3 +[16] Jiankang Deng, Jia Guo, Yuxiang Zhou, Jinke Yu, Irene Kotsia, and Stefanos Zafeiriou. Retinaface: Single-stage dense face localisation in the wild. arXiv preprint arXiv:1905.00641, 2019. 4 +[17] Ali Diba, Mohsen Fayyaz, Vivek Sharma, Amir Hossein Karami, Mohammad Mahdi Arzani, Rahman Yousefzadeh, and Luc Van Gool. Temporal 3d convnets: New architecture and transfer learning for video classification. arXiv preprint arXiv:1711.08200, 2017. 3, 4 +[18] 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. 3 +[19] 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. 3, 4 +[20] 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. 2, 5 +[21] Yong Du, Wei Wang, and Liang Wang. Hierarchical recurrent neural network for skeleton based action recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1110-1118, 2015. 3 +[22] Ehsan Elhamifar and Zwe Naing. Unsupervised procedure learning via joint dynamic summarization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6341-6350, 2019. 3 +[23] 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. 3 +[24] Mohsen Fayyaz and Jurgen Gall. Sct: Set constrained temporal transformer for set supervised action segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 501-510, 2020. 2 + +[25] Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He. Slowfast networks for video recognition. In Proceedings of the IEEE/CVF international conference on computer vision, pages 6202-6211, 2019. 2, 3 +[26] Christoph Feichtenhofer, Axel Pinz, and Andrew Zisserman. Convolutional two-stream network fusion for video action recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1933-1941, 2016. 3, 4 +[27] Daniel Fried, Jean-Baptiste Alayrac, Phil Blunsom, Chris Dyer, Stephen Clark, and Aida Nematzadeh. Learning to segment actions from observation and narration. arXiv preprint arXiv:2005.03684, 2020. 3 +[28] Jiyang Gao, Zhenheng Yang, and Ram Nevatia. Cascaded boundary regression for temporal action detection. arXiv preprint arXiv:1705.01180, 2017. 2 +[29] Reza Ghoddoosian, Saif Sayed, and Vassilis Athitsos. Hierarchical modeling for task recognition and action segmentation in weakly-labeled instructional videos. arXiv preprint arXiv:2110.05697, 2021. 3 +[30] Rohit Girdhar, Joao Carreira, Carl Doersch, and Andrew Zisserman. A better baseline forava. arXiv preprint arXiv:1807.10066, 2018. 2 +[31] Raghav Goyal, Samira Ebrahimi Kahou, Vincent Michalski, Joanna Materzynska, Susanne Westphal, Heuna Kim, Valentin Haenel, Ingo Fruend, Peter Yianilos, Moritz Mueller-Freitag, et al. The" something something" video database for learning and evaluating visual common sense. In ICCV, volume 1, page 5, 2017. 3 +[32] Chunhui Gu, Chen Sun, David A Ross, Carl Vondrick, Caroline Pantofaru, Yeqing Li, Sudheendra Vijayanarasimhan, George Toderici, Susanna Ricco, Rahul Sukthankar, et al. Ava: A video dataset of spatio-temporally localized atomic visual actions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6047-6056, 2018. 1, 2 +[33] 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. 6 +[34] 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 +[35] 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5948-5957, 2018. 3 +[36] De-An Huang, Li Fei-Fei, and Juan Carlos Niebles. Connectionist temporal modeling for weakly supervised action labeling. In European Conference on Computer Vision, pages 137–153. Springer, 2016. 3 +[37] Gabriel Huang, Bo Pang, Zhenhai Zhu, Clara Rivera, and Radu Soricut. Multimodal pretraining for dense video captioning. arXiv preprint arXiv:2011.11760, 2020. 3 + +[38] Haroon Idrees, Amir R Zamir, Yu-Gang Jiang, Alex Gorbani, Ivan Laptev, Rahul Sukthankar, and Mubarak Shah. The thumos challenge on action recognition for videos "in the wild". Computer Vision and Image Understanding, 155:1-23, 2017. 2 +[39] Kumara Kahatapitiya and Michael S Ryoo. Coarse-fine networks for temporal activity detection in videos. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8385-8394, 2021. 2, 3 +[40] Andrej Karpathy, George Toderici, Sanketh Shetty, Thomas Leung, Rahul Sukthankar, and Li Fei-Fei. Large-scale video classification with convolutional neural networks. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 1725-1732, 2014. 3 +[41] 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, 6 +[42] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[43] H. Kuehne, A. B. Arslan, and T. Serre. The language of actions: Recovering the syntax and semantics of goal-directed human activities. In Proceedings of Computer Vision and Pattern Recognition Conference (CVPR), year = .2 +[44] Hildegard Kuehne, Hueihan Jhuang, Estíbaliz Garrote, Tomaso Poggio, and Thomas Serre. Hmdb: a large video database for human motion recognition. In 2011 International Conference on Computer Vision, pages 2556-2563. IEEE, 2011. 3 +[45] Hilde Kuehne, Alexander Richard, and Juergen Gall. Weakly supervised learning of actions from transcripts. Computer Vision and Image Understanding, 163:78-89, 2017. 3 +[46] Anna Kukleva, Hilde Kuehne, Fadime Sener, and Jurgen Gall. Unsupervised learning of action classes with continuous temporal embedding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12066-12074, 2019. 2 +[47] Colin Lea, Michael D Flynn, Rene Vidal, Austin Reiter, and Gregory D Hager. Temporal convolutional networks for action segmentation and detection. In proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 156-165, 2017. 2 +[48] Colin Lea, Austin Reiter, René Vidal, and Gregory D Hager. Segmental spatiotemporal cnns for fine-grained action segmentation. In European Conference on Computer Vision, pages 36-52. Springer, 2016. 3 +[49] Wei Li, Zehuan Yuan, Dashan Guo, Lei Huang, Xiangzhong Fang, and Changhu Wang. Deformable tube network for action detection in videos. arXiv preprint arXiv:1907.01847, 2019. 2 +[50] Xin Li, Tianwei Lin, Xiao Liu, Wangmeng Zuo, Chao Li, Xiang Long, Dongliang He, Fu Li, Shilei Wen, and Chuang Gan. Deep concept-wise temporal convolutional networks for action localization. In Proceedings of the 28th ACM In + +ternational Conference on Multimedia, pages 4004-4012, 2020. 2 +[51] Yingwei Li, Yi Li, and Nuno Vasconcelos. Resound: Towards action recognition without representation bias. In Proceedings of the European Conference on Computer Vision (ECCV), pages 513-528, 2018. 2, 3, 4 +[52] Ji Lin, Chuang Gan, and Song Han. Tsm: Temporal shift module for efficient video understanding. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7083-7093, 2019. 2, 3, 6, 7 +[53] Tianwei Lin, Xiao Liu, Xin Li, Errui Ding, and Shilei Wen. Bmn: Boundary-matching network for temporal action proposal generation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3889-3898, 2019. 2, 3 +[54] Tianwei Lin, Xu Zhao, Haisheng Su, Chongjing Wang, and Ming Yang. Bsn: Boundary sensitive network for temporal action proposal generation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 3-19, 2018. 2, 3 +[55] Ze Liu, Jia Ning, Yue Cao, Yixuan Wei, Zheng Zhang, Stephen Lin, and Han Hu. Video swim transformer. arXiv preprint arXiv:2106.13230, 2021. 1, 6, 7 +[56] Huaishao Luo, Lei Ji, Botian Shi, Haoyang Huang, Nan Duan, Tianrui Li, Jason Li, Taroon Bharti, and Ming Zhou. Univl: A unified video and language pre-training model for multimodal understanding and generation. arXiv preprint arXiv:2002.06353, 2020. 3 +[57] Effrosyni Mavroudi, Benjamin Béjar Haro, and René Vidal. Representation learning on visual-symbolic graphs for video understanding. In European Conference on Computer Vision, pages 71-90. Springer, 2020. 2, 3 +[58] 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 +[59] Mathew Monfort, Alex Andonian, Bolei Zhou, Kandan Ramakrishnan, Sarah Adel Bargal, Tom Yan, Lisa Brown, Quanfu Fan, Dan Gutfreund, Carl Vondrick, et al. Moments in time dataset: one million videos for event understanding. IEEE transactions on pattern analysis and machine intelligence, 42(2):502-508, 2019. 2 +[60] Naila Murray, Luca Marchesotti, and Florent Perronnin. Ava: A large-scale database for aesthetic visual analysis. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pages 2408-2415. IEEE, 2012. 3 +[61] AJ Piergiovanni, Anelia Angelova, Michael S Ryoo, and Irfan Essa. Unsupervised action segmentation for instructional videos. arXiv preprint arXiv:2106.03738, 2021. 3 +[62] AJ Piergiovanni and Michael Ryoo. Temporal gaussian mixture layer for videos. In International Conference on Machine learning, pages 5152-5161. PMLR, 2019. 2, 3 +[63] AJ Piergiovanni and Michael S Ryoo. Learning latent super-events to detect multiple activities in videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5304-5313, 2018. 2, 3 + +[64] AJ Piergiovanni and Michael S Ryoo. Avid dataset: Anonymized videos from diverse countries. arXiv preprint arXiv:2007.05515, 2020. 2, 3 +[65] Zhaofan Qiu, Ting Yao, and Tao Mei. Learning spatiotemporal representation with pseudo-3d residual networks. In proceedings of the IEEE International Conference on Computer Vision, pages 5533–5541, 2017. 3, 4 +[66] Alexander Richard and Juergen Gall. Temporal action detection using a statistical language model. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3131-3140, 2016. 3 +[67] Alexander Richard, Hilde Kuehne, and Juergen Gall. Weakly supervised action learning with rnN based fine-to-coarse modeling. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 754-763, 2017. 3 +[68] Marcus Rohrbach, Sikandar Amin, Mykhaylo Andriluka, and Bernt Schiele. A database for fine grained activity detection of cooking activities. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pages 1194-1201. IEEE, 2012. 3 +[69] Michael S Ryoo, AJ Piergiovanni, Mingxing Tan, and Anelia Angelova. Assemblenet: Searching for multi-stream neural connectivity in video architectures. arXiv preprint arXiv:1905.13209, 2019. 1 +[70] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 815-823, 2015. 4 +[71] Ozan Sener, Amir R Zamir, Silvio Savarese, and Ashutosh Saxena. Unsupervised semantic parsing of video collections. In Proceedings of the IEEE International conference on Computer Vision, pages 4480-4488, 2015. 3 +[72] Yuhan Shen, Lu Wang, and Ehsan Elhamifar. Learning to segment actions from visual and language instructions via differentiable weak sequence alignment. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10156-10165, 2021. 2, 3 +[73] Qinfeng Shi, Li Wang, Li Cheng, and Alex Smola. Discriminative human action segmentation and recognition using semi-markov model. In 2008 IEEE Conference on Computer Vision and Pattern Recognition, pages 1-8. IEEE, 2008. 3 +[74] Zheng Shou, Jonathan Chan, Alireza Zareian, Kazuyuki Miyazawa, and Shih-Fu Chang. Cdc: Convolutional-deconvolutional networks for precise temporal action localization in untrimmed videos. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5734-5743, 2017. 2 +[75] Zheng Shou, Dongang Wang, and Shih-Fu Chang. Temporal action localization in untrimmed videos via multi-stage cnns. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1049-1058, 2016. 2, 3 +[76] Gunnar A Sigurdsson, Jean-Baptiste Alayrac, Aida Nematzadeh, Lucas Smaira, Mateusz Malinowski, Joao Carreira, Phil Blunsom, and Andrew Zisserman. Visual + +grounding in video for unsupervised word translation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10850-10859, 2020. 3 +[77] Gunnar A Sigurdsson, Santosh Divvala, Ali Farhadi, and Abhinav Gupta. Asynchronous temporal fields for action recognition. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 585-594, 2017. 2 +[78] Gunnar A Sigurdsson, Gül Varol, Xiaolong Wang, Ali Farhadi, Ivan Laptev, and Abhinav Gupta. Hollywood in homes: Crowdsourcing data collection for activity understanding. In European Conference on Computer Vision, pages 510-526. Springer, 2016. 2, 3 +[79] Karen Simonyan and Andrew Zisserman. Two-stream convolutional networks for action recognition in videos. In Advances in neural information processing systems, pages 568-576, 2014. 3, 4 +[80] Sijie Song, Cuiling Lan, Junliang Xing, Wenjun Zeng, and Jiaying Liu. An end-to-end spatio-temporal attention model for human action recognition from skeleton data. arXiv preprint arXiv:1611.06067, 2016. 3 +[81] Yale Song, Jordi Vallmitjana, Amanda Stent, and Alejandro Jaimes. Tvsum: Summarizing web videos using titles. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5179-5187, 2015. 3 +[82] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. 2,3 +[83] Chen Sun, Abhinav Shrivastava, Carl Vondrick, Kevin Murphy, Rahul Sukthankar, and Cordelia Schmid. Actor-centric relation network. In Proceedings of the European Conference on Computer Vision (ECCV), pages 318-334, 2018. 2, 3 +[84] Jiajun Tang, Jin Xia, Xinzhi Mu, Bo Pang, and Cewu Lu. Asynchronous interaction aggregation for action detection. In European Conference on Computer Vision, pages 71-87. Springer, 2020. 2 +[85] 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/CVF Conference on Computer Vision and Pattern Recognition, pages 1207-1216, 2019. 1, 2, 3, 4 +[86] Zineng Tang, Jie Lei, and Mohit Bansal. December: Learning from noisy instructional videos via dense captions and entropy minimization. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2415-2426, 2021. 3 +[87] 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. 3, 4 +[88] Du Tran, Jamie Ray, Zheng Shou, Shih-Fu Chang, and Manohar Paluri. Convnet architecture search for spatiotem + +poral feature learning. arXiv preprint arXiv:1708.05038, 2017.3,4 +[89] 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 +[90] Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao, Dahua Lin, Xiaou Tang, and Luc Van Gool. Temporal segment networks: Towards good practices for deep action recognition. In European conference on computer vision, pages 20-36. Springer, 2016. 2, 3, 4, 5, 6, 7 +[91] Xiang Wang, Zhiwu Qing, Ziyuan Huang, Yutong Feng, Shiwei Zhang, Jianwen Jiang, Mingqian Tang, Changxin Gao, and Nong Sang. Proposal relation network for temporal action detection. arXiv preprint arXiv:2106.11812, 2021. 2 +[92] Junwu Weng, Chaoqun Weng, and Junsong Yuan. Spatio-temporal naive-bayes nearest-neighbor (st-nbnn) for skeleton-based action recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4171–4180, 2017. 3 +[93] Bichen Wu, Chenfeng Xu, Xiaoliang Dai, Alvin Wan, Peizhao Zhang, Masayoshi Tomizuka, Kurt Keutzer, and Peter Vajda. Visual transformers: Token-based image representation and processing for computer vision. arXiv preprint arXiv:2006.03677, 2020.5 +[94] Chao-Yuan Wu, Christoph Feichtenhofer, Haoqi Fan, Kaiming He, Philipp Krahenbuhl, and Ross Girshick. Long-term feature banks for detailed video understanding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 284-293, 2019. 2 +[95] Yuanjun Xiong, Yue Zhao, Limin Wang, Dahua Lin, and Xiaou Tang. A pursuit of temporal accuracy in general activity detection. arXiv preprint arXiv:1703.02716, 2017. 2 +[96] Huijuan Xu, Abir Das, and Kate Saenko. R-c3d: Region convolutional 3d network for temporal activity detection. In Proceedings of the IEEE international conference on computer vision, pages 5783-5792, 2017. 2, 3 +[97] Mengmeng Xu, Chen Zhao, David S Rojas, Ali Thabet, and Bernard Ghanem. G-tad: Sub-graph localization for temporal action detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10156-10165, 2020. 2 +[98] Sijie Yan, Yuanjun Xiong, and Dahua Lin. Spatial temporal graph convolutional networks for skeleton-based action recognition. arXiv preprint arXiv:1801.07455, 2018. 3 +[99] Serena Yeung, Olga Russakovsky, Greg Mori, and Li Fei-Fei. End-to-end learning of action detection from frame glimpses in videos. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2678–2687, 2016. 2, 3 +[100] Fangqiu Yi, Hongyu Wen, and Tingting Jiang. Asformer: Transformer for action segmentation. In The British Machine Vision Conference (BMVC), 2021. 2 + +[101] Runhao Zeng, Wenbing Huang, Mingkui Tan, Yu Rong, Peilin Zhao, Junzhou Huang, and Chuang Gan. Graph convolutional networks for temporal action localization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7094-7103, 2019. 2 +[102] Chen Zhao, Ali K Thabet, and Bernard Ghanem. Video self-stitching graph network for temporal action localization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 13658-13667, 2021. 2 +[103] Yue Zhao, Yuanjun Xiong, Limin Wang, Zhirong Wu, Xiaou Tang, and Dahua Lin. Temporal action detection with structured segment networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 2914-2923, 2017. 3 +[104] Bolei Zhou, Alex Andonian, Aude Oliva, and Antonio Torralba. Temporal relational reasoning in videos. In Proceedings of the European Conference on Computer Vision (ECCV), pages 803-818, 2018. 2, 3, 6, 7 +[105] Luowei Zhou, Chenliang Xu, and Jason J Corso. Towards automatic learning of procedures from web instructional videos. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 3 +[106] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. arXiv preprint arXiv:2010.04159, 2020. 5 +[107] Dimitri Zhukov, Jean-Baptiste Alayrac, Ramazan Gokberk Cinbis, David Fouhey, Ivan Laptev, and Josef Sivic. Cross-task weakly supervised learning from instructional videos. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3537-3545, 2019. 2 \ No newline at end of file diff --git a/svipsequenceverificationforproceduresinvideos/images.zip b/svipsequenceverificationforproceduresinvideos/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..984cfba1bfa39d20c3146617a950867a34144259 --- /dev/null +++ b/svipsequenceverificationforproceduresinvideos/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7516eab5fcf8fd1256d80cbcadb59f07d30067a1c777ebb9f835eb15bba6857d +size 531193 diff --git a/svipsequenceverificationforproceduresinvideos/layout.json b/svipsequenceverificationforproceduresinvideos/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c58efd037a7b71addd8b9bc598138c10c31ae23e --- /dev/null +++ b/svipsequenceverificationforproceduresinvideos/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:808a31d3fdaaf18486248ec072955513df71294f1292d965486cd1aa5dd9c306 +size 486027 diff --git a/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/b5229091-5417-443b-841d-958379df4542_content_list.json b/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/b5229091-5417-443b-841d-958379df4542_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..31e3bcef48c4e4545b054310c28c709f9601cd9e --- /dev/null +++ b/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/b5229091-5417-443b-841d-958379df4542_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fa8a7c1f783c6ddcf5482a85790d6526f96f2d2088fac21454515c96d35a86c +size 83018 diff --git a/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/b5229091-5417-443b-841d-958379df4542_model.json b/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/b5229091-5417-443b-841d-958379df4542_model.json new file mode 100644 index 0000000000000000000000000000000000000000..164c9aad6646fd09d251d2e39effd3a86ee2e6b6 --- /dev/null +++ b/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/b5229091-5417-443b-841d-958379df4542_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7aa6a3114cad7f32eb8e164f976b7e62bc36ab330009bec4868352a2db5a98a +size 101609 diff --git a/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/b5229091-5417-443b-841d-958379df4542_origin.pdf b/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/b5229091-5417-443b-841d-958379df4542_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..521ee3a544671cfcf3819904d1e4a1cedb2c510b --- /dev/null +++ b/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/b5229091-5417-443b-841d-958379df4542_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff36b07580aa4f6ca81d0949faf871e70ca5d69aaa73a3649dda23fb7a209bdc +size 1905897 diff --git a/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/full.md b/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b40452f12277e31a0b8484d3cddc8048a32b7e43 --- /dev/null +++ b/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/full.md @@ -0,0 +1,324 @@ +# SWEM: Towards Real-Time Video Object Segmentation with Sequential Weighted Expectation-Maximization + +Zhihui Lin $^{1*}$ , Tianyu Yang $^{2}$ , Maomao Li $^{2}$ , Ziyu Wang $^{3}$ , Chun Yuan $^{4\dagger}$ , Wenhao Jiang $^{3}$ , and Wei Liu $^{3}$ $^{1}$ Department of Computer Science and Technologies, Tsinghua University, Beijing, China + $^{2}$ Tencent AI Lab, Shenzhen, China $^{3}$ Tencent Data Platform, Shenzhen, China + $^{4}$ Tsinghua Shenzhen International Graduate School, Peng Cheng Lab, Shenzhen, China + +{lin-zh14@mails, yuanc@sz}.tsinghua.edu.cn tianyu-yang@outlook.com {limaomao07, cshwjiang}@gmail.com wangziyukobe@163.com wl2223@columbia.edu + +# Abstract + +Matching-based methods, especially those based on space-time memory, are significantly ahead of other solutions in semi-supervised video object segmentation (VOS). However, continuously growing and redundant template features lead to an inefficient inference. To alleviate this, we propose a novel Sequential Weighted Expectation-Maximization (SWEM) network to greatly reduce the redundancy of memory features. Different from the previous methods which only detect feature redundancy between frames, SWEM merges both intra-frame and inter-frame similar features by leveraging the sequential weighted EM algorithm. Further, adaptive weights for frame features endow SWEM with the flexibility to represent hard samples, improving the discrimination of templates. Besides, the proposed method maintains a fixed number of template features in memory, which ensures the stable inference complexity of the VOS system. Extensive experiments on commonly used DAVIS and YouTube-VOS datasets verify the high efficiency (36 FPS) and high performance (84.3% J&F on DAVIS 2017 validation dataset) of SWEM. + +# 1. Introduction + +Semi-supervised video object segmentation (VOS) has seized great interest recent years [3,6,10,16,18,21,25,28, 32,33,37,38,42,43,47,49,51] in the computer vision community. It aims to segment the objects of interest from the background in a video, where only the mask annotation of the first frame is provided during testing. A group of early methods concentrate on on-line fine-tuning [2,3,19,29,30] with the first annotated frame. However, these method tends to suffer from model degradation caused by target appear + +![](images/4f415335597bff5a1d2b336d6bb49dba83382361c0308edf84cc331118d00af1.jpg) +(a) STM + +![](images/fd08f0e1a754a717cd53542e4207afd8b3484cb3d4ca168ef8c2f7505c44d2ba.jpg) +(b) SWEM +Figure 1. Instead of storing all past frames features as memory, just like STM [32] and following methods [6, 16, 37, 38] do, our SWEM sequentially updates a compact set of bases with a fixed size, greatly reducing the inter-frame and intra-frame redundancy. + +ance changes as video goes on. Besides, propagation-based methods use masks computed in previous frames to estimate masks in the current frame [7, 33, 45, 48], which is, however, vulnerable to occlusions and rapid motion. + +Recently, matching-based VOS methods [5, 6, 16, 17, 25, 28, 37, 38, 42, 43, 49, 52] have achieved striking performance. Such matching-based methods first exploit previous frames to construct target templates, and then calculate the pixel-level correlations between the new coming frame embeddings and the target templates to perform the segmentation. As seen in Figure 1, the Space-Time Memory Network (STM) [32] and the following STM-like methods [6, 16, 37, 38, 49] leverage memory networks to store template features every T frames endlessly, which is prone to missing key-frame information and running out of memory for long-term videos. Besides, given that the inter-frame redundancy of video features would harm the efficiency of matching, another group of methods AFB_URR [25] and Swift [43] take advantage of the similarity of inter-frame features to selectively update partial features. Nonetheless, they all fail to balance the performance and efficiency through a hand-crafted similarity threshold. + +Although past efforts have achieved promising results, we argue that both inter-frame redundancy and intra-frame one pose the main obstacles that prevent efficient template + +matching. Here comes to a question that can we achieve a real-time VOS system by considering both the inter-frame and intra-frame redundancy simultaneously? In this paper, we will explore its feasibility. + +Inspired by the Expectation-Maximization Attention (EMA) [21], we intend to construct a set of low-rank bases for memory features through Expectation-Maximization (EM) [9] iterations. Here, the number of bases is far less than that of image pixels. Thus, bases can be regarded as a more compact representation, which can greatly reduce the intra-frame redundancy. Instead of applying EM directly, we adopt Weighted Expectation-Maximization (WEM) with the predicted mask as the fixed weights to explicitly construct foreground and background bases in each frame. What's more, we also propose a weighted EM with adaptive weights, which give larger weights for hard samples during generating bases. Here, the hard samples refer to those pixels that are not well expressed by bases, but are important for object segmentation. + +WEM can deal with the intra-frame redundancy effectively; however, inter-frame one remains unsolved. Applying WEM on a single frame is efficient, but the computation complexity will be dramatically increased if directly applying it to all growing memory features. To further reduce the inter-frame redundancy, we propose the Sequential Weighted Expectation-Maximization (SWEM), where features of only one frame participate in the EM iterations during the memory updating stage. The memory bases will be updated with the new frame features through similarities rather than a simple linear combination. Formally, this updating process is equivalent to a weighted average of all past frame features. As shown in Figure 1, compared with STM [32] which saves all historical frame information as the memory template of objects, our SWEM only updates a more compact set of bases sequentially, thus greatly reducing the inter-frame and intra-frame redundancy. + +Our contributions can be summarized as follows: + +- We propose a fast and robust matching-based method for VOS, dubbed Sequential Weighted Expectation-Maximization (SWEM) network, where a set of compact bases are constructed and updated sequentially, reducing both the inter- and intra-frame redundancy. +- We introduce an adaptive weights calculation approach for weighted EM, which makes the base features pay more attention to hard samples. +- Without bells and whistles, SWEM reaches a level close to state-of-the-art performance, while maintaining an inference speed of 36 FPS. + +# 2. Related Work + +Matching-based Methods for VOS. Recent years have seen a surge of interest in video object segmentation under + +the semi-supervised setting. A number of matching-based methods [5,6,16,17,25,28,32,37,38,43,44,47,49] regard the first or intermediate frames as a target template, which is then used to match the pixel-level feature embedding in the new frame. To obtain both long-term and short-term object appearance information, FEELVOS [42] and CFBI [52] match the current frame with both the first frame and the previous frame to obtain both global and local temporal dependencies. Besides, STM [32] and the following methods [6,16,37,38,49] store multiple memory templates from all previous frames as templates, which is redundant and time-consuming during matching. In contrast, we propose a novel method named SWEM, which only stores a set of low-rank and updated basis features for each target, making the target representation more compact and efficient. + +Learning Fast and Robust VOS. Leaning a fast and robust model is a common goal since both accuracy and speed are important in practical applications [4,23,36,44,47,53]. RANet [47] only uses the first frame as the target template for an acceptable speed. As tracker-based methods, SiamMask [44] and SAT [4] only process the region of interest. TVOS [53] directly propagates target masks according to feature similarity in the embedding space. In general, to achieve fast VOS, the previous methods sacrificed the integrity of the target representation, which substantially degrades segmentation performance. Swift [43] uses a variation-aware trigger module to compute the interframe difference to update frames with diverse dynamics. Further, only partial features that are significantly different from memory features will be updated. + +In this work, we consider reducing inter- and intra-frame redundancy simultaneously. The proposed weighted EM greatly reduces the intra-frame redundancy by iteratively constructing compact base features for the whole frame. To diminish the inter-frame redundancy, we further extend weighted EM in a sequential manner, which can adaptively update the model without increasing the number of matching templates, thus making our model fast and robust. + +# 3. Preliminaries + +# 3.1. Expectation-Maximization Algorithm + +The expectation-maximization (EM) [9] is an iteration-based algorithm, which can be used to estimate parameters of latent variable modes by maximizing the likelihood. The task is defined as estimating model parameters $\theta$ based on observation data set $\mathbf{X}$ and corresponding latent variables $\mathbf{Z}$ . Each EM iteration involves two steps, the Expectation step (E step) and the Maximization step (M step). At the $r$ -th iteration, E step finds the posterior $P(\mathbf{Z}|\mathbf{X},\theta^{r - 1})$ and computes the expectation: + +$$ +\mathcal {Q} (\theta , \theta^ {r - 1}) = \sum P (\mathbf {Z} | \mathbf {X}, \theta^ {r - 1}) \ln P (\mathbf {X}, \mathbf {Z} | \theta). \tag {1} +$$ + +M step estimates parameters by maximizing the above data likelihood: + +$$ +\theta^ {r} = \arg \max _ {\theta} \mathcal {Q} (\theta , \theta^ {r - 1}). \tag {2} +$$ + +The E step and the M step are alternately executed $R$ times to achieve the convergence criterion. + +# 3.2. Expectation-Maximization Attention + +Expectation-Maximization Attention (EMA) [21] is proposed to formulate the attention mechanism [46] into an expectation-maximization manner. Specifically, instead of regarding all pixels as reconstruction bases, EMA iteratively estimates a much more compact set of bases for each image. EMA consists of three steps, namely Responsibility Estimation (RE), Likelihood Maximization (LM), and Data Re-estimation (DR). Denote $\mathbf{X} = \{\mathbf{x}_n\}_{n=1}^N \in \mathbb{R}^{N \times C}$ as image feature, $\mathcal{M} = \{\pmb{\mu}_k\}_{k=1}^K \in \mathbb{R}^{K \times C}$ as the randomly initialized base features, where $N$ , $C$ , and $K$ indicate the numbers of pixels, channels, and bases. RE estimates the hidden variable $\mathbf{Z} = \{z_{nk}\}_{n=1,k=1}^{N,K} \in \mathbb{R}^{N \times K}$ , where the responsibility $z_{nk}$ represents the probability of the $n$ -th pixel belonging to the $k$ -th base: + +$$ +z _ {n k} = \frac {\exp \left(\mathbf {x} _ {n} \boldsymbol {\mu} _ {k} ^ {\top} / \tau\right)}{\sum_ {j = 1} ^ {K} \exp \left(\mathbf {x} _ {n} \boldsymbol {\mu} _ {j} ^ {\top} / \tau\right)}. \tag {3} +$$ + +Here, $\tau$ is a hyper-parameter which controls the shape of distribution $\mathbf{Z}$ . Then, LM updates base features $\mathcal{M}$ by applying the weighted average on feature $\mathbf{X}$ . That is, the $k$ -th base is updated by: + +$$ +\boldsymbol {\mu} _ {k} = \frac {\sum_ {n = 1} ^ {N} z _ {n k} \mathbf {X} _ {n}}{\sum_ {n = 1} ^ {N} z _ {n k}}. \tag {4} +$$ + +Note that RE and LM are iteratively executed $R$ times until convergence. Finally, DR reconstructs a low-rank version of $\mathbf{X}$ using $\tilde{\mathbf{X}} = \mathbf{Z}\mathcal{M}$ . Since $K$ is much less than $N$ , basis set $\mathcal{M}$ can be treated as a compact representation for image feature $\mathbf{X}$ . Inspired by EMA, we consider replacing redundant memory features with more compact base features. + +# 3.3. Redundancy of the Space-time Memory + +To get a more intuitive understanding of feature redundancy in videos, we evaluate the inter-frame and intra-frame cosine similarities of videos features on the DAVIS 2017 [35] validation set using the image encoder of STM [32] as the feature extractor. For each pixel in the current frame, we first calculate its maximum similarity with all pixels in the previous frame. In this way, $N$ such maximum similarities can be obtained. In Figure 2, we list the histogram of the maximum similarities, where the horizontal coordinate is the similarity range. Most of the similarities are larger than 0.6, and nearly $87\%$ of similarities are larger than 0.9, indicating high inter-frame redundancy + +![](images/d9e6bcbda2831e34986cca12c37f8c724dc9d214fca21e86bcd08129ce79e5de.jpg) + +![](images/00cbda9b29e407f80f483f328d8001a6c0be4152875396e77a2d1348ae93a48a.jpg) + +![](images/0b1a666a4f0cbf506f767dd1c07bcfd101c78733835e63d53ede1607f5991e3e.jpg) +Figure 2. The illustration of inter-frame and intra-frame redundancy of video features. + +in video sequences. In contrast, computing the maximum similarity for intra-frame redundancy measurement is not appropriate since spatial continuity would make most maximum similarities exceed 0.9. Thus, we calculate all pairwise similarities and count the average pair number of each frame under different similarities. The third line in Figure 2 shows the statistics. Most of the similarities between the two pixels in an image are positive, and more than $70\%$ of them are larger than 0.3, which demonstrates the ubiquity of intra-frame redundancy. + +To verify that the EM algorithm can find a more compact representation for image features and thus restrain the frame redundancy, we calculate the inter-frame and intra-frame similarity with a basis set rather than the entire image feature, where the basis set consists of 256 bases evaluated via EM iterations. Specifically, instead of calculating similarities between inter-frame bases, we calculate the maximum similarity between each frame feature and the base feature of the previous frame. As seen in Figure 2, more than $99\%$ of inter-frame similarities are larger than 0.7. That is, although each frame has only 256 base features, which is far less than pixel number, it still meets the need of interframe matching. As for intra-frame similarities, although the similarity distribution is basically the same as that of the whole image feature, the number of large similarities has decreased significantly, which demonstrates the intra-frame redundancy is greatly reduced via EM iterations. + +# 4. Proposed Approach + +We first introduce the weighted EM, which leverages the predicted mask as weights to explicitly construct foreground and background bases separately in each frame. Furthermore, the adaptive weights make the model pay more attention to hard samples to improve the segmentation performance. Then, the core part of this work, the SWEM + +![](images/90ece4fffc3f797cdf92e0470fd9126b5ef3f2a812e7dcd1a709262cd1f48fcc.jpg) +Figure 3. The matching-based pipeline of SWEM. The backbone network receives the $t$ -th frame to capture general image features as $\mathbf{Key}$ $\mathbf{K}^{(t)}$ . The features are used to match with target-specific memories. Through the matching process, the re-aggregated value and similarity map are obtained to be the target features for the final segmentation. Multi-level skip connections help refine the segmentation results for low to high resolution. The predicted mask is then employed with the intermediate image features to update bases via our SWEM. + +algorithm is detailed, which shows how to convert growing frame features into fixed-size bases. Finally, we describe the matching-based pipeline of the proposed SWEM. + +# 4.1. Weighted Expectation-Maximization + +Although we have proved that using EM to find a more compact representation can reduce both inter and intra-frame redundancy, we argue that naively employing EM to learn a set of bases for memory features is not a reasonable solution in the VOS system. The reason here is that the memory bases would mix with both the foreground and background, which is unfavorable for object segmentation. Instead, it is desirable to build low-rank foreground and background bases separately. To this end, we leverage Weighted Expectation-Maximization (WEM) [1, 13, 14, 27, 40], which is widely used for weighted data clustering. When using WEM to produce bases for images, Eq. (4) would be modified as: + +$$ +\boldsymbol {\mu} _ {k} = \frac {\sum_ {n = 1} ^ {N} z _ {n k} w _ {n} \mathbf {x} _ {n}}{\sum_ {n = 1} ^ {N} z _ {n k} w _ {n}}, \tag {5} +$$ + +where $w_{n}$ is the weight for $\mathbf{x}_n$ . It is equivalent to "seeing the $n$ -th feature $w_{n}$ times" [14]. Note that WEM makes it possible to construct separate foreground and background bases for template matching, where the object foreground mask and the background mask of each frame can be used as the corresponding fixed weights to substitute $w_{n}$ . In this way, any irregular target region can be represented by a set of bases with a fixed size, which greatly reduces intra-frame redundancy. + +The essence of using WEM for compact representation learning is to perform clustering on all pixels in the image, and make different bases to represent each pixel. Because the number of bases is far less than that of pixels, the constructed segmentation target template would be incomplete to some extent and even be faced with the target lost situation. The expression degree of each pixel is different during basis set construction. Some pixels have little contribution + +for bases, but are very important for object segmentation, which are so-called hard samples. To ensure that the hard samples could be assigned larger weights during basis set construction, we propose to adaptively adjust the weights of pixels rather than directly employing the fixed weights calculated via foreground and background masks. + +We estimate a confidence score for each pixel by a foreground-background binary classification. Specifically, after the E-step of WEM iteration, each pixel is classified by the foreground or background bases, the classification probability of the $n$ -th pixel can be calculated as: + +$$ +P ^ {f g} \left(\mathbf {x} _ {n}\right) = \frac {\sum_ {k = 1} ^ {K} \mathcal {K} \left(\mathbf {x} _ {n} , \boldsymbol {\mu} _ {k} ^ {f g}\right)}{\sum_ {k = 1} ^ {K} \left[ \mathcal {K} \left(\mathbf {x} _ {n} , \boldsymbol {\mu} _ {k} ^ {f g}\right) + \mathcal {K} \left(\mathbf {x} _ {n} , \boldsymbol {\mu} _ {k} ^ {b g}\right) \right]}, \tag {6} +$$ + +$$ +P ^ {b g} (\mathbf {x} _ {n}) = 1 - P ^ {f g} (\mathbf {x} _ {n}), +$$ + +where $\mu_k^{fg}$ and $\mu_k^{bg}$ are foreground and background bases separately. $\mathcal{K}(\cdot)$ is a kernel function for calculating the similarity of two input features. Specifically, $\mathcal{K}(\mathbf{a},\mathbf{b}) = \exp (\frac{\mathbf{ab}^\top / \tau}{\|\mathbf{a}\| \cdot \|\mathbf{b}\|})$ . Eq. (6) can be treated as a coarse segmentation result, since it provides the result of whether each pixel corresponds to the foreground or the background. Besides, the final segmentation (i.e., the output of the network decoder) can be obtained, which is considered more accurate than the coarse one since it is additionally constrained by ground-truth annotations. If coarse segmentation of a pixel is consistent with the final one, this pixel can be regarded as an easy sample. Otherwise, it would be regarded as a hard sample. We believe that the inconsistency of hard samples is because these pixels are neglected during the base construction process, which makes them struggle to achieve the same result as the final segmentation. Supposing that $m^{fg}$ and $m^{bg}$ are soft masks of final segmentation, the adaptive weights are estimated by: + +$$ +w _ {n} ^ {f g} = m _ {n} ^ {f g} P ^ {b g} (\mathbf {x} _ {n}), \quad w _ {n} ^ {b g} = m _ {n} ^ {b g} P ^ {f g} (\mathbf {x} _ {n}). \quad (7) +$$ + +The more inconsistent the coarse and final segmentation are, the higher weights would be given for base construction. + +# 4.2. Sequential Weighted EM + +To reduce inter-frame redundancy, previous methods [25, 43] set a similarity threshold to ignore or merge similar features between frames. However, the segmentation performance and computational complexity are sensitive to this hand-crafted threshold. What's worse, it is hard to find an appropriate threshold to make a trade-off between performance and complexity. In this paper, we extend WEM in a sequential manner, yielding a Sequential Weighted EM (SWEM) algorithm to reduce both intra- and inter-frame redundancy without any threshold hyperparameter. + +At the time step $t$ , the ideal solution is to apply WEM to all previous $t - 1$ frames for basis set construction. However, the growing scale of computing is unacceptable, which is not feasible for long-term segmentation. Therefore, we introduce a sequential weighted average of frame features when computing base assignment, where the weights are estimated with time-dependent responsibility $\mathbf{Z}^{(t)}$ . + +Concretely, we extend the WEM sequentially and reformulate Eq. (5) as: + +$$ +\boldsymbol {\mu} _ {k} ^ {(t)} = \frac {\sum_ {i = 1} ^ {t} \sum_ {n = 1} ^ {N} z _ {n k} ^ {(t)} w _ {n} ^ {(t)} \mathbf {x} _ {n} ^ {(t)}}{\sum_ {i = 1} ^ {t} \sum_ {n = 1} ^ {N} z _ {n k} ^ {(t)} w _ {n} ^ {(t)}}. \tag {8} +$$ + +Note that we implement Eq. (8) in a recursive manner, i.e., the numerator $\alpha$ and denominator $\beta$ are computed by $\pmb{\alpha}_{k}^{(t)} = \pmb{\alpha}_{k}^{(t - 1)} + \sum_{n = 1}^{N}z_{nk}^{(t)}w_{n}^{(t)}\mathbf{x}_{n}^{(t)}$ and $\beta_{k}^{(t)} = \beta_{k}^{(t - 1)} + \sum_{n = 1}^{N}z_{nk}^{(t)}w_{n}^{(t)}$ , then $\pmb{\mu}_{k}^{(t)} = \pmb{\alpha}_{k}^{(t)} / \beta_{k}^{(t)}$ . + +This sequential way of computing base assignment achieves more smooth and adaptable model updating. Instead of storing all frame bases, maintaining only one set of adaptable bases is undoubtedly more friendly to hardware and can also help realize a real-time VOS system. Algorithm1 shows the detailed pipeline of our SWEM at time step $t$ . + +It is also worth noting that the updating of bases is lazy in SWEM. Since $z_{nk}^{(t)}$ represents the similarity degree between $\mathbf{x}_n^{(t)}$ and $\boldsymbol{\mu}_k^{(t)}$ , and if a base feature has more similar features with the current frame, it will be updated more quickly. This lazy updating strategy can help SWEM be more robust to noises and prevent drifts. In another way, $w_n^{(t)}$ also enables the hard samples to be updated faster. + +# 4.3. Matching-based Pipeline + +The overview of the proposed SWEM network is illustrated in Figure 3. The whole pipeline mainly consists of three stages, including 1) feature encoding, 2) segmentation, and 3) memorization. + +Encoding. Similar to previous matching-based methods with Space-Time Memory [6, 16, 23, 25, 32, 37, 38, 43, 49], frames are encoded into Key-Value pairs $(\mathbf{K} \in \mathbb{R}^{N \times C}$ and $\mathbf{V} \in \mathbb{R}^{N \times C^{\prime}})$ for memory query and read. We adopt the encoder structure of STCN [6] to extract image features. The + +Algorithm 1: The SWEM at the time step $t$ +Input: features of frame $t$ .. $\mathbf{X}^{(t)}\in \mathbb{R}^{N\times C}$ mask of frame $t$ .. $m^{fg,(t)}\in [0,1]^N$ and $m^{bg,(t)}\in [0,1]^N$ bases at time step $t - 1$ .. $\mathcal{M}^{fg,(t - 1)}\in \mathbb{R}^{K\times C}$ and $\mathcal{M}^{bg,(t - 1)}\in \mathbb{R}^{K\times C}$ accumulated numerators and denominators: $\alpha^{fg,(t - 1)},\alpha^{bg,(t - 1)}$ and $\beta^{fg,(t - 1)},\beta^{bg,(t - 1)}$ Output: bases $\mathcal{M}^{fg,(t)}$ and $\mathcal{M}^{bg,(t)}$ /Superscript symbols fg and bg are omitted for simplicity. $\star /$ $\mathcal{M}^{(t)}\gets \mathcal{M}^{(t - 1)}$ $w^{(t)}\gets m^{(t)}$ +for $r = 1$ to $R$ do +// SW-E step, estimate responsibilities: $z_{nk}^{(t)}\leftarrow \frac{\mathcal{K}(\mathbf{x}_n^{(t)},\boldsymbol{\mu}_k^{(t)})}{\sum_{j = 1}^K\mathcal{K}(\mathbf{x}_n^{(t)},\boldsymbol{\mu}_j^{(t)})}$ +// SW-M step, update bases: $\alpha_{k}^{(t)}\gets \alpha_{k}^{(t - 1)} + \sum_{n = 1}^{N}z_{nk}^{(t)}w_{n}^{(t)}\mathbf{x}_{n}^{(t)}$ $\beta_{k}^{(t)}\gets \beta_{k}^{(t - 1)} + \sum_{n = 1}^{N}z_{nk}^{(t)}w_{n}^{(t)}$ $\pmb {\mu}_k^{(t)}\gets \pmb {\alpha}_k^{(t)} / \pmb {\beta}_k^{(t)}$ +// SW-W step, calculate weights: $P^{fg}(\mathbf{x}_n^{(t)})\gets$ $\frac{\sum_{k = 1}^{K}\mathcal{K}(\mathbf{x}_n^{(t)},\boldsymbol{\mu}_k^{fg,(t)})}{\sum_{k = 1}^{K}\left[\mathcal{K}(\mathbf{x}_n^{(t)},\boldsymbol{\mu}_k^{fg,(t)}) + \mathcal{K}(\mathbf{x}_n^{(t)},\boldsymbol{\mu}_k^{bg,(t)})\right]}$ $P^{bg}(\mathbf{x}_n^{(t)})\gets 1 - P^{fg}(\mathbf{x}_n^{(t)})$ $w_{n}^{fg,(t)}\gets m_{n}^{fg,(t)}P^{bg}(\mathbf{x}_{n}^{(t)})$ $w_{n}^{bg,(t)}\gets m_{n}^{bg,(t)}P^{fg}(\mathbf{x}_{n}^{(t)})$ +end + $n = 1,2,\dots,N;k = 1,2..,K$ + +key features are also reused for memorization. Specific network details are described in Section 5.1. + +Segmentation. The segmentation stage includes feature matching and mask decoding. At time step $t$ , the $\mathbf{Key}$ features $\mathbf{K}^{(t)}$ are used as query to read memory features from $\kappa^{(t-1)}$ and $\nu^{(t-1)}$ , where $\kappa$ and $\nu$ are base features corresponding to the key and value features and they are concatenations of foreground and background bases ( $[\kappa^{fg};\kappa^{bg}] \in \mathbb{R}^{2K \times C}$ and $[\nu^{fg};\nu^{bg}] \in \mathbb{R}^{2K \times C'}$ ). A non-local [46] formed matching process is applied as follows: + +$$ +\hat {\mathbf {V}} _ {n} ^ {(t)} = \sum_ {k = 1} ^ {2 K} \frac {\mathcal {K} \left(\mathbf {K} _ {n} ^ {(t)} , \boldsymbol {\kappa} _ {k} ^ {(t - 1)}\right)}{\sum_ {j = 1} ^ {2 K} \mathcal {K} \left(\mathbf {K} _ {n} ^ {(t)} , \boldsymbol {\kappa} _ {j} ^ {(t - 1)}\right)} \boldsymbol {\nu} _ {k} ^ {(t - 1)}. \tag {9} +$$ + +$\hat{\mathbf{V}}^{(t)}$ is a low-rank reconstruction using memory bases, + +which is helpful to segmentation tasks. Different from the previous STM-like methods, our memory bases are explicitly separated into foreground and background. Therefore, the correlations $\mathcal{K}(\mathbf{K}_n^{(t)},\pmb{\kappa}_k^{fg,(t - 1)})$ and $\mathcal{K}(\mathbf{K}_n^{(t)},\pmb{\kappa}_k^{bg,(t - 1)})$ can also be used as important segmentation clues. However, the rank of base features is not fixed for different videos since unsorted correlations are not suitable as the inputs for CNNs. To tackle this problem, we design a permutation-invariant operation, which can produce segmentation clues from correlations. Define $\mathcal{K}_n^{fg,(t)}\in \mathbb{R}^K$ and $\mathcal{K}_n^{bg,(t)}\in \mathbb{R}^K$ as the correlations of $\mathbf{K}_n^{(t)}$ with all foreground and background bases, respectively. The permutation-invariant feature $\mathbf{S}^{(t)}$ can be calculated by: + +$$ +\mathbf {S} _ {n l} ^ {(t)} = \frac {\sum_ {j \in \operatorname {t o p l} \left(\mathcal {K} _ {n} ^ {f g , (t)}\right)} \mathcal {K} _ {n j} ^ {f g , (t)}}{\sum_ {j \in \operatorname {t o p l} \left(\mathcal {K} _ {n} ^ {f g , (t)}\right)} \mathcal {K} _ {n j} ^ {f g , (t)} + \sum_ {j \in \operatorname {t o p l} \left(\mathcal {K} _ {n} ^ {b g , (t)}\right)} \mathcal {K} _ {n j} ^ {b g , (t)}}, \tag {10} +$$ + +where $l = 1,2,\dots,L$ . Note that $L\leq K$ is a hyperparameter to control the number of segmentation clues channel and the computation complexity. Besides, $\mathrm{topl}(\cdot)$ means the top- $l$ correlation values. + +The decoder takes segmentation clues $[\hat{\mathbf{V}}^{(t)};\mathbf{S}^{(t)}]$ as input to produce the final mask $\tilde{m}^{(t)}$ . Additional skipconnections are also adopted to make use of low-level appearance features. + +**Memorization.** After the segmentation, key features $\mathbf{K}^{(t)}$ are reused for the memorization stage. We adopt another ResNet-18 to re-encode the image-mask pair to obtain value features $\mathbf{V}^{(t)}$ . The key bases are updated by $\pmb{\kappa}^{(t)} = \mathrm{SWEM}(\mathbf{K}^{(t)}, \tilde{\mathfrak{m}}^{(t)}, \pmb{\kappa}^{(t-1)})$ which is described in Algorithm 1. To maintain the alignment between key and value, the updated value bases is calculated by $\pmb{\nu}_k^{(t)} = (\pmb{\beta}_k^{(t-1)}\pmb{\nu}_k^{(t-1)} + \sum_{n=1}^N z_{nk}^{(t)}w_n^{(t)}\mathbf{v}_n^{(t)}) / \beta_k^{(t)}$ , where $\beta, \mathbf{Z}$ and $w$ are all produced during the construction of key bases $\pmb{\kappa}$ . + +# 5. Implementation Details + +# 5.1. Network Structure + +We adopt ResNet-50 [15] as the backbone to extract frame features and ResNet-18 for value feature extraction. All batch normalization layers are frozen. The stage 4 (res4) features are used for memorization and matching processes. These feature maps have a stride of 16 compared with the row image. The temperature hyper-parameter $\tau$ is set to 0.05. The number of base features in a group is set as $K = 128$ , and the number of iterations $R$ is set as 4 in the SWEM algorithm. We select top-64 ( $L = 64$ ) correlation scores calculated by Eq. (10). For simplicity and fair comparison with STM [32], we use the same two-level decoder, which consists of two refining layers, and each layer contains two residual blocks. + +
KFPSDAVIS 2016 valDAVIS 2017 val
J & F↑JM↑J & F↑JM↑
3237.388.487.680.277.7
6436.888.988.080.978.4
12836.489.588.681.979.3
25635.589.588.582.079.4
+ +Table 1. Ablation study on the number of bases $K$ (with $R = 4$ ). + +# 5.2. Two-stage Training + +Pre-training on static image datasets. Following the previous methods [25, 28, 32, 37, 47], we first perform the pretraining procedure on static image datasets [8, 12, 22, 26, 39]. The input frames are cropped into $384 \times 384$ for training. Three frames are generated based on a single image at each step, where the random affine transformations of shearing, rotation, scaling, and cropping are applied. The Adam optimizer [20] with the learning rate $1e-5$ is adopted for all training processes. Besides, we use the cross-entropy loss for the final segmentation. + +Training on video datasets. After pre-training on images, we fine-tune the proposed SWEM on video datasets DAVIS 2017 [35] and the YouTube-VOS 2018 [50]. The training process is similar to image pre-training, where the main difference is that we sample the three frames from a video clip randomly instead of one single image. For multi-object frames, we randomly select less than 3 objects. We perform all experiments on a single NVIDIA Tesla V100 GPU with a batch size of 4. + +# 6. Experiments + +# 6.1. Ablation Study + +We first analyze the impact of the number of bases $K$ and that of SWEM iterations $R$ , which are key factors affecting the efficiency of the model. Then we investigate the effect of adaptive weights in SWEM on model performance. We directly train all models on video datasets without pre-training on images. Models are evaluated on DAVIS 2016 [34] and DAVIS 2017 validation datasets. + +The number of bases $K$ . Table 1 shows the quantitative results and inference speed under different $K$ values. The performance saturates at $K = 128$ . When decreasing the number of bases, the performance degraded a lot, while this does not save too much computation, as seen in the inference speed. Therefore, we choose a relatively large $K = 128$ as the default setting. + +The number of SWEM iterations $R$ . The number of SWEM iterations affects the efficiency and convergence of bases construction. Table 3 shows results with $R = 1 \sim 7$ . The inference speed is sensitive to the number of iterations. Every increase in $R$ decreases the inference speed by $1 \sim 2$ + +
MethodPub.IFPSDAVIS 2016 valDAVIS 2017 val
J & F↑JM↑FM↑J & F↑JM↑FM↑
STM [32]ICCV 2019✓686.584.888.171.669.274.0
AFB-URR [25]NeuralPS 2020✓4---74.673.076.1
CFBI [52]ECCV 2020586.185.386.974.972.177.7
RANet [47]ICCV 2019✓3085.585.585.465.763.268.2
GC [23]ECCV 2020✓2586.687.685.771.469.373.5
TVOS [53]CVPR 202037---72.369.974.7
SAT [4]CVPR 20203983.182.683.672.368.676.0
SWEM3688.187.389.077.274.579.8
STM [32](+YV)ICCV 2019✓11*89.388.789.981.779.284.3
CFBI [52](+YV)ECCV 2020✓589.488.390.581.979.184.6
EGMN [28](+YV)ECCV 2020✓5---82.880.285.2
KMN [37](+YV)ECCV 2020✓890.589.591.582.880.085.6
SSTVOS [10](+YV)CVPR 2021~7---82.579.985.1
RMNet [16](+YV)CVPR 2021✓1288.888.988.783.581.086.0
LCM [16](+YV)CVPR 2021✓990.789.991.483.580.586.5
JOINT [31](+YV)ICCV 20214---83.580.886.2
DMN [24](+YV)ICCV 2021✓7---84.081.087.0
HMMN [38](+YV)ICCV 2021✓1090.889.692.084.781.987.5
AOT [51](+YV)NeuralPS 2021✓1991.089.792.383.080.385.7
Swift [43](+YV)CVPR 2021✓2590.490.590.381.178.383.9
STCN [6](+YV)NeuralPS 2021✓26*---85.482.288.6
SWEM(+YV)✓3691.389.992.684.381.287.4
+ +FPS. $R = 4$ achieves the best trade-off between performance and efficiency. + +Adaptive weights in SWEM. Without using adaptive weights (Eq. 7), our performance drops greatly ( $81.9\% \rightarrow 77.6\%$ ) while the improvement of inference speed is subtle ( $36.4\mathrm{FPS} \rightarrow 38.4\mathrm{FPS}$ ). Figure 4 shows the distribution of maximum matching similarities between features of the current frame and previous bases. Although SWEM with adaptive weights has fewer high similarities, it has more similar + +Table 2. Comparisons with previous approaches on DAVIS 2016 and DAVIS 2017 validation sets. $^+\mathbf{Y}\mathbf{V}^{\prime}$ denotes training with additional videos from YouTube-VOS. I' indicates the pre-training on image datasets. Note that our SWEM achieves results close to state-of-the-art performance at a speed of 36 FPS on a V100 GPU without IO time. Here, \*\* represents the re-evaluation on our hardware for reference. + +
RFPSDAVIS 2016 valDAVIS 2017 val
J & F↑JM↑J & F↑JM↑
141.587.787.377.975.1
239.488.788.079.576.9
338.388.887.980.878.1
436.489.588.681.979.3
534.589.188.281.278.4
633.089.088.379.877.0
731.888.687.879.877.1
+ +Table 3. Ablation study on the number of SWEM iterations $R$ (with $K = {128}$ ). + +ities above 0.6 than the one with fixed weights (93.4% v.s. 90.5%), guaranteeing fewer missing matches during inference. We also show the qualitative comparison between two kinds of weights in Figure 5. Compared with SWEM with adaptive weights, that with fixed weights is more prone to missing matches, resulting in drift issues. + +# 6.2. Comparison with SOTA + +Datasets and evaluation metrics. We report the results on the DAVIS 2016, DAVIS 2017, and YouTube-VOS 2018 datasets using region similarity $\mathcal{I}$ , contour accuracy $\mathcal{F}$ , and their mean as metrics. + +DAVIS 2016 and DAVIS 2017. Table 2 presents the quan + +![](images/4f352f4712b25412b289ecf1b9dbaa90fbc158494c814dd91b12f63139b36f1d.jpg) +Figure 4. The distribution of maximum matching similarities between current frame features and previous bases. + +![](images/bdc0064419cdb3b615ba16de0e26485c721a63611ee63da11e9e3edb144eaa70.jpg) +Figure 5. The qualitative comparison between adaptive-weights and fixed-weights. SWEM with fixed weights (first line for each sample) is struggled to distinguish similar objects while the one with adaptive weights (second line) is competent for this problem. Weights are visualized at the third line for each sample, where the brighter the pixel, the harder it is. As for the person in the middle, the corresponding background bases pay more attention to objects (the remaining person) which are similar to the target. + +titative comparisons with recent state-of-the-art video segmentation methods on the DAVIS 2016 and 2017 validation sets. Our method achieves the best $\mathcal{I}$ & $\mathcal{F}$ on both datasets among methods without pre-training on image datasets or additional video datasets. In detail, our method outperforms SAT [4], which runs at a similar speed (39 FPS) with ours, with a large margin on DAVIS2017 (+4.9% $\mathcal{I}$ & $\mathcal{F}$ score). Under the setting of using additional training data from YouTube-VOS (+YV), our SWEM surpasses all other top-performing methods. Note that STCN [6] uses a growing memory bank during inference, which harms the long-term segmentation while SWEM keeps the fixed number of bases and has stable computation complexity. SSTVOS [10], AOT [51] and JOINT [31] adopt transformer [41] backbones which are more powerful than ResNet-50. Hierarchical matching used in HMMN [38] also affects the segmentation efficiency deeply. We re-evaluated STM and STCN on our hardware and software environment for reference. Our SWEM is capable of achieving an inference speed of 36 FPS on the V100 GPU and 27 FPS on the 1080ti GPU. + +YouTube-VOS 2018. We make a comparison between our SWEM with previous methods on the YouTube-VOS 2018 via the official evaluation server in Table 4. Note that although SWEM leverages the original ResNet-50 backbone and the identical decoder as STM [32], it achieves the $82.8\%$ overall score which is very close to the state-of-the-art results. Besides, we provide more qualitative and quantitative comparisons in the Supplementary Material. + +
MethodGseenunseen
JM↑FM↑JM↑FM↑
STM [32]79.479.784.272.880.9
AFB-URR [25]79.678.883.174.182.6
EGMN [28]80.280.785.174.080.9
KMN [37]81.481.485.675.383.3
CFBI [52]81.481.185.875.383.4
RMNet [16]81.582.185.775.782.4
SSTVOS [10]81.781.285.976.083.9
LCM [16]82.082.286.775.783.4
DMN [24]82.582.586.976.284.2
HMMN [38]82.682.187.076.884.6
JOINT [31]83.181.585.978.786.5
AOT [51]83.782.587.577.986.7
SAT* [4]63.667.170.255.361.7
TVOS* [53]67.867.169.463.071.6
FRTM* [36]72.172.376.265.974.1
GC* [23]73.272.675.668.975.7
Swift* [11]77.877.881.872.379.5
STCN* [6]83.081.986.577.985.7
SWEM*82.882.486.977.185.0
+ +Table 4. Comparison with state-of-the-art methods on the YouTube-VOS 2018 validation dataset. We report all of the mean Jaccard $(\mathcal{J})$ , the boundary $(\mathcal{F})$ scores for seen and unseen categories, and the overall scores $\mathcal{G}$ . Besides, we use $*$ to indicate those methods with an inference speed $>20$ FPS. Note SSTVOS, JOINT and AOT are transformer-based methods. + +# 7. Conclusion + +In this paper, we proposed a fast yet robust model for semi-supervised video object segmentation dubbed Sequential Weighted Expectation-Maximum (SWEM) network, which is capable of constructing compact target templates with low redundancy for pixel-wise matching. The weighted EM algorithm is used to construct bases for foreground and background features separately and reduce the intra-frame redundancy. We also proposed to compute adaptive weights instead of fixed weights when generating bases, which forces bases to pay more attention to hard samples, so as to reduce the missing match. We extended the weighted EM to sequential weighted EM to process sequential data and completely reduce the inter-frame redundancy. Overall, our method achieves a performance close to the state-of-the-art on VOS at 36 FPS. + +# Acknowledgement + +This work was supported by NSFC project Grant No.U1833101, SZSTI Grant No.JCYJ20190809172201639 and WDZC20200820200655001, the Joint Research Center of Tencent and Tsinghua. + +# References + +[1] Margareta Ackerman, Shai Ben-David, Simina Brânzei, and David Loker. Weighted clustering. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 26, 2012. 4 +[2] Linchao Bao, Baoyuan Wu, and Wei Liu. Cnn in mrf: Video object segmentation via inference in a cnn-based higher-order spatio-temporal mrf. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5977-5986, 2018. 1 +[3] Sergi Caelles, Kevis-Kokitsi Maninis, Jordi Pont-Tuset, Laura Leal-Taixe, Daniel Cremers, and Luc Van Gool. One-shot video object segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 221-230, 2017. 1 +[4] Xi Chen, Zuoxin Li, Ye Yuan, Gang Yu, Jianxin Shen, and Donglian Qi. State-aware tracker for real-time video object segmentation. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. 2, 7, 8 +[5] Yuhua Chen, Jordi Pont-Tuset, Alberto Montes, and Luc Van Gool. Blazingly fast video object segmentation with pixel-wise metric learning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1189-1198, 2018. 1, 2 +[6] Ho Kei Cheng, Yu-Wing Tai, and Chi-Keung Tang. Rethinking space-time networks with improved memory coverage for efficient video object segmentation. In NeurIPS, 2021. 1, 2, 5, 7, 8 +[7] Jingchun Cheng, Yi-Hsuan Tsai, Wei-Chih Hung, Shengjin Wang, and Ming-Hsuan Yang. Fast and accurate online video object segmentation via tracking parts. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7415-7424, 2018. 1 +[8] Ming-Ming Cheng, Niloy J. Mitra, Xiaolei Huang, Philip H. S. Torr, and Shi-Min Hu. Global contrast based salient region detection. IEEE TPAMI, 37(3):569-582, 2015. 6 +[9] Arthur P Dempster, Nan M Laird, and Donald B Rubin. Maximum likelihood from incomplete data via the em algorithm. Journal of the Royal Statistical Society: Series B (Methodological), 39(1):1-22, 1977. 2 +[10] Brendan Duke, Abdalla Ahmed, Christian Wolf, Parham Aarabi, and Graham W Taylor. Sstvos: Sparse spatiotemporal transformers for video object segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5912-5921, 2021. 1, 7, 8 +[11] Bhat G. et al. Learning what to learn for video object segmentation. In European Conference on Computer Vision (ECCV), 2020. 8 +[12] 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. 6 +[13] Dan Feldman and Leonard J Schulman. Data reduction for weighted and outlier-resistant clustering. In Proceedings of the twenty-third annual ACM-SIAM symposium on Discrete Algorithms, pages 1343-1354. SIAM, 2012. 4 + +[14] Israel Dejene Gebru, Xavier Alameda-Pineda, Florence Forbes, and Radu Horaud. Em algorithms for weighted-data clustering with application to audio-visual scene analysis. IEEE transactions on pattern analysis and machine intelligence, 38(12):2402-2415, 2016. 4 +[15] 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. 6 +[16] Li Hu, Peng Zhang, Bang Zhang, Pan Pan, Yinghui Xu, and Rong Jin. Learning position and target consistency for memory-based video object segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4144-4154, 2021. 1, 2, 5, 7, 8 +[17] Yuan-Ting Hu, Jia-Bin Huang, and Alexander G Schwing. Videomatch: Matching based video object segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 54-70, 2018. 1, 2 +[18] Joakim Johnander, Martin Danelljan, Emil Brissman, Fahad Shahbaz Khan, and Michael Felsberg. A generative appearance model for end-to-end video object segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1 +[19] Anna Khoreva, Rodrigo Benenson, Eddy Ilg, Thomas Brox, and Bernt Schiele. Lucid data dreaming for object tracking. In The DAVIS Challenge on Video Object Segmentation, 2017. 1 +[20] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[21] Xia Li, Zhisheng Zhong, Jianlong Wu, Yibo Yang, Zhouchen Lin, and Hong Liu. Expectation-maximization attention networks for semantic segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), October 2019. 1, 2, 3 +[22] Yin Li, Xiaodi Hou, Christof Koch, James M Rehg, and Alan L Yuille. The secrets of salient object segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 280-287, 2014. 6 +[23] Shan Y. Li Y., Shen Z. Fast video object segmentation using the global context module. In European Conference on Computer Vision (ECCV), 2020. 2, 5, 7, 8 +[24] Shuxian Liang, Xu Shen, Jianqiang Huang, and Xian-Sheng Hua. Video object segmentation with dynamic memory networks and adaptive object alignment. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8065-8074, 2021. 7, 8 +[25] Yongqing Liang, Xin Li, Navid Jafari, and Qin Chen. Video object segmentation with adaptive feature bank and uncertain-region refinement. In Advances in neural information processing systems (NeurIPS), 2020. 1, 2, 5, 6, 7, 8 +[26] 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. 6 + +[27] Bo Long, Zhongfei Zhang, Xiaoyun Wu, and Philip S Yu. Spectral clustering for multi-type relational data. In Proceedings of the 23rd international conference on Machine learning, pages 585-592, 2006. 4 +[28] Xinkai Lu, Wenguan Wang, Martin Danelljan, Tianfei Zhou, Jianbing Shen, and Luc Van Gool. Video object segmentation with episodic graph memory networks. In European Conference on Computer Vision (ECCV), 2020. 1, 2, 6, 7, 8 +[29] Jonathon Luiten, Paul Voigtlaender, and Bastian Leibe. Premvos: Proposal-generation, refinement and merging for video object segmentation. In Asian Conference on Computer Vision, pages 565-580. Springer, 2018. 1 +[30] K-K Maninis, Sergi Caelles, Yuhua Chen, Jordi Pont-Tuset, Laura Leal-Taixe, Daniel Cremers, and Luc Van Gool. Video object segmentation without temporal information. IEEE transactions on pattern analysis and machine intelligence, 41(6):1515-1530, 2018. 1 +[31] Yunyao Mao, Ning Wang, Wengang Zhou, and Houqiang Li. Joint inductive and transductive learning for video object segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9670-9679, 2021. 7, 8 +[32] Seoung Wug Oh, Joon-Young Lee, Ning Xu, and Seon Joo Kim. Video object segmentation using space-time memory networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), October 2019. 1, 2, 3, 5, 6, 7, 8 +[33] Federico Perazzi, Anna Khoreva, Rodrigo Benenson, Bernt Schiele, and Alexander Sorkine-Hornung. Learning video object segmentation from static images. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2663-2672, 2017. 1 +[34] Federico Perazzi, Jordi Pont-Tuset, Brian McWilliams, Luc Van Gool, Markus Gross, and Alexander Sorkine-Hornung. A benchmark dataset and evaluation methodology for video object segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 724-732, 2016. 6 +[35] 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. 3, 6 +[36] Andreas Robinson, Felix Jaremo Lawin, Martin Danelljan, Fahad Shahbaz Khan, and Michael Felsberg. Learning fast and robust target models for video object segmentation. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. 2, 8 +[37] Hongje Seong, Junhyuk Hyun, and Euntai Kim. Kernelized memory network for video object segmentation. In European Conference on Computer Vision (ECCV), 2020. 1, 2, 5, 6, 7, 8 +[38] Hongje Seong, Seoung Wug Oh, Joon-Young Lee, Seongwon Lee, Suhyeon Lee, and Euntai Kim. Hierarchical memory matching network for video object segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 12889-12898, 2021. 1, 2, 5, 7, 8 +[39] Jianping Shi, Qiong Yan, Li Xu, and Jiaya Jia. Hierarchical image saliency detection on extended cssd. IEEE + +transactions on pattern analysis and machine intelligence, 38(4):717-729, 2015. 6 +[40] George C Tseng. Penalized and weighted k-means for clustering with scattered objects and prior information in high-throughput biological data. Bioinformatics, 23(17):2247-2255, 2007. 4 +[41] 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. 8 +[42] 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 Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1, 2 +[43] Haochen Wang, Xiaolong Jiang, Haibing Ren, Yao Hu, and Song Bai. Swiftnet: Real-time video object segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1296-1305, 2021. 1, 2, 5, 7 +[44] Qiang Wang, Li Zhang, Luca Bertinetto, Weiming Hu, and Philip HS Torr. Fast online object tracking and segmentation: A unifying approach. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1328-1338, 2019. 2 +[45] Wenguan Wang, Jianbing Shen, Fatih Porikli, and Ruigang Yang. Semi-supervised video object segmentation with super-trajectories. IEEE transactions on pattern analysis and machine intelligence, 41(4):985-998, 2018. 1 +[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, 5 +[47] Ziqin Wang, Jun Xu, Li Liu, Fan Zhu, and Ling Shao. Ranet: Ranking attention network for fast video object segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), October 2019. 1, 2, 6, 7 +[48] Seoung Wug Oh, Joon-Young Lee, Kalyan Sunkavalli, and Seon Joo Kim. Fast video object segmentation by reference-guided mask propagation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7376–7385, 2018. 1 +[49] Haozhe Xie, Hongxun Yao, Shangchen Zhou, Shengping Zhang, and Wenxiu Sun. Efficient regional memory network for video object segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1286-1295, 2021. 1, 2, 5 +[50] Ning Xu, Linjie Yang, Yuchen Fan, Jianchao Yang, Dingcheng Yue, Yuchen Liang, Brian Price, Scott Cohen, and Thomas Huang. Youtube-vos: Sequence-to-sequence video object segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 585-601, 2018. 6 +[51] Zongxin Yang, Yunchao Wei, and Yi Yang. Associating objects with transformers for video object segmentation. In NeurIPS, 2021. 1, 7, 8 + +[52] Yang Y. Yang Z., Wei Y. Collaborative video object segmentation by foreground-background integration. In European Conference on Computer Vision (ECCV), 2020. 1, 2, 7, 8 +[53] Yizhuo Zhang, Zhirong Wu, Houwen Peng, and Stephen Lin. A transductive approach for video object segmentation. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. 2, 7, 8 \ No newline at end of file diff --git a/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/images.zip b/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e44c1c33340ec59eb2eb60f5586b0666e019cdbf --- /dev/null +++ b/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7dcad448ec62126e839abd529dffb6a1405522c3be6da8ea9b83ee47191278f6 +size 594420 diff --git a/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/layout.json b/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8f96eec32122a228e712565a1f53863f29c2524b --- /dev/null +++ b/swemtowardsrealtimevideoobjectsegmentationwithsequentialweightedexpectationmaximization/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d51941405eb4e49afd630109edaab8e6be1f635ad21bb9a529fe3441116f24c3 +size 447068