SlowGuess commited on
Commit
eabc299
·
verified ·
1 Parent(s): 36f8be7

Add Batch d8b1d8f7-8dc5-4a4c-99fa-f5e7ebacdd49

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. complementingbrightnessconstancywithdeepnetworksforopticalflowprediction/9cd055f7-5cc2-4afe-afa0-1386f338f66b_content_list.json +3 -0
  2. complementingbrightnessconstancywithdeepnetworksforopticalflowprediction/9cd055f7-5cc2-4afe-afa0-1386f338f66b_model.json +3 -0
  3. complementingbrightnessconstancywithdeepnetworksforopticalflowprediction/9cd055f7-5cc2-4afe-afa0-1386f338f66b_origin.pdf +3 -0
  4. complementingbrightnessconstancywithdeepnetworksforopticalflowprediction/full.md +372 -0
  5. complementingbrightnessconstancywithdeepnetworksforopticalflowprediction/images.zip +3 -0
  6. complementingbrightnessconstancywithdeepnetworksforopticalflowprediction/layout.json +3 -0
  7. completelyselfsupervisedcrowdcountingviadistributionmatching/19c72cef-4d5f-4ad1-83af-c52baa8e74df_content_list.json +3 -0
  8. completelyselfsupervisedcrowdcountingviadistributionmatching/19c72cef-4d5f-4ad1-83af-c52baa8e74df_model.json +3 -0
  9. completelyselfsupervisedcrowdcountingviadistributionmatching/19c72cef-4d5f-4ad1-83af-c52baa8e74df_origin.pdf +3 -0
  10. completelyselfsupervisedcrowdcountingviadistributionmatching/full.md +257 -0
  11. completelyselfsupervisedcrowdcountingviadistributionmatching/images.zip +3 -0
  12. completelyselfsupervisedcrowdcountingviadistributionmatching/layout.json +3 -0
  13. compositionalhumansceneinteractionsynthesiswithsemanticcontrol/17c013bf-7bdf-421f-902f-3f7fe8744cc4_content_list.json +3 -0
  14. compositionalhumansceneinteractionsynthesiswithsemanticcontrol/17c013bf-7bdf-421f-902f-3f7fe8744cc4_model.json +3 -0
  15. compositionalhumansceneinteractionsynthesiswithsemanticcontrol/17c013bf-7bdf-421f-902f-3f7fe8744cc4_origin.pdf +3 -0
  16. compositionalhumansceneinteractionsynthesiswithsemanticcontrol/full.md +274 -0
  17. compositionalhumansceneinteractionsynthesiswithsemanticcontrol/images.zip +3 -0
  18. compositionalhumansceneinteractionsynthesiswithsemanticcontrol/layout.json +3 -0
  19. compositionalvisualgenerationwithcomposablediffusionmodels/6b5233b8-d7c6-4251-96ae-22b3d8016aa7_content_list.json +3 -0
  20. compositionalvisualgenerationwithcomposablediffusionmodels/6b5233b8-d7c6-4251-96ae-22b3d8016aa7_model.json +3 -0
  21. compositionalvisualgenerationwithcomposablediffusionmodels/6b5233b8-d7c6-4251-96ae-22b3d8016aa7_origin.pdf +3 -0
  22. compositionalvisualgenerationwithcomposablediffusionmodels/full.md +484 -0
  23. compositionalvisualgenerationwithcomposablediffusionmodels/images.zip +3 -0
  24. compositionalvisualgenerationwithcomposablediffusionmodels/layout.json +3 -0
  25. compoundprototypematchingforfewshotactionrecognition/330f394f-de8b-4739-adc1-d3592e67b444_content_list.json +3 -0
  26. compoundprototypematchingforfewshotactionrecognition/330f394f-de8b-4739-adc1-d3592e67b444_model.json +3 -0
  27. compoundprototypematchingforfewshotactionrecognition/330f394f-de8b-4739-adc1-d3592e67b444_origin.pdf +3 -0
  28. compoundprototypematchingforfewshotactionrecognition/full.md +322 -0
  29. compoundprototypematchingforfewshotactionrecognition/images.zip +3 -0
  30. compoundprototypematchingforfewshotactionrecognition/layout.json +3 -0
  31. conclconceptcontrastivelearningfordensepredictionpretraininginpathologyimages/646c15b0-febd-4ae2-a73f-0b867dff21f7_content_list.json +3 -0
  32. conclconceptcontrastivelearningfordensepredictionpretraininginpathologyimages/646c15b0-febd-4ae2-a73f-0b867dff21f7_model.json +3 -0
  33. conclconceptcontrastivelearningfordensepredictionpretraininginpathologyimages/646c15b0-febd-4ae2-a73f-0b867dff21f7_origin.pdf +3 -0
  34. conclconceptcontrastivelearningfordensepredictionpretraininginpathologyimages/full.md +258 -0
  35. conclconceptcontrastivelearningfordensepredictionpretraininginpathologyimages/images.zip +3 -0
  36. conclconceptcontrastivelearningfordensepredictionpretraininginpathologyimages/layout.json +3 -0
  37. concurrentsubsidiarysupervisionforunsupervisedsourcefreedomainadaptation/914b8df4-7e7c-42d1-ab4c-861ea294fa85_content_list.json +3 -0
  38. concurrentsubsidiarysupervisionforunsupervisedsourcefreedomainadaptation/914b8df4-7e7c-42d1-ab4c-861ea294fa85_model.json +3 -0
  39. concurrentsubsidiarysupervisionforunsupervisedsourcefreedomainadaptation/914b8df4-7e7c-42d1-ab4c-861ea294fa85_origin.pdf +3 -0
  40. concurrentsubsidiarysupervisionforunsupervisedsourcefreedomainadaptation/full.md +380 -0
  41. concurrentsubsidiarysupervisionforunsupervisedsourcefreedomainadaptation/images.zip +3 -0
  42. concurrentsubsidiarysupervisionforunsupervisedsourcefreedomainadaptation/layout.json +3 -0
  43. conditionalflownerfaccurate3dmodellingwithreliableuncertaintyquantification/ee19af33-8186-41de-ab0e-fb5353f6f31f_content_list.json +3 -0
  44. conditionalflownerfaccurate3dmodellingwithreliableuncertaintyquantification/ee19af33-8186-41de-ab0e-fb5353f6f31f_model.json +3 -0
  45. conditionalflownerfaccurate3dmodellingwithreliableuncertaintyquantification/ee19af33-8186-41de-ab0e-fb5353f6f31f_origin.pdf +3 -0
  46. conditionalflownerfaccurate3dmodellingwithreliableuncertaintyquantification/full.md +315 -0
  47. conditionalflownerfaccurate3dmodellingwithreliableuncertaintyquantification/images.zip +3 -0
  48. conditionalflownerfaccurate3dmodellingwithreliableuncertaintyquantification/layout.json +3 -0
  49. conditionalstrokerecoveryforfinegrainedsketchbasedimageretrieval/8c2c337d-79b1-4f7a-91a9-6a96e46eb39e_content_list.json +3 -0
  50. conditionalstrokerecoveryforfinegrainedsketchbasedimageretrieval/8c2c337d-79b1-4f7a-91a9-6a96e46eb39e_model.json +3 -0
complementingbrightnessconstancywithdeepnetworksforopticalflowprediction/9cd055f7-5cc2-4afe-afa0-1386f338f66b_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e53f16250136bc50ff697f3d31b99763eabbcd9eb3495a81b37228c08628a5cd
3
+ size 94705
complementingbrightnessconstancywithdeepnetworksforopticalflowprediction/9cd055f7-5cc2-4afe-afa0-1386f338f66b_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6edfb848da4a1ef9d45973b1f49f0e4dbf96f9e9a9858addea68f24d9942fe90
3
+ size 116058
complementingbrightnessconstancywithdeepnetworksforopticalflowprediction/9cd055f7-5cc2-4afe-afa0-1386f338f66b_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:958acc46c07fdd3802d3b0cfcd32810fef79613c58244f6ea836aa2bc53b7d55
3
+ size 7620535
complementingbrightnessconstancywithdeepnetworksforopticalflowprediction/full.md ADDED
@@ -0,0 +1,372 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Complementing Brightness Constancy with Deep Networks for Optical Flow Prediction
2
+
3
+ Vincent Le Guen $^{1,2,3}$ , Clément Rambour $^{2}$ , and Nicolas Thome $^{2,4}$
4
+
5
+ $^{1}$ EDF R&D, Chatou, France
6
+ $^{2}$ Conservatoire National des Arts et Métiers, CEDRIC, Paris, France
7
+ $^{3}$ SINCLAIR AI Lab, Palaiseau, France
8
+ $^{4}$ Sorbonne Université, CNRS, ISIR, F-75005 Paris, France
9
+
10
+ Abstract. State-of-the-art methods for optical flow estimation rely on deep learning, which require complex sequential training schemes to reach optimal performances on real-world data. In this work, we introduce the COMBO deep network that explicitly exploits the brightness constancy (BC) model used in traditional methods. Since BC is an approximate physical model violated in several situations, we propose to train a physically-constrained network complemented with a data-driven network. We introduce a unique and meaningful flow decomposition between the physical prior and the data-driven complement, including an uncertainty quantification of the BC model. We derive a joint training scheme for learning the different components of the decomposition ensuring an optimal cooperation, in a supervised but also in a semi-supervised context. Experiments show that COMBO can improve performances over state-of-the-art supervised networks, e.g. RAFT, reaching state-of-the-art results on several benchmarks. We highlight how COMBO can leverage the BC model and adapt to its limitations. Finally, we show that our semi-supervised method can significantly simplify the training procedure.
11
+
12
+ # 1 Introduction
13
+
14
+ Optical flow estimation is a classical problem in computer vision, consisting in computing the per-pixel motion between video frames. This is a core visual task useful in many applications, such as video compression [1], medical imaging [4] or object tracking [11]. Yet, this remains a particularly challenging task for real-world scenes, especially in presence of fast-moving objects, occlusions, changes of illumination or textureless surfaces.
15
+
16
+ Traditional model-based estimation methods [35, 17] assume that the intensity of pixels is conserved during motion $\mathbf{w}$ : $I_{t-1}(\mathbf{x}) = I_t(\mathbf{x} + \mathbf{w})$ , which is known as the brightness constancy (BC) model. Linearizing this constraint for small motion leads to the famous optical flow partial differential equation (PDE) solved by variational methods since the seminal work of Horn and Schunk [17]:
17
+
18
+ $$
19
+ \frac {\partial I}{\partial t} (t, \mathbf {x}) + \mathbf {w} (t, \mathbf {x}) \cdot \nabla I (t, \mathbf {x}) = 0 \tag {1}
20
+ $$
21
+
22
+ ![](images/57073b3bc46d78775575a44391fb310b2e68ac9898344f36ae019d235948d43f.jpg)
23
+ images t-1, t
24
+
25
+ ![](images/9949dd306409dd485b246cc38c98d7d171802a331287a30eab28380e3cc233c4.jpg)
26
+ ground truth flow $\mathbf{w}^{\prime }$
27
+
28
+ ![](images/23af26f497e09e2159ffe4e1018b318f81770ea919858ecfd409a7f31fb1c656.jpg)
29
+ COMBO prediction $\hat{w}$
30
+
31
+ ![](images/ed1a1dbb37123e74a586573ebfdabfded1b8a1de90d868d2b5f2470d329827fe.jpg)
32
+ Brightness Constancy (BC) flow $\widehat{\pmb{w}}_p$
33
+
34
+ ![](images/9c0f06f3eb453ebb840ca658e4f63dc09c4dadec0fc1fe11074eb04e38208ebd.jpg)
35
+ Augmentation flow $\hat{\pmb{W}}_a$
36
+ Fig. 1: Proposed COMBO model for flow estimation between two images $I_{1}$ and $I_{2}$ . We explicitly leverage the brightness constancy (BC) assumption in Eq. (1) for estimating the physical flow prediction $\hat{\mathbf{w}}_p$ . Since BC is an approximate model violated in several usual situations, COMBO learns an uncertainty map $\hat{\alpha}$ specifying areas where $\hat{\mathbf{w}}_p$ is relevant, and an augmentation data-driven flow $\hat{\mathbf{w}}_a$ to compensate for the BC violations (in this example, related to fog and occlusions). The final COMBO prediction combining $(\hat{\mathbf{w}}_a, \hat{\mathbf{w}}_p, \hat{\alpha})$ is both physically-regularized and accurate.
37
+
38
+ ![](images/d18dcfea146b94f22bd4c4d8896161b6189cf445a546b0e3eaf0308411460768.jpg)
39
+ COMBO uncertainty $\alpha$
40
+
41
+ However this physical model for optical flow is only a rather coarse approximation of the reality. The BC assumption is violated in many situations: in presence of occlusions, global or local illumination changes, specular reflexions, or complex natural situations such as fog. The correspondence problem is also ambiguous for textureless surfaces. To solve this ill-posed inverse problem, this is necessary to inject prior knowledge about the flow, such as spatial smoothness, sparsity or small total variation.
42
+
43
+ In contrast to these traditional model-based approaches, deep neural networks have become state-of-the-art for learning optical flow in a pure data-driven fashion [13, 20, 44, 51, 18, 61, 53]. However, since flow labelling on real images is expensive, supervised deep learning methods mostly use complex curriculum training schemes on synthetic datasets to progressively adapt to the complexity of real-world scenes.
44
+
45
+ More recently, unsupervised deep learning approaches are closer in spirit to traditional approaches [22, 45, 39, 30, 24, 49]. Without ground-truth labels, they rely on a photometric reconstruction loss based on the BC assumption, and additional regularization losses like spatial smoothness. They also use of specific modules, e.g. occlusion detection, to identify images areas where the BC in Eq. (1) is violated.
46
+
47
+ In this work, we introduce a hybrid model-based machine learning (MB/ML) model dedicated to optical flow estimation, which COMplements Brightness constancy with deep networks for accurate Optical flow prediction (COMBO). As illustrated in Figure 1, COMBO decomposes the estimation process into a physical flow based on the simplified Brightness Constancy (BC) hypothesis and a data-driven augmentation for compensating for the limitations of the physical
48
+
49
+ model. COMBO also simultaneously learns an uncertainty model of the brightness constancy, useful for fusing the two flow branches into an accurate flow estimation. Importantly, the two branches are learned jointly and a principled optimization ensures an optimal cooperation between them.
50
+
51
+ Our contributions are the following:
52
+
53
+ - We propose a principled way to regularize supervised flow models with an explicit exploitation of the BC assumption. We introduce with COMBO a meaningful and unique flow decomposition into a physical part optimizing the BC and an augmentation part compensating for its limitations.
54
+ - We propose to jointly learn the physical, augmented flows and a uncertainty measure of the BC validity, generalizing occlusion detection approaches or robust photometric losses. It also enables to exploit the model in semi-supervised contexts for non-annotated pixels where we know that the BC assumption is satisfied.
55
+ - To learn the COMBO model, we define and compute a fine-grained supervision by decomposing the ground-truth flow into a BC flow, a residual flow and an uncertainty map.
56
+ - Experiments (section 4) show that when included into a state-of-the-art supervised network, i.e. RAFT, COMBO can improve performances consistently over datasets and training curriculum steps. COMBO also reaches state-of-the-art performances on several benchmarks, and we show that the semi-supervised scheme can be leveraged to grandly simplify the training curriculum. We also provide detailed ablations and qualitative analyses attesting the benefits of our principled decomposition framework.
57
+
58
+ # 2 Related work
59
+
60
+ Traditional optical flow Since the seminal works of Lucas-Kanade [35] and Horn-Schunck [17], optical flow estimation is traditionally casted as an optimization problem over the space of motion fields between a pair of images [40, 58, 8]. As mentioned in introduction, the cost function is usually based on the conservation assumption of an image descriptor during motion, i.e. the brightness constancy (BC). Since the number of optical flow variables is twice the number of observations, the search problem is underconstrained. Existing methods typically add spatial smoothness constraints on the flow to regularize the problem, enabling to propagate information from non-ambiguous to ambiguous pixels, e.g. occluded. Since, progress has been made for handling the limitations of the brightness constancy with more robust matching loss, such as the gradient constancy [7], the structural similarity (SSIM), the Charbonnier loss [9], the census loss [39] or involving descriptors learned by deep neural networks [3, 59]. However, these traditional methods are limited for handling large motion and often suffer from a high computational cost.
61
+
62
+ Deep supervised methods Deep neural networks have proven effective for directly learning the optical flow end-to-end from a labelled dataset [13, 20, 44,
63
+
64
+ 51, 18, 53, 23]. Although some methods borrow ideas from traditional methods such as cost volume processing [61] and pyramidal coarse-to-fine warping [44], they do not rely anymore on the conservation of an image descriptor. One of the current state-of-the-art architectures is the Recurrent All-Pairs Field Transforms (RAFT) [53]. This model exploits the correlation volume between all pairs of pixels and iteratively refines the flow with a recurrent neural network. Since obtaining ground-truth flow annotations is very expensive, supervised methods mostly train on synthetic datasets. This leads to a non-negligible generalization gap when transferring to real-world datasets. Consequently, complex curriculum learning schemes are needed to progressively adapt the learned optical flow from synthetic data to real scenarios [53, 50].
65
+
66
+ Deep unsupervised methods More recently, unsupervised approaches proved to outperform traditional methods even without flow labels [22, 45, 39, 30, 24, 49]. They revisit the brightness constancy assumption by warping the target image with the estimated flow and optimizing a photometric loss. However they still lag behind supervised methods and require additional mechanisms for overcoming the limitations of the BC assumption, e.g. occlusion reasoning [39, 57] or self-supervision [31, 32, 24]. Occlusions were traditionally treated as outliers in a robust estimation setting [7], or estimated with a forward-backward consistency check [2, 39]. More recent approaches jointly learn occlusion maps with convolutional neural networks in a supervised way (i.e. with ground-truth occlusions) [37, 20, 19] or unsupervised way [63, 15, 21]. Nonetheless, most of these methods focus on specific cases of deviations from the brightness constancy assumption, e.g. occlusions or illumination changes. Our approach is more general and learns to compensate for any failure case of this simplified assumption. Besides, we learn from supervised flow data a confidence model of the BC assumption, which enables to learn our model in a semi-supervised setting [26, 60].
67
+
68
+ Hybrid MB/ML Combining model-based (MB) and machine learning (ML) models is a long-standing subject [42, 54, 46] that yet remains widely open nowadays. Leveraging physical knowledge enables to design machine learning models that learn from less data, and offer better generalization while conserving physical plausibility. Many ideas were explored, such as imposing soft physical constraints [43, 48, 34, 28, 56] in the training loss function or hard constraints in the network architectures [6, 12, 27, 16, 36, 41]. However, most existing approaches assume a fully-known prior physical model. Very few works have investigated how to exploit incomplete physical models with deep neural networks [33, 38, 47, 29, 62]. Besides, exploiting incomplete physical knowledge in a deep hybrid model has never been explored for optical flow to the best of our knowledge.
69
+
70
+ # 3 COMBO model for optical flow
71
+
72
+ Given a pair of frames $I_{t-1}$ and $I_t \in \mathbb{R}^{W \times H \times 3}$ , the optical flow task consists in estimating the dense motion field $\mathbf{w} = (u, v) \in \mathbb{R}^{W \times H \times 2}$ that maps each pixel
73
+
74
+ ![](images/383755e30fa41deb2b884ba845632a1ad5e9d2d16988ded576b08f11879c496f.jpg)
75
+ Fig. 2: Our proposed COMBO model for optical flow estimation. Given a pair of input frames $(I_{t - 1}, I_t)$ , COMBO first extract convolutional features. The model is composed of three branches that compute an estimate for the physical flow $\hat{\mathbf{w}}_p$ , the augmentation flow $\hat{\mathbf{w}}_a$ and the uncertainty map $\hat{\alpha}$ .
76
+
77
+ from the source image $I_{t-1}$ to its corresponding relative location in the target image $I_t$ .
78
+
79
+ We introduce COMBO, a deep learning model that explicitly exploits the brightness constancy (BC) assumption and learns the complementary information to compensate for the BC modeling errors.
80
+
81
+ The COMBO model is depicted in Figure 2. The model takes a pair of input frames $(I_{t - 1}, I_t)$ and first encodes them into a feature space. From this common representation space, the rationale of COMBO is to decompose the dense flow $\hat{\mathbf{w}}$ using 3 main quantities: a physical term $\hat{\mathbf{w}}_p \in \mathbb{R}^{W \times H \times 2}$ fulfilling the BC assumption, an augmentation term $\hat{\mathbf{w}}_a \in \mathbb{R}^{W \times H \times 2}$ dedicated to capture the remaining information for accurate flow prediction. For each pixel, our decomposition also involves an uncertainty map $\hat{\alpha} \in [0,1]^{W \times H}$ representing the violation of the BC assumption at each pixel.
82
+
83
+ In section 3.1, we present our proposed BC augmentation framework, ensuring a unique and meaningful decomposition of $\hat{\mathbf{w}}$ between the physical $\hat{\mathbf{w}}_p$ , augmented $\hat{\mathbf{w}}_a$ and uncertainty $\hat{\alpha}$ terms. From this formulation, we derive in section 3.2 a training scheme to learn the model parameters, including a supervised but also a semi-supervised variant leveraging the learned BC confidence $\hat{\alpha}$ .
84
+
85
+ # 3.1 BC-augmented flow decomposition
86
+
87
+ We consider the flow $\mathbf{w}(\mathbf{x})$ representing the displacement of pixel $\mathbf{x} = (x,y)$ from $I_{t - 1}(\mathbf{x})$ to $I_{t}(\mathbf{x})$ . Let us define the brightness constancy divergence as $\mathcal{L}_{BC}(\mathbf{x},\mathbf{w})\coloneqq \ell (I_{t - 1}(\mathbf{x}) - I_t(\mathbf{x} + \mathbf{w}))$ measured with the photometric loss $\ell$ (e.g. the L1 loss). In COMBO, we propose to decompose the ground truth flow
88
+
89
+ $\mathbf{w}^*$ between a physical flow $\mathbf{w}_p^*$ , an augmentation flow $\mathbf{w}_a^*$ and an uncertainty map $\alpha^*$ :
90
+
91
+ $$
92
+ \mathbf {w} ^ {*} (\mathbf {x}) = (1 - \alpha^ {*} (\mathbf {x})) \mathbf {w} _ {p} ^ {*} (\mathbf {x}) + \alpha^ {*} (\mathbf {x}) \mathbf {w} _ {a} ^ {*} (\mathbf {x}). \tag {2}
93
+ $$
94
+
95
+ Since the decomposition in Eq. (2) is not necessarily unique, we define the COMBO decomposition $(\mathbf{w}_p^*, \mathbf{w}_a^*, \alpha^*)$ as the solution of the following constrained optimization problem:
96
+
97
+ $$
98
+ \min _ {\mathbf {w} _ {p}, \mathbf {w} _ {a}} \| \left(\mathbf {w} _ {a}, \mathbf {w} _ {p}\right) \| \quad \text {s u b j e c t t o :} \tag {3}
99
+ $$
100
+
101
+ $$
102
+ \left\{ \begin{array}{l} \left(1 - \alpha^ {*} (\mathbf {x})\right) \mathbf {w} _ {p} (\mathbf {x}) + \alpha (\mathbf {x}) \mathbf {w} _ {a} (\mathbf {x}) = \mathbf {w} ^ {*} (\mathbf {x}) \\ \left(1 - \alpha^ {*} (\mathbf {x})\right) | I _ {1} (\mathbf {x}) - I _ {2} (\mathbf {x} + \mathbf {w} _ {p} (\mathbf {x})) | = 0 \\ \alpha^ {*} (\mathbf {x}) = \sigma \left(| I _ {1} (\mathbf {x}) - I _ {2} (\mathbf {x} + \mathbf {w} ^ {*} (\mathbf {x})) |\right). \end{array} \right.
103
+ $$
104
+
105
+ Theoretical properties of the decomposition: Under these constraints, the decomposition problem in Eq. (3) admits a unique solution $(\mathbf{w}_p^*, \mathbf{w}_a^*, \alpha^*)$ (we detail the proof in supplementary 1). The uniqueness in decomposition of a given flow into the three $(\mathbf{w}_p^*, \mathbf{w}_a^*, \alpha^*)$ components is important since it ensures a well posed problem for learning the different terms.
106
+
107
+ Beyond its sound mathematical formulation, the decomposition in Eq. (3) is also meaningful. It ensures to properly and explicitly exploit the BC model and to overcome its limitations to represent real data in diverse and complex situations. We detail now each component of this decomposition problem:
108
+
109
+ Brightness constancy flow $\hat{\mathbf{w}}_p(\mathbf{x})$ : We define the brightness constancy flow $\hat{\mathbf{w}}_p$ as a minimizer of the BC condition, similarly to traditional and unsupervised methods. The BC is a very useful constraint not fully exploited in deep supervised methods. However, as mentioned in introduction, this BC assumption is often violated in real data, e.g. in case of occlusions, illumination changes, textureless surfaces, etc. When directly minimizing $\mathcal{L}_{BC}(\mathbf{x},\mathbf{w}) = \ell (I_{t - 1}(\mathbf{x}) - I_t(\mathbf{x} + \mathbf{w}))$ , for a given pixel $\mathbf{x}$ in the source image, there may exist multiple possible matches in the target image satisfying the BC constraint. Therefore, the BC constraint is only applied to $\mathbf{w}_p$ in Eq. (3), not to the final flow vector $\mathbf{w}^*$ , and is weighted by the BC confidence measure $(1 - \alpha^{*}(\mathbf{x}))$ . This is done on purpose, since the BC constraint is not always verified when training a model from ground truth supervision, making this term possibly conflicting with the supervised objective. We verify experimentally that a naive incorporation of the BC loss during training is not effective. In contrast, COMBO exploits an augmented flow to jointly incorporate the BC knowledge with an adaptive compensation for its violation.
110
+
111
+ $BC$ augmented flow $\hat{\mathbf{w}}_a(\mathbf{x})$ : In contrast to traditional and unsupervised methods, we do not leverage prior knowledge on the flow but instead rely on a data-driven augmentation $\hat{\mathbf{w}}_a$ to learn how to optimally compensate for the simplified model, as investigated by several recent augmented physical models [33, 55, 38, 47, 29, 62]. To ensure a unique decomposition in Eq. (3), we minimize the norm
112
+
113
+ of the concatenated vector $(\hat{\mathbf{w}}_a,\hat{\mathbf{w}}_p)$ . The rationale is to compensate with the minimal correction $\| \hat{\mathbf{w}}_a\|$ from the brightness constancy assumption. This least-action augmentation also prevents $\hat{\mathbf{w}}_p(\mathbf{x})$ from being too large: the BC flow is enforced to be as close as possible to the ground-truth flow $\mathbf{w}^*$ . Minimizing the norm of $\hat{\mathbf{w}}_p$ also prevents degenerate cases with possibly several admissible $\hat{\mathbf{w}}_p$ equidistant to $\mathbf{w}^*$ (see supplementary 1 for a discussion).
114
+
115
+ BC uncertainty $\alpha^{*}(\mathbf{x})$ : We weight the decomposition between $\hat{\mathbf{w}}_p$ and $\hat{\mathbf{w}}_a$ in Eq. (3) with the uncertainty map $\alpha^{*}(\mathbf{x}) = \sigma (\mathcal{L}_{BC}(\mathbf{x},\mathbf{w}^{*}))$ quantifying the per-pixel validity of the BC assumption, where $\sigma$ is a nonlinear function<sup>5</sup> ensuring that the uncertainty values spread over [0; 1]. When $\alpha^{*}(\mathbf{x}) = 0$ , the BC assumption is verified; in that case, our decomposition reduces to the physical flow $\hat{\mathbf{w}} (\mathbf{x}) = \hat{\mathbf{w}}_p(\mathbf{x})$ as in traditional methods. On the contrary, when the BC is violated $(\alpha^{*}(\mathbf{x}) > 0)$ , the errors of the brightness constancy modelling are compensated by the data-driven model $\hat{\mathbf{w}}_a$ . This leads to a meaningful decomposition between $\hat{\mathbf{w}}_p$ and $\hat{\mathbf{w}}_a$ .
116
+
117
+ # 3.2 Training
118
+
119
+ In this section, we propose to jointly learn the three quantities $\mathbf{w}_p^*$ , $\mathbf{w}_a^*$ and $\alpha^*$ of the flow decomposition Eq. (2) with a deep neural architecture named COMBO. We introduce a practical learning framework to solve the decomposition problem in Eq. (3) in the supervised and semi-supervised settings. Given a dataset of labelled image pairs $\mathcal{D}_{sup} = \{(I_{t-1}, I_t, \mathbf{w}^*)_i\}_{i=1}^{N_{sup}}$ and unlabelled image pairs $\mathcal{D}_{unsup} = \{(I_{t-1}, I_t)_i\}_{i=1}^{N_{unsup}}$ , the goal is to learn the parameters $\theta = \{\theta_b, \theta_p, \theta_a\}$ of the COMBO model depicted in Figure 2, where $\theta_b$ are the backbone encoder parameters, $\theta_p$ the parameters of the BC flow model, $\theta_a$ are the parameters of the augmented flow model.
120
+
121
+ The general loss for learning the COMBO model is the following:
122
+
123
+ $$
124
+ \begin{array}{l} \mathcal {L} (\mathcal {D}, \theta) = \lambda_ {p} \| \hat {\mathbf {w}} _ {p} - \mathbf {w} _ {p} ^ {*} \| _ {2} ^ {2} + \lambda_ {a} \| \hat {\mathbf {w}} _ {a} - \mathbf {w} _ {a} ^ {*} \| _ {2} ^ {2} + \lambda_ {t o t a l} \| \hat {\mathbf {w}} - \mathbf {w} ^ {*} \| _ {2} ^ {2} \\ + \lambda_ {p h o t o} \mathcal {L} _ {p h o t o} (\mathcal {D}, \theta) + \lambda_ {w} \| (\hat {\mathbf {w}} _ {a}, \hat {\mathbf {w}} _ {p}) \| ^ {2} + \lambda_ {\alpha} \mathcal {L} _ {\alpha} (\mathcal {D}, \theta), \tag {4} \\ \end{array}
125
+ $$
126
+
127
+ where $\hat{\mathbf{w}} (\mathbf{x}) = (1 - \hat{\alpha} (\mathbf{x}))\hat{\mathbf{w}}_p(\mathbf{x}) + \hat{\alpha} (\mathbf{x})\hat{\mathbf{w}}_a(\mathbf{x})$ is the flow predicted by COMBO.
128
+
129
+ The total loss in Eq. (4) is composed of supervised losses on the final flow $\hat{\mathbf{w}}$ , the BC flow $\hat{\mathbf{w}}_p$ and the augmentation flow $\hat{\mathbf{w}}_a$ . In addition to the supervised loss on $\hat{\mathbf{w}}_p$ , we also use a photometric loss similarly to traditional and unsupervised methods. We use the L1 loss weighted by the certainty measure $(1 - \alpha^{*}(\mathbf{x}))$ :
130
+
131
+ $$
132
+ \mathcal {L} _ {\text {p h o t o}} (\mathcal {D}, \theta) = \sum_ {I _ {1}, I _ {2} \in \mathcal {D}} \sum_ {\mathbf {x}} (1 - \alpha^ {*} (\mathbf {x})) | I _ {1} (\mathbf {x}) - I _ {2} (\mathbf {x} + \hat {\mathbf {w}} _ {p}) | _ {1}. \tag {5}
133
+ $$
134
+
135
+ With the L1 loss, the physical branch of COMBO directly models the brightness conservation at the pixel level and the learned uncertainty captures the limitations of this hypothesis. Other photometric losses more robust to the brightness
136
+
137
+ constancy limitations could have been chosen, e.g. the Charbonnier [9], SSIM [24] or census loss [39], that would produce a different physical flow. Our augmentation framework can seamlessly adapt to the level of approximation of the BC model at each pixel. Note that the photometric loss is complementary with the supervised loss $\| \hat{\mathbf{w}}_p - \mathbf{w}_p^*\| _2^2$ : a small error on the predicted flow $\hat{\mathbf{w}}_p$ results in a small endpoint error (EPE) but can have a large photometric error if $\hat{\mathbf{w}}_p$ leads to a large photometric change in the target image.
138
+
139
+ Finally, we define the uncertainty loss as:
140
+
141
+ $$
142
+ \mathcal {L} _ {\alpha} \left(\mathcal {D} _ {s u p}, \theta\right) = \sum_ {I _ {1}, I _ {2} \in \mathcal {D} _ {s u p}} \sum_ {\mathbf {x}} \| \hat {\alpha} (\mathbf {x}) - \sigma \left(\mathcal {L} _ {B C} \left(\mathbf {x}, \mathbf {w} ^ {*}\right)\right) \| _ {2} ^ {2}. \tag {6}
143
+ $$
144
+
145
+ Curriculum learning for the BC uncertainty: In the COMBO decomposition $\hat{\mathbf{w}} (\mathbf{x}) = (1 - \hat{\alpha} (\mathbf{x}))\hat{\mathbf{w}}_p(\mathbf{x}) + \hat{\alpha} (\mathbf{x})\hat{\mathbf{w}}_a(\mathbf{x})$ , a bad estimate of the uncertainty $\alpha$ could be harmful for learning $\hat{\mathbf{w}}_p$ and $\hat{\mathbf{w}}_a$ . Therefore, similarly to the teacher forcing strategy in sequential models, we choose a scheduled sampling strategy [5] where we use the ground truth $\alpha^{*}$ with high probability at the beginning of learning, and decrease progressively this probability towards 0 to rely more and more on the prediction $\hat{\alpha}$ (see Algorithm 1).
146
+
147
+ Supervised learning: In the supervised learning setting, we only exploit the supervised set $\mathcal{D}_{sup}$ . We minimize the total loss in Eq. (4) by using the fine-grained supervision on $(\mathbf{w}_p^*, \mathbf{w}_a^*, \alpha^*)$ that we have created (see supplementary 3.1 for examples of tuples $(\mathbf{w}_p^*, \mathbf{w}_a^*, \alpha^*)$ for each dataset).
148
+
149
+ Semi-supervised learning: COMBO can be also favorably used in a semi-supervised training setting, which consists in exploiting the information of non-annotated images in $\mathcal{D}_{unsup}$ in addition to the annotated frames in $\mathcal{D}_{sup}$ . This is an important context in practice since labelling flow images is expensive at scale (in general $N_{unsup} \gg N_{sup}$ ). Leveraging unlabelled data directly on the target dataset is an appealing way for unsupervised domain adaptation.
150
+
151
+ When learning in semi-supervised mode (see Algorithm 1), we mix in a minibatch labelled image pairs from $\mathcal{D}_{sup}$ and unlabelled image pairs from $\mathcal{D}_{unsup}$ . For labelled images, we again minimize the supervised loss $\mathcal{L}$ defined in Eq. (4). For unlabelled frames, we refine the estimation of $\hat{\mathbf{w}}_p$ by exploiting the photometric loss on pixels that are likely to satisfy the BC constraint (measured by the uncertainty map $\alpha$ learned with ground-truth data). We only minimize in that case the photometric loss $\mathcal{L}_{photo}(\mathcal{D}_{unsup},\theta)$ , which corresponds to the particular case of Eq. (4) by setting $\lambda_{photo} = 1$ and $\lambda_p = \lambda_a = \lambda_{total} = \lambda_w = \lambda_\alpha = 0$ . Importantly, for unlabelled images, we block the gradient flow in the uncertainty branch $\alpha$ since $\alpha$ can only be estimated in supervised mode.
152
+
153
+ # 4 Experiments
154
+
155
+ We evaluate and compare COMBO to recent state-of-the-art models on the optical flow datasets FlyingChairs [13], MPI Sintel [10] and KITTI-2015 [14], in
156
+
157
+ Algorithm 1: COMBO optimization:
158
+ Parameters: $\lambda_{p},\lambda_{a},\lambda_{total},\lambda_{photo},\lambda_{w},\lambda_{\alpha}\geq 0,\tau >0$ for epoch $= 1:N_{\mathrm{epoch}}$ do for each batch $b = (b_{sup},b_{unsup})$ do If Rand(0,1) $< 1 -$ epoch/50 Then:# scheduled sampling $\hat{\mathbf{w}} (\mathbf{x}) = (1 - \alpha^{*}(\mathbf{x}))\hat{\mathbf{w}}_p(\mathbf{x}) + \alpha^* (\mathbf{x})\hat{\mathbf{w}}_a(\mathbf{x})$ Else: $\hat{\mathbf{w}} (\mathbf{x}) = (1 - \hat{\alpha} (\mathbf{x}))\hat{\mathbf{w}}_p(\mathbf{x}) + \hat{\alpha} (\mathbf{x})\hat{\mathbf{w}}_a(\mathbf{x})$ Compute $\mathcal{L}_{sup} = \mathcal{L}(b_{sup},\theta ,\lambda_{sup},\lambda_{photo},\lambda_w,\lambda_\alpha)$ with Eq.4 Compute $\mathcal{L}_{unsup} = \mathcal{L}_{photo}(b_{unsup},\theta)$ $\theta_{j + 1} = \theta_j - \tau \nabla (\mathcal{L}_{sup} + \mathcal{L}_{unsup})$
159
+
160
+ the supervised and semi-supervised contexts. For model analysis, we perform a train/test resplit of the Sintel and KITTI training datasets, as done by [30]. Our code is available at https://github.com/vincent-leguen/COMBO.
161
+
162
+ # 4.1 Experimental setup
163
+
164
+ We adopt for the backbone encoder and flow network the RAFT architecture [53], which is one of the current state-of-the-art methods for supervised optical flow. The encoder is composed of convolutional layers that extract features from images $I_{t-1}$ and $I_t$ at resolution $1/8$ . Then visual similarity is modelled by constructing a 4D correlation volume that computes matching costs for all possible displacements. The optical flow branch is a gated recurrent unit (GRU) that progressively refines the flow from an initial estimate, with lookups on the correlation volume. The final flow is the sum of residual refinements from the GRU, upsampled at full resolution.
165
+
166
+ In the COMBO model, the encoder and correlation volume are shared, and each branch has its own GRU initialized from zero. The uncertainty branch
167
+
168
+ <table><tr><td rowspan="2">Stage</td><td rowspan="2">Method</td><td rowspan="2">Chairs</td><td colspan="2">Sintel-test-resplit</td><td colspan="2">KITTI-test-resplit</td></tr><tr><td>Clean</td><td>Final</td><td>Fl-epe</td><td>Fl-all</td></tr><tr><td>C</td><td>RAFT</td><td>0.82</td><td>1.11</td><td>1.76</td><td>10.7</td><td>39.7</td></tr><tr><td>C</td><td>COMBO</td><td>0.74</td><td>1.04</td><td>1.58</td><td>10.2</td><td>39.3</td></tr><tr><td>C+T</td><td>RAFT</td><td>1.15</td><td>0.82</td><td>1.17</td><td>5.67</td><td>17.9</td></tr><tr><td>C+T</td><td>COMBO</td><td>1.09</td><td>0.77</td><td>0.96</td><td>5.46</td><td>17.3</td></tr><tr><td>C+T+</td><td>RAFT</td><td>1.23</td><td>0.57</td><td>0.76</td><td>1.79</td><td>7.12</td></tr><tr><td>S+H+K</td><td>COMBO</td><td>1.16</td><td>0.56</td><td>0.71</td><td>1.75</td><td>6.58</td></tr></table>
169
+
170
+ Table 1: Performances of COMBO compared to the RAFT model (run with online code). COMBO consistently outperforms RAFT on the three training stages, illustrating the relevance of leveraging the BC physical model and complementing its failure cases.
171
+
172
+ <table><tr><td rowspan="2">Stage</td><td rowspan="2">Method</td><td rowspan="2">Chairs</td><td colspan="2">Sintel (train)</td><td colspan="2">KITTI-15 (train)</td></tr><tr><td>Clean</td><td>Final</td><td>Fl-epe</td><td>Fl-all</td></tr><tr><td>C</td><td>RAFT [53]</td><td>0.82</td><td>2.26</td><td>4.52</td><td>10.67</td><td>39.72</td></tr><tr><td>C</td><td>GMA [23]</td><td>0.79</td><td>2.32</td><td>4.10</td><td>10.32</td><td>36.91</td></tr><tr><td>C</td><td>COMBO</td><td>0.74</td><td>2.19</td><td>4.37</td><td>10.19</td><td>39.02</td></tr><tr><td>C+T</td><td>LiteFlowNet [20]</td><td>-</td><td>2.48</td><td>4.04</td><td>10.39</td><td>28.5</td></tr><tr><td>C+T</td><td>PWC-Net [51]</td><td>-</td><td>2.55</td><td>3.93</td><td>10.35</td><td>33.7</td></tr><tr><td>C+T</td><td>VCN [61]</td><td>-</td><td>2.21</td><td>3.68</td><td>8.36</td><td>25.1</td></tr><tr><td>C+T</td><td>MaskFlowNet [63]</td><td>-</td><td>2.25</td><td>3.61</td><td>-</td><td>23.1</td></tr><tr><td>C+T</td><td>RAFT [53]</td><td>1.15</td><td>1.43</td><td>2.71</td><td>5.01</td><td>17.5</td></tr><tr><td>C+T</td><td>GMA [23]</td><td>1.19</td><td>1.31</td><td>2.73</td><td>4.69</td><td>17.1</td></tr><tr><td>C+T</td><td>COMBO</td><td>1.09</td><td>1.31</td><td>2.58</td><td>4.69</td><td>16.5</td></tr></table>
173
+
174
+ Table 2: State-of-the-art performance comparison on FlyingChairs, Sinteltrain and KITTI-train, when learning on FlyingChairs (C) and FlyingChairs+FlyingThings (C+T). Scores are reported from corresponding papers.
175
+
176
+ is simply adapted to provide a unique output channel. We give details on the network architectures and hyperparameters in supplementary 2. The code of COMBO will be released if accepted. Note that our method is agnostic to the optical flow backbone. Any other deep architecture than RAFT could be used for computing the physical, augmentation flow and the uncertainty map.
177
+
178
+ # 4.2 Supervised state-of-the-art comparison
179
+
180
+ Following the supervised learning curriculum of prior works [63, 52, 53, 23], we pretrain our models successively on the synthetic datasets FlyingChairs [13] and FlyingThings3D [37]. We then finetune on Sintel [10] by combining data from Sintel, KITTI-2015 and HD1K [25]. We finally finetune on KITTI-2015 with only data from KITTI.
181
+
182
+ In Table 1, we compare the endpoint error (EPE) of COMBO with RAFT [53], by running the code from the authors. Since we rely on a RAFT architecture, the results in Table 1 directly evaluate the impact of the proposed augmented model and learning scheme. We see that COMBO consistently outperforms RAFT on FlyingChairs, Sintel-test-resplit and KITTI-test-resplit from all stages of the curriculum. This confirms the relevance of leveraging the BC constraint for regularizing supervised models, and the use of the augmentation for compensating its violations.
183
+
184
+ In Table 2, we compare COMBO to competitive supervised optical flow baselines, from the stages FlyingChairs (C) and FlyingChairs+FlyingThings $(\mathrm{C} + \mathrm{T})$ When generalizing to Sintel-train and KITTI-train, COMBO outperforms RAFT [53] in all cases, and is superior or equivalent to the recent GMA model [23] in $6 / 8$ cases. Note also that COMBO outperforms all other methods on FlyingChairs.
185
+
186
+ <table><tr><td>model</td><td>mode</td><td>checkpoint</td><td colspan="2">KITTI (test-resplit)</td></tr><tr><td></td><td></td><td></td><td>F1-epe</td><td>F1-all</td></tr><tr><td>RAFT [53]</td><td>sup</td><td>C</td><td>2.28</td><td>7.60</td></tr><tr><td>COMBO</td><td>sup</td><td>C</td><td>2.19</td><td>7.30</td></tr><tr><td>COMBO</td><td>semisup</td><td>C</td><td>1.75</td><td>6.88</td></tr><tr><td>RAFT [53]</td><td>sup</td><td>S</td><td>1.79</td><td>7.12</td></tr><tr><td>COMBO</td><td>sup</td><td>S</td><td>1.75</td><td>6.58</td></tr><tr><td>COMBO</td><td>semisup</td><td>S</td><td>1.74</td><td>6.58</td></tr></table>
187
+
188
+ Table 3: Comparison with RAFT on KITTI-test-resplit from the FlyingChairs (C) and Sintel (S) checkpoints, with supervised and semisup training on KITTI. We see that COMBO in semisup from Chairs is almost equivalent to COMBO from Sintel, showing that the training curriculum can be drastically reduced.
189
+
190
+ # 4.3 Semi-supervised results
191
+
192
+ We analyze the performances of COMBO in a semi-supervised learning setting in Table 3. We evaluate the different models on KITTI test-resplit, using for training the annotated images of KITTI train-resplit (sup) and the additional unlabelled images of KITTI (semisup). When training on KITTI from the earliest stage of the curriculum (FlyingChairs), we can see that COMBO-semisup (Fl-epe=1.75) largely improves over RAFT-sup (2.28) and COMBO-sup (2.19). It confirms that leveraging the vast amount of unlabelled frames is crucial for adapting the model to a target dataset from an early checkpoint. Interestingly, the semisup training from Chairs is almost equivalent to the COMBO model trained from the Sintel checkpoint (1.74). It shows that COMBO trained in a semisup context enables to greatly simplify the training curriculum to reach similar performances. This feature of COMBO is of crucial interest in many domains for transferring models to target datasets from a single synthetic training stage.
193
+
194
+ To further analyze the semi-supervised learning ability of COMBO, we progressively reduce the number of training images on KITTI-resplit and compare the performances of RAFT and COMBOsemisup trained from the FlyingChairs checkpoint. In Figure 3, we observe that RAFT degrades much more sharply than COMBO with fewer training images, and the difference in EPE becomes very large with $10\%$ of training images (EPE=11.6 for RAFT v.s. 4.4 for COMBO). It highlights the crucial ability of COMBO to leverage the BC assumption on unlabeled frames.
195
+
196
+ ![](images/c7809a494454ea9057badfa532e3f6f878d201e7a2a54c7a241add9ed8f34e8f.jpg)
197
+ Fig.3: Performances on KITTI-resplit trained from the Chairs, w.r.t. the number of labelled frames.
198
+
199
+ ![](images/7111bfe86b1426bd0009d51fc70d0a3294f2421e6b7817fc1acc0acf968c85df.jpg)
200
+
201
+ ![](images/b840f816f3d24a625cde79ba700b092a87f4176fb113bbaa271830643f13b8c1.jpg)
202
+
203
+ ![](images/d034562545592014f55daedb2849d3bad712c078d9c9f39efa39436c4bfa349c.jpg)
204
+ Fig. 4: Qualitative prediction results on MPI Sintel. We observe that in zones of high uncertainty of the BC, the physical flow $\hat{\mathbf{w}}_p$ is ill-defined; the augmentation flow $\hat{\mathbf{w}}_a$ successfully complements it for accurate flow estimation. We also show that the uncertainty learned by COMBO is consistent with the GT BC uncertainty, and that it detects other cases of violation of the BC different from occlusions.
205
+
206
+ ![](images/a082fdf0404853b28bd5e2960af7a16120638ab9206b102829a1bac1aa301717.jpg)
207
+
208
+ ![](images/57434b5e657f1aeafc3bfab2ca3a99b5b6e3c1e63c686df749478f68fa5eb6e2.jpg)
209
+
210
+ ![](images/5e855c02b30a5c84c6658711df12f55a694df6c62c679dcef5161d061de73d85.jpg)
211
+
212
+ ![](images/e9731076ec713d5fbfc2a954b5f5a900a8991ce897500c559dbc55780e0c1c1e.jpg)
213
+
214
+ ![](images/ca84a8c6fa4dc6eaa2d9991ba0abd98f757e8909633bb46b6197d6078af9ac7e.jpg)
215
+
216
+ ![](images/bdc353951ea35090a8e845b964ee3bdc53b44b9cbf04e1363accbc5bee16e59a.jpg)
217
+
218
+ ![](images/a9a50ba816b24c78351c80d6d54e1e3a6db1795edbe9e843aad82d7439729beb.jpg)
219
+
220
+ ![](images/37be9149e634f1d065cefd2cc95ba624b9742366c228cb8d7835e13b29ea9983.jpg)
221
+
222
+ ![](images/db34488164b394c55bf283449fe7553422aa9ce38921252127b8f33979baac3b.jpg)
223
+
224
+ ![](images/04a10240124702a4cbbca0b6fb9905f8277fd99ee3c0cdf3cfeaced7f1f1e9c8.jpg)
225
+
226
+ ![](images/8e57386b437b3182e5c420357a5ea042a6e1930df1d5babc72f527e90d94e62c.jpg)
227
+
228
+ ![](images/5cafb7c44e370c296411941ebcaba4224c3aaf87f00d57bdf8ab0abc24eae278.jpg)
229
+
230
+ ![](images/576cbebb1d83cafe2dbe60ca6a8b61bec730e215e3003af3b06fb59776eb89e8.jpg)
231
+
232
+ ![](images/d4ff4ab69034cbed5b6e133d46157db620f5c696bceed55000aa97cb0a71424d.jpg)
233
+ COMBO $w_{p}$
234
+ Fig. 5: Qualitative prediction results on KITTI 2015. We see that at the bottom of the image where the road becomes occluded, the physical flow $\hat{\mathbf{w}}_p$ is ill-defined and is complements by $\hat{\mathbf{w}}_a$ for accurate prediction.
235
+
236
+ ![](images/8ea4082df679a5ce850dba67d6d2775a566027ea1bf479c6834e0933a4815c0a.jpg)
237
+ COMBO $W_{a}$
238
+
239
+ ![](images/c7ce0a8a4a850b287a805a0aafe27af15c623af1661c74388d150c363b119c0b.jpg)
240
+ COMBO EPE=45.266
241
+
242
+ ![](images/59f0810555e5e9a03c72a33b320707c0f6a2cf750d7c44ac7cc4d50494624038.jpg)
243
+ COMBO uncertainty
244
+
245
+ ![](images/f718d0d12563098672e4e0ed36ae954c4cc134e5b01757dbfd4a81405c55d773.jpg)
246
+
247
+ ![](images/41da600f24e4070e73fe5c5f01bc6adc751cb6e7a0bb1b764beab1c0f3a12064.jpg)
248
+
249
+ ![](images/72374c3a54193be7f81326ea505a08cc9b2c82fcf38b0ff142b805d49f750cb8.jpg)
250
+ Fig. 6: Failure cases of the brightness constancy detected by COMBO different from occlusions. The last column corresponds to image 1 masked by the map of thresholded uncertainty $\hat{\alpha}$ deprived of the ground-truth occlusions. From top to bottom, COMBO captures: illumination change, motion blur and fog.
251
+
252
+ ![](images/190ee906e0eb9b51e88bfd33c32970b1a196205529c07b022f210348fe78012d.jpg)
253
+ image2
254
+
255
+ ![](images/489755ef3616ade2c988b2f0b0a2464e97d7a6266615d39acc274d6e3813ae11.jpg)
256
+
257
+ ![](images/778c2e57efd67a9fb76b4a8da585704a36f31c657db6e826eba18c0753a50f98.jpg)
258
+
259
+ ![](images/983200f726d8ae4b88fcef9cdcd5435c88e274f0e4938e49ca7c130994e99579.jpg)
260
+ GT flow
261
+
262
+ ![](images/fc6193550ab0ccaa177c20e6a17f65a0deb75dd8d4d18c70e70907f40a242bd6.jpg)
263
+
264
+ ![](images/14dce582a54b05005cb596310501a201b5b0163240dc09964ba4ad87fe8ea2b1.jpg)
265
+
266
+ ![](images/100d49f9b80387488b37cffdeff4dd377679014bb535d07514271a17849a9d38.jpg)
267
+ Illumination changes
268
+ motion blur
269
+
270
+ ![](images/bbfe431de8ef2abf2e7021a6dcf5ab25cfd923b362a505d1be2a0525cb742c20.jpg)
271
+ fog
272
+
273
+ ![](images/dd0395e50dbc818db19b6f4cb885ccc18d882474b06aef002f120fe6de4598a5.jpg)
274
+
275
+ # 4.4 Ablation study
276
+
277
+ We perform in Table 4 an ablation study on FlyingChairs to analyze the behaviour of the COMBO model. We first show that two RAFT branches trained with different seeds and mixed 50:50 improve over RAFT but is largely inferior to COMBO, show that the performances of COMBO do not simply come from an augmentation of the parameters or an ensembling effect. Then, we see that a single RAFT branch with the photometric loss $\mathcal{L}_{photo}$ in Eq. (5) (epe=0.794) is far inferior to COMBO (0.743). This is because the BC regularization helps in improving generalization in regions where the BC assumption is fulfilled, but is detrimental in regions where the BC assumption does not hold. In contrast, COMBO can leverage the BC assumption and complement it in an adaptive manner when it is violated, overcoming the conflict issues between the two terms.
278
+
279
+ Moreover, the linear decomposition $\hat{\mathbf{w}} = \hat{\mathbf{w}}_p + \hat{\mathbf{w}}_a$ without the uncertainty branch, i.e. we set $\alpha (\mathbf{x}) = 1 / 2$ everywhere, is clearly inferior to COMBO. It shows the crucial necessity to account for the uncertainty of the BC. Finally, when we remove the minimization of $\| (\hat{\mathbf{w}}_a,\hat{\mathbf{w}}_p)\|$ from COMBO (then the decomposition is not unique anymore), the performances also decrease, highlighting the superiority of the well-posed and unique decomposition of COMBO.
280
+
281
+ We then report in Table 5 the performances of the individual $\hat{\mathbf{w}}_p$ (resp. $\hat{\mathbf{w}}_a$ ) branches weighted by the certainty of the BC (resp. uncertainty). For example, we compute $EPE_{weighted}(\hat{\mathbf{w}}_p,\mathbf{w}^*) = \sum_{\mathbf{x}}(1 - \alpha^*(\mathbf{x}))\|\hat{\mathbf{w}}_p(\mathbf{x}) - \mathbf{w}^*(\mathbf{x})\|_2$ . We see that both $\hat{\mathbf{w}}_p$ and $\hat{\mathbf{w}}_a$ are superior to RAFT on areas where they apply. In particular the performance gap compared to RAFT widens on areas with high BC uncertainty (EPE= 2.20 v.s. 0.52), showing the benefits of the COMBO decomposition to greatly improve the estimation on challenging zones.
282
+
283
+ <table><tr><td>Method</td><td>EPE (FlyingChairs)</td></tr><tr><td>RAFT [53]</td><td>0.818</td></tr><tr><td>2 RAFT branches mixed equally</td><td>0.800</td></tr><tr><td>RAFT + BC photometric loss</td><td>0.794</td></tr><tr><td>COMBO帽子p+hatw(a) (no weighting by uncertainty)</td><td>0.769</td></tr><tr><td>COMBO without min ||(hatw,a,hatw)p||</td><td>0.752</td></tr><tr><td>COMBO</td><td>0.743</td></tr></table>
284
+
285
+ Table 4: Ablation study on FlyingChairs, showing the benefits of the meaningful and principled decomposition of COMBO, compared to the backbone RAFT.
286
+
287
+ # 4.5 COMBO analysis
288
+
289
+ We provide qualitative flow predictions of the COMBO model for Sintel-test-resplit in Figure 4 and KITTI-test-resplit in Figure 5. In uncertain zones ( $\hat{\alpha} \approx 1$ , for example in the occluded region of the bird in Figure 4 or at the bottom of Figure 5), we can see that $\hat{\mathbf{w}}_p$ gives incoherent results, as expected. In that case, the flow is efficiently complemented by $\hat{\mathbf{w}}_a$ to produce the COMBO flow.
290
+
291
+ <table><tr><td>Method</td><td>EPE weighted (FlyingChairs)</td></tr><tr><td>RAFT on BC certain zones</td><td>0.48</td></tr><tr><td>COMBO帽子p on certain zones</td><td>0.30</td></tr><tr><td>RAFT on BC uncertain zones</td><td>2.29</td></tr><tr><td>COMBO帽子a on uncertain zones</td><td>0.52</td></tr></table>
292
+
293
+ Table 5: Performances of the individual BC $\hat{\mathbf{w}}_p$ and residual $\hat{\mathbf{w}}_a$ flow branches on areas with high BC confidence (resp. high BC uncertainty).
294
+
295
+ Occlusion detection: To analyze the ability of COMBO to detect occlusions, we represent in supplementary 3.2 the precision-recall curve of the COMBO uncertainty detector with respect to the ground-truth occlusion masks (which are known for Sintel). COMBO obtains an Average Precision (AP) of $59\%$ , which is a lower bound of the true AP of COMBO for occlusions (since COMBO also captures other failure cases than occlusions). This means that COMBO is able to efficiently detect occlusions without any ground-truth occlusion supervision, compared to the random classifier which reaches $7\%$ (ratio of occluded pixels).
296
+
297
+ Detection of other failure cases of the BC: In the third line of Figure 4, we show the ground-truth (GT) BC uncertainty mask (defined as $\mathcal{L}_{BC} > \epsilon$ , $\epsilon = 0.01$ in Figure 4) and the ground-truth occlusions of Sintel. We observe that the COMBO uncertainty globally aligns with the GT BC uncertainty, and covers a larger area than the GT occlusions. To investigate this, we display the thresholded uncertainty mask $\alpha$ deprived of the GT occlusions: it shows that COMBO can capture other failure cases of the BC different than occlusions. Applying this mask on image 1 (bottom right of Figure 4) shows that this corresponds to illumination changes for this example.
298
+
299
+ We further analyze the other failure cases of the BC in Figure 6. We can see that COMBO can detect other cases of violation of the BC, without any supervision masks on these cases. The top row of Figure 6 shows that the uncertainty $\alpha$ detects the illumination change on the arm of the woman. On the middle row, the uncertainty concentrates on the woman running, which causes motion blur. The bottom row shows a BC uncertainty on a large part of the image, caused by the presence of fog. We provide additional visualizations in supplementary 3.4.
300
+
301
+ # 5 Conclusion
302
+
303
+ We have introduced COMBO, a new physically-constrained architecture for optical flow estimation that explicitly exploits the simplified brightness constancy constraint. COMBO learns the uncertainty of the BC and how to complement it with a data-driven network. COMBO reaches state-of-the-art results on several benchmarks, and is able to greatly simplify the training curriculum with a semi-supervised learning scheme. An appealing perspective would be to investigate the application of augmented physical models to multi-frame optical flow estimation.
304
+
305
+ # References
306
+
307
+ 1. Agustsson, E., Minnen, D., Johnston, N., Balle, J., Hwang, S.J., Toderici, G.: Scale-space flow for end-to-end optimized video compression. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 8503-8512 (2020)
308
+ 2. Alvarez, L., Deriche, R., Papadopoulos, T., Sánchez, J.: Symmetrical dense optical flow estimation with occlusions detection. International Journal of Computer Vision 75(3), 371-385 (2007)
309
+ 3. Bailer, C., Varanasi, K., Stricker, D.: Cnn-based patch matching for optical flow with thresholded hinge embedding loss. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. pp. 3250-3259 (2017)
310
+ 4. Balakrishnan, G., Zhao, A., Sabuncu, M.R., Guttag, J., Dalca, A.V.: An unsupervised learning model for deformable medical image registration. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 9252-9260 (2018)
311
+ 5. Bengio, S., Vinyals, O., Jaitly, N., Shazeer, N.: Scheduled sampling for sequence prediction with recurrent neural networks. Advances in neural information processing systems 28 (2015)
312
+ 6. de Bezenac, E., Pajot, A., Gallinari, P.: Deep learning for physical processes: Incorporating prior scientific knowledge. ICLR (2018)
313
+ 7. Brox, T., Bruhn, A., Papenberg, N., Weickert, J.: High accuracy optical flow estimation based on a theory for warping. In: European conference on computer vision. pp. 25-36. Springer (2004)
314
+ 8. Brox, T., Malik, J.: Large displacement optical flow: descriptor matching in variational motion estimation. IEEE transactions on pattern analysis and machine intelligence 33(3), 500-513 (2010)
315
+ 9. Bruhn, A., Weickert, J., Schnörr, C.: Lucas/kanade meets horn/schunck: Combining local and global optic flow methods. International journal of computer vision 61(3), 211-231 (2005)
316
+ 0. Butler, D.J., Wulff, J., Stanley, G.B., Black, M.J.: A naturalistic open source movie for optical flow evaluation. In: European conference on computer vision. pp. 611-625. Springer (2012)
317
+ 1. Corpetti, T., Mémin, É., Pérez, P.: Dense estimation of fluid flows. IEEE Transactions on pattern analysis and machine intelligence 24(3), 365-380 (2002)
318
+ 2. Daw, A., Thomas, R.Q., Carey, C.C., Read, J.S., Appling, A.P., Karpatne, A.: Physics-guided architecture (pga) of neural networks for quantifying uncertainty in lake temperature modeling. In: Proceedings of the 2020 siam international conference on data mining. pp. 532-540. SIAM (2020)
319
+ 3. Dosovitskiy, A., Fischer, P., Ilg, E., Hausser, P., Hazirbas, C., Golkov, V., Van Der Smagt, P., Cremers, D., Brox, T.: Flownet: Learning optical flow with convolutional networks. In: Proceedings of the IEEE international conference on computer vision (ICCV). pp. 2758-2766 (2015)
320
+ 4. Geiger, A., Lenz, P., Stiller, C., Urtasun, R.: Vision meets robotics: The kitti dataset. The International Journal of Robotics Research 32(11), 1231-1237 (2013)
321
+ 5. Godet, P., Boulch, A., Plyer, A., Le Besnerais, G.: Starflow: A spatiotemporal recurrent cell for lightweight multi-frame optical flow estimation. In: 2020 25th International Conference on Pattern Recognition (ICPR). pp. 2462-2469. IEEE (2021)
322
+
323
+ 16. Greydanus, S., Dzamba, M., Yosinski, J.: Hamiltonian neural networks. In: Advances in Neural Information Processing Systems (NeurIPS). pp. 15353-15363 (2019)
324
+ 17. Horn, B.K., Schunck, B.G.: Determining optical flow. Artificial intelligence 17(1-3), 185-203 (1981)
325
+ 18. Hui, T.W., Tang, X., Loy, C.C.: Liteflownet: A lightweight convolutional neural network for optical flow estimation. In: Proceedings of the IEEE conference on computer vision and pattern recognition (CVPR). pp. 8981-8989 (2018)
326
+ 19. Hur, J., Roth, S.: Iterative residual refinement for joint optical flow and occlusion estimation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 5754-5763 (2019)
327
+ 20. Ilg, E., Mayer, N., Saikia, T., Keuper, M., Dosovitskiy, A., Brox, T.: Flownet 2.0: Evolution of optical flow estimation with deep networks. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 2462-2470 (2017)
328
+ 21. Janai, J., Guney, F., Ranjan, A., Black, M., Geiger, A.: Unsupervised learning of multi-frame optical flow with occlusions. In: Proceedings of the European Conference on Computer Vision (ECCV). pp. 690-706 (2018)
329
+ 22. Jason, J.Y., Harley, A.W., Derpanis, K.G.: Back to basics: Unsupervised learning of optical flow via brightness constancy and motion smoothness. In: European Conference on Computer Vision. pp. 3-10. Springer (2016)
330
+ 23. Jiang, S., Campbell, D., Lu, Y., Li, H., Hartley, R.: Learning to estimate hidden motions with global motion aggregation. CVPR (2021)
331
+ 24. Jonschkowski, R., Stone, A., Barron, J.T., Gordon, A., Konolige, K., Angelova, A.: What matters in unsupervised optical flow. In: Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part II 16. pp. 557-572. Springer (2020)
332
+ 25. Kondermann, D., Nair, R., Honauer, K., Krispin, K., Andrusis, J., Brock, A., Gussefeld, B., Rahimimoghaddam, M., Hofmann, S., Brenner, C., 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. pp. 19-28 (2016)
333
+ 26. Lai, W.S., Huang, J.B., Yang, M.H.: Semi-supervised learning for optical flow with generative adversarial networks. In: Proceedings of the 31st International Conference on Neural Information Processing Systems. pp. 353-363 (2017)
334
+ 27. Le Guen, V., Thome, N.: Disentangling physical dynamics from unknown factors for unsupervised video prediction. In: CVPR (2020)
335
+ 28. Li, Z., Kovachki, N., Azizzadenesheli, K., Liu, B., Bhattacharya, K., Stuart, A., Anandkumar, A.: Fourier neural operator for parametric partial differential equations. arXiv preprint arXiv:2010.08895 (2020)
336
+ 29. Linial, O., Eytan, D., Shalit, U.: Generative ODE modeling with known unknowns. ICLR 2020 Deep Differential Equations Workshop (2020)
337
+ 30. Liu, L., Zhang, J., He, R., Liu, Y., Wang, Y., Tai, Y., Luo, D., Wang, C., Li, J., Huang, F.: Learning by analogy: Reliable supervision from transformations for unsupervised optical flow estimation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 6489-6498 (2020)
338
+ 31. Liu, P., King, I., Lyu, M.R., Xu, J.: Ddflow: Learning optical flow with unlabeled data distillation. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 33, pp. 8770-8777 (2019)
339
+
340
+ 32. Liu, P., Lyu, M., King, I., Xu, J.: Selfflow: Self-supervised learning of optical flow. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 4571-4580 (2019)
341
+ 33. Long, Y., She, X., Mukhopadhyay, S.: Hybridnet: integrating model-based and data-driven learning to predict evolution of dynamical systems. Conference on Robot Learning (CoRL) (2018)
342
+ 34. Lu, L., Jin, P., Karniadakis, G.E.: Deeponet: Learning nonlinear operators for identifying differential equations based on the universal approximation theorem of operators. arXiv preprint arXiv:1910.03193 (2019)
343
+ 35. Lucas, B.D., Kanade, T., et al.: An iterative image registration technique with an application to stereo vision. Vancouver, British Columbia (1981)
344
+ 36. Lutter, M., Ritter, C., Peters, J.: Deep lagrangian networks: Using physics as model prior for deep learning. arXiv preprint arXiv:1907.04490 (2019)
345
+ 37. Mayer, N., Ilg, E., Hausser, P., Fischer, P., Cremers, D., Dosovitskiy, A., Brox, T.: 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. pp. 4040-4048 (2016)
346
+ 38. Mehta, V., Char, I., Neiswanger, W., Chung, Y., Schneider, J.: Neural dynamical systems. ICLR 2020 Deep Differential Equations Workshop (2020)
347
+ 39. Meister, S., Hur, J., Roth, S.: Unflow: Unsupervised learning of optical flow with a bidirectional census loss. In: Thirty-Second AAAI Conference on Artificial Intelligence (2018)
348
+ 40. Mémin, E., Pérez, P.: Dense estimation and object-based segmentation of the optical flow with robust techniques. IEEE Transactions on Image Processing 7(5), 703-719 (1998)
349
+ 41. Mohan, A.T., Lubbers, N., Livescu, D., Chertkov, M.: Embedding hard physical constraints in neural network coarse-graining of 3d turbulence. arXiv preprint arXiv:2002.00021 (2020)
350
+ 42. Psichogios, D.C., Ungar, L.H.: A hybrid neural network-first principles approach to process modeling. AIChE Journal 38(10), 1499-1511 (1992)
351
+ 43. Raissi, M.: Deep hidden physics models: Deep learning of nonlinear partial differential equations. The Journal of Machine Learning Research 19(1), 932-955 (2018)
352
+ 44. Ranjan, A., Black, M.J.: Optical flow estimation using a spatial pyramid network. In: Proceedings of the IEEE conference on computer vision and pattern recognition (CVPR). pp. 4161-4170 (2017)
353
+ 45. Ren, Z., Yan, J., Ni, B., Liu, B., Yang, X., Zha, H.: Unsupervised deep learning for optical flow estimation. In: Thirty-First AAAI Conference on Artificial Intelligence (2017)
354
+ 46. Rico-Martinez, R., Anderson, J., Kevrekidis, I.: Continuous-time nonlinear signal processing: a neural network based approach for gray box identification. In: Proceedings of IEEE Workshop on Neural Networks for Signal Processing. pp. 596-605. IEEE (1994)
355
+ 47. Saha, P., Dash, S., Mukhopadhyay, S.: PHICNet: Physics-incorporated convolutional recurrent neural networks for modeling dynamical systems. arXiv preprint arXiv:2004.06243 (2020)
356
+ 48. Sirignano, J., Spiliopoulos, K.: Dgm: A deep learning algorithm for solving partial differential equations. Journal of computational physics 375, 1339-1364 (2018)
357
+ 49. Stone, A., Maurer, D., Ayvaci, A., Angelova, A., Jonschkowski, R.: Smurf: Self-teaching multi-frame unsupervised raft with full-image warping. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 3887-3896 (2021)
358
+
359
+ 50. Sun, D., Vlasic, D., Herrmann, C., Jampani, V., Krainin, M., Chang, H., Zabih, R., Freeman, W.T., Liu, C.: Autoflow: Learning a better training set for optical flow. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 10093-10102 (2021)
360
+ 51. Sun, D., Yang, X., Liu, M.Y., Kautz, J.: Pwc-net: Cnns for optical flow using pyramid, warping, and cost volume. In: Proceedings of the IEEE conference on computer vision and pattern recognition (CVPR). pp. 8934-8943 (2018)
361
+ 52. Sun, D., Yang, X., Liu, M.Y., Kautz, J.: Models matter, so does training: An empirical study of cnns for optical flow estimation. IEEE transactions on pattern analysis and machine intelligence 42(6), 1408-1423 (2019)
362
+ 53. Teed, Z., Deng, J.: RAFT: recurrent all-pairs field transforms for optical flow. In: European Conference on Computer Vision (ECCV) (2020)
363
+ 54. Thompson, M.L., Kramer, M.A.: Modeling chemical processes using prior knowledge and neural networks. AIChE Journal 40(8), 1328-1340 (1994)
364
+ 55. Wang, Q., Li, F., Tang, Y., Xu, Y.: Integrating model-driven and data-driven methods for power system frequency stability assessment and control. IEEE Transactions on Power Systems 34(6), 4557-4568 (2019)
365
+ 56. Wang, S., Wang, H., Perdikaris, P.: Learning the solution operator of parametric partial differential equations with physics-informed deeponets. arXiv preprint arXiv:2103.10974 (2021)
366
+ 57. Wang, Y., Yang, Y., Yang, Z., Zhao, L., Wang, P., Xu, W.: Occlusion aware unsupervised learning of optical flow. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. pp. 4884-4893 (2018)
367
+ 58. Wedel, A., Cremers, D., Pock, T., Bischof, H.: Structure-and motion-adaptive regularization for high accuracy optic flow. In: 2009 IEEE 12th International Conference on Computer Vision. pp. 1663-1668. IEEE (2009)
368
+ 59. Xu, J., Ranftl, R., Koltun, V.: Accurate optical flow via direct cost volume processing. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. pp. 1289-1297 (2017)
369
+ 60. Yan, W., Sharma, A., Tan, R.T.: Optical flow in dense foggy scenes using semi-supervised learning. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 13259-13268 (2020)
370
+ 61. Yang, G., Ramanan, D.: Volumetric correspondence networks for optical flow. Advances in neural information processing systems 32, 794-805 (2019)
371
+ 62. Yin, Y., Le Guen, V., Dona, J., Ayed, I., de Bezenac, E., Thome, N., Gallinari, P.: Augmenting physical models with deep networks for complex dynamics forecasting. In: Ninth International Conference on Learning Representations ICLR 2021 (2021)
372
+ 63. Zhao, S., Sheng, Y., Dong, Y., Chang, E.I., Xu, Y., et al.: Maskflownet: Asymmetric feature matching with learnable occlusion mask. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 6278-6287 (2020)
complementingbrightnessconstancywithdeepnetworksforopticalflowprediction/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d17e1746100610b0af1fbea89a74e046675e86a02e3427ad1f44ace36e1122d6
3
+ size 464145
complementingbrightnessconstancywithdeepnetworksforopticalflowprediction/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e97b91074191ff3f884a933980fd0c61804f1fef5d3649f9005b8531f2199035
3
+ size 547474
completelyselfsupervisedcrowdcountingviadistributionmatching/19c72cef-4d5f-4ad1-83af-c52baa8e74df_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:164e1b3268e8f31ffd586dd7cf2c8808a4a0a8749ce6c44893ac95960ba8a2ce
3
+ size 77219
completelyselfsupervisedcrowdcountingviadistributionmatching/19c72cef-4d5f-4ad1-83af-c52baa8e74df_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb27c1748f6bb16d3bed95da2d3b246abdcd82b56d2fdc01c69b63fb27387574
3
+ size 99097
completelyselfsupervisedcrowdcountingviadistributionmatching/19c72cef-4d5f-4ad1-83af-c52baa8e74df_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98d7d9e706cbcff45dd6079a00a46d14d95212b27654805e1aedfdea1bc0e5a0
3
+ size 2766287
completelyselfsupervisedcrowdcountingviadistributionmatching/full.md ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Completely Self-Supervised Crowd Counting via Distribution Matching
2
+
3
+ Deepak Babu Sam\*, Abhinav Agarwalla\*, Jimmy Joseph, Vishwanath A. Sindagi, R. Venkatesh Babu, and Vishal M. Patel
4
+
5
+ $^{1}$ Indian Institute of Science, Bangalore 560012, India
6
+ $^{2}$ Johns Hopkins University, Baltimore MD 21218, USA
7
+ {deepaksam,venky}@iisc.ac.in, {agarwallaabhinav,jimmyj005}@gmail.com, {vishwanathsindagi,vpatel36}@jhu.edu
8
+
9
+ Abstract. Dense crowd counting is a challenging task that demands millions of head annotations for training models. Though existing self-supervised approaches could learn good representations, they require some labeled data to map these features to the end task of density estimation. We mitigate this issue with the proposed paradigm of complete self-supervision, which does not need even a single labeled image. The only input required to train, apart from a large set of unlabeled crowd images, is the approximate upper limit of the crowd count for the given dataset. Our method dwells on the idea that natural crowds follow a power law distribution, which could be leveraged to yield error signals for backpropagation. A density regressor is first pretrained with self-supervision and then the distribution of predictions is matched to the prior. Experiments show that this results in effective learning of crowd features and delivers significant counting performance.
10
+
11
+ Keywords: Self-supervision, unsupervised learning, crowd counting
12
+
13
+ # 1 Introduction
14
+
15
+ The ability to estimate head counts of dense crowds effectively and efficiently serves several practical applications. This has motivated deeper research in the field and resulted in a plethora of crowd density regressors. These CNN based models deliver excellent counting performance almost entirely on the support of fully supervised training. Such a data hungry paradigm is limiting the further development of the field as it is practically infeasible to annotate thousands of people in dense crowds for every kind of setting under consideration. The fact that current datasets are relatively small and cover only limited scenarios, accentuates the necessity of a better training regime. Hence, developing methods to leverage the easily available unlabeled data has gained attention recently.
16
+
17
+ The classic way of performing unsupervised learning revolves around autoencoders [18, 26, 40, 57]. Autoencoders or its variants are optimized to predict back
18
+
19
+ ![](images/74719a22fc97b3cc3f1a807ea91325a540f0ee02dd66b81623a9c7a2c064d9e3.jpg)
20
+ Fig. 1. Though self-supervision methods learn features in an unsupervised manner (in orange), they require labeled training to map these features to the end task (in blue). But complete self-supervision is devoid of any such instance-level supervision, instead relies on matching the statistics of the predictions to a prior distribution (in green).
21
+
22
+ their inputs, usually through a representational bottleneck. By doing so, the acquired features are generic enough that they could be employed for solving other tasks of interest. These methods have graduated to the more recent framework of self-supervision, where useful representations are learned by performing some alternate task for which pseudo labels can be easily obtained. For example, in self-supervision with colorization approach [28, 29, 70], a model is trained to predict the color image given its grayscale version. One can easily generate grayscale inputs from RGB images. Similarly, there are lots of tasks for which labels are freely available like predicting angle of rotation from an image [14, 15], solving jumbled scenes [44], inpainting [47] etc. Though self-supervision is effective in learning useful representations, they require a final mapping from the features to the end task of interest. This is thought to be essentially unavoidable as some supervisory signal is necessary to aid the final task. For this, typically a linear layer or a classifier is trained on top of the learned features using supervision from labeled data, defeating the true purpose of self-supervision. In the case of crowd counting, one requires training with annotated data for converting the features to a density map. To reiterate, the current unsupervised approaches could capture the majority of its features from unlabeled data, but demand supervision at the end for them to be made useful for any practical applications.
23
+
24
+ Our work emerges precisely from the above limitation of the standard self-supervision methods, but narrowed down to the case of crowd density estimation. The objective is to eliminate the mandatory final labeled supervision needed for mapping the learned self-supervised features to a density map output. In other words, we mandate developing a model that can be trained without using any labeled data. Such a problem statement is not only challenging, but also ill-posed. Without providing a supervisory signal, the model cannot recognize the task of interest and how to properly guide the training stands as the prime issue.
25
+
26
+ We solve this in a novel manner by carefully aiding the model to regress crowd density on the back of making some crucial assumptions. The idea relies on the observation that natural crowds tend to follow certain long tailed statistics and could be approximated to an appropriate parametric prior distribution. If a network trained with a self-supervised task is available, its features can be faithfully mapped to crowd density by enforcing the predictions to match the prior distribution. The matching is measured in terms of Sinkhorn distance [12], which is differentiated to derive error signals for supervision. This proposed framework is contrasted against the normal self-supervision regime in Figure 1, with the central difference being the replacement of the essential labeled training at the end by supervision through distribution matching. We show that the proposed approach results in effective learning of crowd features and delivers good performance in terms of counting metrics.
27
+
28
+ # 2 Related Work
29
+
30
+ Though there are earlier works like [9] on counting people in sparse crowds, the paradigm of dense crowd counting via density regression plausibly begins with [19]. The initial methods generally employ hand-crafted features and frequency analysis for counting. With the advent of deep learning, many CNN based density regressors have emerged. It ranges from the initial simple models [67] to multi-network/multi-scale architectures designed specifically to address the drastic diversity in crowd images [5, 7, 8, 45, 71]. Regressors with better, deeper and recurrent based deep models [24, 30, 32] are shown to improve counting performance. An alternate line of works enhance density regression by providing auxiliary information through crowd classification [51, 52], scene context [2, 10, 36], perspective data [49, 64], attention [35, 65, 66] and even semantic priors [59]. Models designed to progressively predict density maps and perform refinement is explored in [20, 48, 54]. Works like [34, 53] effectively fuse multiscale information. Some approaches try to bring flavors of detection to crowd counting [3, 4, 31, 33, 38]. Interestingly, all these works, including more recent ones [39, 58, 60, 61], are fully supervised and leverage annotated data to achieve good performance. The issue of annotation has drawn attention of a few works in the field and is mitigated via multiple means. A count ranking loss on unlabeled images is employed in a multi-task formulation along with labeled data by [37]. Wang et al. [62] train using labeled synthetic data and adapt to real crowd scenario. The autoencoder method proposed in [6] optimizes almost $99\%$ of the model parameters with unlabeled data. However, all of these models require some annotated data (either given by humans or obtained through synthetic means) for training.
31
+
32
+ Our approach is not only new to crowd counting, but also kindles alternate avenues in the area of unsupervised learning as well. Though initial works on the subject employ autoencoders or its variants [18, 26, 40, 57] for learning useful features, the paradigm of self-supervision with pseudo labels stands out to be superior in many aspects. Works like [28, 29, 70], learn representa
33
+
34
+ ![](images/5d26d6ee699e83143f15cc3ddb5056946cf9260e567f311292ec8ec392d4e147.jpg)
35
+ Fig. 2. Computing the distribution of natural crowds: crops from dense crowd images are framed to a spatial grid of cells and crowd counts of all the cells are aggregated to a histogram (obtained on Shanghaitech Part_A dataset [71]). The distribution is certainly long tailed and could be approximated to a power law.
36
+
37
+ tions through colorizing a grayscale image. Apart from these, pseudo labels for supervision are computed from motion cues [1, 22, 46], temporal information in videos [41, 63], learning to inpaint [47], co-occurrence [21], spatial context [13, 43, 44], cross-channel prediction [69], spotting artifacts [23], predicting object rotation [14, 15] etc. The recent work of Zhang et al. [68] introduce the idea of auto-encoding transformations rather than data. Furthermore, self-supervision is shown effective for unsupervised domain adaptation in [56]. An extensive and rigorous comparison of all major self-supervised methods is available in [27]. All these approaches focus on learning generic features and not the final task. But we extend self-supervision paradigm directly to the downstream task of interest.
38
+
39
+ # 3 Our Approach
40
+
41
+ # 3.1 Natural Crowds and Density Distribution
42
+
43
+ As mentioned in Section 1, our objective of training a density regressor without using any annotated data is somewhat ill-posed. The main reason being the absence of any supervisory signal to guide the model towards the task of interest, which is the density estimation of crowd images. But this issue could be circumvented by effectively exploiting certain structure or pattern specific to the problem. In the case of crowd images, restricting to only dense ones, we deduce an interesting pattern on the density distribution. They seem to spread out following a power law. To see this, we sample fixed size crops from lots of dense crowd images and divide each crop into a grid of cells as shown in Figure 2. Then the number people in every cell is computed and accumulated to a histogram. The distribution of these cell counts is quite clearly seen to be long tailed, with regions having low counts forming the head and high counts joining the tail. The number of cell regions with no people has the highest frequency, which then rapidly decays as the crowd density increases. This resembles the
44
+
45
+ way natural crowds are arranged with sparse regions occurring more often than rarely forming highly dense neighborhoods. Coincidentally, it has been shown that many natural phenomena obey a similar power law and is being studied heavily [11]. The dense crowds also appear conforming to this pattern as evident from multiple works [16, 17, 25, 42] etc. on the dynamics of pedestrian gatherings.
46
+
47
+ Moving to a more formal description, if $\pmb{D}$ represents the density map for the input image $\pmb{I}$ , then the crowd count is given by $C = \sum_{xy} D_{xy}$ (please refer [7, 19, 71] regarding creation of density maps). $\pmb{D}$ is framed into a grid of $M \times N$ (typically set as $M = N = 3$ ) cells, with $C_{mn}$ denoting the crowd count in the cell indexed by $(m, n)$ . Now let $H^{GT}$ be the histogram computed by collecting the cell counts $(C_{mn})$ from all the images. We try to find a parametric distribution that approximately follows $H^{GT}$ with special focus to the long tailed region. The power law with exponential cut-off seems to be better suited (see Figure 2). Consequently, the crowd counts in cells $C_{mn}$ could be thought as being generated by the following relation,
48
+
49
+ $$
50
+ C _ {m n} \sim P _ {\text {p r i o r}} (\mathrm {c}) \propto c ^ {\alpha} \exp (- \lambda c), \tag {1}
51
+ $$
52
+
53
+ where $P_{prior}$ is the substitute power law distribution. There are two parameters to $P_{prior}$ with $\alpha$ controlling the shape and $\lambda$ setting the tail length.
54
+
55
+ Our approach is to fix a prior distribution so that it can be enforced on the model predictions. Studies like [16, 42] simulate crowd behaviour dynamics and estimate the exponent of the power law to be around 2. Empirically, we also find that $\alpha = 2$ works in most cases of dense crowds, with the only remaining parameter to fix is the $\lambda$ . Observe that $\lambda$ affects the length of the tail and directly determines the maximum number of people in any given cell. If the maximum count $C^{max}$ is specified for the given set of crowd images, then $\lambda$ could be fixed such that the cumulative probability density (the value of CDF) of $P_{prior}$ at $C^{max}$ is very close to 1. We assume $1 / S$ as the probability of finding a cell with count $C^{max}$ out of $S$ images in the given set. Now the CDF value at $C^{max}$ could be set to $1 - 1 / S$ , simply the probability for getting values less than the maximum. Note that $C^{max}$ need not be exact as small variations do not change $P_{prior}$ significantly. This makes it practical as the accurate maximum count might not be available in real-world scenarios. Since $C^{max}$ is for the cells, the maximum crowd count of the full image $C^{fmax}$ is related as $C^{max} = C^{fmax} / (MNS_{crop})$ , where $S_{crop}$ denotes the average number of crops that make up a full image (and is typically set as 4). Thus, for a given a set of highly dense images, only one parameter, the $C^{fmax}$ is required to fix an appropriate prior distribution.
56
+
57
+ We make a small modification to the prior distribution $P_{prior}$ as its value range starts from 1. $H^{GT}$ has values from zero with large probability mass concentrated near the low count region. Roughly $30\%$ of the mass is seen to be distributed for counts less than or around 1. So, that much probability mass near the head region of $P_{prior}$ is redistributed to [0,1] range in a uniform manner. This is found to be better for both training stability and performance.
58
+
59
+ In short, now we have a prior distribution representing how the crowd density is being allocated among the given set of images. Suppose there exists a CNN
60
+
61
+ ![](images/8379f276d80ebeef4f58c74faaef576f2831960e8df89715b40436f27f6a3332.jpg)
62
+ STAGE 1: SELF-SUPERVISION
63
+
64
+ ![](images/6412008178f3e51cc028076c21f5446158c35ecd05b833226f82033851765bb8.jpg)
65
+ STAGE 2: SINKHORN TRAINING
66
+ Fig. 3. The architecture of CSS-CCNN is shown. CSS-CCNN has two stages of training: the first trains the base feature extraction network in a self-supervised manner with rotation task and the second stage optimizes the model for matching the statistics of the density predictions to that of the prior distribution using optimal transport.
67
+
68
+ model that can output density maps, then one could try to generate error signals for updating the parameters of the model by matching the statistics of the predictions with that of the prior. But that could be a very weak signal for proper training of the model. It would be helpful if the model has a good initialization to start the supervision by distribution matching, which is precisely what we do by self-supervision in the next section.
69
+
70
+ # 3.2 Stage 1: Learning Features with Self-Supervision
71
+
72
+ We rely on training the model with self-supervision to learn effective and generic features that could be useful for the end task of density estimation. That means the model has to be trained in stages, with the first stage acquiring patterns frequently occurring in the input images. Since only dense crowd images are fed, we hope to learn mostly features relevant to crowds. These could be peculiar edges discriminating head-shoulder patterns formed by people to fairly high-level semantics pertaining to crowds. Note that the model is not signaled to pick up representations explicitly pertinent to density estimation, but implicitly culminate in learning crowd patterns as those are the most prominent part of the input data distribution. Hence, the features acquired by self-supervision could serve as a faithful initialization for the second stage of distribution matching.
73
+
74
+ Regarding self-supervision, there are numerous ways to generate pseudo labels for training models. The task of predicting image rotations is a simple, but highly effective for learning good representations [27]. The basic idea is to randomly rotate an image and train the model to predict the angle of rotation. By doing so, the network learns to detect characteristic edges or even fairly high-level patterns of the objects relevant for determining the orientation. These features are observed to be generic enough for diverse downstream tasks [27] and hence we choose self-supervision through rotation as our method.
75
+
76
+ Figure 3 shows the architecture of our density regressor, named the CSS-CCNN (for Completely Self-Supervised Counting CNN). It has a base Feature Extraction Network (FEN), which is composed of three VGG [50] style convolutional blocks with max poolings in-between. This is followed by two task heads: $C_1$ for the first training stage of self-supervision, and $C_2$ for regressing crowd density at second stage. The first stage branch has two more convolutions and a fully connected layer to finally classify the input image to one of the rotation classes. We take $112 \times 112$ crops from crowd images and randomly rotate the crop by one of the four predefined angles (0, 90, 180, 270 degrees). The model is trained with cross-entropy loss between the predicted and the actual rotation labels. The optimization runs till saturation as evaluated on a validation set.
77
+
78
+ Once the training is complete, the FEN has learned useful features for density estimation and the rotation classification head is removed. Now the parameters of FEN are frozen and is ready to be used in the second stage of training.
79
+
80
+ # 3.3 Stage 2: Sinkhorn Training
81
+
82
+ After the self-supervised training stage, FEN is extended to a density regressor by adding two convolutional layers as shown in Figure 3. We take features from both second and third convolution blocks for effectively mapping to crowd density. This aggregates features from slightly different receptive fields and is seen to deliver better performance. The layers of FEN are frozen and only a few parameters in the freshly added layers are open for training in the second stage of distribution matching. This particularly helps to prevent over-fitting as the training signal generated could be weak for updating large number of parameters. Now we describe the details of the exact matching process.
83
+
84
+ The core idea is to compute the distribution of crowd density predicted by CSS-CCNN and optimize the network to match that closely with the prior $P_{prior}$ . For this, a suitable distance metric between the two distributions should be defined with differentiability as a key necessity. Note that the predicted distribution is in the form of an empirical measure (an array of cell count values) and hence it is difficult to formulate an easy analytical expression for the computing similarity. The classic Earth Mover's Distance (EMD) measures the amount of probability mass that needs to be moved if one tries to transform between the distributions (also described as the optimal transport cost). But this is not a differentiable operation and cannot be used directly in our case. Hence, we choose the Sinkhorn distance formulation proposed in [12]. Sinkhorn distance between two empirical measures is proven to be an upper bound for EMD and
85
+
86
+ has a differentiable implementation. Moreover, this method performs favorable in terms of efficiency and speed as well.
87
+
88
+ Let $D^{CS}$ represent the density map output by CSS-CCNN and $C^{CS}$ hold the cells extracted from the predictions. To make the distribution matching statistically significant, a batch of images are evaluated to get the cell counts $(C_{mn}^{CS}\mathrm{s})$ , which are then formed into an array $H^{CS}$ . We also sample the prior $P_{prior}$ and create another empirical measure $H^{GT}$ to act as the ground truth. Now the Sinkhorn loss $\mathcal{L}_{sink}$ is computed between $H^{GT}$ and $H^{CS}$ . It is basically a regularized version of optimal transport (OT) distance for the two sample sets. Designate $h^{GT}$ and $h^{CS}$ as the probability vectors (summing to 1) associated with the empirical measures $H^{GT}$ and $H^{CS}$ respectively. Now a transport plan $P$ could be conceived as the joint likelihood of shifting the probability mass from $h^{GT}$ to $h^{CS}$ . Define $U$ to be the set of all such valid candidate plans as,
89
+
90
+ $$
91
+ \boldsymbol {U} = \left\{\boldsymbol {P} \in \mathbb {R} _ {+} ^ {d \times d} \mid \boldsymbol {P} \mathbf {1} = \boldsymbol {h} ^ {G T}, \boldsymbol {P} ^ {T} \mathbf {1} = \boldsymbol {h} ^ {C S} \right\}. \tag {2}
92
+ $$
93
+
94
+ There is a cost $M$ associated with any given transport plan, where $M_{ij}$ is the squared difference between the counts of $i$ th sample of $H^{GT}$ and $j$ th of $H^{CS}$ . Closer the two distribution, lower would be the cost for transport. Hence, the Sinkhorn loss $\mathcal{L}_{sink}$ is defined as the cost pertinent to the optimal transportation plan with an additional regularization term. Mathematically,
95
+
96
+ $$
97
+ \mathcal {L} _ {\text {s i n k}} \left(H ^ {G T}, H ^ {C S}\right) = \underset {\boldsymbol {P} \in \boldsymbol {U}} {\arg \min } \langle \boldsymbol {P}, \boldsymbol {M} \rangle_ {F} - \frac {1}{\beta} E (\boldsymbol {P}), \tag {3}
98
+ $$
99
+
100
+ where $\langle >>_F$ stands for the Frobenius inner product, $E(P)$ is the entropy of the joint distribution $P$ and $\beta$ is a regularization constant (see [12] for more details). It is evident that minimizing $\mathcal{L}_{sink}$ brings the two distributions closer in terms of how counts are allotted.
101
+
102
+ The network parameters are updated to optimize $\mathcal{L}_{sink}$ , thereby bringing the distribution of predictions close to that of the prior. At every iteration of the training, a batch of crowd images are sampled from the dataset and empirical measures for the predictions as well as prior are constructed to backpropagate the Sinkhorn loss. The value of $\mathcal{L}_{sink}$ on a validation set of images is monitored for convergence and the training is stopped if the average loss does not improve over a certain number of epochs. Note that we do not use any annotated data even for validation. The counting performance is evaluated at the end with the model chosen based on the best mean validation Sinkhorn loss.
103
+
104
+ Thus, our Sinkhorn training procedure does not rely on instance-level supervision, but exploits matching the statistics computed from a set of inputs to that of the prior. One criticism regarding this method could be that the model need not learn the task of crowd density estimation by optimizing the Sinkhorn loss. It could learn any other arbitrary task that follows a similar distribution. The counter-argument stems from the semantics of the features learned by the base network. Since the initial training mostly captures features related to dense crowds, the Sinkhorn optimization has only limited flexibility in what it can do other than map them through a fairly simple function to crowd density. This
105
+
106
+ ![](images/499bb5530f98794757e9686ca23752e88cd8a8a88d44a5992ee358d14208abc8.jpg)
107
+ Fig. 4. Density maps estimated by CSS-CCNN along with that of baseline methods. Despite being trained without a single annotated image, CSS-CCNN is seen to be quite good at discriminating the crowd regions as well as regressing the density values.
108
+
109
+ is especially true as there is only a small set of parameters being trained with Sinkhorn. It is highly likely and straightforward to map the frequent crowd features to its density values, whose distribution is signaled through the prior. Moreover, we show through extensive experiments that CSS-CCNN ends up learning crowd density estimation.
110
+
111
+ # 4 Experiments and Analysis
112
+
113
+ Any crowd density regressor is evaluated mainly for the standard counting metrics. There are two metrics widely being followed by the community. The first is the MAE or Mean Absolute Error, which directly measures the counting performance. It is the absolute difference of the predicted and actual counts averaged over the test set or simply expressed as MAE = $(1 / S_{test})\sum_{i = 1}^{N}|C_i - C_i^{GT}|$ , where $C_i$ is the count predicted by the model for $i$ th image and $C_i^{GT}$ denotes the actual count. Note that $S_{test}$ is the number of images in the test set. Coming to the second metric, the Mean Squared Error or MSE is defined as
114
+
115
+ Table 1. Performance comparison of CSS-CCNN with other methods. Our model outperforms all the baselines.
116
+
117
+ <table><tr><td rowspan="2">Method</td><td colspan="2">ST PartA</td><td colspan="2">UCF-QNRF</td><td colspan="2">UCF-CC-50</td><td colspan="2">JHU-CRWD</td></tr><tr><td>MAE</td><td>MSE</td><td>MAE</td><td>MSE</td><td>MAE</td><td>MSE</td><td>MAE</td><td>MSE</td></tr><tr><td>WTA-CCNN [6]</td><td>154.7</td><td>229.4</td><td>-</td><td>-</td><td>433.7</td><td>583.3</td><td>-</td><td>-</td></tr><tr><td>CCNN Self-Super</td><td>121.2</td><td>197.5</td><td>196.8</td><td>309.3</td><td>348.8</td><td>484.3</td><td>147.5</td><td>436.2</td></tr><tr><td>CCNN Random</td><td>431.1</td><td>559.0</td><td>718.7</td><td>1036.3</td><td>1279.3</td><td>1567.9</td><td>320.3</td><td>793.5</td></tr><tr><td>CCNN Mean</td><td>282.8</td><td>359.9</td><td>567.1</td><td>752.8</td><td>771.2</td><td>898.4</td><td>316.3</td><td>732.3</td></tr><tr><td>CCNN P prior</td><td>272.2</td><td>372.5</td><td>535.6</td><td>765.9</td><td>760.0</td><td>949.9</td><td>302.3</td><td>707.6</td></tr><tr><td>CSS-CCNN (0 labels)</td><td>197.3</td><td>295.9</td><td>437.0</td><td>722.3</td><td>564.9</td><td>959.4</td><td>217.6</td><td>651.3</td></tr></table>
118
+
119
+ MSE = SQRT((1/Stest) ∑i=1N (Ci - CiGT)2), a measure of the variance of count estimation and it represents the robustness of the model.
120
+
121
+ Our completely self-supervised framework is unique in many ways that the baseline comparisons should be different from the typical supervised methods. It is not fair to compare CSS-CCNN with other approaches as they use the full annotated data for training. Hence, we take a set of solid baselines for our model to demonstrate its performance. The CCNN Random experiment refers to the results one would get if only Stage 1 self-supervision is done without the subsequent Sinkhorn training. This is the random accuracy for our setting and helpful in showing whether the proposed complete self-supervision works. Since our approach takes one parameter, the maximum count value of the dataset $(C^{fmax})$ as input, CCNN Mean baseline indicates the counting performance if the regressor blindly predicts the given value for all the images. We choose mean value as it makes for sense in this setting than the maximum (which anyway has worse performance than mean). Another important validation for our proposed paradigm is the CCNN $P_{prior}$ experiment, where the model gives out a value randomly drawn from the prior distribution as its prediction for a given image. The counting performance of this baseline tells us with certainty whether the Stage 2 training does anything more than that by chance. Note that we do not initialize CCNN with any pretrained weights as is typically done for supervised counting models. CCNN Self-Super runs the Stage 1 training to learn the FEN parameters and is followed by labeled optimization for updating the regressor layers. These self-supervised or fully supervised methods are not directly comparable to our approach as we do not use any annotated data for training, but are shown for completeness. Also note that only the train/validation set images are used for optimizing CSS-CCNN and the ground truth annotations are never used. The counting metrics are computed on the labeled test set.
122
+
123
+ # 4.1 Crowd Datasets
124
+
125
+ The Shanghaiitech Part_A [71] is a popular dense crowd counting dataset, containing 482 images randomly crawled from the Internet. It has images with crowd counts as low as 33 to as high as 3139, with an average of 501. The train set has
126
+
127
+ ![](images/8ee1102d10ea2703f6e9ec670a7a4008d5a75bc93c2c079cd4b9f056e2587f70.jpg)
128
+ Fig. 5. Comparing our completely self-supervised method to fully supervised and self-supervised approaches under a limited amount of labeled training data. The x-axis denotes the number of training images along with the count (in thousands) of head annotations available for training, while the y-axis represents the MAE thus obtained. At low data scenarios, CSS-CCNN has significantly superior performance.
129
+
130
+ ![](images/36a9ef68c9f4014d76948be5589d41581c810046f54615d689bf54b7b5c5f56b.jpg)
131
+
132
+ 300 images, out of which $10\%$ is held out for validation. There are 182 images testing. The hyper-parameter used for this is $C^{fmax} = 3000$ . We compare the performance of CSS-CCNN with the baselines listed earlier and other competing methods in Table 1. It is clear that CSS-CCNN outperforms all the baselines by a significant margin. This shows that the proposed method works better than any naive strategies that do not consider the input images. Figure 4 visually compares density predictions made by CSS-CCNN and other models. The predictions of our approach are mostly on crowd regions and closely follows the ground truth, emphasizing its ability to discriminate crowds well.
133
+
134
+ UCF-QNRF dataset [20] is a large and diverse collection of crowd images with 1.2 million annotations. There are 1535 images with crowd count varying from 49 to 12865, resulting in an average of 815 individuals per image. The dataset offers very high-resolution images with an average resolution of $2013 \times 2902$ . The max count hyper-parameter is set to $C^{fmax} = 12000$ . We achieve similar performance trends on UCF-QNRF dataset as well. CSS-CCNN outperforms all the unsupervised baselines in terms of MAE and MSE as evident from Table 1.
135
+
136
+ UCF_CC_50 dataset [19] has just 50 images with extreme variation in crowd density ranging from 94 to 4543. The small size and diversity together makes this dataset the most challenging. We follow the standard 5-fold cross-validation scheme suggested by the creators of the dataset to report the performance metrics. Since the number of images is quite small, the assumption taken for setting the prior distribution gets invalid to certain extent. But a slightly different parameter to the prior distribution works. We set $\alpha = 1$ and $C^{fmax} = 4000$ . Despite being a small and highly diverse dataset, CSS-CCNN is able to beat all the baselines. The self-supervised MAE is also better than [6]. These results evidence the effectiveness of our method.
137
+
138
+ Table 2. Evaluating CSS-CCNN in a true practical setting: the model is trained on images crawled from the web, but evaluated on crowd datasets.
139
+
140
+ <table><tr><td>Train on web images</td><td>MAE</td><td>MSE</td></tr><tr><td>Test on ST_PartA</td><td>208.8</td><td>309.5</td></tr><tr><td>Test on UCF-QNRF</td><td>450.7</td><td>755.9</td></tr><tr><td>Test on JHU-CROWD++</td><td>241.2</td><td>706.8</td></tr></table>
141
+
142
+ JHU-CROWD++ [54, 55] is a comprehensive dataset with 1.51 million head annotations spanning 4372 images. The crowd scenes are obtained under various scenarios and weather conditions, making it one of the challenging dataset in terms of diversity. Furthermore, JHU-CROWD++ has a richer set of annotations at head level as well as image level. The maximum count is fixed to $C^{f_{max}} = 8000$ . The performance trends are quite similar to other datasets, with our approach delivering better MAE than the baselines as evident from Table 1. This indicates the generalization ability of CSS-CCNN across different datasets.
143
+
144
+ # 4.2 Performance with Limited Data
145
+
146
+ Here we explore the proposed algorithm along with fully supervised and self-supervised approaches when few annotated images are available for training. The analysis is performed by varying the number of labeled samples and the resultant counting metrics are presented in Figure 5. For training CSS-CCNN with data, we utilise the available annotated data to compute the optimal Sinkhorn assignments $P^{*}$ and then optimize the $\mathcal{L}_{sink}$ loss. This way both the labeled as well as unlabeled data can be leveraged for training by alternating respective batches (in a 5:1 ratio). It is clear that, at very low data, scenarios CSS-CCNN beats the supervised as well as self-supervised baselines by a significant margin. The Sinkhorn training shows $13\%$ boost in MAE (for Shanghaiitech Part_A) by using just one labeled sample as opposed to no samples. This indicates that CSS-CCNN can perform well in extremely low data regimes. It takes about 20K head annotations for the supervised model to perform as well as CSS-CCNN. Also, CSS-CCNN has significantly less number of parameters to learn using the labeled samples as compared to a fully supervised network. These results suggests that our complete self-supervision is the right paradigm to employ for crowd counting when the amount of available annotated data is less.
147
+
148
+ # 4.3 CSS-CCNN in True Practical Setting
149
+
150
+ The complete self-supervised setting is motivated for scenarios where no labeled images are available for training. But till now we have been using images from crowd datasets with the annotations being intentionally ignored. Now consider crawling lots of crowd images from the Internet and employing these unlabeled data for training CSS-CCNN. For this, we use textual tags related to dense
151
+
152
+ ![](images/ba2c343906db51b380adc4e927c9a290663be743ef4177290397dc49934ab66b.jpg)
153
+ Fig. 6. Double logarithmic representation of maximum likelihood fit for the crowd counts from different datasets.
154
+
155
+ ![](images/d01bead9507c673587f4c308f35dc0f0970dea3d290c06948323d4b447e494bf.jpg)
156
+
157
+ crowds and similarity matching with dataset images to collect approximately 5000 dense crowd images. No manual pruning of undesirable images with motion blur, perspective distortion or other artifacts is done. CSS-CCNN is trained on these images with the same hyper-parameters as that of Shanghaitech Part_A and the performance metrics are computed on the datasets with annotations. From Table 2, it is evident that our model achieves very competitive MAE on the crowd datasets (compared to Table 1), despite not using images from those datasets for training. This further demonstrates the generalization ability of CSS-CCNN to learn from less curated data, emphasizing the practical utility.
158
+
159
+ # 4.4 Analysis of the Prior Distribution
160
+
161
+ The proposed Sinkhorn training requires a prior distribution of crowd counts to be defined and the choice of an appropriate prior is essential for the best model performance as seen from Table 3. Here we analyze the crowd data more carefully to see why the truncated power law is the right choice of prior. For this, the counts from crowd images are extracted as described in Section 3.1 and a maximum likelihood fit over various parametric distributions is performed. The double logarithmic visualization of the probability distribution of both the data and the priors are available in Figure 6. Note that the data curve is almost a straight line in the logarithmic plot, a clear marker for power law characteristic. Both truncated power law and lognormal tightly follow the distribution. But on close inspection of the tail regions, we find truncated power law to best represent the prior. This further validates our choice of the prior distribution.
162
+
163
+ # 4.5 Sensitivity Analysis for the Crowd Parameter
164
+
165
+ As described in Section 3.1, CSS-CCNN requires the maximum crowd count $(C^{fmax})$ for the given set of images as an input. This is necessary to fix the prior distribution parameter $\lambda$ . One might not have the exact max value for
166
+
167
+ Table 3. Ablating the effect of hyper-parameters on CSS-CCNN. Our model is robust to fairly large change in the maximum count parameter.
168
+
169
+ <table><tr><td>Param</td><td>MAE</td><td>MSE</td></tr><tr><td>Uniform Prior</td><td>261.8</td><td>406.0</td></tr><tr><td>Pareto Prior</td><td>248.3</td><td>386.2</td></tr><tr><td>Lognormal Prior</td><td>239.5</td><td>345.8</td></tr><tr><td>Truncated Power Law Prior</td><td>197.3</td><td>295.9</td></tr><tr><td>Cfmax= 2000</td><td>204.2</td><td>316.4</td></tr><tr><td>Cfmax= 2500</td><td>197.9</td><td>304.6</td></tr><tr><td>Cfmax= 3000</td><td>197.3</td><td>295.9</td></tr><tr><td>Cfmax= 3500</td><td>191.9</td><td>288.5</td></tr><tr><td>α = 1.9</td><td>202.9</td><td>303.3</td></tr><tr><td>α = 2.0</td><td>197.3</td><td>295.9</td></tr><tr><td>α = 2.1</td><td>200.7</td><td>305.6</td></tr></table>
170
+
171
+ the crowds in a true practical setting; an approximate estimate is a more reasonable assumption. Hence, we vary $C^{fmax}$ around the actual value and train CSS-CCNN on Shanghaitech PartA [71] and UCF-QNRF[20]. The performance metrics in Table 3 show that changing $C^{fmax}$ to certain extent does not alter the performance significantly. The MAE remained roughly within the same range, even though the max parameter is being changed in the order of 500. These findings indicate that the our approach is insensitive to the exact crowd hyperparameter value, increasing its practical utility. We also check the sensitivity of our approach on the power law exponent $\alpha$ . Varying $\alpha$ around 2 results in similar performances, in agreement with our design choices (see Section 3.1).
172
+
173
+ # 5 Conclusions
174
+
175
+ We show for the first time that a density regressor can be fully trained from scratch without using a single annotated image. This new paradigm of complete self-supervision relies on optimizing the model by matching the statistics of the distribution of predictions to that of a predefined prior. Though the counting performance of the model stands better than other baselines, there is a performance gap compared to fully supervised methods. Addressing this issue could be the prime focus of future works. For now, our work can be considered as a proof of concept that models could be trained directly for solving the downstream task of interest, without providing any instance-level labeled data.
176
+
177
+ # 6 Acknowledgments
178
+
179
+ This work was supported by MeitY (Ministry of Electronics and Information Technology) project (No. 4(16)2019-ITEA), Govt. of India. VMP was supported by an ARO grant W911NF-21-1-0135.
180
+
181
+ # Bibliography
182
+
183
+ [1] Agrawal, P., Carreira, J., Malik, J.: Learning to see by moving. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV) (2015)
184
+ [2] Babu Sam, D., Babu, R.V.: Top-down feedback for crowd counting convolutional neural network. In: Proceedings of the AAAI Conference on Artificial Intelligence (2018)
185
+ [3] Babu Sam, D., Peri, S.V., Sundararaman, M.N., Babu, R.V.: Going beyond the regression paradigm with accurate dot prediction for dense crowds. In: Proceedings of the IEEE Winter Conference on Applications of Computer Vision (WACV) (2020)
186
+ [4] Babu Sam, D., Peri, S.V., Sundararaman, M.N., Kamath, A., Babu, R.V.: Locate, size and count: Accurately resolving people in dense crowds via detection. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI) (2020)
187
+ [5] Babu Sam, D., Sajjan, N.N., Babu, R.V., Srinivasan, M.: Divide and grow: Capturing huge diversity in crowd images with incrementally growing CNN. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2018)
188
+ [6] Babu Sam, D., Sajjan, N.N., Maurya, H., Babu, R.V.: Almost unsupervised learning for dense crowd counting. In: Proceedings of the AAAI Conference on Artificial Intelligence (2019)
189
+ [7] Babu Sam, D., Surya, S., Babu, R.V.: Switching convolutional neural network for crowd counting. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2017)
190
+ [8] Cao, X., Wang, Z., Zhao, Y., Su, F.: Scale aggregation network for accurate and efficient crowd counting. In: Proceedings of the European Conference on Computer Vision (ECCV) (2018)
191
+ [9] Chan, A.B., Liang, Z.S.J., Vasconcelos, N.: Privacy preserving crowd monitoring: Counting people without people models or tracking. In: IEEE Conference on Computer Vision and Pattern Recognition (2008)
192
+ [10] Cheng, Z.Q., Li, J.X., Dai, Q., Wu, X., Hauptmann, A.G.: Learning spatial awareness to improve crowd counting. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV) (2019)
193
+ [11] Clauset, A., Shalizi, C.R., Newman, M.E.: Power-law distributions in empirical data. SIAM review (2009)
194
+ [12] Cuturi, M.: Sinkhorn distances: Lightspeed computation of optimal transport. In: Advances in Neural Information Processing Systems (NIPS) (2013)
195
+ [13] Doersch, C., Gupta, A., Efros, A.A.: Unsupervised visual representation learning by context prediction. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV) (2015)
196
+
197
+ [14] Feng, Z., Xu, C., Tao, D.: Self-supervised representation learning by rotation feature decoupling. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2019)
198
+ [15] Gidaris, S., Singh, P., Komodakis, N.: Unsupervised representation learning by predicting image rotations. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2018)
199
+ [16] Helbing, D., Johansson, A., Al-Abideen, H.Z.: Dynamics of crowd disasters: An empirical study. Physical review E (2007)
200
+ [17] Helbing, D., Kühnert, C., Lämmer, S., Johansson, A., Gehlsen, B., Ammoser, H., West, G.B.: Power laws in urban supply networks, social systems, and dense pedestrian crowds. In: Complexity Perspectives in Innovation and Social Change, pp. 433-450. Springer (2009)
201
+ [18] Hinton, G.E., Salakhutdinov, R.R.: Reducing the dimensionality of data with neural networks. Science (2006)
202
+ [19] Idrees, H., Saleemi, I., Seibert, C., Shah, M.: Multi-source multi-scale counting in extremely dense crowd images. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2013)
203
+ [20] Idrees, H., Tayyab, M., Athrey, K., Zhang, D., Al-Maadeed, S., Rajpoot, N., Shah, M.: Composition loss for counting, density map estimation and localization in dense crowds. In: Proceedings of the European Conference on Computer Vision (ECCV) (2018)
204
+ [21] Isola, P., Zoran, D., Krishnan, D., Adelson, E.H.: Learning visual groups from co-occurrences in space and time. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2016)
205
+ [22] Jayaraman, D., Grauman, K.: Learning image representations tied to egomotion. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV) (2015)
206
+ [23] Jenni, S., Favaro, P.: Self-supervised feature learning by learning to spot artifacts. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2018)
207
+ [24] Jiang, X., Xiao, Z., Zhang, B., Zhen, X., Cao, X., Doermann, D., Shao, L.: Crowd counting and density estimation by trellis encoder-decoder networks. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2019)
208
+ [25] Karamouzas, I., Skinner, B., Guy, S.J.: A universal power law governing pedestrian interactions. APS (2015)
209
+ [26] Kingma, D.P., Welling, M.: Auto-encoding variational bayes. In: Proceedings of the International Conference on Learning Representations (ICLR) (2013)
210
+ [27] Kolesnikov, A., Zhai, X., Beyer, L.: Revisiting self-supervised visual representation learning. In: Proceedings of the IEEE conference on Computer Vision and Pattern Recognition (CVPR) (2019)
211
+ [28] Larsson, G., Maire, M., Shakhnarovich, G.: Learning representations for automatic colorization. In: Proceedings of the European Conference on Computer Vision (ECCV) (2016)
212
+
213
+ [29] Larsson, G., Maire, M., Shakhnarovich, G.: Colorization as a proxy task for visual understanding. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2017)
214
+ [30] Li, Y., Zhang, X., Chen, D.: CSRNet: Dilated convolutional neural networks for understanding the highly congested scenes. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2018)
215
+ [31] Lian, D., Li, J., Zheng, J., Luo, W., Gao, S.: Density map regression guided detection network for rgb-d crowd counting and localization. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2019)
216
+ [32] Liu, C., Weng, X., Mu, Y.: Recurrent attentive zooming for joint crowd counting and precise localization. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2019)
217
+ [33] Liu, J., Gao, C., Meng, D., Hauptmann, A.G.: DecideNet: Counting varying density crowds through attention guided detection and density estimation. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2018)
218
+ [34] Liu, L., Qiu, Z., Li, G., Liu, S., Ouyang, W., Lin, L.: Crowd counting with deep structured scale integration network. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV) (2019)
219
+ [35] Liu, N., Long, Y., Zou, C., Niu, Q., Pan, L., Wu, H.: ADCrowdNet: An attention-injective deformable convolutional network for crowd understanding. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2019)
220
+ [36] Liu, W., Salzmann, M., Fua, P.: Context-aware crowd counting. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2019)
221
+ [37] Liu, X., Van De Weijer, J., Bagdanov, A.D.: Exploiting unlabeled data in CNNs by self-supervised learning to rank. IEEE Transactions on Pattern Analysis and Machine Intelligence (2019)
222
+ [38] Liu, Y., Shi, M., Zhao, Q., Wang, X.: Point in, box out: Beyond counting persons in crowds. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2019)
223
+ [39] Ma, Z., Wei, X., Hong, X., Gong, Y.: Learning scales from points: A scalable aware probabilistic model for crowd counting. In: Proceedings of the 28th ACM International Conference on Multimedia (2020)
224
+ [40] Makhzani, A., Frey, B.J.: Winner-take-all autoencoders. In: Advances in Neural Information Processing Systems (NIPS) (2015)
225
+ [41] Misra, I., Zitnick, C.L., Hebert, M.: Shuffle and learn: unsupervised learning using temporal order verification. In: Proceedings of the European Conference on Computer Vision (ECCV) (2016)
226
+ [42] Moussaïd, M., Helbing, D., Theraulaz, G.: How simple rules determine pedestrian behavior and crowd disasters. Proceedings of the National Academy of Sciences (2011)
227
+ [43] Nathan Mundhenk, T., Ho, D., Chen, B.Y.: Improvements to context based self-supervised learning. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2018)
228
+
229
+ [44] Noroozi, M., Favaro, P.: Unsupervised learning of visual representations by solving jigsaw puzzles. In: Proceedings of the European Conference on Computer Vision (ECCV) (2016)
230
+ [45] Onoro-Rubio, D., López-Sastre, R.J.: Towards perspective-free object counting with deep learning. In: Proceedings of the European Conference on Computer Vision (ECCV) (2016)
231
+ [46] Pathak, D., Girshick, R., Dollar, P., Darrell, T., Hariharan, B.: Learning features by watching objects move. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2017)
232
+ [47] Pathak, D., Krahenbuhl, P., Donahue, J., Darrell, T., Efros, A.A.: Context encoders: Feature learning by inpainting. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2016)
233
+ [48] Ranjan, V., Le, H., Hoai, M.: Iterative crowd counting. In: Proceedings of the European Conference on Computer Vision (2018)
234
+ [49] Shi, M., Yang, Z., Xu, C., Chen, Q.: Revisiting perspective information for efficient crowd counting. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2019)
235
+ [50] Simonyan, K., Zisserman, A.: Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556 (2014)
236
+ [51] Sindagi, V.A., Patel, V.M.: CNN-based cascaded multi-task learning of high-level prior and density estimation for crowd counting. In: Proceedings of the IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS) (2017)
237
+ [52] Sindagi, V.A., Patel, V.M.: Generating high-quality crowd density maps using contextual pyramid CNNs. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV) (2017)
238
+ [53] Sindagi, V.A., Patel, V.M.: Multi-level bottom-top and top-bottom feature fusion for crowd counting. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV) (2019)
239
+ [54] Sindagi, V.A., Yasarla, R., Patel, V.M.: Pushing the frontiers of unconstrained crowd counting: New dataset and benchmark method. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV) (2019)
240
+ [55] Sindagi, V.A., Yasarla, R., Patel, V.M.: JHU-CROWD++: Large-scale crowd counting dataset and a benchmark method. Technical Report (2020)
241
+ [56] Sun, Y., Tzeng, E., Darrell, T., Efros, A.A.: Unsupervised domain adaptation through self-supervision. arXiv preprint arXiv:1909.11825 (2019)
242
+ [57] Vincent, P., Larochelle, H., Bengio, Y., Manzagol, P.A.: Extracting and composing robust features with denoising autoencoders. In: Proceedings of the International Conference on Machine Learning (ICML) (2008)
243
+ [58] Wan, J., Chan, A.: Modeling noisy annotations for crowd counting. Advances in Neural Information Processing Systems (2020)
244
+ [59] Wan, J., Luo, W., Wu, B., Chan, A.B., Liu, W.: Residual regression with semantic prior for crowd counting. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2019)
245
+
246
+ [60] Wan, J., Wang, Q., Chan, A.B.: Kernel-based density map generation for dense object counting. IEEE Transactions on Pattern Analysis and Machine Intelligence (2020)
247
+ [61] Wang, Q., Gao, J., Lin, W., Li, X.: Nwpu-crowd: A large-scale benchmark for crowd counting and localization. IEEE Transactions on Pattern Analysis and Machine Intelligence (2020)
248
+ [62] Wang, Q., Gao, J., Lin, W., Yuan, Y.: Learning from synthetic data for crowd counting in the wild. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2019)
249
+ [63] Wang, X., Gupta, A.: Unsupervised learning of visual representations using videos. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV) (2015)
250
+ [64] Yan, Z., Yuan, Y., Zuo, W., Tan, X., Wang, Y., Wen, S., Ding, E.: Perspective-guided convolution networks for crowd counting. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV) (2019)
251
+ [65] Zhang, A., Shen, J., Xiao, Z., Zhu, F., Zhen, X., Cao, X., Shao, L.: Relational attention network for crowd counting. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV) (2019)
252
+ [66] Zhang, A., Yue, L., Shen, J., Zhu, F., Zhen, X., Cao, X., Shao, L.: Attentional neural fields for crowd counting. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV) (2019)
253
+ [67] Zhang, C., Li, H., Wang, X., Yang, X.: Cross-scene crowd counting via deep convolutional neural networks. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2015)
254
+ [68] Zhang, L., Qi, G.J., Wang, L., Luo, J.: AET vs. AED: Unsupervised representation learning by auto-encoding transformations rather than data. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2019)
255
+ [69] Zhang, R., Isola, P., Efros, A.: Split-brain autoencoders: Unsupervised learning by cross-channel prediction. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2017)
256
+ [70] Zhang, R., Isola, P., Efros, A.A.: Colorful image colorization. In: Proceedings of the European Conference on Computer Vision (ECCV) (2016)
257
+ [71] Zhang, Y., Zhou, D., Chen, S., Gao, S., Ma, Y.: Single-image crowd counting via multi-column convolutional neural network. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2016)
completelyselfsupervisedcrowdcountingviadistributionmatching/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38cb50e7c6a626317175802d89f4bbdd7d65592a0461b3c16e554ae7f392207e
3
+ size 435940
completelyselfsupervisedcrowdcountingviadistributionmatching/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0a1bd2c7f49927aa7ee1fabf8e96a79008cbe9f8d3d97e470941136e47f4cb0
3
+ size 398849
compositionalhumansceneinteractionsynthesiswithsemanticcontrol/17c013bf-7bdf-421f-902f-3f7fe8744cc4_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b35fe4eefd04150e64a6262e30a3a83753aded7b5bd3edd8fba79d7e367edd9
3
+ size 72880
compositionalhumansceneinteractionsynthesiswithsemanticcontrol/17c013bf-7bdf-421f-902f-3f7fe8744cc4_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca1bbba4434e3a884109e90a700cb748994b867a4ea5cb0517ffc3689c8a3023
3
+ size 89086
compositionalhumansceneinteractionsynthesiswithsemanticcontrol/17c013bf-7bdf-421f-902f-3f7fe8744cc4_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:800e01ddcec9c3c41367bda190e75eea45525d45af54ecc40414e0b22140e0f1
3
+ size 5970027
compositionalhumansceneinteractionsynthesiswithsemanticcontrol/full.md ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Compositional Human-Scene Interaction Synthesis with Semantic Control
2
+
3
+ Kaifeng Zhao $^{1}$ , Shaofei Wang $^{1}$ , Yan Zhang $^{1}$ , Thabo Beeler $^{2}$ , and Siyu Tang $^{1}$
4
+
5
+ $^{1}$ ETH Zürich
6
+ {kaifeng.zhao, shaofei.wang, yan.zhang, siyu.tang}@inf.ethz.ch
7
+ $^{2}$ Google
8
+ thabo.beeler@gmail.com
9
+
10
+ Abstract. Synthesizing natural interactions between virtual humans and their 3D environments is critical for numerous applications, such as computer games and AR/VR experiences. Recent methods mainly focus on modeling geometric relations between 3D environments and humans, where the high-level semantics of the human-scene interaction has frequently been ignored. Our goal is to synthesize humans interacting with a given 3D scene controlled by high-level semantic specifications as pairs of action categories and object instances, e.g., "sit on the chair". The key challenge of incorporating interaction semantics into the generation framework is to learn a joint representation that effectively captures heterogeneous information, including human body articulation, 3D object geometry, and the intent of the interaction. To address this challenge, we design a novel transformer-based generative model, in which the articulated 3D human body surface points and 3D objects are jointly encoded in a unified latent space, and the semantics of the interaction between the human and objects are embedded via positional encoding. Furthermore, inspired by the compositional nature of interactions that humans can simultaneously interact with multiple objects, we define interaction semantics as the composition of varying numbers of atomic action-object pairs. Our proposed generative model can naturally incorporate varying numbers of atomic interactions, which enables synthesizing compositional human-scene interactions without requiring composite interaction data. We extend the PROX dataset with interaction semantic labels and scene instance segmentation to evaluate our method and demonstrate that our method can generate realistic human-scene interactions with semantic control. Our perceptual study shows that our synthesized virtual humans can naturally interact with 3D scenes, considerably outperforming existing methods. We name our method COINS, for CO compositional INInteraction Synthesis with Semantic Control. Code and data are available at https://github.com/zkf1997/COINS.
11
+
12
+ Keywords: human-scene interaction synthesis, semantic composition, virtual humans.
13
+
14
+ ![](images/4c6aa5e31cf5b67854f6e5fdcd6c1ff351eaf6a956be01f1defd21be0522b7c7.jpg)
15
+
16
+ ![](images/9ebc92bf067adc8094f4434f3816a12727f909ffc1d9f92e24f5cd2ea86023db.jpg)
17
+
18
+ ![](images/ba3ed7d53e25b7b2a7d710ebc051030bb5b90b16ec574618191c567a40f1a53d.jpg)
19
+
20
+ ![](images/0fbcd63e800ffe9a5c9578a6f7f88274c8c6895fc05a05a031cfd1e7271fb6d9.jpg)
21
+
22
+ ![](images/117ee9af6ceb9419db261e8e3e42017839dd289805fd252fd24fc6fd98ef1c10.jpg)
23
+
24
+ ![](images/91c525842929e054a3b27c6f00a656ca94ace6350a713a17453303e32b3b28fc.jpg)
25
+
26
+ ![](images/e4b57b8380f54e4d2fe663a5c0f1a606fae18b4166481d49c5c3e5a626a50c29.jpg)
27
+ Fig. 1: Given a pair of action and object instance as the semantic specification, our method generates virtual humans naturally interacting with the object (first row). Furthermore, our method retargets interactions on unseen action-object combinations (second row) and synthesizes composite interactions without requiring any corresponding composite training data (third row).
28
+
29
+ ![](images/ac43a0df46367877d8ce658037a08d2399bbc051b97fe5c5266c07724c6d9e4e.jpg)
30
+
31
+ ![](images/ebf173683b40b44343abc44762f8bace3535bb443e76c4bd054c08db48ac8f96.jpg)
32
+
33
+ # 1 Introduction
34
+
35
+ People constantly interact with their surroundings, and such interactions have semantics, specifically as combinations of actions and object instances, e.g., "sit on the chair" or "lie on the bed". Incorporating and controlling such interaction semantics is critical for creating virtual humans with realistic behavior. An effective solution for semantic-aware virtual human generation could advance existing technologies in AR/VR, computer games, and synthetic data generation to train machine learning perception algorithms. However, existing methods focus on modeling geometric relationships between virtual humans and their 3D environments [11, 45, 46], and thus are not able to synthesize body-scene interactions with semantic control of human actions and specific interaction objects. This heavily limits their use in practice.
36
+
37
+ In this paper, we aim to incorporate semantic control into the synthesis of human-scene interactions. This is a challenging task due to the following reasons. First, semantic-aware human-scene interactions are characterized by body artic
38
+
39
+ ulation, 3D object geometry, and the intent of the interaction. It is challenging to learn a generalizable representation to capture such heterogeneous information. Second, given a 3D scene, the space for plausible human-scene interactions is enormous, and obtaining sufficiently diverse training data remains challenging.
40
+
41
+ To address these challenges, we introduce a novel interaction synthesis approach that leverages transformer-based generative models and can synthesize realistic 3D human bodies, given a 3D scene and a varying number of action-object pairs. These pairs can specify the intent of the interactions and the interacting objects. The key advantages of our models are two-fold: First, we represent human body articulation and 3D object geometry as tokens in the proposed transformer network, and the interaction semantics are embedded via positional encoding. Combined with a conditional variational auto-encoder (VAE) [16,33], we learn a unified latent space that captures the distribution of human articulation conditioned on the given 3D objects and the interaction semantics. Second, our models can be used to synthesize composite interactions, as they can naturally incorporate a varying number of 3D objects and interaction semantics. By training only on irreducible atomic interactions (e.g., "sit on the sofa", "touch the table"), our model can generate novel composite interactions (e.g., "sit on the sofa and touch the table") in unseen 3D scenes without requiring composite training data (Fig. 1). Furthermore, we decompose the interaction synthesis task into three stages. First, we infer plausible global body locations and orientations given pairs of actions and objects. Second, we generate detailed body articulation and body-scene contact that aligns with the object geometry and interaction semantics. Lastly, we further refine the local body-scene contact by leveraging the inferred contact map.
42
+
43
+ To train and evaluate our method, we extend the PROX dataset [10] to the PROX-S dataset, which includes 3D instance segmentation, SMPL-X body estimation, and per-frame annotation of interaction semantics. Since there are no existing methods working on the same task of populating scenes with semantic control, we adapt PiGraph [31] and POSA [11] to this new task, and train their modified versions on the PROX-S dataset as baselines. Our perceptual study shows that our proposed method can generate realistic 3D human bodies in a 3D scene with semantic control, significantly outperforming those baselines.
44
+
45
+ In summary, our contributions are: (1) a novel compositional representation for interaction with semantics; (2) a generative model for synthesizing diverse and realistic human-scene interactions from semantic specifications; (3) a framework for composing atomic interactions to generate composite interactions; and (4) the extended human-scene interaction dataset PROX-S containing scene instance segmentation and per-frame interaction semantic annotation.
46
+
47
+ # 2 Related Work
48
+
49
+ Human-Scene Interaction Synthesis. Synthesizing human-scene interactions has been a challenging problem in the computer vision and graphics community. Various methods have been proposed to analyze object affordances and gener
50
+
51
+ ate static human-scene interactions [6,8,12,15,17,30,31]. However, the realism of synthesized interactions from these methods is often limited by their oversimplified human body representations. The recently published PSI [46] uses the parametric body model SMPL-X [23] to put 3D human bodies into scenes, conditioned on scene semantic segmentation and depth map. In addition, geometric constraints are applied to resolve human-scene contact and penetration problems. PLACE [45] learns the human-scene proximity and contact in interactions to infer physically plausible humans in 3D scenes. POSA [11] proposes an egocentric contact feature map that encodes per-vertex contact distance and semantics information. A stochastic model is trained to predict contact feature maps given body meshes, with the predicted contact features guiding the body placement optimization in scenes. Wang et al. [40] generate human bodies at specified locations and orientations, conditioning on the point cloud of the scene and implicitly modeling the scene affordance. Concurrent work [41] first generates scene-agnostic body poses from actions and then places body into scene using POSA, which is similar to the POSA-I baseline we implement.
52
+
53
+ Apart from being realistic, semantic control is another important goal in synthesizing interactions. PiGraph [31] learns a probabilistic distribution for each annotated interaction category and synthesizes interactions by selecting the highest scoring samples of fitted categorical distribution. Conditional action synthesis methods [1,2,24] generate human motion conditioned on action categories or text descriptions while ignoring human-scene interaction. NSM [34] uses a mixture of experts modulated by the action category to generate human motion of seven predefined categories. SAMP [9] extends NSM by incorporating stochastic motion modeling and a GoalNet predicting possible interaction goals given scene objects and action categories. NSM and SAMP are limited in interaction semantics modeling since they can only model interactions with one single object or the surrounding environment as a whole. Our work, in contrast, models the compositional nature of interaction semantics and can generate composite interactions involving multiple objects simultaneously.
54
+
55
+ Human Behavior Semantics Modelling. Understanding human behavior is an important problem that has long received a significant amount of attention. Action recognition [13,14,32,37] classifies human activities into predefined action categories. Language driven pose and motion generation [1,2,35] incorporates natural languages that can represent more expressive and fine-grained action semantics. Human-object interaction detection [5,7,42] models interactions as triplets of (human, action, object), detecting humans and objects from images along with the relations between them.
56
+
57
+ One key observation is that humans can perform multiple actions simultaneously and such behaviors have composite semantics. Composite semantics are often modeled as the combination of basic semantic units, like how phrases are composed by words in natural languages. Semantic composition is termed as compound in linguistics [18, 25] and studied in natural language processing [21, 22, 43]. PiGraph [31] describes composite human-scene interaction semantics with a set of (verb, noun) pairs. BABEL [26] uses natural language
58
+
59
+ labels to annotate human motion capture data [3,19,20,36,38] and allow multiple descriptions existing in a single frame to model composite semantics. These works model semantics on the object category level and ignore the differences among instances of the same category. Our work goes beyond this limitation to model interaction semantics with specific object instances, which is critical for solving ambiguity in scenes with multiple objects of the same category.
60
+
61
+ # 3 Method
62
+
63
+ # 3.1 Preliminaries
64
+
65
+ Body Representation. We represent the 3D human body using a simplified SMPL-X model, consisting of vertex locations, triangle faces, and auxiliary per-vertex binary contact features, denoted as $\mathbf{B} = (\mathbf{V},\mathbf{F},\mathbf{C})$ . For computational efficiency, we downsample the original SMPl-X mesh to have 655 vertices $\mathbf{V}\in \mathbb{R}^{655\times 3}$ and 1296 faces $\mathbf{F}\in \{1\dots 655\}^{1296\times 3}$ using the sampling method of [28]. The binary contact features $\mathbf{C}\in \{0,1\}^{655}$ indicate whether each body vertex is in contact with scene objects [11]. Specifically, we consider a body vertex is in contact if its distance to scene objects is below a threshold value. We introduce the auxiliary contact features because human-object contact is a strong cue for interaction semantics, e.g., "touch" implies contact on hands. We use the contact features to further refine human-scene interaction in post-optimization.
66
+
67
+ 3D Scene Representation. We represent a 3D scene as a set of object instances, denoted as $\mathbf{S} = \{o^i\}_{i=1}^O$ where $O$ is the number of object instances. Each object instance $o^i \in \mathbb{R}^{8192 \times 9}$ is an oriented point cloud of 8192 points with attributes of location, color, and normal. We represent objects as point clouds to incorporate the geometry information and enable generalization to open-set objects that do not belong to predefined object categories, unlike previous works [11,31,46] that only use object category information. Moreover, the effect of intra-class object variance on interactions can be learned from the object geometry to improve fine-grained human-scene contacts.
68
+
69
+ Compositional Interaction Representation. Human-scene interactions involve three types of components: human bodies, actions, and objects. Inspired by the observation that humans can perform multiple interactions at the same time, we propose a compositional interaction representation $\mathbf{I} = (\mathbf{B},\{(a^i,o^i)\}_{i = 1}^M)$ , where $\mathbf{B}$ denotes the human body, and $\{(a^{i},o^{i})\}_{i = 1}^{M}$ is a set of atomic interactions. We use the term atomic interaction to refer to the basic, irreducible building block for interaction semantics, and each atomic interaction $(a^i,o^i)$ is a pair of a one-hot encoded action and an object instance, e.g., "sit on a chair". In addition, interactions can comprise more than one such atomic interaction unit, since one can simultaneously interact with multiple objects, e.g., "sit on a chair and type on a keyboard". We refer to such interactions consisting of more than one atomic interaction as composite interactions.
70
+
71
+ ![](images/9620fe0d9a3ce57cf1de41c7b4d5f08e2ed4f617eee87e5f436ad921e189a2e0.jpg)
72
+ Fig. 2: Illustration of our COINS method for human-scene interaction synthesis with semantic control. Given a 3D scene and semantic specifications of actions (e.g., "sit on", "touch") paired with object instances (highlighted with color), COINS first generates a plausible human pelvis location and orientation and then generates the detailed body.
73
+
74
+ # 3.2 Interaction Synthesis with Semantic Control
75
+
76
+ Synthesizing interactions with semantic control requires generating human bodies interacting with given scene objects in a natural and semantically correct way. Specifically, given a scene $S$ and interaction semantics specified as $\{(a^i,o^i)\}_{i = 1}^M$ , the task is to generate a human body $\mathbf{B}$ that perceptually satisfies the constraints of performing action $a^i$ with object $o^i$ .
77
+
78
+ We propose a multi-stage method for interaction synthesis with semantic control as illustrated in Fig. 2. Given interaction semantics specified as action-object pairs, we first infer possible pelvis locations and orientations. Then we transform objects to the generated pelvis coordinate frame and sample body and contact map in the local space. We separately train two transformer-based conditional VAE (cVAE) [16, 33] models for pelvis and body generation, and name them as PelvisVAE and BodyVAE respectively. Lastly, we apply an interaction-based optimization that is guided by contact features to refine the generated interactions.
79
+
80
+ Architecture. We propose a transformer-based conditional variational auto-encoder (cVAE) architecture that can handle the heterogeneous inputs of our compositional interaction representation containing body mesh vertices, object points without predefined topology, and interaction semantics. Specifically, object points and body vertices are represented as token inputs to the transformer, and learnable action embeddings are added to paired object tokens as positional encoding.
81
+
82
+ The BodyVAE architecture is illustrated in Fig. 3. The PelvisVAE shares a similar architecture and we refer readers to the Supp. Mat. for illustration.
83
+
84
+ ![](images/2f465b6d5d5460a2fb4bd816e01b91ed5bb0ef1c775236826d665907f90296a9.jpg)
85
+ Fig. 3: Illustration of BodyVAE architecture. Human body and objects are represented as tokens of the transformers while each action category is mapped to a learnable embedding and added to the corresponding object tokens. Modules within the dashed box are the semantic conditions of a varying number of action-object pairs. We denote addition with $\oplus$ and positional encoding with "PE". We visualize vertices with positive contact features as blue on the body mesh.
86
+
87
+ Our cVAE networks take varying numbers of action-object pairs as conditional inputs. Each action category is mapped to a learnable embedding, and each object point cloud is first converted to 256 local keypoints using PointNet++ [27]. The action embedding is then added to the tokens of the paired object as positional encoding. Compared to treating actions as separate tokens [24], encoding actions into the positional encoding for object tokens can regulate each action to only affect the paired object, e.g., the action "sit on" is only related to the sofa, but not the table, in the example of Fig. 3. The human body input comprises mesh vertices with location and auxiliary contact features. We apply a linear layer to map vertices to tokens and vertex index based positional encoding to encode body topology.
88
+
89
+ The transformer encoder maps input interactions into a latent space and the decoder predicts human bodies with contact features from conditional action-object pairs and the sampled latent code. On top of the encoder transformer network, we apply average pooling on the output human tokens followed by a linear layer to predict the latent normal distribution. At the decoder, we use a template body with person-dependent shape parameters for body tokens. Using the personalized template body makes our model generalize to different body shapes and enables explicit control of the body shape. The sampled latent code is used for keys and values of the encoder-decoder attention layers [39].
90
+
91
+ BodyVAE shares the same transformer-based architecture and the same conditional input of action-object pairs as PelvisVAE. There are mainly two differences between BodyVAE and PelvisVAE. First, BodyVAE represents a human as a body mesh with contact features, while PelvisVAE represents a human as the pelvis joint location and orientation. Second, all input objects are in the
92
+
93
+ scene coordinate frame in PelvisVAE while input objects are transformed to the local pelvis coordinate frame in BodyVAE.
94
+
95
+ To make our sampled bodies compatible with the SMPL-X body model and ensure a valid body shape, we jointly train a Multi-Layer Perceptron (MLP) [29] with the BodyVAE to regress the corresponding SMPL-X body parameters from the sampled body meshes. We refer to the Supp. Mat. for more details on architecture and the training losses.
96
+
97
+ Interaction-Based Optimization. Our model is trained with the pseudo ground truth body estimation [10, 44], which does not guarantee natural human-scene contact. Therefore, the generated interactions can also be unnatural. We follow [11, 45, 46] to apply interaction-based optimization to refine the interactions. We use generated SMPL-X parameters as initialization and optimize body translation $t$ , global orientation $R$ and pose $\theta$ . The optimization objective is given by:
98
+
99
+ $$
100
+ E (t, R, \theta) = \mathcal {L} _ {\text {i n t e r a c t i o n}} + \mathcal {L} _ {\text {c o l l}} + \mathcal {L} _ {\text {r e g}}, \tag {1}
101
+ $$
102
+
103
+ where $\mathcal{L}_{\text{interaction}}$ encourages body vertices with positive contact features to have zero distance to objects, $\mathcal{L}_{\text{coll}}$ is the scene SDF based collision term defined in [46], and the $\mathcal{L}_{\text{reg}}$ term penalizes $t,R$ and $\theta$ deviating from the initialization. We refer to the Supp. Mat. for detailed definitions.
104
+
105
+ # 3.3 Compositional Interaction Generation
106
+
107
+ Compositional interaction generation aims to generate composite interactions using models trained only on atomic interactions. Compositional interaction generation reflects the compositional nature of interaction semantics and can save the need to collect composite interaction data. Although our transformer-based generative model can synthesize bodies given composite interaction semantics, e.g. "sit on the sofa and touch the wall", it requires collecting data and training for all composite interactions we want to synthesize. However, collecting composite interaction data is exponentially more expensive than atomic interactions considering the vast possible combinations of atomic interactions. Therefore, it is desirable to have an automatic way to generate composite interactions requiring only atomic interaction data.
108
+
109
+ To that end, we propose a simple yet effective two-step approach to generating composite interactions using models trained only on atomic interactions: (1) Compositional pelvis generation, where we formulate the task of generating pelvis frames given composite interaction semantics as finding the intersection of pelvis distributions of atomic interactions. (2) Compositional body generation, where we leverage attention masks derived from contact statistics in transformer inference to compose atomic interactions at the body parts level.
110
+
111
+ Compositional Pelvis Generation. We formulate compositional pelvis generation as finding the intersection of pelvis distributions of component atomic interactions. Using our PelvisVAE trained for atomic interactions, we can decode the
112
+
113
+ prior standard Gaussian distribution to distributions of plausible pelvis frames given atomic interaction semantics. Each component atomic interaction of a composite interaction determines a pelvis frame distribution in scenes, and intuitively the plausible pelvis of the composite interaction should lie in the intersection of all pelvis distributions. Therefore, we propose a compositional pelvis generation method where we sample pelvis frames for each atomic interaction, optimize all pelvis frames to be close in space, and average the optimized pelvis frames as the generated composite pelvis frame.
114
+
115
+ Specifically, we denote the decoder of the PelvisVAE as a function $\mathcal{G}(z^i |a^i,o^i)$ mapping a latent code $z^{i}$ to a pelvis frame conditioned on the action-object pair of $(a^i,o^i)$ , we obtain the final pelvis frame from the composition of $M$ atomic interactions from the following optimization problem:
116
+
117
+ $$
118
+ \tilde {Z} = \underset {Z = \{z ^ {i} \} _ {i = 1} ^ {M}} {\arg \min } \sum_ {1 \leq i < M} \sum_ {i < j \leq M} | \mathcal {G} \left(z ^ {i} \mid a ^ {i}, o ^ {i}\right) - \mathcal {G} \left(z ^ {j} \mid a ^ {j}, o ^ {j}\right) | - \lambda \sum_ {1 \leq i \leq M} \log (p \left(z ^ {i}\right)), \tag {2}
119
+ $$
120
+
121
+ $Z$ denotes the set of $M$ randomly sampled latent codes for $M$ component atomic interactions, and $\lambda$ is a tunable weight. The initial values of the latent codes are randomly sampled from the prior distribution. The motivation is to optimize the latent codes of $M$ component atomic interactions to make their decoded pelvis frames as close as possible in the scene while maintaining high probabilities in each component pelvis distribution. We take the average of the $M$ optimized component pelvis frames as the sampled composite pelvis frame.
122
+
123
+ Compositional Body Generation. For compositional body generation, we use the attention mechanism of transformer networks to compose atomic interactions at body part level. Although we use BodyVAE trained only on atomic interaction data, we can input more than one atomic interaction and achieve compositional body generation with additional attention masks derived from contact statistics.
124
+
125
+ Our method is inspired by the observation from contact probability statistics that interaction semantics can often be determined by contact on certain body parts instead of the whole body, e.g., sitting is characterized by contact around the hip area. Specifically, we calculate the per-vertex contact probability for each action using training data. The vertex contact probability for one action is defined as the ratio of the number of positive contact features of the vertex and the number of all contact features of the vertex in the interaction data of the specified action. Heatmap visualization of such categorical contact statistics is shown in Fig. 4. High contact probability indicates a high correlation between the body vertex area and action semantics.
126
+
127
+ Inspired by the observed action-part correlation, we propose leveraging the attention mechanism to compose atomic interactions according to three body parts: upper limbs, lower limbs, and torso. Given composite interaction semantics for body generation, we calculate the sum of contact probability at each part for each action. If the sum of contact probability of one action at one body part exceeds those of other actions by a threshold, we mask the attention between the
128
+
129
+ ![](images/f678bca1cc1451e436d5df9fc61bd7859136fe3d7469e64deacea4183f0cf09f.jpg)
130
+ "Lie on"-Side
131
+
132
+ ![](images/01a61006ec90a6700e7cc24338c8164e45101a03d772fc573ec1e54a0886bb1d.jpg)
133
+ "Lie on"-Bottom
134
+
135
+ ![](images/909ddc6eac83335fab4a08f49783a9d06365ac854b5f8f7250a05d8c3c2af568.jpg)
136
+ "Sit on"-Side
137
+
138
+ ![](images/8d887dd0f2b34c3e3c53f27457d07ed05430c3e0c4ffc8910f8812616e6de1e2.jpg)
139
+ "Sit on"-Bottom
140
+
141
+ ![](images/32cb9d16d58f3c8513c1f602efd84da5c71144ef655d6de5e073f8c75f04b88f.jpg)
142
+ Fig. 4: Visualization of per-vertex contact probability for two actions from the side and bottom views. Brighter colors indicate higher contact probability with objects. We randomly sample a pose within the action category for visualization.
143
+
144
+ ![](images/e068eadc43f2b921638cc6af671b74572180d4ed5555acd3006407a8e79ed31a.jpg)
145
+ Fig. 5: Illustration of the PROX-S dataset. From left to right, it shows the RGB image, 3D scene reconstruction with instance segmentation, and the fitted SMPL-X human body with per-frame interaction semantic labels.
146
+
147
+ ![](images/d7a97426494534e62ab2d76ee15378d9bc5ca22108b5c2a4814a001de9fd28a6.jpg)
148
+
149
+ part and all other atomic interactions to be zero. Taking the composite interaction "sit on chair and touch table" as an example, touching has a significantly greater sum of contact probability on upper limbs so the attention between upper limb tokens and chair (objects not paired with touching) tokens will be masked as zero.
150
+
151
+ We input such attention masks and component atomic interactions to the transformer for compositional body generation. The derived attention masks can naturally compose the component atomic interactions via BodyVAE.
152
+
153
+ # 4 Experiments
154
+
155
+ # 4.1 Dataset
156
+
157
+ We annotate a new dataset called PROX-S on top of the PROX [10] dataset to evaluate interaction synthesis with semantic control since there is no existing dataset suitable for this task. The PROX-S dataset contains (1) 3D instance segmentation of all 12 PROX scenes; (2) 3D human body reconstructions within the scenes; and (3) per-frame interaction semantic labels in the form of action-object pairs, as shown in Fig. 5. We refer to the Supp. Mat. for the detailed process description and statistics.
158
+
159
+ # 4.2 Evaluation Metrics
160
+
161
+ Semantic Contact. Compared to the semantics-agnostic body-scene contact score used in [46], we propose a semantic contact score to evaluate whether the generated interactions adhere to the semantic specifications characterized by proper body-scene contact. Using the action-specific body vertex contact probability introduced in Sec. 3.3 as weights, we calculate a weighted sum of binary contact features for each body in the training data and name the sum as the semantic contact score. This action-dependent semantic contact score reflects how body contact features align with the semantics of one action. We use the 20 percentile semantic contact score of training data bodies as the threshold score for each action to filter low-quality training interaction data with inaccurate contact. When evaluating a generated interaction sample, we calculate the weighted sum of contact features and compare it to the action-specific threshold score. The semantic contact score is one if the sum is higher than the threshold and zero otherwise.
162
+
163
+ Physical Plausibility. We evaluate the physical plausibility of generated interactions using the non-collision metric from [4,11,45,46]. It is calculated as the ratio of the number of body vertices with non-negative scene SDF values and the number of all body vertices.
164
+
165
+ Diversity. Following [46], we perform K-Means clustering to cluster the SMPL-X parameters of generated bodies into 50 clusters and evaluate the diversity using the entropy of the cluster ID histogram and the mean distance to cluster centers.
166
+
167
+ Perceptual Study. We evaluate the perceptual realism and semantic accuracy of generated human-scene interactions by conducting perceptual studies on Amazon Mechanical Turk (AMT). We perform a binary-choice perceptual study where samples of the same interaction semantics from different sources are shown and the turkers are asked to choose the more natural one. For semantic accuracy, we instruct the turkers to rate the consistency between shown interaction samples and semantic labels from 1 (strongly disagree) to 5 (strongly agree). For more details regarding the perceptual studies, please refer to the Supp. Mat.
168
+
169
+ # 4.3 Baselines
170
+
171
+ There is no existing method that directly applies to the problem of generating 3D human bodies given a 3D scene and interaction semantics. Therefore, we modify two state-of-the-art interaction synthesis methods for our tasks and train their models using the same PROX-S dataset.
172
+
173
+ $PiGraph-X$ . PiGraph [31] is the most related work to our knowledges, which simultaneously generates scene placement and human skeletons from interaction category specifications. We remove the scene placement step of the original paper and replace the skeleton body representation with the more realistic SMPL-X
174
+
175
+ (a) Interaction Synthesis with Semantic Control.
176
+
177
+ Table 1: Binary Realism Perceptual Study.
178
+
179
+ <table><tr><td colspan="2">% users rated as “more realistic”</td></tr><tr><td>Ours</td><td>POSA-I</td></tr><tr><td>63.8 %</td><td>36.2 %</td></tr><tr><td>Ours</td><td>PiGraph-X</td></tr><tr><td>79.7 %</td><td>20.3 %</td></tr><tr><td>Ours</td><td>PseudoGT</td></tr><tr><td>45.3 %</td><td>54.7 %</td></tr></table>
180
+
181
+ (b) Interaction Synthesis via Semantic Composition.
182
+
183
+ <table><tr><td colspan="2">% users rated as “more realistic”</td></tr><tr><td>Ours-C</td><td>PiGraph-X-C</td></tr><tr><td>81.2 %</td><td>18.2 %</td></tr><tr><td>Ours-C</td><td>PseudoGT</td></tr><tr><td>42.4 %</td><td>57.6 %</td></tr></table>
184
+
185
+ body model. We refer to this modified PiGraph variant as PiGraph-X. For compositional interaction generation, we extend PiGraph by sampling basic bodies from all comprised atomic interactions and using the average similarity score to those atomic interactions. We denote this PiGraph extension as PiGraph-X-C.
186
+
187
+ POSA-I. POSA [11] generates human-scene interactions using optimization guided by per-vertex contact features. However, POSA lacks global control of the generated contact features and cannot generate human bodies conditioned on interaction semantics. To incorporate global semantics of human-scene interaction, we modify POSA to generate human bodies with vertex-level contact features from interaction semantics in the format of action-noun pairs. We denote the semantic-controllable POSA variant as POSA-I.
188
+
189
+ # 4.4 Interaction Synthesis with Semantic Control
190
+
191
+ We evaluate the synthesized interactions in terms of perceptual realism, perceptual semantic accuracy, semantic contact, physical plausibility, and diversity. Table 1 and 2 show the results of the perceptual studies on binary realism and other quantitative metrics, respectively. Our method significantly outperforms the baselines in the binary realism study and even comes close to the body poses reconstructed from the real human-scene interactions, which we consider as the pseudo ground truth. Our method also achieves higher perceptual semantic ratings than all the baselines. Quantitatively, our method achieves the highest semantic contact score (0.93) which significantly outperforms the baselines. Our method performs comparably on physical plausibility as POSA-I and significantly better than PiGraph-X. For diversity metrics, our method has a larger cluster entropy and smaller cluster size compared to the baselines. We observe more frequent unnatural interaction samples from PiGraph-X and POSA-I, which accounts for their larger cluster sizes. Note that our method is a generative pipeline where we evaluate every randomly sampled result, while both baselines need to search thousands of samples of global placement in scenes.
192
+
193
+ We show the qualitative comparison of interactions generated from ours and two baselines in Fig. 6. PiGraph-X naively models the human body as independent joints and therefore suffers from unnatural body poses, poor human-scene
194
+
195
+ Table 2: Evaluation of semantics, physical plausibility and diversity.
196
+
197
+ <table><tr><td></td><td>Semantic Accuracy</td><td>Semantic Contact</td><td>Non-Collision</td><td>Entropy</td><td>Cluster Size</td><td>Samples</td></tr><tr><td>PiGraph-X</td><td>3.90 ± 0.93</td><td>0.84</td><td>0.85</td><td>3.67</td><td>1.07</td><td>25K</td></tr><tr><td>POSA-I</td><td>4.03 ± 0.85</td><td>0.67</td><td>0.98</td><td>3.75</td><td>1.08</td><td>&gt;1K</td></tr><tr><td>Ours</td><td>4.17 ± 0.71</td><td>0.93</td><td>0.97</td><td>3.77</td><td>0.83</td><td>1</td></tr></table>
198
+
199
+ ![](images/4ffee9acd89ab51e777d699f4fa7a3c7af14ed867b3e4535407b546d0842aaad.jpg)
200
+ Fig. 6: Qualitative comparison of interactions generated with our method and two baselines. Each row shows interactions generated from one method. From left to right, the columns correspond to different interaction semantics of "lying on the sofa", "stepping up on the chair", "sitting on the chair and touching the table", and "standing on the floor and touching the shelving".
201
+
202
+ contact, and penetration. POSA-I generates bodies with physically plausible interactions, but since it needs to find plausible body placement in the scene, its optimization can easily get stuck at local minimums that are not semantically accurate and have inferior human-scene contact. In contrast, our method learns how humans interact with objects given different interaction semantics and generates realistic interactions that are both physically plausible and human-like.
203
+
204
+ # 4.5 Compositional Interaction Generation
205
+
206
+ We conduct the same evaluation for novel composite interaction generation as introduced in Sec. 4.4. We compare our method to the PiGraph-X-C extension for compositional interaction generation. POSA-I is not included in this part since it can not be easily extended for semantic composition. In the forced-alternative-choice (binary-choice) perceptual study (Tab. 1 (b)), our method significantly outperforms the baseline. The semantic accuracy, semantic contact, non-collision and diversity comparisons are shown in Tab. 3. Our method achieves significantly
207
+
208
+ ![](images/3f82fffab090b22e14ed6c81c59f3b695a3f1007bc40c743f5cdf70ac1147475.jpg)
209
+ Fig. 7: Qualitative comparison of composite interactions generated using ours-C and PiGraph-X-C. Each row shows interactions generated from one method.
210
+
211
+ Table 3: Evaluation of semantics, physical plausibility and diversity for novel compositional interaction generation.
212
+
213
+ <table><tr><td></td><td>Semantic Accuracy</td><td>Semantic Contact</td><td>Non-Collision</td><td>Entropy</td><td>Cluster Size</td><td>Samples</td></tr><tr><td>PiGraph-X-C</td><td>3.88 ± 1.15</td><td>0.80</td><td>0.84</td><td>3.72</td><td>1.09</td><td>25K</td></tr><tr><td>Ours-C</td><td>3.95 ± 1.18</td><td>0.76</td><td>0.98</td><td>3.80</td><td>0.68</td><td>1</td></tr></table>
214
+
215
+ better semantic accuracy, physical plausibility, and sample efficiency. The slight inferior semantic contact score is because the combinations of actions and objects in the test scenes may not always afford natural contact, like touching an incomplete wall in Fig. 7 (d). Touching the wall and floor simultaneously generates higher contact scores but perceptually unnatural poses to humans.
216
+
217
+ We refer to the Supp. Mat. for more qualitative results, failures, ablation study, and limitations.
218
+
219
+ # 5 Conclusion
220
+
221
+ In this paper, we introduce a method to generate humans interacting with 3D scenes given interaction semantics as action-object pairs. We propose a compositional interaction representation and transformer-based VAE models to stochastically generate human-scene interactions. We further explored generating composite interactions by composing atomic interactions, which does not demand training on composite interaction data. Our method is a step towards creating virtual avatars interacting with 3D scenes.
222
+
223
+ Acknowledgements: We sincerely acknowledge the anonymous reviewers for their insightful suggestions. We thank Francis Engelmann for help with scene segmentation and proofreading, and Siwei Zhang for providing body fitting results. This work was supported by the SNF grant 200021 204840.
224
+
225
+ # References
226
+
227
+ 1. Ahn, H., Ha, T., Choi, Y., Yoo, H., Oh, S.: Text2action: Generative adversarial synthesis from language to action. In: Proc. of ICRA. IEEE (2018)
228
+ 2. Ahuja, C., Morency, L.P.: Language2pose: Natural language grounded pose forecasting. In: Proc. of 3DV. IEEE (2019)
229
+ 3. Akhter, I., Black, M.J.: Pose-conditioned joint angle limits for 3d human pose reconstruction. In: Proc. of CVPR (2015)
230
+ 4. Engelmann, F., Rematas, K., Leibe, B., Ferrari, V.: From Points to Multi-Object 3D Reconstruction. In: Proc. of CVPR (2021)
231
+ 5. Gkioxari, G., Girshick, R., Dollár, P., He, K.: Detecting and recognizing human-object interactions. In: Proc. of CVPR (2018)
232
+ 6. Grabner, H., Gall, J., Van Gool, L.: What makes a chair a chair? In: Proc. of CVPR. IEEE (2011)
233
+ 7. Gupta, A., Kembhavi, A., Davis, L.S.: Observing human-object interactions: Using spatial and functional compatibility for recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence 31, 1775-1789 (2009)
234
+ 8. Gupta, A., Satkin, S., Efros, A.A., Hebert, M.: From 3d scene geometry to human workspace. In: Proc. of CVPR. IEEE (2011)
235
+ 9. Hassan, M., Ceylan, D., Villegas, R., Saito, J., Yang, J., Zhou, Y., Black, M.J.: Stochastic scene-aware motion prediction. In: Proc. of ICCV (2021)
236
+ 10. Hassan, M., Choutas, V., Tzionas, D., Black, M.J.: Resolving 3D human pose ambiguities with 3D scene constraints. In: Proc. of ICCV (2019)
237
+ 1. Hassan, M., Ghosh, P., Tesch, J., Tzionas, D., Black, M.J.: Populating 3D scenes by learning human-scene interaction. In: Proc. of CVPR (2021)
238
+ 2. Hu, R., Yan, Z., Zhang, J., Van Kaick, O., Shamir, A., Zhang, H., Huang, H.: Predictive and generative neural networks for object functionality. arXiv preprint arXiv:2006.15520 (2020)
239
+ 3. Ji, S., Xu, W., Yang, M., Yu, K.: 3d convolutional neural networks for human action recognition. IEEE transactions on pattern analysis and machine intelligence 35(1), 221-231 (2012)
240
+ 4. Kay, W., Carreira, J., Simonyan, K., Zhang, B., Hillier, C., Vijayanarasimhan, S., Viola, F., Green, T., Back, T., Natsev, P., et al.: The kinetics human action video dataset. arXiv preprint arXiv:1705.06950 (2017)
241
+ 5. Kim, V.G., Chaudhuri, S., Guibas, L.J., Funkhouser, T.: Shape2pose: humancentric shape analysis. In: ACM Transactions on Graphics, (Proc. SIGGRAPH) (2014)
242
+ 6. Kingma, D.P., Welling, M.: Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114 (2013)
243
+ 7. Li, X., Liu, S., Kim, K., Wang, X., Yang, M.H., Kautz, J.: Putting humans in a scene: Learning affordance in 3d indoor environments. In: Proc. of CVPR (2019)
244
+ 8. Lieber, R., Stekauer, P.: The oxford handbook of compounding (2011)
245
+ 9. Mahmood, N., Ghorbani, N., Troje, N.F., Pons-Moll, G., Black, M.J.: AMASS: Archive of motion capture as surface shapes. In: Proc. of ICCV (2019)
246
+ 20. Mandery, C., Terlemez, O., Do, M., Vahrenkamp, N., Asfour, T.: The kit whole-body human motion database. In: Proc. of ICAR (2015)
247
+ 21. Mineshima, K., Martínez-Gómez, P., Miyao, Y., Bekki, D.: Higher-order logical inference with compositional semantics. In: Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing (2015)
248
+
249
+ 22. Mitchell, J., Lapata, M.: Vector-based models of semantic composition. In: Proc. of ACL (2008)
250
+ 23. Pavlakos, G., Choutas, V., Ghorbani, N., Bolkart, T., Osman, A.A.A., Tzionas, D., Black, M.J.: Expressive body capture: 3d hands, face, and body from a single image. In: Proc. of CVPR (2019)
251
+ 24. Petrovich, M., Black, M.J., Varol, G.: Action-conditioned 3d human motion synthesis with transformer vae. In: Proc. of ICCV (2021)
252
+ 25. Plag, I.: Word-formation in English. Cambridge University Press (2018)
253
+ 26. Punnakkal, A.R., Chandrasekaran, A., Athanasiou, N., Quiros-Ramirez, A., Black, M.J.: BABEL: Bodies, action and behavior with english labels. In: Proc. of CVPR (2021)
254
+ 27. Qi, C.R., Yi, L., Su, H., Guibas, L.J.: Pointnet++: Deep hierarchical feature learning on point sets in a metric space. arXiv preprint arXiv:1706.02413 (2017)
255
+ 28. Ranjan, A., Bolkart, T., Sanyal, S., Black, M.J.: Generating 3D faces using convolutional mesh autoencoders. In: Proc. of ECCV (2018)
256
+ 29. Rumelhart, D.E., Hinton, G.E., Williams, R.J.: Learning internal representations by error propagation. Tech. rep., California Univ San Diego La Jolla Inst for Cognitive Science (1985)
257
+ 30. Savva, M., Chang, A.X., Hanrahan, P., Fisher, M., Nießner, M.: Scenegrok: Inferring action maps in 3d environments. ACM transactions on graphics (TOG), (Proc. SIGGRAPH) 33(6), 1-10 (2014)
258
+ 31. Savva, M., Chang, A.X., Hanrahan, P., Fisher, M., Nießner, M.: PiGraphs: Learning Interaction Snapshots from Observations. ACM Transactions on Graphics, (Proc. SIGGRAPH) 35(4) (2016)
259
+ 32. Simonyan, K., Zisserman, A.: Two-stream convolutional networks for action recognition in videos. Proc. of NeurIPS (2014)
260
+ 33. Sohn, K., Lee, H., Yan, X.: Learning structured output representation using deep conditional generative models. Proc. of NeurIPS (2015)
261
+ 34. Starke, S., Zhang, H., Komura, T., Saito, J.: Neural state machine for character-scene interactions. In: ACM Trans. Graph.(ACM SIGGRAPH Asia) (2019)
262
+ 35. Tevet, G., Gordon, B., Hertz, A., Bermano, A.H., Cohen-Or, D.: Motionclip: Exposing human motion generation to clip space. arXiv preprint arXiv:2203.08063 (2022)
263
+ 36. De la Torre, F., Hodgins, J., Bargteil, A., Martin, X., Macey, J., Collado, A., Beltran, P.: Guide to the carnegie mellon university multimodal activity (cmummac) database (2009)
264
+ 37. Tran, D., Wang, H., Torresani, L., Ray, J., LeCun, Y., Paluri, M.: A closer look at spatiotemporal convolutions for action recognition. In: Proc. of CVPR (2018)
265
+ 38. Troje, N.F.: Decomposing biological motion: A framework for analysis and synthesis of human gait patterns. Journal of Vision 2, 371-387 (2002)
266
+ 39. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L., Polosukhin, I.: Attention is all you need. Proc. of NeurIPS (2017)
267
+ 40. Wang, J., Xu, H., Xu, J., Liu, S., Wang, X.: Synthesizing long-term 3d human motion and interaction in 3d scenes. In: Proc. of CVPR (2021)
268
+ 41. Wang, J., Rong, Y., Liu, J., Yan, S., Lin, D., Dai, B.: Towards diverse and natural scene-aware 3d human motion synthesis. In: Proc. of CVPR (2022)
269
+ 42. Yao, B., Fei-Fei, L.: Modeling mutual context of object and human pose in human-object interaction activities. In: Proc. of CVPR (2010)
270
+ 43. Yin, D., Meng, T., Chang, K.W.: Sentibert: A transferable transformer-based architecture for compositional sentiment semantics. arXiv preprint arXiv:2005.04114 (2020)
271
+
272
+ 44. Zhang, S., Zhang, Y., Bogo, F., Marc, P., Tang, S.: Learning motion priors for 4d human body capture in 3d scenes. In: Proc. of ICCV (2021)
273
+ 45. Zhang, S., Zhang, Y., Ma, Q., Black, M.J., Tang, S.: PLACE: Proximity learning of articulation and contact in 3D environments. In: Proc. of 3DV (2020)
274
+ 46. Zhang, Y., Hassan, M., Neumann, H., Black, M.J., Tang, S.: Generating 3d people in scenes without people. In: Proc. of CVPR (2020)
compositionalhumansceneinteractionsynthesiswithsemanticcontrol/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c8e4d644a48d73c5468e131bd2486fc42eea3459973ed14a5debbeab805171de
3
+ size 428352
compositionalhumansceneinteractionsynthesiswithsemanticcontrol/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae6d07e47215741f7d1085e41210bc754d49f45048652a41ce977002e054063c
3
+ size 335681
compositionalvisualgenerationwithcomposablediffusionmodels/6b5233b8-d7c6-4251-96ae-22b3d8016aa7_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b98779c9ccf236b6916c2fd5af86a7e82c1f8a3cdb8a4fd703dc323a8a960ac
3
+ size 94796
compositionalvisualgenerationwithcomposablediffusionmodels/6b5233b8-d7c6-4251-96ae-22b3d8016aa7_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:968179da8f0b9da00e50388b86338423c65a54adc3a7799619460b9ad5a4d42b
3
+ size 120094
compositionalvisualgenerationwithcomposablediffusionmodels/6b5233b8-d7c6-4251-96ae-22b3d8016aa7_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa53eebb32db4cd49df4c1a4376b1e2e2629a169c749ff56de3e113d0b2f616a
3
+ size 1672701
compositionalvisualgenerationwithcomposablediffusionmodels/full.md ADDED
@@ -0,0 +1,484 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Compositional Visual Generation with Composable Diffusion Models
2
+
3
+ Nan Liu $^{1\star}$ , Shuang Li $^{2\star}$ , Yilun Du $^{2\star}$
4
+
5
+ Antonio Torralba², and Joshua B. Tenenbaum²
6
+
7
+ <sup>1</sup> University of Illinois Urbana-Champaign
8
+
9
+ 2 Massachusetts Institute of Technology
10
+
11
+ nanliu4@illinois.edu, {lishuang,yilundu,torralba,jbt}@mit.edu
12
+
13
+ Abstract. Large text-guided diffusion models, such as DALLE-2, are able to generate stunning photorealistic images given natural language descriptions. While such models are highly flexible, they struggle to understand the composition of certain concepts, such as confusing the attributes of different objects or relations between objects. In this paper, we propose an alternative structured approach for compositional generation using diffusion models. An image is generated by composing a set of diffusion models, with each of them modeling a certain component of the image. To do this, we interpret diffusion models as energy-based models in which the data distributions defined by the energy functions may be explicitly combined. The proposed method can generate scenes at test time that are substantially more complex than those seen in training, composing sentence descriptions, object relations, human facial attributes, and even generalizing to new combinations that are rarely seen in the real world. We further illustrate how our approach may be used to compose pre-trained text-guided diffusion models and generate photorealistic images containing all the details described in the input descriptions, including the binding of certain object attributes that have been shown difficult for DALLE-2. These results point to the effectiveness of the proposed method in promoting structured generalization for visual generation.
14
+
15
+ Keywords: Compositionality, Diffusion Models, Energy-based Models, Visual Generation
16
+
17
+ # 1 Introduction
18
+
19
+ Our understanding of the world is highly compositional in nature. We are able to rapidly understand new objects from their components, or compose words into complex sentences to describe the world states we encounter [21]. We are able
20
+
21
+ (a) Composing Language Descriptions
22
+ ![](images/01c1b8ee3118a9d63c7f559031fd11cf79680e5885cb92819e6e8f88266aded6.jpg)
23
+ "A red car parked in a desert" AND "hills behind the car" AND "Aurora in the sky"
24
+
25
+ ![](images/cc4a792e64e446eb250e39b8f7fe89c09f1a93dfa9522293af7ed998be7995b6.jpg)
26
+ "The sun setting in a horizon" AND "A house next to a pond" AND "Hills in the background"
27
+
28
+ ![](images/69c0862e3edf30684cdf526954c99168df348e2dd29b4dae9390670ef5a1b27f.jpg)
29
+ "A house with snow on the roof" AND "The house behind a tree" AND "A car in front of a tree"
30
+
31
+ ![](images/24d1fcdce14ecf00f1e26ef11d45409d5699801d7e26ceb2b7f50f993e9eb6c1.jpg)
32
+ "A cloudy blue sky" AND "A mountain in the horizon" AND "Cherry Blossoms in front of the mountain"
33
+
34
+ ![](images/d137f0582ab6611bcb2d170b10e1cea23cc30d1211915b6205fc7243b0383eb2.jpg)
35
+ "A Ferris wheel" AND "A lake right next to the Ferris wheel" AND Buildings next to the lake
36
+
37
+ ![](images/525cae3631717e72b520471b1eb4883833399740ace5d4316be8d734596e7f15.jpg)
38
+ "Palm trees on both sides of the street" AND "Pink Sunset in the horizon" AND "A car moving away"
39
+
40
+ (b) Composing Objects
41
+ Fig. 1: Our method allows compositional visual generation across a variety of domains, such as language descriptions, objects, object relations, and human attributes.
42
+ ![](images/b23aa47e37627d5285dee32e837656ea84cb3b612ed5274575d9fb0ce439be4c.jpg)
43
+ Obj1 (0.1, 0.5) AND Obj1 (0.1, 0.65) AND Obj2 (0.5, 0.3) AND Obj2 (0.3, 0.55) AND Obj3 (0.5, 0.65) AND Obj3 (0.5, 0.45) AND Obj4 (0.7, 0.5) Obj4 (0.7, 0.3)
44
+
45
+ (c) Composing Object Relations
46
+ ![](images/d9f700bca5b8c9c123b820b1d4dc5b00012cf9826ab945084800049649055175.jpg)
47
+ "A large purple metal "A large yellow rubber cube to the left of a cylinder to the right large gray rubber of a small gray metal cube" AND "A large cube" AND "A large purple metal cube to yellow rubber cylinder the right of a large below a large red yellow rubber sphere" rubber cube
48
+
49
+ (d) Composing Facial Attributes
50
+ ![](images/8b5c6bea14f55650ee6eed6566b5d87c9c7995e978b870c4dd0ccc476d621d0e.jpg)
51
+ NOT Female) AND Smiling AND (NOT Glasses)
52
+
53
+ ![](images/ba85e6d1e5c2e4b4cb0c0db7088e8661519a38299f0c84ca2ea9d109cf75ae13.jpg)
54
+ Male AND Blonde hair AN (NOT glasses)
55
+
56
+ to make 'infinite use of finite means' [4], i.e., repeatedly reuse and recombine concepts we have acquired in a potentially infinite manner. We are interested in constructing machine learning systems to have such compositional capabilities, particularly in the context of generative modeling.
57
+
58
+ Existing text-conditioned diffusion models such as DALLE-2 [30] have recently made remarkable strides towards compositional generation, and are capable in generating photorealistic images given textual descriptions. However, such systems are not fully compositional in nature and generate incorrect images when given more complex descriptions [24,39]. An underlying difficulty may be that such models encode text descriptions as fixed-size latent vectors. However, as textual descriptions become more complex, more information needs to be squeezed into the fixed-size vector. Thus it is impossible to encode arbitrarily complex textual descriptions.
59
+
60
+ In this work, we propose to factorize the compositional generation problem, using different diffusion models to capture different subsets of a compositional specification. These diffusion models are then explicitly composed together to jointly generate an image. By explicitly factorizing the compositional generative modeling problem, our method is able to generalize to significantly more complex combinations that are unseen during training.
61
+
62
+ Such an explicit form of compositionality has been explored before under the context of Energy-Based Models (EBMs) [7,8,23]. However, directly training EBMs has been proved to be unstable and hard to scale. We show that diffu
63
+
64
+ sion models can be interpreted as implicitly parameterized EBMs, which can be further composed for image generation, significantly improving training stability and image quality.
65
+
66
+ Our proposed method enables zero-shot compositional generation across different domains as shown in Figure 1. First, we illustrate how our approach may be applied to large pre-trained diffusion models, such as GLIDE [26], to compose multiple text descriptions. Next, we illustrate how our approach can be applied to compose objects and object relations, enabling zero-shot generalization to a larger number of objects. Finally, we illustrate how our framework can compose different facial attributes to generate human faces.
67
+
68
+ Contributions: In this paper, we introduce an approach towards compositional visual generation using diffusion models. First, we show that diffusion models can be composed by interpreting them as energy-based models and drawing on this connection, show how we may compose diffusion models together.
69
+
70
+ Second, we propose two compositional operators, conjunction and negation, on top of diffusion models that allow us to compose concepts in different domains during inference without any additional training. We show that the proposed method enables effective zero-shot combinatorial generalization. Finally, we evaluate our method on composing language descriptions, objects, object relations, and human facial attributes. Our method can generate high-quality images containing all the concepts and outperforms baselines by a large margin. For example, the accuracy of our method is $24.02\%$ higher than the best baseline for composing three objects in the specified positions on the CLEVR dataset.
71
+
72
+ # 2 Related Work
73
+
74
+ Controllable Image Generation. Our work is related to existing work on controllable image generation. One type of approach towards controllable image generation specifies the underlying content of an image utilizing text through either GANs [43,44,2], VQ-VAEs [31], or diffusion models [26]. An alternative type of approach towards controllable image generation manipulates the underlying attributes in an image [35,42,46]. In contrast, we are interested in compositionally controlling the underlying content of an image at test time, generating images that exhibit compositions of multiple different types of image content. Thus, most relevant to our work, existing work has utilized EBMs to compose different factors describing a scene [7,27,8,23]. We illustrate how we may implement such probabilistic composition on diffusion models, achieving better performance.
75
+
76
+ Diffusion Models. Diffusion models have emerged as a promising class of generative models that formulates the data-generating process as an iterative denoising procedure [36,15]. The denoising procedure can be seen as parameterizing the gradients of the data distribution [38], connecting diffusion models to EBMs [22,10,28,12,11]. Diffusion models have recently shown great promise in image generation [6], enabling effective image editing [25,20], text conditioning [26,32,13], and image inpainting [33]. The iterative, gradient-based sampling of diffusion models lends itself towards flexible conditioning [6], enabling us to com-
77
+
78
+ pose factors across different images. While diffusion models have been developed for image generation [37], they have further proven successful in the generation of waveforms [3], 3D shapes [45], decision making [16] and text [1], suggesting that our proposed composition operators may further be applied in such domains.
79
+
80
+ # 3 Background
81
+
82
+ # 3.1 Denoising Diffusion Models
83
+
84
+ Denoising Diffusion Probabilistic Models (DDPMs) are a class of generative models where generation is modeled as a denoising process. Starting from sampled noise, the diffusion model performs $T$ denoising steps until a sharp image is formed. In particular, the denoising process produces a series of intermediate images with decreasing levels of noise, denoted as $\boldsymbol{x}_T, \boldsymbol{x}_{T-1}, \dots, \boldsymbol{x}_0$ , where $\boldsymbol{x}_T$ is sampled from a Gaussian prior and $\boldsymbol{x}_0$ is the final output image.
85
+
86
+ DDPMs construct a forward diffusion process by gradually adding Gaussian noise to the ground truth image. A diffusion model then learns to revert this noise corruption process. Both the forward processes $q(\pmb{x}_t|\pmb{x}_{t-1})$ and the reverse process $q(\pmb{x}_{t-1}|\pmb{x}_t)$ are modeled as the products of Markov transition probabilities:
87
+
88
+ $$
89
+ q \left(\boldsymbol {x} _ {0: T}\right) = q \left(\boldsymbol {x} _ {0}\right) \prod_ {t = 1} ^ {T} q \left(\boldsymbol {x} _ {t} \mid \boldsymbol {x} _ {t - 1}\right), \quad p _ {\theta} \left(\boldsymbol {x} _ {T: 0}\right) = p \left(\boldsymbol {x} _ {T}\right) \prod_ {t = T} ^ {1} p _ {\theta} \left(\boldsymbol {x} _ {t - 1} \mid \boldsymbol {x} _ {t}\right), \tag {1}
90
+ $$
91
+
92
+ where $q(\pmb{x}_0)$ is the real data distribution and $p(\pmb{x}_T)$ is a standard Gaussian prior.
93
+
94
+ A generative process $p_{\theta}(\pmb{x}_{t-1}|\pmb{x}_t)$ is trained to generate realistic images by approximating the reverse process through variational inference. Each step of the generative process is a Gaussian distribution with learned mean and covariance:
95
+
96
+ $$
97
+ p _ {\theta} \left(\boldsymbol {x} _ {t - 1} \mid \boldsymbol {x} _ {t}\right) := \mathcal {N} \left(\mu_ {\theta} \left(\boldsymbol {x} _ {t}, t\right), \sigma_ {t} ^ {2}\right) = \mathcal {N} \left(\boldsymbol {x} _ {t} + \epsilon_ {\theta} \left(\boldsymbol {x} _ {t}, t\right), \sigma_ {t} ^ {2}\right), \tag {2}
98
+ $$
99
+
100
+ where $\pmb{x}_{t-1}$ is parameterized by a mean $\mu_{\theta}(\pmb{x}_t, t)$ represented by a perturbation $\epsilon_{\theta}(\pmb{x}_t, t)$ to a noisy image $\pmb{x}_t$ . The goal is to remove the noise gradually by predicting a less noisy image at timestep $\pmb{x}_{t-1}$ given a noisy image $\pmb{x}_t$ . To generate real images, we sample $\pmb{x}_{t-1}$ from $t = T$ to $t = 1$ using the parameterized marginal distribution $p_{\theta}(\pmb{x}_{t-1}|\pmb{x}_t)$ , with an individual step corresponding to:
101
+
102
+ $$
103
+ \boldsymbol {x} _ {t - 1} = \boldsymbol {x} _ {t} + \epsilon_ {\theta} \left(\boldsymbol {x} _ {t}, t\right) + \mathcal {N} \left(0, \sigma_ {t} ^ {2}\right). \tag {3}
104
+ $$
105
+
106
+ The generated images become more realistic over multiple iterations.
107
+
108
+ # 3.2 Energy Based Models
109
+
110
+ Energy-Based Models (EBMs) [10,9,12,28] are a class of generative models where the data distribution is modeled using an unnormalized probability density. Given an image $\pmb{x} \in \mathbb{R}^D$ , the probability density of image $\pmb{x}$ is defined as:
111
+
112
+ $$
113
+ p _ {\theta} (\boldsymbol {x}) \propto e ^ {- E _ {\theta} (\boldsymbol {x})}, \tag {4}
114
+ $$
115
+
116
+ ![](images/4d42121cb94c646418435c81eb27ad3d023ab440f32d000a36a02bcee50eeaf8.jpg)
117
+ Fig. 2: Compositional generation. Our method can compose multiple concepts during inference and generate images containing all the concepts without further training. We first send an image from iteration $t$ and each of the concept to the diffusion model to generate a set of scores $\{\epsilon_{\theta}(\pmb{x}_t,t|\pmb{c}_1),\dots,\epsilon_{\theta}(\pmb{x}_t,t|\pmb{c}_n)\}$ . We then compose different concepts using the proposed compositional operators, such as conjunction, to denoise the generated images. The final image is obtained after $T$ iterations.
118
+
119
+ where the energy function $E_{\theta}(\pmb {x}):\mathbb{R}^{D}\to \mathbb{R}$ is a learnable neural network.
120
+
121
+ A gradient based MCMC procedure, Langevin dynamics [10], is then used to sample from an unnormalized probability distribution to iteratively refine the generated image $\pmb{x}$ :
122
+
123
+ $$
124
+ \boldsymbol {x} _ {t} = \boldsymbol {x} _ {t - 1} - \frac {\lambda}{2} \nabla_ {\boldsymbol {x}} E _ {\theta} (\boldsymbol {x} _ {t - 1}) + \mathcal {N} (0, \sigma^ {2}). \tag {5}
125
+ $$
126
+
127
+ The procedure for sampling from diffusion models in Equation (3) is functionally similar to the sampling procedure used by EBMs in Equation (5). In both settings, images are iteratively refined starting from Gaussian noise, with a small amount of additional Gaussian noise added at each iterative step.
128
+
129
+ # 4 Our approach
130
+
131
+ In this section, we first introduce how we may interpret diffusion models as energy-based models in section 4.1 and then introduce how we compose diffusion models for visual generation in section 4.2.
132
+
133
+ # 4.1 Diffusion Models as Energy Based Models
134
+
135
+ The sampling procedure of diffusion models in Equation (3) and EBMs in Equation (5) are functionally similar. At a timestep $t$ , in diffusion models, images are updated using a learned denoising network $\epsilon_{\theta}(\pmb{x}_t,t)$ while in EBMs, images are updated using the gradient of the energy function $\nabla_{\pmb{x}}E_{\theta}(\pmb{x}_t)\propto \nabla_{\pmb{x}}\log p_{\theta}(\pmb {x})$ which is the score of the estimated probability distribution $p_{\theta}(\pmb {x})$ .
136
+
137
+ The denoising network $\epsilon_{\theta}(\pmb{x}_{t}, t)$ is trained to predict the underlying score of the data distribution [41,37] when the number of diffusion steps increases to infinity. Similarly, an EBM is trained so that $\nabla_{\pmb{x}}E_{\theta}(\pmb{x}_{t})$ corresponds to the score of the data distribution as well. In this sense, $\epsilon_{\theta}(\pmb{x}_{t}, t)$ and $\nabla_{\pmb{x}}E_{\theta}(\pmb{x}_{t})$ are functionally the same, and the underlying sampling procedure in Equation (3) and
138
+
139
+ Equation (5) are equivalent. We may view a trained diffusion model $\epsilon_{\theta}(\pmb{x}_t,t)$ as implicitly parameterizing an EBM by defining its data gradient $\nabla_{\pmb{x}}E_{\theta}(\pmb{x}_{t})$ at each data point, and we will subsequently refer to $\epsilon_{\theta}(\pmb{x}_t,t)$ as the score function. Such a parameterization enables us to leverage past work towards composing EBMs and apply it to diffusion models.
140
+
141
+ Composing EBMs. Previous EBMs [14,7] have shown good compositionality ability for visual generation. Given $n$ independent EBMs, $E_{\theta}^{1}(\pmb{x}), \dots, E_{\theta}^{n}(\pmb{x})$ , the functional form of EBMs in Equation (4) enable us to compose multiple separate EBMs together to obtain a new EBM. The composed distribution can be represented as:
142
+
143
+ $$
144
+ p _ {\text {c o m p o s e}} (\boldsymbol {x}) \propto p _ {\theta} ^ {1} (\boldsymbol {x}) \dots p _ {\theta} ^ {n} (\boldsymbol {x}) \propto e ^ {- \sum_ {i} E _ {\theta} ^ {i} (\boldsymbol {x})} = e ^ {- E _ {\theta} (\boldsymbol {x})}, \tag {6}
145
+ $$
146
+
147
+ where $p_{\theta}^{i}\propto e^{-E_{\theta}^{i}(\pmb {x})}$ is the probability density of image $\pmb{x}$ (Equation (4)). Langevin dynamics is used to iteratively refine the generated image $\pmb{x}$ .
148
+
149
+ $$
150
+ \boldsymbol {x} _ {t} = \boldsymbol {x} _ {t - 1} - \frac {\lambda}{2} \nabla_ {\boldsymbol {x}} \left(\sum_ {i} E _ {\theta} ^ {i} \left(\boldsymbol {x} _ {t - 1}\right)\right) + \mathcal {N} (0, \sigma^ {2}). \tag {7}
151
+ $$
152
+
153
+ Composing Diffusion Models. By leveraging the interpretation that diffusion models are functionally similar to EBMs, we may compose diffusion models in a similar way. The generative process and the score function of a diffusion model can be represented as $p_{\theta}^{i}(\pmb{x}_{t - 1}|\pmb{x}_{t})$ and $\epsilon_{\theta}^{i}(\pmb{x},t)$ , respectively. If we treat the individual score function in diffusion models as the learned gradient of energy functions in EBMs, the composition of diffusion models has a score function of $\sum_{i}\epsilon_{\theta}^{i}(\pmb {x},t)$ . Thus the generative process of composing multiple diffusion models becomes:
154
+
155
+ $$
156
+ p _ {\text {c o m p o s e}} \left(\boldsymbol {x} _ {t - 1} \mid \boldsymbol {x} _ {t}\right) = \mathcal {N} \left(\boldsymbol {x} _ {t} + \sum_ {i} \epsilon_ {\theta} ^ {i} \left(\boldsymbol {x} _ {t}, t\right), \sigma_ {t} ^ {2}\right). \tag {8}
157
+ $$
158
+
159
+ A complication when parameterizing of a gradient field of EBM $\nabla_{\pmb{x}}E_{\theta}(\pmb{x}_t)$ with a learned score function $\epsilon_{\theta}(\pmb{x},t)$ , is that the gradient field may not be conservative, and thus does not lead to a valid probability density. However, as discussed in [34], explicitly parameterizing the learned function $\epsilon_{\theta}(\mathbf{x},t)$ as the gradient of EBM achieves similar performance as the non-conservative parameterization of diffusion models, suggesting this is not problematic.
160
+
161
+ # 4.2 Compositional Generation through Diffusion Models
162
+
163
+ Next, we discuss how we compose diffusion models for image generation. We aim to generate images conditioned on a set of concepts $\{c_1, c_2, \ldots, c_n\}$ . To do this, we represent each concept $c_i$ as an individual diffusion model, which are composed to generate images. Inspired by EBMs [7,23], we define two compositional operators, conjunction (AND) and negation (NOT), to compose diffusion models. We learn a set of diffusion models representing the conditional image generation $p(\boldsymbol{x} | c_i)$ given factor $c_i$ and an unconditional image generation $p(\boldsymbol{x})$ .
164
+
165
+ Concept Conjunction (AND). We aim to generate images containing certain attributes. Following [7], the conditional probability can be factorized as
166
+
167
+ $$
168
+ p (\boldsymbol {x} | \boldsymbol {c} _ {1}, \dots , \boldsymbol {c} _ {n}) \propto p (\boldsymbol {x}, \boldsymbol {c} _ {1}, \dots , \boldsymbol {c} _ {n}) = p (\boldsymbol {x}) \prod_ {i} p (\boldsymbol {c} _ {i} | \boldsymbol {x}). \tag {9}
169
+ $$
170
+
171
+ We can represent $p(\pmb{c}_i|\pmb{x})$ using a combination of a conditional distribution $p(\pmb{x}|\pmb{c}_i)$ and an unconditional distribution $p(\pmb{x})$ , with both of them are parameterized as diffusion models $p(\pmb{c}_i|\pmb{x}) \propto \frac{p(\pmb{x}|\pmb{c}_i)}{p(\pmb{x})}$ . The expression of $p(\pmb{c}_i|\pmb{x})$ corresponds to the implicit classifier that represents the likelihood of $\pmb{x}$ exhibiting factor $\pmb{c}_i$ . Substituting $p(\pmb{c}_i|\pmb{x})$ in Equation 9, we can rewrite Equation 9 as the probability distribution:
172
+
173
+ $$
174
+ p (\boldsymbol {x} | \boldsymbol {c} _ {1}, \dots , \boldsymbol {c} _ {n}) \propto p (\boldsymbol {x}) \prod_ {i} \frac {p (\boldsymbol {x} | \boldsymbol {c} _ {i})}{p (\boldsymbol {x})}. \tag {10}
175
+ $$
176
+
177
+ We sample from this resultant distribution using Equation (8), with a new composed score function $\epsilon^{*}(\pmb{x}_{t},t)$ :
178
+
179
+ $$
180
+ \epsilon^ {*} (\boldsymbol {x} _ {t}, t) = \epsilon_ {\theta} (\boldsymbol {x} _ {t}, t) + \alpha \sum_ {i} \left(\epsilon_ {\theta} \left(\boldsymbol {x} _ {t}, t \mid \boldsymbol {c} _ {i}\right) - \epsilon_ {\theta} \left(\boldsymbol {x} _ {t}, t\right)\right), \tag {11}
181
+ $$
182
+
183
+ where the constant $\alpha$ corresponds to a temperature scaling on $\frac{p(\boldsymbol{x}|\boldsymbol{c}_i)}{p(\boldsymbol{x})}$ . We may then generate the composed sample using the following generative process:
184
+
185
+ $$
186
+ p ^ {*} \left(\boldsymbol {x} _ {t - 1} \mid \boldsymbol {x} _ {t}\right) := \mathcal {N} \left(\boldsymbol {x} _ {t} + \epsilon^ {*} \left(\boldsymbol {x} _ {t}, t\right), \sigma_ {t} ^ {2}\right). \tag {12}
187
+ $$
188
+
189
+ In the setting in which image generation is conditioned on a single concept, the above sampling procedure reduces to classifier-free guidance.
190
+
191
+ Concept Negation (NOT). In concept negation, we aim to generate image with the absence of a certain factor $\tilde{\pmb{c}}_j$ . We also need to generate images that look realistic. One easy way to do this is to make the generated images contain another factor $\pmb{c}_i$ . Following [7], concept negation can be represented as the composed probability distribution $p(\pmb{x}|$ not $\tilde{\pmb{c}}_j,\pmb{c}_1,\pmb{c}_2,\dots ,\pmb{c}_n) = \frac{\prod_i p(\pmb{x}|\pmb{c}_i)}{p(\pmb{x}|\tilde{\pmb{c}}_j)^{\alpha}}$ . Following [7], we refactorize the joint probability distribution as:
192
+
193
+ $$
194
+ p (\boldsymbol {x} | \text {n o t} \tilde {\boldsymbol {c}} _ {j}, \boldsymbol {c} _ {1}, \boldsymbol {c} _ {2}, \dots , \boldsymbol {c} _ {n}) \propto p (\boldsymbol {x}, \text {n o t} \tilde {\boldsymbol {c}} _ {j}, \boldsymbol {c} _ {1}, \boldsymbol {c} _ {2}, \dots , \boldsymbol {c} _ {n}) = p (\boldsymbol {x}) \frac {\prod_ {i} p (\boldsymbol {c} _ {i} | \boldsymbol {x})}{p (\tilde {\boldsymbol {c}} _ {j} | \boldsymbol {x}) ^ {\beta}}. \tag {13}
195
+ $$
196
+
197
+ Using the implicit classifier factorization $p(\pmb{c}_i|\pmb{x}) \propto \frac{p(\pmb{x}|\pmb{c}_i)}{p(\pmb{x})}$ , we can rewrite the above expression as:
198
+
199
+ $$
200
+ p (\boldsymbol {x} | \text {n o t} \tilde {\boldsymbol {c}} _ {j}, \boldsymbol {c} _ {1}, \boldsymbol {c} _ {2}, \dots , \boldsymbol {c} _ {n}) \propto p (\boldsymbol {x}) \frac {p (\boldsymbol {x}) ^ {\beta}}{p (\boldsymbol {x} | \tilde {\boldsymbol {c}} _ {j}) ^ {\beta}} \prod_ {i} \frac {p (\boldsymbol {x} | \boldsymbol {c} _ {i})}{p (\boldsymbol {x})}. \tag {14}
201
+ $$
202
+
203
+ Similarly, we may construct a new learned score $\epsilon^{*}(\pmb{x}_{t},t)$ using Equation (8) to sample from the generative process to represent this negated probability distribution at each timestep:
204
+
205
+ Algorithm 1 Code for Composing Diffusion Models
206
+ 1: Require Diffusion model $\epsilon_{\theta}(\pmb{x},t|\pmb{c})$ , scale $\alpha$ negation factor $\beta$ noises $\sigma_t$
207
+ 2: // Code for conjunction
208
+ 3: Initialize sample $x_{T}\sim \mathcal{N}(\mathbf{0},\mathbf{I})$
209
+ 4: for $t = T,\dots ,1$ do
210
+ 5: $\epsilon_i\gets \epsilon_\theta (\pmb {x}_t,t|\pmb {c}_i)$ // compute conditional scores for each factor $c_{i}$
211
+ 6: $\epsilon \leftarrow \epsilon_{\theta}(\pmb {x}_t,t)$ // compute unconditional score
212
+ 7: $x_{t - 1}\sim \mathcal{N}(x_t + \epsilon +\alpha \sum_i(\epsilon_i - \epsilon),\sigma_t^2)$ // sampling
213
+ 8: end for
214
+ 9:
215
+ 10: // Code for negation
216
+ 11: Initialize sample $x_{T}\sim \mathcal{N}(\mathbf{0},\mathbf{I})$
217
+ 12: for $t = T,\ldots ,1$ do
218
+ 13: $\tilde{\epsilon}_{j}\gets \epsilon_{\theta}(\pmb{x}_{t},t|\tilde{\pmb{c}}_{j})$ // compute conditional scores for negated factor $\tilde{c}_j$
219
+ 14: $\epsilon_{i}\gets \epsilon_{\theta}(\pmb{x}_{t},t|\pmb{c}_{i})$ // compute conditional scores for each factor $c_{i}$
220
+ 15: $\epsilon \leftarrow \epsilon_{\theta}(\pmb {x}_t,t)$ // compute unconditional score
221
+ 16: $x_{t - 1}\sim \mathcal{N}(x_t + \epsilon +\alpha \{-\beta (\tilde{\epsilon}_j - \epsilon) + \sum_i(\epsilon_i - \epsilon)\} ,\sigma_t^2)$ // sampling
222
+ 17: end for
223
+
224
+ $$
225
+ \epsilon^ {*} (\boldsymbol {x} _ {t}, t) = \epsilon_ {\theta} (x _ {t}, t) + \alpha \{- \beta \left(\epsilon_ {\theta} \left(\boldsymbol {x} _ {t}, t \mid \tilde {\boldsymbol {c}} _ {j}\right) - \epsilon_ {\theta} (\boldsymbol {x} _ {t}, t)\right) + \sum_ {i} \left(\epsilon_ {\theta} \left(\boldsymbol {x} _ {t}, t \mid \boldsymbol {c} _ {i}\right) - \epsilon_ {\theta} (\boldsymbol {x} _ {t}, t)\right) \}, \tag {15}
226
+ $$
227
+
228
+ where the constant $\alpha$ corresponds to a temperature scaling on each implicit classifier $\frac{p(\boldsymbol{x}|\boldsymbol{c}_i)}{p(\boldsymbol{x})}$ . We may then generate samples from this modified learned score using Equation 12.
229
+
230
+ Algorithm 1 provides the pseudo-code for composing diffusion models using concept conjunction and negation. Our method can compose pre-trained diffusion models during inference time without any additional training.
231
+
232
+ # 5 Experiment Setup
233
+
234
+ # 5.1 Datasets
235
+
236
+ CLEVR. CLEVR [17] is a synthetic dataset containing objects with different shapes, colors, and sizes. The training set consists of 30,000 images at $128 \times 128$ resolution. Each image contains $1 \sim 5$ objects and a 2D coordinate $(x,y)$ label indicating that the image contains an object at $(x,y)$ . In our experiments, the 2D coordinate label is the coordinate of one random object in the image.
237
+
238
+ Relational CLEVR. Relational CLEVR [23] contains relational descriptions between objects in the image, such as "a red cube to the left of a blue cylinder". The training dataset contains 50,000 images at $128 \times 128$ resolution. Each training image contains $1 \sim 5$ objects, and one label describing a relation between
239
+
240
+ two objects. If there is only one object in the image, the second object in the relational description is null.
241
+
242
+ FFHQ. FFHQ [18] is a real world human face dataset. The original FFHQ dataset consists of 70,000 human face images without labels. [5] annotates three binary attributes, including smile, gender, and glasses, for the images using pretrained classifiers. As a result, there are 51,067 images labeled by the classifiers.
243
+
244
+ # 5.2 Evaluation Metrics
245
+
246
+ Binary classification accuracy. During testing, we evaluate the performance of the proposed method and baselines on three different settings. The first test setting, 1 Component, generates images conditioned on a single concept (matching the training distribution). The second and third test settings,
247
+
248
+ 2 Components and 3 Components, generate images by composing two and three concepts respectively using the conjunction and negation operators. They are used to evaluate the models' generalization ability to new combinations.
249
+
250
+ For each task, we use the training data (real images) to train a binary classifier that takes an image and a concept, e.g. 'smiling', as input, and predicts whether the image contains or represents the concept. We then apply this classifier to a generated image, checking whether it faithfully captures each of the concepts. In each test setting, each method generates 5,000 images for evaluation. The accuracy of the method is the percentage of generated images capturing all the concepts (See Appendix B).
251
+
252
+ Frechet Inception Distance (FID) is a commonly used metric for evaluating the quality of generated images. It uses a pretrained inception model [40] to extract features for the generated images and real images and measure their feature similarity. Specifically, we use Clean-FID [29] to evaluate the generated images. FID is usually computed on 50,000 generated images, but we use 5,000 images in our experiments, thus causing our FID scores to be higher than usual.
253
+
254
+ # 6 Experiments
255
+
256
+ We compare the proposed method and baselines (section 6.1) on compositional generation on different domains. We show results of composing natural language descriptions (section 6.2), objects (section 6.3), object relational descriptions (section 6.4), and human facial attributes (Appendix A). Results analysis are shown in section 6.5.
257
+
258
+ # 6.1Baselines
259
+
260
+ We compare our method with baselines for compositional visual generation.
261
+
262
+ Energy-based models (EBM) [7] is the first paper using EBMs for compositional visual generation. They propose three compositional operators for composing different concepts. Our works is inspired by [7], but we compose diffusion models and achieve better results.
263
+
264
+ ![](images/613cfa765e8095d494cfd52cd7d14a4e75fbd42023db615d4145ff1fb5792515.jpg)
265
+ GLIDE
266
+
267
+ ![](images/1fe3df7c13cfce28cbd00d7464b53330d24154bbf9719975c1bdb20cce3e1d0d.jpg)
268
+
269
+ ![](images/66a427b140e340098fded1eb59fdcc17024b40eaab82b2a6d26579461f16904e.jpg)
270
+
271
+ ![](images/f6ca7a278ff3370a5ed4ff6b63739c261197caec0c456c670200a066f2db0afd.jpg)
272
+
273
+ ![](images/10a9cc9c8a64a854276bf6a67a8ef68f84b262ed4f31d0ca7b6e6cf682197889.jpg)
274
+
275
+ ![](images/b0c0382f4a0135ed15512811de57336133182731f387ac50e070a97168ae2c5b.jpg)
276
+
277
+ ![](images/06c99a0e69154b101c28718025b643323cc23c90665274f8097c91fdad28ca9e.jpg)
278
+ Composed GLIDE (Ours)
279
+ "A starry night sky" AND "A polar bear in a forest"
280
+ Fig. 3: Composing Language Descriptions. We develop Composed GLIDE (Ours), a version of GLIDE [26] that utilizes our compositional operators to combine textual descriptions, without further training. We compare it to the original GLIDE, which directly encodes the descriptions as a single long sentence. Our approach more accurately captures text details, such as the "overwater bungalows" in the third example.
281
+
282
+ ![](images/a195b5f368c7e78ed33fa8d161f124c8e587c422a0bd4b5e3acaa45d6f8fe64b.jpg)
283
+ "A white church sitting on a hill" AND "Aurora in the sky"
284
+
285
+ ![](images/887fdf26b26a91d237c4f04cc85ed1a7cfe85d627a25e610c47c9f549a514bf7.jpg)
286
+ "A pink sky in the horizon" AND "A sailboat at the sea" AND "Overwater bungalows"
287
+
288
+ ![](images/6d22f5f98819d9d8ea98199ed12a8a37f636cbc9529b1e12fb891e902e7bc568.jpg)
289
+ "A blue bird on a tree" AND "A red car behind the tree" AND "A green forest in the background"
290
+ "A pink sky" AND "A blue mountain in the horizon" AND "Cherry Blossoms in front of the mountain"
291
+
292
+ ![](images/91ae1d5e98dfd0ebe0f941ebab2338e06db110aa0e3aa2ec72cfc4819ec42783.jpg)
293
+ "A green tree swaying in the wind" AND "A red brick house located behind a tree" AND "A healthy lawn in front of the house"
294
+
295
+ ![](images/46307099085433059b5bef372e3ec56c377a0cfaaba294c52456c1502362b732.jpg)
296
+
297
+ StyleGAN2 [19] is one of the state-of-the-art GAN methods for unconditional image generation. To enable compositional image generation, We optimize the latent code by decreasing the loss between a trained binary classifier and the given labels. We use the final latent code to generate images.
298
+
299
+ LACE [27] uses pre-trained classifiers to generate energy scores in the latent space of the pre-trained StyleGAN2 model. To enable compositional image synthesis, LACE uses compositional operators [7].
300
+
301
+ GLIDE [26] is a recent state-of-the-art text-conditioned diffusion model. For composing language descriptions, we use the classifier-free model released by OpenAI for comparison. For the rest tasks, we train the GLIDE model using the same data as our method.
302
+
303
+ # 6.2 Composing Language Descriptions
304
+
305
+ We first validate that our approach can compose natural language descriptions. We use the pre-trained text conditional diffusion models from GLIDE [26]. The image generation results of the released GLIDE model (a small model) is shown in Figure 3. We develop Composed GLIDE (Ours), a version of GLIDE [26] that utilizes our compositional operators to combine textual descriptions, without further training. We compare this model to the original GLIDE model, which directly encodes the descriptions as a single long sentence.
306
+
307
+ In Figure 3, $GLIDE$ takes a single long sentence as input, for example "A pink sky in the horizon, a sailboat at the sea, and overwater bungalows". In contrast,
308
+
309
+ ![](images/048a360158085e25f181a1356643c42ada63711d6aeafb6e61f41a12e724c67c.jpg)
310
+ Fig. 4: Composing Objects. Our method can compose multiple objects while baselines either miss or generate more objects.
311
+
312
+ Table 1: Quantitative evaluation of ${128} \times {128}$ image generation results on CLEVR. The binary classification accuracy (Acc) and FID scores are reported. Our method outperforms baselines on all the three test settings.
313
+
314
+ <table><tr><td rowspan="2">Models</td><td colspan="2">1 Component</td><td colspan="2">2 Components</td><td colspan="2">3 Components</td></tr><tr><td>Acc (%) ↑</td><td>FID ↓</td><td>Acc (%) ↑</td><td>FID ↓</td><td>Acc (%) ↑</td><td>FID ↓</td></tr><tr><td>EBM [7]</td><td>70.54</td><td>78.63</td><td>28.22</td><td>65.45</td><td>7.34</td><td>58.33</td></tr><tr><td>StyleGAN2 [19]</td><td>1.04</td><td>51.37</td><td>0.04</td><td>23.29</td><td>0.00</td><td>19.01</td></tr><tr><td>LACE [27]</td><td>0.70</td><td>50.92</td><td>0.00</td><td>22.83</td><td>0.00</td><td>19.62</td></tr><tr><td>GLIDE [26]</td><td>0.86</td><td>61.68</td><td>0.06</td><td>38.26</td><td>0.00</td><td>37.18</td></tr><tr><td>Ours</td><td>86.42</td><td>29.29</td><td>59.20</td><td>15.94</td><td>31.36</td><td>10.51</td></tr></table>
315
+
316
+ Composed GLIDE (Ours) composes several short sentences using the concept conjunction operator, e.g. "A pink sky in the horizon" AND "A sailboat at the sea" AND "Overwater bungalows". While both GLIDE and Composed GLIDE (Ours) can generate reasonable images containing objects described in the text prompt, our approach with the compositional operators can more accurately capture text details, such as the presence of "a polar bear" in the first example and the "overwater bungalows" in the third example.
317
+
318
+ # 6.3 Composing Objects
319
+
320
+ Given a set of 2D object positions, we aim to generate images containing objects at those positions.
321
+
322
+ Qualitative results. We compare the proposed method and baselines on composing objects in Figure 4. We only show the concept conjunction here because the object positions are not binary values, and thus negation of object positions is not interpretable. Given a set of object position labels, we compose them to generate images. Our model can generate images of objects at certain locations while the baseline methods either miss objects or generate incorrect objects.
323
+
324
+ ![](images/2e18547c0deb3260761c6934c15e22c9623329a264c51f50664505f8a8f2d5eb.jpg)
325
+ Fig. 5: Composing Visual Relations. Image generation results on the Relational CLEVR dataset. Our model is trained to generate images conditioned on a single object relation, but during inference, our model can compose multiple object relations, generating better results than baselines.
326
+
327
+ Table 2: Quantitative evaluation of $128 \times 128$ image generation results on the Relational CLEVR dataset. The binary classification accuracy (Acc) and FID score on three test settings are reported. Although EBM performs well on the binary classification accuracy, its FID score is much lower than other methods. Our method achieves comparable or better results than baselines.
328
+
329
+ <table><tr><td rowspan="2">Models</td><td colspan="2">1 Component</td><td colspan="2">2 Components</td><td colspan="2">3 Components</td></tr><tr><td>Acc (%) ↑</td><td>FID ↓</td><td>Acc (%) ↑</td><td>FID ↓</td><td>Acc (%) ↑</td><td>FID ↓</td></tr><tr><td>EBM [23]</td><td>78.14</td><td>44.41</td><td>24.16</td><td>55.89</td><td>4.26</td><td>58.66</td></tr><tr><td>StyleGAN2 [19]</td><td>20.18</td><td>22.29</td><td>1.66</td><td>30.58</td><td>0.16</td><td>31.30</td></tr><tr><td>LACE [27]</td><td>1.10</td><td>40.54</td><td>0.10</td><td>40.61</td><td>0.04</td><td>40.60</td></tr><tr><td>GLIDE [26]</td><td>32.68</td><td>57.48</td><td>7.48</td><td>59.47</td><td>2.14</td><td>61.52</td></tr><tr><td>Ours</td><td>60.40</td><td>29.06</td><td>21.84</td><td>29.82</td><td>2.80</td><td>26.11</td></tr></table>
330
+
331
+ Quantitative results. As shown in Table 1, our method outperforms baselines by a large margin. The binary classification accuracy of our method is $15.88\%$ higher than the best baseline, EBM, in the 1 component test setting and is 24.02 higher than EBM on the more challenging 3 Components setting. Our method is more effective in zero-shot compositional generalization. In addition, our method can generate images with lower FID scores (more similar to the real images).
332
+
333
+ # 6.4 Composing Object Relations
334
+
335
+ Qualitative results. We further compare the proposed approach and baselines on composing object relational descriptions in Figure 5. Our model is trained to generate images conditioned on a single object relation, but it can compose multiple object relations during inference without additional training. Both LACE
336
+
337
+ and StyleGAN2 fail to capture object relations in the input sentences, but EBM and our method can correctly compose multiple object relations. Our method generates higher-quality images compared with EBM, e.g. the object boundaries are sharper in our results than EBM. Surprisingly, DALLE-2 and GLIDE can generate high-quality images, but they fail to understand object relations.
338
+
339
+ Quantitative results. Same as experiments in section 6.3, we evaluate the proposed method and baselines on three test settings in Table 2. We train a binary classifier to evaluate whether an image contains objects that satisfy the input relational description. For binary classification accuracy, our method outperforms StyleGAN2 (CLIP), LACE, and GLIDE on all three test settings. EBMs perform well on composing relational descriptions, but their FID scores are much worse than other methods, i.e. their generated images are not realistic.
340
+
341
+ # 6.5 Results analysis
342
+
343
+ We show the image generation results conditioned on each individual sentence description, and our composition results in Figure 6. We provide four successful compositional examples, where the generated image contains all the concepts mentioned in the input sentences.
344
+
345
+ Failure cases. We observed three main failure cases of the proposed method. The first one is the pre-trained diffusion models do not understand certain concepts, such as "person" in (b). We used the pre-trained diffusion model, GLIDE [26], which is trained to avoid generating human images. The second type of failure is because the diffusion models confuse the objects' attributes. In (c), the generated image contains "a red bear" while the input is "a bear in a red forest". The third type of failure is because the composition does not work, e.g. the "bird-shape and flower-color object" and the "dog-fur and sofa-shape object" in (d). Such failures usually happen when the objects are in the center of the images.
346
+
347
+ # 7 Conclusion
348
+
349
+ In this paper, we compose diffusion models for image generation. By interpreting diffusion models as energy-based models, we may explicitly compose them and generate images with significantly more complex combinations that are never seen during training. We propose two compositional operators, concept conjunction and negation, allowing us to compose diffusion models during the inference time without any additional training. The proposed composable diffusion models can generate images conditioned on sentence descriptions, objects, object relations, human facial attributes, and even generalize to new combinations that are rarely seen in the real world. These results demonstrate the effectiveness of the proposed method for compositional visual generation.
350
+
351
+ A limitation of our current approach is that while we are able to compose multiple diffusion models together, they are instances of the same model. We found limited success when composing diffusion models trained on different datasets. In
352
+
353
+ ![](images/56ee6decc0f5aaa16d7494b00935ae7ed4da2eab18552651a79dfc37b08c4f8e.jpg)
354
+ (a) Successful Examples
355
+ "An abandoned vehicle"
356
+
357
+ ![](images/c33d95bb2f30390e4b099eb40acaa4be3ba73c10c83440105bda4ec168095cd0.jpg)
358
+ "A forest covered with snow"
359
+
360
+ ![](images/a884d8c3f59d05e1cca0de765e678430d7ae2d9090dc02c9e82dae6ba11f1b7c.jpg)
361
+
362
+ ![](images/9f005f6c16c5b64bdd9c7545358c9c3f146ad8d7dc6ff439f992c044cf9805fd.jpg)
363
+ "A camel!"
364
+
365
+ ![](images/2acadfd6dd1dd26c3a14d4fb9e4a64cb31e60ad56529a53a6e632da58224eb74.jpg)
366
+ "A forest"
367
+
368
+ ![](images/eb9b473b0adf895ac8903c50fba9937d01986a41b25d6bd60c4f97ba452a1f33.jpg)
369
+ "A camel" AND "A forest"
370
+
371
+ ![](images/be5599a3ae22d885abc7cead80e1fec538636e14d5e36512dacc8830f79c4d5d.jpg)
372
+ "A horse"
373
+ "A yellow flower field"
374
+
375
+ ![](images/1ca2420162e3a39442f7b2da9e1b8497bd330f9e004b68074bb8c2f3ae3ba50f.jpg)
376
+ An abandoned vehicle? AND "A forest covered with snow"
377
+
378
+ ![](images/4fda4a03474f0eb166da141970ff4129b17ed79bc4c0e6cb0ae7d488350d19f4.jpg)
379
+ "A horse" AND "A yellow flower field."
380
+
381
+ ![](images/04a8f8771a4610cf64f177f6b233b1fb61c5c9941cbb45dd65562e8c4817eba6.jpg)
382
+ "A boat"
383
+
384
+ ![](images/21f1901026a81e8828688ff1a2614c1e08d03aafa627cb23517bec737f76138d.jpg)
385
+ "A desert"
386
+
387
+ ![](images/0c23147b7ff77ac67941aa2c23ba533f3f152d2a2553dfcfa4a2c0148db23994.jpg)
388
+ "A boat" AND "A desert"
389
+
390
+ ![](images/d0ef7601a70be2238170258cc75bd5c0adb10c52f8a8c328bf3903f7c8b8cd8a.jpg)
391
+ (b) Diffusion model fails
392
+ "A bus"
393
+
394
+ ![](images/49238ee3ca927b2a5d389158da76d49296db8177c7c0e8c00d4b11f17bbba18a.jpg)
395
+ "A person"
396
+
397
+ ![](images/944cca865068fc32c4ccb76b0c3e390904565735f24d9745f027d93180df3f32.jpg)
398
+ "A bus" AND
399
+ "A person"
400
+
401
+ ![](images/0d0f1135a2a7b79d15440c81ff42276d304731d9932cdbf90978b25d0b3efe4b.jpg)
402
+ (c) Diffusion model confuses object attributes
403
+ "A bear in a red forest"
404
+
405
+ ![](images/175021e3ace70650425a80f1ddf41b03310bb475c2f74910bfcf8aee6b6af042.jpg)
406
+ "A car stuck in the forest"
407
+
408
+ ![](images/27bf0d41f25efb532244267a01f43e8957e6a697ed9a76dd7a88efb8cdd26c1c.jpg)
409
+ "A bear in a red forest" AND "A car stuck in the forest"
410
+
411
+ ![](images/37e10b2f0265a6ea8e37cc040bc1c2d55a60ffaedb4907f7826ef99c056fd082.jpg)
412
+ (d) Composition fails
413
+ "A bird"
414
+
415
+ ![](images/7464692f36c03108a37aa77ee43fdca57836168da0521a372a97342f7f13f663.jpg)
416
+ "A flower"
417
+
418
+ ![](images/0e90f6ca970faff04e864b84e04e3b40fa08b1383b9bcd2a62bf23f366943c04.jpg)
419
+ "A bird" AND "A flower"
420
+
421
+ ![](images/5ee0985bda36b37f6d93f4e2563e07e8694dfd4c50b51bc78d93f647a3bc1cf0.jpg)
422
+ "A couch"
423
+
424
+ ![](images/ba841d8c8b9af7f8c947986a4db1836dc440d6c0898c073282eaac5d80fc991d.jpg)
425
+ "A dog sitting in the living room."
426
+
427
+ ![](images/7333feb59a61e18c079ed3fd80050896391bd4a136df25e1850b938ed722dd57.jpg)
428
+ "A couch" AND "A dog sitting in the living room"
429
+ Fig. 6: Qualitative results. Successful examples (a) and failure examples (b-d) generated by the proposed method. There are three main types of failures: (b) The pretrained diffusion model does not understand certain concepts, such as "person". (c) The pre-trained diffusion model confuses objects' attributes. (d) The composition fails. This usually happens when the objects are in the center of the images.
430
+
431
+ contrast, compositional generation with EBMs [7] can successfully compose multiple separately trained models. Incorporating additional structures into diffusion models from EBMs [10], such as a conservative score field, may be a promising direction towards enabling compositions of separately trained diffusion models.
432
+
433
+ Acknowledgments. Shuang Li is supported by Raytheon BBN Technologies Corp. under the project Symbiant (reg. no. 030256-00001 90113), Mitsubishi Electric Research Laboratory (MERL) under the project Generative Models For Annotated Video, and CMU and Army Research Laboratory under the project Contrastive dissection to visualize the differences between synthetic and real trained representations (reg. no. 1130233-442111). Yilun Du is supported by a NSF Graduate Fellowship.
434
+
435
+ # References
436
+
437
+ 1. Austin, J., Johnson, D.D., Ho, J., Tarlow, D., van den Berg, R.: Structured denoising diffusion models in discrete state-spaces. In: Advances in Neural Information Processing Systems (2021)
438
+ 2. Bau, D., Andonian, A., Cui, A., Park, Y., Jahanian, A., Oliva, A., Torralba, A.: Paint by word. arXiv preprint arXiv:2103.10951 (2021)
439
+ 3. Chen, N., Zhang, Y., Zen, H., Weiss, R.J., Norouzi, M., Chan, W.: Wavegrad: Estimating gradients for waveform generation. arXiv preprint arXiv:2009.00713 (2020)
440
+ 4. Chomsky, N.: Aspects of the Theory of Syntax. The MIT Press, Cambridge (1965), http://www.amazon.com/Aspects-Theory-Syntax-Noam-Chomsky/ dp/0262530074
441
+ 5. DCGM: Gender, age, and emotions extracted for flickr-faces-hq dataset (ffhq). https://github.com/DCGM/ffhq-features-dataset (2020)
442
+ 6. Dhariwal, P., Nichol, A.: Diffusion models beat gans on image synthesis. Advances in Neural Information Processing Systems 34 (2021)
443
+ 7. Du, Y., Li, S., Mordatch, I.: Compositional visual generation with energy based models. Advances in Neural Information Processing Systems 33, 6637-6647 (2020)
444
+ 8. Du, Y., Li, S., Sharma, Y., Tenenbaum, J., Mordatch, I.: Unsupervised learning of compositional energy concepts. Advances in Neural Information Processing Systems 34 (2021)
445
+ 9. Du, Y., Li, S., Tenenbaum, J., Mordatch, I.: Improved contrastive divergence training of energy based models. arXiv preprint arXiv:2012.01316 (2020)
446
+ 0. Du, Y., Mordatch, I.: Implicit generation and generalization in energy-based models. arXiv preprint arXiv:1903.08689 (2019)
447
+ 1. Gao, R., Song, Y., Poole, B., Wu, Y.N., Kingma, D.P.: Learning energy-based models by diffusion recovery likelihood. In: International Conference on Learning Representations (2021), https://openreview.net/forum?id=v_1Soh8QUNc
448
+ 2. Grathwohl, W., Wang, K.C., Jacobsen, J.H., Duvenaud, D., Zemel, R.: Learning the stein discrepancy for training and evaluating energy-based models without sampling. In: International Conference on Machine Learning (2020)
449
+ 3. Gu, S., Chen, D., Bao, J., Wen, F., Zhang, B., Chen, D., Yuan, L., Guo, B.: Vector quantized diffusion model for text-to-image synthesis. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 10696-10706 (2022)
450
+ 4. Hinton, G.E.: Training products of experts by minimizing contrastive divergence. Neural computation 14(8), 1771-1800 (2002)
451
+ 5. Ho, J., Jain, A., Abbeel, P.: Denoising diffusion probabilistic models. Advances in Neural Information Processing Systems 33, 6840-6851 (2020)
452
+ 6. Janner, M., Du, Y., Tenenbaum, J., Levine, S.: Planning with diffusion for flexible behavior synthesis. In: International Conference on Machine Learning (2022)
453
+ 7. Johnson, J., Hariharan, B., Van Der Maaten, L., Fei-Fei, L., Lawrence Zitnick, C., Girshick, R.: Clevr: A diagnostic dataset for compositional language and elementary visual reasoning. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 2901-2910 (2017)
454
+ 8. Karras, T., Laine, S., Aila, T.: A style-based generator architecture for generative adversarial networks. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 4401-4410 (2019)
455
+
456
+ 19. Karras, T., Laine, S., Aittala, M., Hellsten, J., Lehtinen, J., Aila, T.: Analyzing and improving the image quality of stylegan. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 8110-8119 (2020)
457
+ 20. Kim, G., Ye, J.C.: Diffusionclip: Text-guided image manipulation using diffusion models (2021)
458
+ 21. Lake, B.M., Salakhutdinov, R., Tenenbaum, J.B.: Human-level concept learning through probabilistic program induction. Science 350(6266), 1332-1338 (2015). https://doi.org/10.1126/science.aab3050, https://www.science.org/doi/abs/10.1126/science.aab3050
459
+ 22. LeCun, Y., Chopra, S., Hadsell, R., Ranzato, M., Huang, F.: A tutorial on energy-based learning. Predicting structured data 1(0) (2006)
460
+ 23. Liu, N., Li, S., Du, Y., Tenenbaum, J., Torralba, A.: Learning to compose visual relations. Advances in Neural Information Processing Systems 34 (2021)
461
+ 24. Marcus, G., Davis, E., Aaronson, S.: A very preliminary analysis of dall-e 2. arXiv preprint arXiv:2204.13807 (2022)
462
+ 25. Meng, C., He, Y., Song, Y., Song, J., Wu, J., Zhu, J.Y., Ermon, S.: Sdedit: Guided image synthesis and editing with stochastic differential equations. In: International Conference on Learning Representations (2021)
463
+ 26. Nichol, A., Dhariwal, P., Ramesh, A., Shyam, P., Mishkin, P., McGrew, B., Sutskever, I., Chen, M.: Glide: Towards photorealistic image generation and editing with text-guided diffusion models. arXiv preprint arXiv:2112.10741 (2021)
464
+ 27. Nie, W., Vahdat, A., Anandkumar, A.: Controllable and compositional generation with latent-space energy-based models. Advances in Neural Information Processing Systems 34 (2021)
465
+ 28. Nijkamp, E., Hill, M., Han, T., Zhu, S.C., Wu, Y.N.: On the anatomy of mcmc-based maximum likelihood learning of energy-based models. arXiv preprint arXiv:1903.12370 (2019)
466
+ 29. Parmar, G., Zhang, R., Zhu, J.Y.: On aliased resizing and surprising subtleties in gan evaluation. In: CVPR (2022)
467
+ 30. Ramesh, A., Dhariwal, P., Nichol, A., Chu, C., Chen, M.: Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125 (2022)
468
+ 31. Ramesh, A., Pavlov, M., Goh, G., Gray, S., Voss, C., Radford, A., Chen, M., Sutskever, I.: Zero-shot text-to-image generation. In: International Conference on Machine Learning. pp. 8821-8831. PMLR (2021)
469
+ 32. Rombach, R., Blattmann, A., Lorenz, D., Esser, P., Ommer, B.: High-resolution image synthesis with latent diffusion models. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 10684-10695 (2022)
470
+ 33. Sahara, C., Chan, W., Chang, H., Lee, C.A., Ho, J., Salimans, T., Fleet, D.J., Norouzi, M.: Palette: Image-to-image diffusion models. arXiv preprint arXiv:2111.05826 (2021)
471
+ 34. Salimans, T., Ho, J.: Should ebms model the energy or the score? In: Energy Based Models Workshop-ICLR 2021 (2021)
472
+ 35. Shoshan, A., Bhonker, N., Kviatkovsky, I., Medioni, G.: Gan-control: Explicitly controllable gans. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 14083-14093 (2021)
473
+ 36. Sohl-Dickstein, J., Weiss, E., Maheswaranathan, N., Ganguli, S.: Deep unsupervised learning using nonequilibrium thermodynamics. In: International Conference on Machine Learning. pp. 2256-2265. PMLR (2015)
474
+ 37. Song, J., Meng, C., Ermon, S.: Denoising diffusion implicit models. In: International Conference on Learning Representations (2021)
475
+
476
+ 38. Song, Y., Sohl-Dickstein, J., Kingma, D.P., Kumar, A., Ermon, S., Poole, B.: Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13456 (2020)
477
+ 39. Swimmer963: What dall-e 2 can and cannot do (May 2022), https://www. lesswrong.com/posts/uKp6tBFStnsvrot5t/what-dall-e-2-can-and-cannot-do
478
+ 40. Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., Wojna, Z.: Rethinking the inception architecture for computer vision. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 2818-2826 (2016)
479
+ 41. Vincent, P.: A connection between score matching and denoising autoencoders. Neural computation 23(7), 1661-1674 (2011)
480
+ 42. Xiao, T., Hong, J., Ma, J.: Elegant: Exchanging latent encodings with gan for transferring multiple face attributes. In: Proceedings of the European conference on computer vision (ECCV). pp. 168-184 (2018)
481
+ 43. Xu, T., Zhang, P., Huang, Q., Zhang, H., Gan, Z., Huang, X., He, X.: Attngan: Fine-grained text to image generation with attentional generative adversarial networks. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 1316-1324 (2018)
482
+ 44. Zhang, H., Xu, T., Li, H., Zhang, S., Wang, X., Huang, X., Metaxas, D.N.: Stack-gan: Text to photo-realistic image synthesis with stacked generative adversarial networks. In: Proceedings of the IEEE international conference on computer vision. pp. 5907-5915 (2017)
483
+ 45. Zhou, L., Du, Y., Wu, J.: 3D shape generation and completion through point-voxel diffusion. In: International Conference on Computer Vision (2021)
484
+ 46. Zhu, J., Shen, Y., Zhao, D., Zhou, B.: In-domain gan inversion for real image editing. In: European conference on computer vision. pp. 592-608. Springer (2020)
compositionalvisualgenerationwithcomposablediffusionmodels/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1a20ef1a7110ed6a0552efdf81a8ee6c9feac8318b953f176938f739dbd3f68
3
+ size 506752
compositionalvisualgenerationwithcomposablediffusionmodels/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38fc35116b9b3016a3ff56192facdf93fe9943124ea8b8db846a9b2585043f8b
3
+ size 557555
compoundprototypematchingforfewshotactionrecognition/330f394f-de8b-4739-adc1-d3592e67b444_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8f156351b5f6a368d968d74323d8d7a441fd9f47d248d8c361d9845520ec84a
3
+ size 83606
compoundprototypematchingforfewshotactionrecognition/330f394f-de8b-4739-adc1-d3592e67b444_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:778e331b730256338cf1b8aca07ad7398ad478343ce02ff937f6ffcbc1835c4e
3
+ size 108406
compoundprototypematchingforfewshotactionrecognition/330f394f-de8b-4739-adc1-d3592e67b444_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1f5e7c8e4d05369cb91940a6b89cb0dd438bb955901330e68801fb8b8f149fd
3
+ size 2696191
compoundprototypematchingforfewshotactionrecognition/full.md ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Compound Prototype Matching for Few-shot Action Recognition
2
+
3
+ Yifei Huang $^{[0000-0001-8067-6227] \star \ddagger}$ , Lijin Yang $^{[0000-0003-3787-6658] \star}$ , and Yoichi Sato $^{[0000-0003-0097-4537]}$
4
+
5
+ Institute of Industrial Science, the University of Tokyo, Tokyo, Japan {hyf,yang-lj,ysato}@iis.u-tokyo.ac.jp
6
+
7
+ Abstract. Few-shot action recognition aims to recognize novel action classes using only a small number of labeled training samples. In this work, we propose a novel approach that first summarizes each video into compound prototypes consisting of a group of global prototypes and a group of focused prototypes, and then compares video similarity based on the prototypes. Each global prototype is encouraged to summarize a specific aspect from the entire video, e.g., the start/evolution of the action. Since no clear annotation is provided for the global prototypes, we use a group of focused prototypes to focus on certain timestamps in the video. We compare video similarity by matching the compound prototypes between the support and query videos. The global prototypes are directly matched to compare videos from the same perspective, e.g., to compare whether two actions start similarly. For the focused prototypes, since actions have various temporal variations in the videos, we apply bipartite matching to allow the comparison of actions with different temporal positions and shifts. Experiments demonstrate that our proposed method achieves state-of-the-art results on multiple benchmarks.
8
+
9
+ Keywords: Few-shot action recognition, compound prototype, prototype matching.
10
+
11
+ # 1 Introduction
12
+
13
+ Difficulty in collecting large-scale data and labels promotes the research on few-shot learning. Built upon the success of few-shot learning for image understanding tasks [33,10,62,26,16,54,36,37,53], many begin to focus on the few-shot action recognition task [28]. Once realized, such techniques could greatly alleviate the cost of video labeling [20] and promote real-world applications where the labels in certain scenarios are hard to acquire [25].
14
+
15
+ Most few-shot action recognition works determine the category of a query video using its similarity to the few labeled support videos. Many works [73,74,18] follow ProtoNet [47] to first learn a prototype for each video and compute the video similarity based on the similarity of the prototypes. To better consider the temporal dependencies in videos (e.g., temporal ordering and relation), recent
16
+
17
+ works construct sub-sequence prototypes using different parts of the videos and calculate video similarity by matching the support-query prototypes [5,44].
18
+
19
+ While temporal dependencies are considered, limitations still exist in previous methods. Firstly, without considering spatial information, previous methods cannot fully exploit the spatiotemporal relation in the videos for distinguishing actions like "put A on B" and "put A besides B" because they differ only in the relative position of the objects. Secondly, the sub-sequence prototypes come from fixed temporal locations, so that they cannot well handle the actions that happen at different speeds. Thirdly, it is computationally costly to exhaustively compute the similarity between all pairs of sub-sequence prototypes [44].
20
+
21
+ To address the limitations and achieve more robust few-shot action recognition, we explore how to: (1) better generate prototypes that can robustly encode spatiotemporal relation in the videos, (2) enable the prototypes to flexibly encode the actions done with different lengths and speeds, and (3) match the prototypes between two videos without exhaustively comparing all prototype pairs.
22
+
23
+ One straightforward way to address the first point is to use object features extracted from object bounding boxes [22]. However, we observed in our preliminary experiments only limited performance gain when previous methods [44,70] directly use them as additional inputs. In this work, we propose a multi-relation encoder to effectively encode the object features, by considering the spatiotemporal relation among objects across frames, the temporal relation between different frame-wise features, as well as the relation between object features and frame-wise features.
24
+
25
+ For the second and third points, we propose to generate global prototypes that consider all frames in the input video. This is done by taking advantage of the self-attention mechanism of Transformers [51]. Since it is difficult to represent a wide variety of actions by using a single prototype, we instead use a group of prototypes to represent each action. We match the support-query similarity by fixed 1-to-1 matching, i.e., the $i$ -th prototype of the query video is always matched with the $i$ -th prototype of the support video. Thus, during training, each prototype will try to capture a certain aspect of the video. To avoid all prototypes to be the same, we apply a diversity loss when learning the prototypes, so that they are encouraged to capture different aspects of the action (e.g., one prototype captures the start of the action, and another prototype captures the action evolution).
26
+
27
+ However, learning prototypes to represent different aspects of the action (e.g., the start/end of the action) is a difficult task even with annotation [9,40,41]. Thus, it is not sufficient to compute video similarity only by the global prototypes. To make the similarity measurement more reliable, we generate another group of focused prototypes, where each prototype is encouraged to focus on certain timestamps of the video. Since actions may happen in different parts of the videos at different speeds [34], it is not correct to compare the same timestamp between two videos. We therefore use bipartite matching to match the focused prototypes between the support and query videos, so that comparison of actions with different lengths and speeds can be done.
28
+
29
+ Our method uses the compound of two groups of prototypes, which we call compound prototypes, for calculating video similarity. On multiple benchmark datasets, our method outperforms previous methods significantly when only one example is available, demonstrating the superiority of using our compound prototypes in similarity measurement.
30
+
31
+ To summarize, our key contributions include:
32
+
33
+ - A novel method for few-shot action recognition based on generating and matching compound prototypes.
34
+ - Our method achieves state-of-the-art performance on multiple benchmark datasets [7,19,30], outperforming previous methods by a large margin.
35
+ - A detailed ablation study showing the usefulness of leveraging object information for few-shot action recognition and demonstrating how the two groups of prototypes encode the video from complementary perspectives.
36
+
37
+ # 2 Related Works
38
+
39
+ Few-shot image classification methods can be broadly divided into three categories. The transfer-learning based methods [14,45,57] use pre-training and fine-tuning to increase the performance of deep backbone networks on few-shot learning. The second line of works focuses on rapidly learning an optimized classifier using limited training data [1,21,46,2,58,17,67]. The third direction is based on metric learning, whose goal is to learn more generalizable feature embeddings under a certain distance metric [29,47,52,27]. The key to metric-learning based methods is to generate robust representations of data under a certain metric, so that it may generalize to novel categories with few labeled samples. Our work falls into this school of research and focus on the more challenging video setting.
40
+
41
+ Few-shot action recognition methods [50,34,43,24,3,74,42,75,61] mainly fall into the metric-learning framework. Many works follow the scheme of ProtoNet [47] to compute video similarity based on generated prototypes. For learning better prototypes, ProtoGAN [32] synthesizes additional feature, CMN [72,73] uses a multi-layer memory network, while ARN [69] uses jigsaws for self-supervision and enhances the video-level representation via spatial and temporal attention. There are also methods that perform pretraining with semantic labels [56,59,60] or use additional information such as depth [18] to augment video-level prototypes. Our method uses another form of additional information: the object bounding box from pretrained object detectors [22].
42
+
43
+ The temporal variance of actions form a major challenge in few-shot action recognition task [34]. To better model temporal dependencies, recent researches put more focus on generating and matching sub-video level prototypes. OTAM [5] uses a generalized dynamic time warping technique [8] to monotonously match the prototypes between query and support videos. ITA-Net [70] first implicitly aggregates information for each frame using other frames, and conducts a 1-to-1 matching of all prototypes. However, these two methods use frame-wise prototypes, thus cannot well capture the higher-level temporal relation in multiple frames. Recently, TRX [44] constructs prototypes of different
44
+
45
+ cardinalities for query and support videos, and calculate similarity by matching all prototype pairs. However, since TRX can only match prototypes with the same cardinality (e.g., three-frame prototypes matches with three-frame prototypes), it is hard to align the actions with different evolving speeds (e.g., one takes 2 frames while the other takes 4 frames). Also, the exhaustively matching of all pairs is computationally expensive.
46
+
47
+ We summarize three main differences compared with previous works: (1) We encode spatiotemporal object information to form more robust prototypes. (2) We generate a compound of global and focused prototypes to represent the actions from diverse perspectives. (3) The two groups of prototypes are efficiently matched to robustly compute video similarity.
48
+
49
+ Transformers [51] have recently acquired remarkable achievements in computer vision [6,38,13,15,68,64]. FEAT [65] represents early work that applies transformer in the few-shot learning task, and TRX [44] first introduces Transformer [15] into the few-shot action recognition task. Different from TRX, we apply a Transformer encoder-decoder to generate compound prototypes, and show that this is more effective in the few-shot action recognition scenario.
50
+
51
+ # 3 Method
52
+
53
+ # 3.1 Problem Setting
54
+
55
+ In few-shot action recognition, a model aims to recognize an unlabeled video (query) into one of the target categories each with a limited number of labeled examples (support set) [5,44]. We follow the common practice [52,17] to use episodic training, where in each episode a $C$ -way $K$ -shot problem is sampled: the support set $\mathcal{S} = \{\mathbf{X}_s^j\}_{j=1}^{C \times K}$ is composed of $C \times K$ labeled videos from $C$ different classes where each class contains $K$ samples. The query set contains $N$ unlabeled videos $\mathcal{Q} = \{\mathbf{X}_q^i\}_{i=1}^N$ . The goal is to classify each video in the query set as one of the $C$ classes.
56
+
57
+ # 3.2 Proposed Method
58
+
59
+ We propose a new method for few-shot action recognition by generating and matching compound prototypes between query and support videos. As shown in Fig. 1, given the video input, a feature embedding network first extracts global (frame-wise) features $\mathbf{F}_g$ . To better model the actions involving multiple objects, we obtain object bounding boxes by a pretrained object detector [22], and extract object features $\mathbf{F}_o$ using the same embedding network. Then a multi-relation encoder uses $\mathbf{F}_g$ and $\mathbf{F}_o$ to output multi-relation features $\mathbf{F}_m$ containing spatiotemporal global-object relations. Then a compound prototype decoder generates global prototypes $\mathbf{P}_g$ and focused prototypes $\mathbf{P}_f$ for each video. During similarity calculation, we use fixed 1-to-1 matching on the global prototypes and bipartite matching on the focused prototypes, encouraging the similarity to be computed robustly from diverse perspectives. We introduce the details of each component below.
60
+
61
+ ![](images/2f5a9273e3031b50fc6229176e01435b072bb6ac9c25e51a59fe3bdfdd9e10e9.jpg)
62
+ Fig. 1. Illustration of our proposed method on a 3-way 1-shot problem. First, the videos are processed by an embedding network to acquire global (frame-level) features $\mathbf{F}_g$ and object features $\mathbf{F}_o$ . Features $\mathbf{F}_g$ and $\mathbf{F}_o$ are equipped with 1D and 3D positional encoding (PE), respectively, and then used by a multi-relation encoder (Sec. 3.2) to encode global-global, global-object and object-object information into a multi-relation feature $\mathbf{F}_m$ . Using $\mathbf{F}_m$ , a Transformer-based compound prototype decoder transforms the learnable tokens $\mathbf{T}_g, \mathbf{T}_f$ into compound prototypes that represent the input video (Sec. 3.2). The compound prototypes is consisted of several global prototypes $\mathbf{P}_g$ (green squares) and focused prototypes $\mathbf{P}_f$ (blue squares). They are applied with different loss and different matching strategies, so that each global prototype captures a certain aspect of the action summarized from the whole video, and each focused prototype focuses on a specific temporal location of the video. The final similarity score is calculated as the average similarity of all matched prototype pairs between support and query videos.
63
+
64
+ Feature embedding For each input video $\mathbf{X} \in S \cup \mathcal{Q}$ , we sample $T$ frames following the sampling strategy of TSN [55]. We use an embedding network to acquire a global (frame-level) feature representation for each video $\mathbf{F}_g \in \mathbb{R}^{T \times d}$ , where $d$ is the feature dimension. Additionally, we extract object features via ROI-Align [22] using the predicted bounding boxes on each frame. We use only $B$ most confident boxes on each frame, forming object features $\mathbf{F}_o \in \mathbb{R}^{BT \times d}$ .
65
+
66
+ Multi-relation encoder To better generate prototypes that are discriminative for actions involving multiple objects, we propose to use a multi-relation encoder to encode the spatiotemporal information from $\mathbf{F}_g$ and $\mathbf{F}_o$ . We specifically consider the following three relations: global-global (frame-wise) relation, global-object relation, object-object relation, and apply transformer [51] as the base architecture to allow relation modeling across frames. As shown in Fig. 1, the encoder consists of three relation encoding transformers (RETs). The global-global RET $(\mathrm{RET}_{gg})$ and the object-object RET $(\mathrm{RET}_{oo})$ are identical except the input. They take as input the global feature $\mathbf{F}_g$ and the object feature $\mathbf{F}_o$ respectively, and use the input to generate the query $\mathbf{Q}$ , key $\mathbf{K}$ and value $\mathbf{V}$ vectors for the transformer:
67
+
68
+ $$
69
+ \boldsymbol {F} _ {g g} = R E T _ {g g} (\boldsymbol {Q} = \boldsymbol {K} = \boldsymbol {V} = \boldsymbol {F} _ {g}) \tag {1}
70
+ $$
71
+
72
+ $$
73
+ \boldsymbol {F} _ {o o} = R E T _ {o o} (\boldsymbol {Q} = \boldsymbol {K} = \boldsymbol {V} = \boldsymbol {F} _ {o}), \tag {2}
74
+ $$
75
+
76
+ The global-object RET $(\mathrm{RET}_{go})$ works differently, where it maps $\mathbf{F}_g$ as query vector, while $\mathbf{F}_o$ as key and value vectors:
77
+
78
+ $$
79
+ \boldsymbol {F} _ {g o} = R E T _ {g o} \left(\boldsymbol {Q} = \boldsymbol {F} _ {g}, \boldsymbol {K} = \boldsymbol {V} = \boldsymbol {F} _ {o}\right). \tag {3}
80
+ $$
81
+
82
+ The output size of each RET is the same as its input query vector. Thus, each of the $T$ frame would have $B + 2$ features with dimension $d$ . We concatenate the three outputs into a multi-relation feature $\mathbf{F}_m \in \mathbb{R}^{(B + 2)T \times d}$ .
83
+
84
+ Positional encoding (PE) is shown to be effective in transformer-based architectures [51,39,38]. We also use PE but omit in the equations for simplicity. For $\pmb{F}_{g}$ we use 1D PE to encode the temporal location of each frame, and for $\pmb{F}_{o}$ we apply 3D PE, encoding both spatial and temporal location of each object.
85
+
86
+ Compound prototype decoder The compound prototype decoder also follows the transformer architecture [51,49,11,6], so that the prototypes can be generated by considering feature of all frames via self-attention. As shown in Fig. 1, the input to the prototype decoder are two groups of learnable tokens $\pmb{T}_g \in \mathbb{R}^{m_g \times d}$ and $\pmb{T}_f \in \mathbb{R}^{m_f \times d}$ . A multi-head attention layer first encodes the tokens into $\hat{\pmb{T}}_g$ and $\hat{\pmb{T}}_f$ , then another multi-head attention layer transforms them into two groups of prototypes $P_g = \{p_{g,k}\}_{k=1}^{m_g} \in \mathbb{R}^{m_g \times d}$ and $P_f = \{p_{f,k}\}_{k=1}^{m_f} \in \mathbb{R}^{m_f \times d}$ . For simplicity, we omit the subscripts $g, f$ and all normalization layers, thus the equation can be written as:
87
+
88
+ $$
89
+ Q = \hat {T} W _ {Q}, \quad K = F _ {m} W _ {K}, \quad V = F _ {m} W _ {V}, \tag {4}
90
+ $$
91
+
92
+ where $\pmb{W}_Q, \pmb{W}_K, \pmb{W}_V \in \mathbb{R}^{d \times d}$ are linear projection weights, then we have
93
+
94
+ $$
95
+ \boldsymbol {A} = \operatorname {s o f t m a x} \left(\frac {\boldsymbol {Q} \boldsymbol {K} ^ {T}}{\sqrt {d}}\right), \quad \boldsymbol {P} = F F N (\boldsymbol {A} \boldsymbol {V}), \tag {5}
96
+ $$
97
+
98
+ where $\mathbf{A} \in \mathbb{R}^{m \times (B + 2)T}$ is the self-attention weights, and FFN denotes feed forward network.
99
+
100
+ To encourage the prototypes to capture different aspects of the action, we apply constraints on the two groups of prototypes individually. For the global prototypes $P_g$ , we add a diversity loss to maximize their diversity:
101
+
102
+ $$
103
+ L _ {d i v} = \sum_ {i \neq j} \operatorname {s i m} \left(\boldsymbol {p} _ {g, i}, \boldsymbol {p} _ {g, j}\right), \tag {6}
104
+ $$
105
+
106
+ where $sim$ denotes the cosine similarity function.
107
+
108
+ Since learning $P_{g}$ to robustly represent each aspect of the action (e.g., the start of the action) is difficult even with annotation [63,66]. To increase the overall robustness, for the focused prototypes $P_{f}$ , we instead add regularization on the self-attention weight $A_{f}$ so that different $p_{f}$ can focus on different temporal locations of the video:
109
+
110
+ $$
111
+ L _ {a t t} = \sum_ {i \neq j} \operatorname {s i m} \left(\boldsymbol {\alpha} _ {f, i}, \boldsymbol {\alpha} _ {f, j}\right). \tag {7}
112
+ $$
113
+
114
+ Here $\pmb{\alpha}_{f,i}\in \mathbb{R}^{(B + 2)T}$ denotes the $i$ -th row in $\pmb{A}_f$
115
+
116
+ Compound Prototype Matching Cooperating with the compound prototypes, we use different matching strategies to calculate the overall similarity between two videos. As shown in Fig. 1, for the global prototypes $P_g$ , we match the query and support prototypes in a 1-to-1 manner, i.e., the $i$ -th prototype of the query video is always matched with the $i$ -th prototype of the support video. To calculate the global prototypes' overall similarity score between video $a$ and video $b$ , we average the similarity score of all the $m_g$ global prototypes:
117
+
118
+ $$
119
+ s _ {g} ^ {a, b} = \frac {1}{m _ {g}} \sum_ {k = 1} ^ {m _ {g}} \operatorname {s i m} \left(\boldsymbol {p} _ {g, k} ^ {a}, \boldsymbol {p} _ {g, k} ^ {b}\right). \tag {8}
120
+ $$
121
+
122
+ Thus, to maximize the similarity score of correct video pairs and minimize the similarity of incorrect video pairs during episodic training, each $\pmb{p}_g$ will try to encode a certain aspect of the action, e.g., the start of the action. This phenomenon is supported by our experiments in Sec. 4.
123
+
124
+ For the focused prototypes $P_f$ , we apply a bipartite matching-based similarity measure. Since different actions may happen in different temporal positions in the videos, the bipartite matching enables the temporal alignment of actions, allowing the comparison between actions of different lengths and at different speeds. Formally speaking, for $P_f^a$ of video $a$ and $P_f^b$ of video $b$ , we find a bipartite matching between these two sets of prototypes by searching for the best permutation of $m_f$ elements with the highest cosine similarity using the Hungarian algorithm [31]. Denote $\sigma$ as the best permutation, the similarity score of $P_f^a$ and $P_f^b$ is calculated by:
125
+
126
+ $$
127
+ s _ {d} ^ {i, j} = \frac {1}{m _ {f}} \sum_ {k = 1} ^ {m _ {f}} \operatorname {s i m} \left(\boldsymbol {p} _ {f, k} ^ {a}, \boldsymbol {p} _ {f, \sigma (k)} ^ {b}\right). \tag {9}
128
+ $$
129
+
130
+ Finally, the similarity score is computed by a weighted average of $s_g$ and $s_f$ : $s^{a,b} = \lambda_1s_g^{a,b} + \lambda_2s_f^{a,b}$ . During training, this similarity score is directly regarded as logits for the cross-entropy loss $L_{ce}$ . The total loss function is a weighted sum of three losses: $L = w_{1}L_{ce} + w_{2}L_{div} + w_{3}L_{att}$ . During inference, we assign the label of the query video as the label of the most similar video in the support set.
131
+
132
+ # 4 Experiments
133
+
134
+ We conduct experiments on four public datasets. Kinetics [7] and Something-something V2 (SSv2) [19] are two most frequently used benchmarks for few-shot action recognition. These two datasets are both splitted as 64/12/24 classes for train/val/test. For SSv2, we use both the split from CMN [72] (SSv2°) and the split from OTAM [5] (SSv2#). Recently, Zhang et al. [69] proposed new splits for HMDB [30] and UCF [48] datasets. We also conduct experiments on these two datasets using the split from [69].
135
+
136
+ Since our method's performance is competitive in both standard 1-shot 5-way setting and 5-shot 5-way setting, in this section we only demonstrate 1-shot
137
+
138
+ results and place 5 shot results in the supplementary due to page limitation. Following previous works, we report the average result of 10,000 test episodes in the experiments.
139
+
140
+ Baselines We compare our method with recent works reporting state-of-the-art performance, including MatchNet [52], CMN [73], OTAM [5], TRN [71], ARN [69], TRX [44], ITA-Net [70]. Following [74], we also compare with the few-shot image classification model FEAT [65] which is also based on transformers. Specifically, since no previous works used object detector in few-shot action recognition, for a fair comparison with previous works, we conduct experiments in two settings: (1) we give baseline methods the same input (both $\mathbf{F}_g$ and $\mathbf{F}_o$ ) as our method and compare the performance. We denote the baselines as "Baseline+" in this setting. (2) We discard the object detector in our method and use only $\mathbf{F}_g$ as input and $RET_{gg}$ as the encoder. We denote our method in this setting as "Ours".
141
+
142
+ To enable previous methods to take object features as input, we choose to compare with methods TRX+, FEA $T+$ , and ITA-Net $^+$ because they also use transformer-based architectures like our method, thus no modification on the model architecture is needed. For completeness, we also compare MatchNet $^+$ and TRN $^+$ without transformer architecture. For these two methods, we reshape the object features $\pmb{F}_{o}$ to $\pmb{F}_{o}^{\prime} \in \mathbb{R}^{T \times Bd}$ as input. Since these two works are not designed to input the object features, we train an ensembled network, one with $\pmb{F}_{g}$ as input and the other with $\pmb{F}_{o}^{\prime}$ as input. We use the public implementation of TRX and implement ITA-Net by ourselves. More details about baseline implementation can be found in the supplementary material. Recently, several works [56,4,74] pretrain the backbone on the meta-training set and found this pretraining to be useful for few-shot action recognition. To compare with the majority of prior works, we do not follow this setting in our experiments.
143
+
144
+ Implementation details We use ResNet-50 [23] pretrained on ImageNet [12] as the backbone of embedding network, and a fixed Mask-RCNN [22] trained on COCO dataset [35] is used as the bounding box extractor. We select $B = 3$ most confident object bounding boxes per frame. The pre-processing steps follow OTAM [5] where we also sample $T = 8$ frames with random crop during training and center crop during inference. The model and the backbone is optimized using SGD with an initial learning rate of 0.001 and decaying every 20 epochs by 0.1. The embedding network except its first BatchNorm layer is fine-tuned with 1/10 learning rate. The training is stopped when the loss on the validation set is greater than the average of the previous 5 epochs. Unless otherwise stated, we report result using $m_{g} = m_{f} = 8$ , $\lambda_{1} = \lambda_{2} = 0.5$ , $w_{1} = 1$ , $w_{2} = w_{3} = 0.1$ .
145
+
146
+ # 4.1 Results
147
+
148
+ Tab. 1 shows result comparison with baseline methods. In the upper block, our model slightly outperforms previous works even without using the object detector on 4 of the 5 dataset/splits. This suggests that compared with other
149
+
150
+ Table 1. Results of 5-way 1-shot experiments on 5 dataset splits. Methods marked with * indicates results of our implementation with the original reported results shown in parenthesis. The bottom and upper block are results with and without using object features, respectively. For ITA-Net, result on SSv2° comes from Table 5 of [70].
151
+
152
+ <table><tr><td>Method</td><td>SSv2°</td><td>SSv2#</td><td>Kinetics</td><td>HMDB</td><td>UCF</td></tr><tr><td>MatchNet* [52]</td><td>34.9 (31.3)</td><td>35.1</td><td>54.6 (53.3)</td><td>50.1</td><td>70.3</td></tr><tr><td>CMN [73]</td><td>36.2</td><td>-</td><td>60.5</td><td>-</td><td>-</td></tr><tr><td>ARN [69]</td><td>-</td><td>-</td><td>63.7</td><td>45.5</td><td>66.3</td></tr><tr><td>OTAM [5]</td><td>-</td><td>42.8</td><td>73.0</td><td>-</td><td>-</td></tr><tr><td>TRN* [71,5]</td><td>35.9</td><td>39.6 (38.6)</td><td>68.6 (68.4)</td><td>52.3</td><td>76.3</td></tr><tr><td>FEAT* [65]</td><td>38.4</td><td>45.5</td><td>73.0</td><td>56.1</td><td>75.8</td></tr><tr><td>ITA-Net* [70]</td><td>38.4 (38.6)</td><td>46.1</td><td>72.6</td><td>56.5</td><td>76.0</td></tr><tr><td>TRX* [44]</td><td>37.1 (36.0)</td><td>41.5 (42.0)</td><td>64.6 (63.6)</td><td>54.4</td><td>77.7</td></tr><tr><td>Ours-</td><td>38.9</td><td>49.3</td><td>73.3</td><td>60.1</td><td>71.4</td></tr><tr><td>MatchNet+*</td><td>35.6</td><td>36.5</td><td>57.6</td><td>52.8</td><td>72.8</td></tr><tr><td>TRN+*</td><td>38.1</td><td>41.3</td><td>71.4</td><td>55.3</td><td>79.7</td></tr><tr><td>FEAT+*</td><td>43.1</td><td>46.6</td><td>73.9</td><td>61.5</td><td>79.7</td></tr><tr><td>ITA-Net+*</td><td>43.7</td><td>48.9</td><td>74.4</td><td>61.6</td><td>79.5</td></tr><tr><td>TRX+*</td><td>39.4</td><td>44.2</td><td>71.8</td><td>60.1</td><td>81.2</td></tr><tr><td>Ours</td><td>57.1</td><td>59.6</td><td>81.0</td><td>80.3</td><td>79.0</td></tr></table>
153
+
154
+ prototype generation methods, our proposed approach to generate and match the compound prototypes enables better similarity measurement for few-shot action recognition. From the comparison of baseline methods with their “+” variants, we can see that these methods cannot fully exploit the information brought by the object features. When object features are added as input, our full model significantly outperforms previous methods that use the same input. Compared with the performance of our method in the upper block, the object features significantly stimulates the potential of our proposed compound prototype matching scheme, by improving the accuracy on the SSv2 dataset for over $10\%$ , the Kinetics dataset for $7.7\%$ and the HMDB dataset for over $20\%$ . In the ablation study, we show even better performance can be achieved by carefully adjusting the number of prototypes $m_{g}$ and $m_{f}$ .
155
+
156
+ Our method does not achieve state-of-the-art results on the UCF dataset. One reason is that classes in the UCF dataset can be easily distinguished only from appearance. This causes our multi-relation encoder to overfit. If we remove this encoder and directly use concatenation of object and global features as input to the compound prototype decoder, our method can achieve the state-of-the-art accuracy of 87.7. This reveals one limitation of our method, i.e., easy to overfit on simple datasets.
157
+
158
+ # 4.2 Ablation Study
159
+
160
+ Effect of object features While there exist previous studies that leverage additional information for few-shot action recognition [18], no work has invest
161
+
162
+ Table 2. Results comparison of different methods when using/not using object information, and using/not using our proposed encoder.
163
+
164
+ <table><tr><td>Encoding</td><td>Prototype</td><td>SSv2°</td><td>SSv2#</td><td>Kinetics</td></tr><tr><td rowspan="4">Backbone only (w/o. object features)</td><td>None</td><td>34.9</td><td>35.1</td><td>54.6</td></tr><tr><td>ITA-Net</td><td>38.4</td><td>45.5</td><td>72.6</td></tr><tr><td>TRX</td><td>37.1</td><td>41.5</td><td>64.6</td></tr><tr><td>Ours</td><td>37.9</td><td>48.5</td><td>72.5</td></tr><tr><td rowspan="4">Our encoder (w/o. object features)</td><td>None</td><td>35.3</td><td>37.2</td><td>59.4</td></tr><tr><td>ITA-Net</td><td>38.6</td><td>46.5</td><td>73.0</td></tr><tr><td>TRX</td><td>38.2</td><td>44.4</td><td>68.9</td></tr><tr><td>Ours</td><td>38.9</td><td>49.3</td><td>73.3</td></tr><tr><td rowspan="4">Concat (w. object features)</td><td>None</td><td>35.6</td><td>36.5</td><td>57.6</td></tr><tr><td>ITA-Net+</td><td>43.7</td><td>48.9</td><td>74.4</td></tr><tr><td>TRX+</td><td>39.4</td><td>44.2</td><td>71.8</td></tr><tr><td>Ours</td><td>42.1</td><td>49.1</td><td>79.2</td></tr><tr><td rowspan="4">Our encoder (w. object features)</td><td>None</td><td>39.1</td><td>42.5</td><td>58.4</td></tr><tr><td>ITA-Net+</td><td>44.0</td><td>50.7</td><td>73.3</td></tr><tr><td>TRX+</td><td>46.3</td><td>48.4</td><td>73.4</td></tr><tr><td>Ours</td><td>57.1</td><td>59.6</td><td>81.0</td></tr></table>
165
+
166
+ Table 3. Results comparison of our model using different encoding relations with different number of global prototypes and focused prototypes.
167
+
168
+ <table><tr><td>Setting</td><td>Fgg</td><td>Fgo</td><td>Foo</td><td>SSv2#</td><td>Kinetics</td></tr><tr><td rowspan="7">mg=8,
169
+ mf=8</td><td>✓</td><td>×</td><td>×</td><td>49.3</td><td>73.3</td></tr><tr><td>×</td><td>✓</td><td>×</td><td>47.3</td><td>69.1</td></tr><tr><td>×</td><td>×</td><td>✓</td><td>55.5</td><td>73.6</td></tr><tr><td>✓</td><td>✓</td><td>×</td><td>49.6</td><td>75.0</td></tr><tr><td>✓</td><td>×</td><td>✓</td><td>57.7</td><td>79.7</td></tr><tr><td>×</td><td>✓</td><td>✓</td><td>57.8</td><td>77.1</td></tr><tr><td>✓</td><td>✓</td><td>✓</td><td>59.6</td><td>81.0</td></tr><tr><td rowspan="4">mg=16,
170
+ mf=0</td><td>✓</td><td>×</td><td>×</td><td>38.9</td><td>65.5</td></tr><tr><td>×</td><td>✓</td><td>×</td><td>38.8</td><td>65.2</td></tr><tr><td>×</td><td>×</td><td>✓</td><td>38.5</td><td>64.0</td></tr><tr><td>✓</td><td>✓</td><td>✓</td><td>39.3</td><td>66.1</td></tr><tr><td rowspan="4">mg=0,
171
+ mf=16</td><td>✓</td><td>×</td><td>×</td><td>41.9</td><td>72.3</td></tr><tr><td>×</td><td>✓</td><td>×</td><td>34.4</td><td>73.7</td></tr><tr><td>×</td><td>×</td><td>✓</td><td>29.3</td><td>61.0</td></tr><tr><td>✓</td><td>✓</td><td>✓</td><td>44.0</td><td>76.7</td></tr></table>
172
+
173
+ tigated the use of object features as in our method. One may argue that the performance improvement of our method only comes from the use of object features. However, in Tab. 1 we find that performance gain of previous methods is limited if object features are additionally used as input. Here, we show that a boost in performance only happens when object features, our multi-relation encoder, and our decoder are used together.
174
+
175
+ We test the performance of multiple methods with and without using object information, and also with and without using our multi-relation encoder. In Tab. 2, the first block uses neither object feature nor our multi-relation encoder, and the second block uses our encoder but with only the global-global relation $RET_{gg}$ . From the comparison between these two blocks, we can see that our multi-relation encoder can improve the performance of all methods, but not significantly. In the third block of Tab. 2, we concatenate each frame-wise feature with its corresponding object features as input. The comparison between this block and the first block shows the improvement brought by object features: around $2 \sim 5$ percent on SSv2 dataset, and $2 \sim 6$ percent on Kinetics dataset. Finally, in the fourth block of Tab. 2, both object features and our multi-relation encoder are used. Comparing this block with the second and third blocks, all methods get more improvement. This shows that using our multi-relation encoder to consider multiple relations across frames can better leverage the information brought by the object features. Among all methods in the fourth block of Tab. 2, our method enjoys the most significant performance gain. This indicates that while the object features bring additional information, our method can best leverage this information to help the few-shot action recognition task.
176
+
177
+ Impact of multi-relation feature encoding To see how does the multi-relation feature encoding contribute to the performance, we conduct ablation study of our method considering only subsets of $\{\pmb{F}_{gg},\pmb{F}_{go},\pmb{F}_{oo}\}$ . We also vary the number of global prototypes $m_{g}$ and focused prototypes $m_{f}$ to see the influence of feature encoding on each group of prototypes.
178
+
179
+ Results can be seen in Tab. 3. From the experiments with $m_g = m_f = 8$ , the SSv2# dataset gets much improvement from the use of object-object feature $F_{oo}$ , while the Kinetics dataset benefits more from the global-global feature $F_{gg}$ . This is reasonable since SSv2 dataset includes more actions with multiple objects. From the experiments with $m_g = 16$ , the global prototypes seem to work equally well using the three encoded features on both datasets. The experiments with $m_f = 16$ suggest that focused prototypes work better with global-global relations. When using all three features (last row of each block), the comparison between different choices of $m_g$ and $m_f$ indicates that the two groups of prototypes capture complementary aspects of the action, since the performances got significantly improved when two groups of prototypes both present. A more detailed figure showing the accuracy difference of each action class can be found in the supplementary material.
180
+
181
+ # 4.3 Analysis of compound prototypes
182
+
183
+ The core of our proposed method is the generation and matching of compound prototypes. In this section we conduct extensive experiments to get a more comprehensive understanding of the two groups of prototypes.
184
+
185
+ What aspect of the action does each prototype capture? We address this question by investigating the self-attention operation that generates the prototypes. From Equation 5, the self-attention weight $\alpha \in \mathbb{R}^{(B + 2)\times T}$ on each frame represents from which part of the video does each prototype gather its information. To better understand the prototypes, we visualize this attention in Fig. 2 using two 1-shot 2-way examples. In the visualization we average the $B + 2$ attention weights in each frame, forming $\tilde{\alpha}\in \mathbb{R}^T$ , and show this averaged value on each of the $T = 8$ frames. For clarity we only show 2 global prototypes and 2 focused prototypes in each video. We also show the video similarity scores and the similarity of matched prototypes at the bottom of the figure.
186
+
187
+ The visualization is shown in Fig. 2. We first analyze the attention of each prototype. In all videos, the global prototype $\pmb{p}_{g,2}$ have high attention weights on the start of the action (not the start of the video), and $\pmb{p}_{g,6}$ pays more attention to the frames that contain appearance change compared with other frames (no hand existence). This is expected since $L_{div}$ forces each global prototype to be different, while the 1-to-1 matching encourages each global prototype to focus on similar aspects so that correct video similarity can be predicted. For the focused prototypes, $\pmb{p}_{f,1}$ usually gives high attention to the last few frames, and $\pmb{p}_{f,2}$ pays more attention on the middle frames. This is also expected since $L_{att}$ refrains the focused prototypes to attend on similar temporal locations, and
188
+
189
+ ![](images/788c849dbcd25b8623e14f8254b2da82ddd128883ae3354944f08e44c48e5f4d.jpg)
190
+ (a) Query: pretend to take something from somewhere
191
+
192
+ ![](images/411d780612ea03c1ebdf01323853c76d97820882957546c0151fb9081ecb139f.jpg)
193
+ (b) Support: pretend to take something from somewhere
194
+
195
+ ![](images/1a6c997c7a4223e0d9fb142a6bc5064dbda8f9666fc7bb6805de6062cd64e0a6.jpg)
196
+ (c) Support: opening something
197
+ Fig. 2. Visualization of the self-attention weight of two global prototypes and two focused prototypes on each timestamp of the input. Attention weights higher than average (0.125) are marked in black. We can see the global prototypes capture a certain aspect of the action in the video, regardless of temporal location: $\pmb{p}_{g,2}$ - the start of the action; $\pmb{p}_{g,6}$ - the frames without hand. Meanwhile, the focused prototypes mainly attend on fixed timestamps of the video: $\pmb{p}_{f,1}$ - the end of the video; $\pmb{p}_{f,2}$ - the middle part of the video. Example to the left comes from the SSv2° dataset and the example to the right is from SSv2#. Video similarity scores $s$ and similarity scores of matched prototypes $\pmb{p}_* \sim \pmb{p}_*$ are shown at the bottom.
198
+
199
+ ![](images/d690c6226c788c687135242503fc17ac37fd66cfc7ac92b5a1f0560361ffbe17.jpg)
200
+ (x) Query: Tipping something over
201
+
202
+ ![](images/735e984b446cdebda9b0b17ba516980489a765d130c2a6040dc521fccc055293.jpg)
203
+ (y) Support: Tipping something over
204
+
205
+ ![](images/b298a26aade800116408e4f65ad73da2172c9effd1c20326b919ac7662e65b8c.jpg)
206
+ (z) Support: Lifting up one end of something
207
+
208
+ bipartite matching allows similar actions to be matched even when they are at different temporal locations of the videos. A similar phenomenon exists in the object detection task [6], where each object query focuses on detecting objects in a specific spatial location of the image.
209
+
210
+ In the left example, both the prototype pairs $< \pmb{p}_{g,2}^{a}, \pmb{p}_{g,2}^{b} >$ and $< \pmb{p}_{g,6}^{a}, \pmb{p}_{g,6}^{b} >$ have high similarity scores (0.53 and 0.49 shown at the bottom of the left example). This indicates that video $a$ and $b$ have similar starts, and the intra-video appearance change is also similar. Thus the query action is correctly classified as "Pretending to take something from somewhere". In the right example, we can see the effectiveness of the focused prototypes. By Hungarian matching, $\pmb{p}_{f,1}^{x}$ is matched with $\pmb{p}_{f,2}^{y}$ . Since they both encode the frames where the hands just tip the objects over, these two prototypes give high similarities, enabling the query action of "Tipping something over" to be correctly recognized.
211
+
212
+ A statistical analysis of self-attention weights can be found in Fig. 3 showing the average response of the first 4 global prototypes and the first 4 focused prototypes on all videos of the test set. As a result of the loss functions $L_{div}, L_{att}$ and the matching strategies, on both SSv2# and Kinetics datasets, $P_g$ (first 4 rows)
213
+
214
+ ![](images/b895d2a8fa282a708baf92f27f8fdb5836646d8f596472db54dae1f8ad4d404a.jpg)
215
+ Fig.3. Visualization of self-attention weights of $P_{s}$ and $P_{d}$ for all samples on the test set of $\mathrm{SSv2^{\sharp}}$ and Kinetics datasets.
216
+
217
+ ![](images/07520db1a0514da0fd34ef44374aef53ecfd4167cbd53a044b44ab9f1842fd7f.jpg)
218
+ Fig. 4. Performance on the $\mathrm{SSv2^{\sharp}}$ and Kinetics datasets when changing the number of global/focused prototypes.
219
+
220
+ ![](images/0e438630b70c52cef95c7e9238a2d05c155edcf9c57c7873b40772c18c730fd0.jpg)
221
+
222
+ have a more uniform attention distribution, while $\pmb{P_f}$ have obvious temporal regions of focus. The diversity of the prototypes ensures a robust representation of the videos, thus similarity between videos can be better computed during the few-shot learning process.
223
+
224
+ How much does each group of prototype contribute? To find the answer, we test our method using different numbers of prototypes ( $m_g$ and $m_f$ ) and show the results in Fig. 4. Although the best combination of $m_g$ and $m_f$ are different for each dataset, the performance gets better when the number of prototypes increases, and after a certain threshold, the result saturates because of the overfitting on the training data. Best results on both $\mathrm{SSv2}^{\sharp}$ (62.0) and Kinetics (86.9) datasets are achieved when $m_f$ is larger than $m_g$ . Although $m_g = m_f = 8$ is not the optimal setting, we apply this setting in Sec. 4.1 and Sec. 4.2 since it is the most stable setting on all datasets. A method to automatically choose the number of prototypes is left for our future work.
225
+
226
+ Also, we show the class accuracy improvement when our method uses both groups of prototypes compared with our method using only one group of prototype. In Fig. 5, orange bars denote the accuracy difference between the $m_g = m_f = 8$ setting and the $m_g = 16$ , $m_f = 0$ setting, which indicates the performance gain by introducing the focused prototypes. Blue bars, on the other hand, show the accuracy improvement brought by the global prototypes. We can see on the SSv2# dataset that when combining the two groups of prototypes, some hard classes like "pulling S out of S", "pulling S from left to right" and "pushing S from right to left" can be better distinguished. From the results of the two datasets, we observe the focused prototypes are more effective in the Kinetics dataset. This is because the Kinetics dataset focuses more on appearance, which can be better captured and compared by the focused prototypes.
227
+
228
+ Will wrong bipartite matching destroy the temporal ordering of actions? Although we observe great performance gain brought by $P_{f}$ in Tab. 3 and Fig. 5, the bipartite matching will unavoidably produce some wrongly matched prototype pairs when creating the correct matchings. Our additional experi
229
+
230
+ ![](images/dc9e0d9118bf4c713d0193a0ed030829b8e2b4a3d3660b8161bebb88c8370fc7.jpg)
231
+
232
+ ![](images/d7e052a5ad3a4b97fa87e765a8465dbd2ec2b43c3877325fa2bc7506c0c266b0.jpg)
233
+ Fig. 5. Class accuracy improvement when our method uses $m_g = m_f = 8$ prototypes compared to: orange bars: $m_g = 16$ , $m_f = 0$ ; blue bars: $m_g = 0$ , $m_f = 16$ . S stands for the abbreviation of "something".
234
+
235
+ ments in the supplementary show that filtering the matched prototypes with low similarity negatively affects the convergence of the model. One reason is that positional encoding implicitly encodes the temporal ordering of the frames within each prototype. During training, the similarity scores of all the wrong matching pairs are learned to be small and so that the final similarity score can be dominated by the similarity score of the correctly matched prototype pairs.
236
+
237
+ # 5 Conclusion
238
+
239
+ In this work, we introduce a novel method for few-shot action recognition by generating global and focused prototypes and compare video similarity based on the prototypes. When generating the prototypes, we encode spatiotemporal object relations to address the actions that involve multiple objects. The two groups of prototypes are encouraged to capture different aspects of the input by different loss functions and matching strategies. In our future work, we will explore a more flexible prototype matching strategy that can avoid the mismatch in the bipartite matching.
240
+
241
+ Acknowledgement This work is supported by JSPS KAKENHI Grant Number JP22K17905, JP20H04205 and JST AIP Acceleration Research Grant Number JPMJCR20U1.
242
+
243
+ # References
244
+
245
+ 1. Andrychowicz, M., Denil, M., Gomez, S., Hoffman, M.W., Pfau, D., Schaul, T., Shillingford, B., De Freitas, N.: Learning to learn by gradient descent by gradient descent. In: NeurIPS (2016) 3
246
+ 2. Antoniou, A., Edwards, H., Storkey, A.: How to train your maml. ICML (2019) 3
247
+ 3. Bishay, M., Zoumpourlis, G., Patras, I.: Tarn: Temporal attentive relation network for few-shot and zero-shot action recognition. BMVC (2019) 3
248
+ 4. Cao, C., Li, Y., Lv, Q., Wang, P., Zhang, Y.: Few-shot action recognition with implicit temporal alignment and pair similarity optimization. CVIU (2021) 8
249
+ 5. Cao, K., Ji, J., Cao, Z., Chang, C.Y., Niebles, J.C.: Few-shot video classification via temporal alignment. In: CVPR (2020) 2, 3, 4, 7, 8, 9
250
+ 6. Carion, N., Massa, F., Synnaeve, G., Usunier, N., Kirillov, A., Zagoruyko, S.: End-to-end object detection with transformers. In: ECCV (2020) 4, 6, 12
251
+ 7. Carreira, J., Zisserman, A.: Quo vadis, action recognition? a new model and the kinetics dataset. In: CVPR (2017) 3, 7
252
+ 8. Chang, C.Y., Huang, D.A., Sui, Y., Fei-Fei, L., Niebles, J.C.: D3tw: Discriminative differentiable dynamic time warping for weakly supervised action alignment and segmentation. In: CVPR (2019) 3
253
+ 9. Chao, Y.W., Vijayanarasimhan, S., Seybold, B., Ross, D.A., Deng, J., Sukthankar, R.: Rethinking the faster r-cnn architecture for temporal action localization. In: CVPR (2018) 2
254
+ 0. Chowdhury, A., Jiang, M., Chaudhuri, S., Jermaine, C.: Few-shot image classification: Just use a library of pre-trained feature extractors and a simple classifier. In: ICCV (2021) 1
255
+ 1. Cong, Y., Liao, W., Ackermann, H., Rosenhahn, B., Yang, M.Y.: Spatial-temporal transformer for dynamic scene graph generation. In: ICCV (2021) 6
256
+ 2. Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L.: Imagenet: A large-scale hierarchical image database. In: CVPR (2009) 8
257
+ 3. Deng, J., Yang, Z., Chen, T., Zhou, W., Li, H.: Transvg: End-to-end visual grounding with transformers. ICCV (2021) 4
258
+ 4. Dhillon, G.S., Chaudhari, P., Ravichandran, A., Soatto, S.: A baseline for few-shot image classification. ICLR (2019) 3
259
+ 5. Doersch, C., Gupta, A., Zisserman, A.: Crosstransformers: spatially-aware few-shot transfer. NeurIPS (2020) 4
260
+ 6. Fan, Q., Zhuo, W., Tang, C.K., Tai, Y.W.: Few-shot object detection with attention-rpn and multi-relation detector. In: CVPR (2020) 1
261
+ 7. Finn, C., Abbeel, P., Levine, S.: Model-agnostic meta-learning for fast adaptation of deep networks. In: International Conference on Machine Learning. PMLR (2017) 3, 4
262
+ 8. Fu, Y., Zhang, L., Wang, J., Fu, Y., Jiang, Y.G.: Depth guided adaptive meta-fusion network for few-shot video recognition. In: ACM MM (2020) 1, 3, 9
263
+ 9. Goyal, R., Ebrahimi Kahou, S., Michalski, V., Materzynska, J., Westphal, S., et al.: "The" something something" video database for learning and evaluating visual common sense. In: ICCV (2017) 3, 7
264
+ 20. Grauman, K., Westbury, A., Byrne, E., et al.: Ego4d: Around the world in 3,000 hours of egocentric video. arXiv preprint arXiv:2110.07058 (2021) 1
265
+ 21. Gui, L.Y., Wang, Y.X., Ramanan, D., Moura, J.M.: Few-shot human motion prediction via meta-learning. In: ECCV (2018) 3
266
+
267
+ 22. He, K., Gkioxari, G., Dollár, P., Girshick, R.: Mask r-cnn. In: ICCV (2017) 2, 3, 4, 5, 8
268
+ 23. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: CVPR (2016) 8
269
+ 24. Hong, J., Fisher, M., Gharbi, M., Fatahalian, K.: Video pose distillation for few-shot, fine-grained sports action recognition. In: ICCV (2021) 3
270
+ 25. Huang, Y., Cai, M., Li, Z., Sato, Y.: Predicting gaze in egocentric video by learning task-dependent attention transition. In: ECCV (2018) 1
271
+ 26. Kang, B., Liu, Z., Wang, X., Yu, F., Feng, J., Darrell, T.: Few-shot object detection via feature reweighting. In: ICCV (2019) 1
272
+ 27. Kang, D., Kwon, H., Min, J., Cho, M.: Relational embedding for few-shot classification. In: ICCV (2021) 3
273
+ 28. Kliper-Gross, O., Hassner, T., Wolf, L.: One shot similarity metric learning for action recognition. In: SIMBAD (2011) 1
274
+ 29. Koch, G., Zemel, R., Salakhutdinov, R., et al.: Siamese neural networks for one-shot image recognition. In: ICML (2015) 3
275
+ 30. Kuehne, H., Jhuang, H., Garrote, E., Poggio, T., Serre, T.: Hmdb: a large video database for human motion recognition. In: ICCV (2011) 3, 7
276
+ 31. Kuhn, H.W.: The hungarian method for the assignment problem. Naval research logistics quarterly (1955) 7
277
+ 32. Kumar Dwivedi, S., Gupta, V., Mitra, R., Ahmed, S., Jain, A.: Protagan: Towards few shot learning for action recognition. In: CVPRW (2019) 3
278
+ 33. Li, H., Eigen, D., Dodge, S., Zeiler, M., Wang, X.: Finding task-relevant features for few-shot learning by category traversal. In: CVPR (2019) 1
279
+ 34. Li, S., Liu, H., Qian, R., Li, Y., See, J., Fei, M., Yu, X., Lin, W.: Ta2n: Two-stage action alignment network for few-shot action recognition. arXiv preprint arXiv:2107.04782 (2021) 2, 3
280
+ 35. Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dólar, P., Zitnick, C.L.: Microsoft coco: Common objects in context. In: ECCV (2014) 8
281
+ 36. Liu, W., Zhang, C., Lin, G., Liu, F.: Crnet: Cross-reference networks for few-shot segmentation. In: CVPR (2020) 1
282
+ 37. Liu, Y., Zhang, X., Zhang, S., He, X.: Part-aware prototype network for few-shot semantic segmentation. In: ECCV (2020) 1
283
+ 38. Liu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., Lin, S., Guo, B.: Swin transformer: Hierarchical vision transformer using shifted windows. ICCV (2021) 4, 6
284
+ 39. Lu, Z., He, S., Zhu, X., Zhang, L., Song, Y.Z., Xiang, T.: Simpler is better: Few-shot semantic segmentation with classifier weight transformer. In: ICCV (2021) 6
285
+ 40. Luo, Z., Guillory, D., Shi, B., Ke, W., Wan, F., Darrell, T., Xu, H.: Weakly-supervised action localization with expectation-maximization multi-instance learning. In: ECCV (2020) 2
286
+ 41. Ma, J., Gorti, S.K., Volkovs, M., Yu, G.: Weakly supervised action selection learning in video. In: CVPR (2021) 2
287
+ 42. Mishra, A., Verma, V.K., Reddy, M.S.K., Arulkumar, S., Rai, P., Mittal, A.: A generative approach to zero-shot and few-shot action recognition. In: WACV (2018) 3
288
+ 43. Patravali, J., Mittal, G., Yu, Y., Li, F., Chen, M.: Unsupervised few-shot action recognition via action-appearance aligned meta-adaptation. In: ICCV (2021) 3
289
+
290
+ 44. Perrett, T., Masullo, A., Burghardt, T., Mirmehdi, M., Damen, D.: Temporal-relational crosstransformers for few-shot action recognition. In: CVPR (2021) 2, 3, 4, 8, 9
291
+ 45. Qiao, S., Liu, C., Shen, W., Yuille, A.L.: Few-shot image recognition by predicting parameters from activations. In: CVPR (2018) 3
292
+ 46. Ravi, S., Larochelle, H.: Optimization as a model for few-shot learning. ICLR (2017) 3
293
+ 47. Snell, J., Swersky, K., Zemel, R.S.: Prototypical networks for few-shot learning. NeurIPS (2017) 1, 3
294
+ 48. Soomro, K., Zamir, A.R., Shah, M.: Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402 (2012) 7
295
+ 49. Sun, R., Li, Y., Zhang, T., Mao, Z., Wu, F., Zhang, Y.: Lesion-aware transformers for diabetic retinopathy grading. In: CVPR (2021) 6
296
+ 50. Thatipelli, A., Narayan, S., Khan, S., Anwer, R.M., Khan, F.S., Ghanem, B.: Spatio-temporal relation modeling for few-shot action recognition. arXiv preprint arXiv:2112.05132 (2021) 3
297
+ 51. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L., Polosukhin, I.: Attention is all you need. In: NeurIPS (2017) 2, 4, 5, 6
298
+ 52. Vinyals, O., Blundell, C., Lillicrap, T., Wierstra, D., et al.: Matching networks for one shot learning. NeurIPS (2016) 3, 4, 8, 9
299
+ 53. Wang, H., Zhang, X., Hu, Y., Yang, Y., Cao, X., Zhen, X.: Few-shot semantic segmentation with democratic attention networks. In: ECCV (2020) 1
300
+ 54. Wang, K., Liew, J.H., Zou, Y., Zhou, D., Feng, J.: Panet: Few-shot image semantic segmentation with prototype alignment. In: ICCV (2019) 1
301
+ 55. Wang, L., Xiong, Y., Wang, Z., Qiao, Y., Lin, D., Tang, X., Van Gool, L.: Temporal segment networks: Towards good practices for deep action recognition. In: ECCV (2016) 5
302
+ 56. Wang, X., Ye, W., Qi, Z., Zhao, X., Wang, G., Shan, Y., Wang, H.: Semantic-guided relation propagation network for few-shot action recognition. In: ACM MM (2021) 3, 8
303
+ 57. Wang, X., Huang, T.E., Darrell, T., Gonzalez, J.E., Yu, F.: Frustratingly simple few-shot object detection. ICML (2020) 3
304
+ 58. Wei, X.S., Wang, P., Liu, L., Shen, C., Wu, J.: Piecewise classifier mappings: Learning fine-grained learners for novel categories with few examples. TIP (2019) 3
305
+ 59. Xian, Y., Korbar, B., Douze, M., Schiele, B., Akata, Z., Torresani, L.: Generalized many-way few-shot video classification. In: ECCV (2020) 3
306
+ 60. Xian, Y., Korbar, B., Douze, M., Torresani, L., Schiele, B., Akata, Z.: Generalized few-shot video classification with video retrieval and feature generation. TPAMI (2021) 3
307
+ 61. Xu, B., Ye, H., Zheng, Y., Wang, H., Luwang, T., Jiang, Y.G.: Dense dilated network for few shot action recognition. In: ICMR (2018) 3
308
+ 62. Xu, C., Fu, Y., Liu, C., Wang, C., Li, J., Huang, F., Zhang, L., Xue, X.: Learning dynamic alignment via meta-filter for few-shot learning. In: CVPR (2021) 1
309
+ 63. Xu, M., Zhao, C., Rojas, D.S., Thabet, A., Ghanem, B.: G-tad: Sub-graph localization for temporal action detection. In: CVPR (2020) 6
310
+ 64. Yang, J., Li, C., Zhang, P., Dai, X., Xiao, B., Yuan, L., Gao, J.: Focal self-attention for local-global interactions in vision transformers. NeurIPS (2021) 4
311
+ 65. Ye, H.J., Hu, H., Zhan, D.C., Sha, F.: Few-shot learning via embedding adaptation with set-to-set functions. In: CVPR. pp. 8808-8817 (2020) 4, 8, 9
312
+
313
+ 66. Zeng, R., Huang, W., Tan, M., Rong, Y., Zhao, P., Huang, J., Gan, C.: Graph convolutional networks for temporal action localization. In: ICCV (2019) 6
314
+ 67. Zhang, C., Cai, Y., Lin, G., Shen, C.: Deepemd: Few-shot image classification with differentiable earth mover's distance and structured classifiers. In: CVPR (2020) 3
315
+ 68. Zhang, C., Gupta, A., Zisserman, A.: Temporal query networks for fine-grained video understanding. In: CVPR (2021) 4
316
+ 69. Zhang, H., Zhang, L., Qi, X., Li, H., Torr, P.H., Koniusz, P.: Few-shot action recognition with permutation-invariant attention. In: ECCV (2020) 3, 7, 8, 9
317
+ 70. Zhang, S., Zhou, J., He, X.: Learning implicit temporal alignment for few-shot video classification. *IJCAI* (2021) 2, 3, 8, 9
318
+ 71. Zhou, B., Andonian, A., Oliva, A., Torralba, A.: Temporal relational reasoning in videos. In: ECCV (2018) 8, 9
319
+ 72. Zhu, L., Yang, Y.: Compound memory networks for few-shot video classification. In: ECCV (2018) 3, 7
320
+ 73. Zhu, L., Yang, Y.: Label independent memory for semi-supervised few-shot video classification. TPAMI (2020) 1, 3, 8, 9
321
+ 74. Zhu, X., Toisoul, A., Perez-Rua, J.M., Zhang, L., Martinez, B., Xiang, T.: Few-shot action recognition with prototype-centered attentive learning. BMVC (2021) 1, 3, 8
322
+ 75. Zhu, Z., Wang, L., Guo, S., Wu, G.: A closer look at few-shot video classification: A new baseline and benchmark. BMVC (2021) 3
compoundprototypematchingforfewshotactionrecognition/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3039846fa00b4116de9d2022e4f47e282b6b9792e3014e5e7ea0478875a7c9b0
3
+ size 446112
compoundprototypematchingforfewshotactionrecognition/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f15f0940829974d1238ba82f0a7bd8ebd203de79e137e60fc7e00ecd5c1c4293
3
+ size 510359
conclconceptcontrastivelearningfordensepredictionpretraininginpathologyimages/646c15b0-febd-4ae2-a73f-0b867dff21f7_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0250a154d71abfe80bda6ae2207b5c47dad76f88c3f7566851b46e93c14d1fbf
3
+ size 80924
conclconceptcontrastivelearningfordensepredictionpretraininginpathologyimages/646c15b0-febd-4ae2-a73f-0b867dff21f7_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe4b6a72a68f9ad81baae5b315df3b458e639be551cdd5ba3d0c45fbead18e34
3
+ size 97543
conclconceptcontrastivelearningfordensepredictionpretraininginpathologyimages/646c15b0-febd-4ae2-a73f-0b867dff21f7_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b7d6105d17fc53504acca32ffe43044179151582559905f50bab364e0c969e4
3
+ size 5710811
conclconceptcontrastivelearningfordensepredictionpretraininginpathologyimages/full.md ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ConCL: Concept Contrastive Learning for Dense Prediction Pre-training in Pathology Images
2
+
3
+ Jiawei Yang $^{1,2,\star}$ , Hanbo Chen $^{1,\star\star}$ , Yuan Liang $^{2}$ , Junzhou Huang $^{3}$ , Lei He $^{2}$ , and Jianhua Yao $^{1,\star\star}$
4
+
5
+ Tencent AI Lab
6
+
7
+ $^{2}$ University of California, Los Angeles
8
+
9
+ <sup>3</sup> University of Texas at Arlington
10
+
11
+ jiawei118@ucla.edu
12
+
13
+ Abstract Detecting and segmenting objects within whole slide images is essential in computational pathology workflow. Self-supervised learning (SSL) is appealing to such annotation-heavy tasks. Despite the extensive benchmarks in natural images for dense tasks, such studies are, unfortunately, absent in current works for pathology. Our paper intends to narrow this gap. We first benchmark representative SSL methods for dense prediction tasks in pathology images. Then, we propose concept contrastive learning (ConCL), an SSL framework for dense pre-training. We explore how ConCL performs with concepts provided by different sources and end up with proposing a simple dependency-free concept generating method that does not rely on external segmentation algorithms or saliency detection models. Extensive experiments demonstrate the superiority of ConCL over previous state-of-the-art SSL methods across different settings. Along our exploration, we distill several important and intriguing components contributing to the success of dense pre-training for pathology images. We hope this work could provide useful data points and encourage the community to conduct ConCL pre-training for problems of interest. Code is available at https://github.com/TencentAILabHealthcare/ConCL.
14
+
15
+ Keywords: Pathology image analysis $\cdot$ Whole slide image $\cdot$ Self-supervised learning $\cdot$ Object detection $\cdot$ Instance segmentation $\cdot$ Pre-training
16
+
17
+ # 1 Introduction
18
+
19
+ Computational pathology is an emerging area in modern healthcare. More whole slide images (WSIs) are now analyzed by deep learning (DL) models [29]. To alleviate the heavy annotation burden required by DL models, reusing weights from pre-trained models has become a common practice. Besides transferring from fully-supervised models, recent attention has been attracted to self-supervised
20
+
21
+ ![](images/b3612fbc0eba2673656f479855afc5fec1666110f4f87ac264b56137a3b7ab00.jpg)
22
+ Figure 1: (a) Example pathology images with tissue class names. (b,c) Comparisons of pre-trained models by fine-tuning on the GlaS [28] and CRAG [9] datasets. The detector is Mask-RCNN [14] with a ResNet-18 backbone [15], and an FPN head[20]. Results are averaged over 5 independent runs.
23
+
24
+ ![](images/89543519b32c0498c773b14fb257b4343dc28ac4b544419cf21a658198816d89.jpg)
25
+
26
+ ![](images/2064029ae02d6efdc0c1fb23509608d6d07493929272230e47801f533c1646f5.jpg)
27
+
28
+ learning (SSL) methods [12,3,10]. They are annotation-free but can achieve comparable or even better performance when transferring.
29
+
30
+ The breakthrough of SSL methods starts with contrastive learning [11,34,3,12,4], where the most popular task is instance discrimination [34]. It requires a model to discriminate among individual instances. To achieve that, it first defines some positive pairs and negative pairs. It then optimizes a model to maximize the representation similarity between positive pairs and minimize it between negative pairs. Later, more SSL methods based on cross-view prediction are proposed, e.g., [2,10,3,38]. However, these methods are optimized for image-level representations and might be sub-optimal for dense prediction tasks such as object detection and instance segmentation. This motivates works for detection-friendly pre-training methods, e.g., DenseCL [33], InsLoc [37], Self-EMD [22], SCRL [27], and more [16,30,35,36]. Despite many interests raised in the natural image domain for dense prediction problems, such studies, which are of important clinical and practical values, are absent in the pathology image domain. Our research is intended to bridge the gap between SSL in natural images and pathology images for dense prediction tasks, as well as to distill the key components to the success of dense pre-training in the pathology data.
31
+
32
+ To that end, we start by presenting a general Concept Contrastive Learning (ConCL) framework. Rather than contrasting image-level representations [34,3,12], it contrasts "concepts" that mark different local (semantic) regions. ConCL is an abstraction of dense contrasting frameworks that can resemble most concurrent related works. We first benchmark current leading image-level SSL methods and a grid-level dense SSL method (i.e., DenseCL [33]) in two public datasets. We observe a considerable performance gap between DenseCL [33] and the others. These gaps indicate the importance of contrasting densely (grid-level) than roughly (image-level). Then, directed by the performance differences and the characteristics of pathology images, we gradually develop and improve ConCL via a series of explorations. Specifically, we explore: 1) what makes the success
33
+
34
+ of dense prediction pre-training? 2) what kind of concepts are good for pathology images? The nature of having rich low-level patterns in pathology images (see Fig. 1-(a)) gives some surprising and intriguing results, e.g., a randomly initialized model can group meaningful concepts and help dense pre-training. Along the exploration, we distill several key components contributing to the transferring performance for dense tasks. At the end of exploration, the presented ConCL can surpass various state-of-the-art SSL methods by solid and consistent margins across different downstream datasets, detector architectures, fine-tuning schedules, and pre-training epochs. For example, as shown in Figure 1-(b), the 200-epoch pre-trained ConCL wins all the other methods but with $4 \times$ to $8 \times$ fewer epochs. To summarize, this paper makes the following contributions:
35
+
36
+ - It makes one of the earliest attempts to systematically study and benchmark self-supervised learning methods for dense prediction problems in pathology images, which are of high practical and clinical interest but, unfortunately, absent in existing works. We hope this work could narrow the gap between studies in natural images and pathology images.
37
+ - It presents ConCL, an SSL framework for dense pre-training. We show how ConCL performs with concepts provided by different sources and find that a randomly initialized model could learn semantic concepts and improve itself without expert-annotation or external algorithms while achieving competitive, if not the best, results.
38
+ - It shows how important the dense pre-training is in pathology images for dense tasks and provides some intriguing observations that could contribute to other applications such as few-shot and semi-supervised segmentation and detection, or more, in pathology image analysis or beyond.
39
+
40
+ We hope this work could provide useful data points and encourage the community to conduct ConCL pre-training for problems of interest.
41
+
42
+ # 2 Related work
43
+
44
+ Contrastive learning. The success of deep learning is mainly attributed to mining a large amount of data. When limited data is provided for specific tasks, an alternative is to transfer knowledge by re-using pre-trained models [8,13]. SSL methods learn good pre-trained models from label-free pretext tasks, e.g., colorization [39,40], denoising [31], and thus attract much attention. Recently, contrastive learning [12,4,3,24,34,2], a typical branch of SSL, has made significant progress in many fields, where instance discrimination [11,34,12,4,3] serves as a pretext task. It requires a model to discriminate among individual instances, i.e., image-level representations [34]. MoCo [12,4] and SimCLR[3] are two representatives. Specifically, they generate two views of the same image via random data augmentations (e.g., color jittering, random cropping) and mark them as a positive pair. Then, views from other different images are marked as negative instances or pairs. After that, they learn embeddings by maximizing the similarity between the representations of positive pairs while minimizing it between
45
+
46
+ the representations of negative pairs. Later methods combine contrasting with clustering, e.g., SwAV[2] proposes to contrast views' cluster assignments, and PCL [19] contrasts instances with cluster prototypes.
47
+
48
+ Dense prediction pre-training. Despite their success in transferring to classification tasks, good image-level representations do not necessarily result in better performance in dense prediction tasks. Therefore, recent efforts have been made for dense prediction pre-training. Related works are mostly concurrent [33,37,27,30,35,36,22,16]. Among them, DenseCL [33] learns the correspondence among pixels of a positive pair and optimizes a pairwise contrastive loss at a pixel level, yielding a dense contrasting behavior. Self-EMD [22] does dense predicting in a non-contrastive manner as in BYOL [10], i.e., predicting a grid-level feature vector from one view when given its counterpart from another (positive) view. SCRL [27] argues the importance of spatially consistent representations, so it maximizes the similarity of box region features in the intersected area. The most relevant works concurrent to ours are [16,30]. They also optimize contrastive loss over mask-averaged representations. Those masks are generated by external algorithms that are successful for natural images, e.g., Felzenszwalb-Huttenlocher algorithm [7], or models, e.g., MCG[1], BASNet[25], and DeepUSPS[23]. However, the success of such mask generators is unfortunately unverified in pathology images. In this paper, we provide some of their empirical results. Their different performances yield the disparity between natural and pathology images, from which we are motivated to propose a dependency-free concept mask generator. It directly bootstraps the structural concepts inherent in pathology images, learns from scratch, and has better potential.
49
+
50
+ SSL in pathology images. Studying SSL methods in pathology images is still at an early stage. In addition to studies on natural images, SimCLR [3] is also studied and benchmarked for classification, regression, and segmentation tasks in pathology images [6]. Some domain-specific self-supervised pretext tasks, e.g., magnification prediction, JigMag prediction, and hematoxylin channel prediction, are proposed and studied [18]. However, despite interest raised in natural images for dense problems, existing works have not studied, to our knowledge, detection/segmentation-friendly SSL methods in pathology images. Our work aims to bridge this gap and provide our exploration roadmap toward better dense prediction performance for pathology images.
51
+
52
+ # 3 Method
53
+
54
+ # 3.1 Preliminary: Instance Contrastive Learning
55
+
56
+ MoCo[12] abstracts the instance discrimination task as a dictionary look-up problem. Specifically, for each encoded query $q$ , there is a set of encoded keys $\{k_0, k_1, k_2, \ldots\}$ in a dictionary. The instance discrimination task is to pull closer $q$ and its matched positive key $k_+$ in the dictionary while spreading $q$ away from all
57
+
58
+ ![](images/81f706859952c750b12f8497188940fad3de3169ec27e15be62fa3ee3ee6c9f8.jpg)
59
+ Figure 2: ConCL overview. ConCL has three steps: (1) Given a query view $x_{q}$ and a key view $x_{k}$ , their union region is cropped as a reference view $x_{r}$ . ConCL obtains concept proposals by processing $x_{r}$ with a "concept generator." (2) For the shared concepts, ConCL computes their representations via masked average pooling (MAP). (3) ConCL optimizes concept contrastive loss (Eq. (2)), and ensembles the concept prototypes from the key encoder to the concept queue.
60
+
61
+ other negative keys $k_{-}$ . When using the dot-product as similarity measurement, a form of contrastive loss function based on InfoNCE[24] becomes:
62
+
63
+ $$
64
+ L _ {q} = - \log \frac {\exp (q \cdot k _ {+} / \tau)}{\exp (q \cdot k _ {+} / \tau) + \sum_ {k _ {-}} \exp (q \cdot k _ {-} / \tau)} \tag {1}
65
+ $$
66
+
67
+ where $\tau$ is a temperature hyper-parameter [34]. Queries $q$ and keys $k$ are computed by a query encoder and a key encoder, respectively [12,4]. Formally, $q = h(\mathsf{GAP}(f_5(x_q)))$ , where $h$ is a MLP projection head as per [3]; $\mathsf{GAP}(\cdot)$ denotes global-average-pooling, and $f_{5}(x)$ represents the outputs from the stage-5 of a ResNet [15]. Keys $k$ are computed similarly using the key encoder. In MoCo [12], the negative keys are stored in a queue to avoid using large batches [3].
68
+
69
+ # 3.2 Concept Contrastive Learning
70
+
71
+ Instance contrastive methods [3,12,34] do well in discriminating among image-level instances, but dense prediction tasks usually require discriminating among local details, e.g., object instances or object parts. We abstract such local details, or say, fine-grained semantics as "concepts." A concept does not necessarily represent an object. Instead, any sub-region in an image could be a concept since it contains certain different semantics. From the perspective of dense prediction, it is desirable to build concept-sensitive representations. For example, one WSI patch usually contains multiple small objects, e.g., nucleus, glands, and multiple texture-like tissues, e.g., mucus [29,17]. To successfully detect and segment objects in such images, models need to learn more information from local details. To
72
+
73
+ this end, we propose a simple but effective framework — **Concept Contrastive Learning** (ConCL). Figure 2 shows its overview, which we elaborate on below.
74
+
75
+ Concept discrimination. We first define a pretext task named concept discrimination. Similar to instance discrimination [34,11], concept discrimination requires a model to discriminate among the representations of the same but augmented concepts and the representations of different concepts. We formulate concept discrimination by extending the instance-level queries and keys to concept-level. Specifically, given an encoded query concept $q^{c}$ and a set of encoded key concepts $\{k_0^c, k_1^c, k_2^c, \ldots\}$ , we derive concept contrastive loss as:
76
+
77
+ $$
78
+ L _ {c} = - \log \frac {\exp \left(q ^ {c} \cdot k _ {+} ^ {c} / \tau\right)}{\exp \left(q ^ {c} \cdot k _ {+} ^ {c} / \tau\right) + \sum_ {k _ {-} ^ {c}} \exp \left(q ^ {c} \cdot k _ {-} ^ {c} / \tau\right)} \tag {2}
79
+ $$
80
+
81
+ where $\tau$ is the same temperature parameter and $k_{-}^{c}$ are keys in the concept queue — the queue to store concept representations. This objective brings representations of different views of the same concept closer and spreads representations of views from different concepts apart.
82
+
83
+ Concept mask proposal. We use masks to annotate fine-grained concepts explicitly. Assume a mask generator is given, as diagramed at the bottom of Figure 2; we first pass a reference view $x_{r}$ , defined as the circumscribed rectangle crop of the union of two views, into the mask generator to obtain a set of concept masks — $\mathcal{M}_r = \{m_i\}_{i=1}^K$ , where $K$ is the number of concepts. Since the reference view contains both the query view and the key view, their concept masks $\mathcal{M}_q$ and $\mathcal{M}_k$ are immediately obtained if we restore them in the reference view. Then, we derive concept representations in both views by masked average pooling (MAP) with resized concept masks. Specifically, we compute $q^{c} = h(\mathrm{MAP}(f_{5}(x_{q}), m_{c}))$ and $k^{c}$ similarly, where $\mathrm{MAP}(z, m) = \sum_{ij} m_{ij} \cdot z_{ij} / \sum_{ij} m_{ij}$ , and $z \in \mathbb{R}^{CHW}$ denotes feature maps, $m \in \{0,1\}^{HW}$ is a binary indicator for each concept. Here, only the shared concepts in both views are considered, i.e., $m_{c} \in \mathcal{M}_{q} \cap \mathcal{M}_{k}$ .
84
+
85
+ Our analysis hereafter focuses on 1) What makes the success of dense prediction pre-training? 2) What kind of concepts are good for pathology images? Different answers to these two questions reveal the characteristics of pathology images and the disparity between natural and pathology images, as we explore in Section 4. Below, we first introduce the benchmark pipeline and setups.
86
+
87
+ # 3.3 Benchmark Pipeline
88
+
89
+ Despite the extensive benchmarks in natural images for dense tasks, to our knowledge, such studies are unfortunately absent in current works for pathology. Note that studying SSL methods in pathology images is still at an early stage. Most current works focus on employing image-level SSL methods for classification tasks. Orthogonal to theirs, we investigate a wider range of SSL methods for object detection and instance segmentation tasks, which are of high clinical value. We hope our work could provide useful data points for future work.
90
+
91
+ Implementations. For implementation details, please refer to Appendix B. We briefly introduce the datasets here and elaborate on them in Appendix C:
92
+
93
+ - Pre-training dataset. We use NCT-CRC-HE-100K[17] dataset, referred to as NCT, for pre-training. It contains 100,000 non-overlapping patches extracted from hematoxylin and eosin (H&E) stained colorectal cancer and normal tissues. All images are of size $224 \times 224$ at 0.5 MPP ( $20 \times$ magnification). We randomly choose $80\%$ of NCT to be the pre-training dataset.
94
+ - Transferring dataset. We use two public datasets, the gland segmentation in pathology images challenge (GlaS) dataset [28] and the colorectal adenocarcinoma gland (CRAG) dataset [9], and follow their official train/test splits for evaluation. GlaS [28] collects images of $775 \times 522$ from H&E stained slides with object-instance-level annotation; the images include both malignant and benign glands. CRAG [9] collects 213 H&E stained images taken from 38 WSIs with a pixel resolution of $0.55\mu \mathrm{m}$ /pixel at $20 \times$ magnification. Images are mostly of size $1512 \times 1516$ with object-instance-level annotation.
95
+
96
+ We study the performance of object detection and instance segmentation.
97
+
98
+ Experimental setup. We pre-train all the methods on the NCT training set for 200 epochs. For ConCL pre-training, we warm up the model by optimizing instance contrastive loss (Eq. (1)) for the first 20 epochs and switch to concept contrastive loss (Eq. (2)). Then, we use the pre-trained backbones to initialize the detectors, fine-tune them on the training sets of transferring datasets, and test them in the corresponding test sets. Unless otherwise specified, we run all the transferring experiments 5 times and report the averaged performance.
99
+
100
+ # 4 Towards Better Concepts: a Roadmap
101
+
102
+ In this section, we first benchmark some popular state-of-the-art SSL methods for dense pathology tasks. Then, we start with DenseCL [33] and derive better concepts along the way, directed by the questions raised in the previous section.
103
+
104
+ # 4.1 Benchmarking SSL methods for Dense Pathology Tasks
105
+
106
+ Benchmark results. Table 1 (baselines and prior SSL arts) shows the transferring performance for GlaS dataset (left columns) and CRAG dataset (right columns), respectively. We report results using 200-epoch pre-trained models and a $1 \times$ fine-tuning schedule. On the GlaS dataset [28], we observe that the gap between training from randomly initialized models and training from supervised pre-trained models is relatively smaller compared to those in the natural image domain [5,4,10,3]. Nonetheless, state-of-the-art SSL methods all exceed supervised pre-training, meeting the same expectation as in natural images. Yet, on the CRAG dataset [9], most of the pre-trained models, including both the self-supervised ones and the supervised one, fail to achieve competitive performance
107
+
108
+ <table><tr><td rowspan="2">Category</td><td rowspan="2">Methods</td><td colspan="4">GlaS</td><td colspan="4">CRAG</td></tr><tr><td>Detect APbb</td><td>APbb75</td><td>Segment APmk</td><td>APmk75</td><td>Detect APbb</td><td>APbb75</td><td>Segment APmk</td><td>APmk75</td></tr><tr><td rowspan="2">Baselines</td><td>Rand. Init.</td><td>49.8</td><td>57.3</td><td>52.1</td><td>60.7</td><td>51.1</td><td>57.0</td><td>50.6</td><td>57.3</td></tr><tr><td>Supervised</td><td>50.2</td><td>56.9</td><td>53.2</td><td>62.1</td><td>49.2</td><td>55.2</td><td>49.4</td><td>55.0</td></tr><tr><td rowspan="3">Sec. 4.1</td><td>SimCLR[3]</td><td>50.7</td><td>56.9</td><td>53.6</td><td>62.7</td><td>49.2</td><td>54.8</td><td>49.1</td><td>54.7</td></tr><tr><td>BYOL[10]</td><td>50.9</td><td>57.7</td><td>53.9</td><td>62.6</td><td>49.9</td><td>55.8</td><td>49.3</td><td>55.3</td></tr><tr><td>PCL-v2† [19]</td><td>49.4</td><td>55.9</td><td>51.9</td><td>61.0</td><td>51.0</td><td>56.6</td><td>50.5</td><td>56.7</td></tr><tr><td rowspan="3">Prior SSL arts</td><td>MoCo-v1[12]</td><td>50.0</td><td>56.2</td><td>52.1</td><td>59.9</td><td>47.2</td><td>51.1</td><td>47.5</td><td>52.0</td></tr><tr><td>MoCo-v2[4]</td><td>52.3</td><td>60.0</td><td>55.3</td><td>65.0</td><td>50.0</td><td>55.7</td><td>50.3</td><td>56.8</td></tr><tr><td>DenseCL[33]</td><td>53.9</td><td>62.0</td><td>56.5</td><td>66.2</td><td>52.3</td><td>58.2</td><td>52.2</td><td>59.8</td></tr><tr><td colspan="10">Our differently instantiated ConCLs:</td></tr><tr><td rowspan="3">Sec. 4.2</td><td>(1) g-ConCL(s=3)</td><td>54.9</td><td>64.1</td><td>57.1</td><td>66.3</td><td>55.4</td><td>62.3</td><td>54.4</td><td>62.0</td></tr><tr><td>(2) g-ConCL(s=5)</td><td>55.4</td><td>65.2</td><td>57.4</td><td>67.2</td><td>55.5</td><td>62.7</td><td>54.6</td><td>62.2</td></tr><tr><td>(3) g-ConCL(s=7)</td><td>54.9</td><td>63.8</td><td>57.0</td><td>66.5</td><td>55.3</td><td>62.5</td><td>54.7</td><td>62.6</td></tr><tr><td>Sec. 4.3</td><td>(4) fh-ConCL(s=50)</td><td>55.8</td><td>65.6</td><td>58.3</td><td>68.8</td><td>54.8</td><td>60.7</td><td>54.1</td><td>60.7</td></tr><tr><td>Natural-image</td><td>(5) fh-ConCL(s=500)</td><td>56.2</td><td>65.9</td><td>57.7</td><td>67.9</td><td>54.7</td><td>61.9</td><td>53.8</td><td>60.5</td></tr><tr><td>priors concepts</td><td>(6) bas-ConCL</td><td>56.1</td><td>66.1</td><td>58.1</td><td>68.1</td><td>54.2</td><td>61.1</td><td>53.4</td><td>60.8</td></tr><tr><td>Sec. 4.4</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Bootstrapped</td><td>(7) b-ConCL(f4)</td><td>56.8</td><td>66.2</td><td>58.7</td><td>68.9</td><td>55.1</td><td>62.2</td><td>54.1</td><td>61.4</td></tr><tr><td>concepts</td><td>(8) b-ConCL(f5)</td><td>56.1</td><td>65.6</td><td>57.8</td><td>67.7</td><td>56.5</td><td>63.3</td><td>55.3</td><td>62.9</td></tr></table>
109
+
110
+ Table 1: Main results of object detection and instance segmentation. $\mathrm{AP}^{bb}$ : bounding box mAP, $\mathrm{AP}^{mk}$ : mask mAP.
111
+
112
+ compared to training from randomly initialized weights. The only exception is DenseCL [33], a dense contrasting method.
113
+
114
+ Among the image-level SSL methods, MoCo-v2 [4] performs the best in GlaS and the second-best in CRAG. Enhanced by dense contrasting, DenseCL [33] achieves the best results in both datasets. It should be emphasized that DenseCL [33] gets $+1.6\mathrm{AP}^{bb}$ for GlaS by using grid-level contrasting. This demonstrates the importance of designing dense pre-training frameworks when transferring to dense tasks since all the stragglers are only optimized for image-level representations. Thus, we here conclude dense contrasting matters.
115
+
116
+ # 4.2 Correspondence matters
117
+
118
+ From the previous section, we find dense contrasting is favored in both natural and pathology images, where DenseCL [33] all achieves top performance. The next question is: can we improve the dense contrasting framework? To answer it, we first summarize the overall pipeline of DenseCL [33]. DenseCL computes the dense representations of two views without global average pooling, i.e., $f_{5}(x_{q}), f_{5}(x_{k})$ , and passes them to a dense projection head to obtain final grid features of size $\mathbb{R}^{128 \times 7 \times 7}$ . Then it sets the most similar (measured by cosine similarity) grids in two views as positive pairs. As such, the correspondence of positive pairs is learned. However, the reliability of learned correspondence remains questionable and would affect the quality of learned representations.
119
+
120
+ ![](images/a5c484dd116e9fb7b1652f8c073b2efe7a307b5a646e88ed1169c0585be29906.jpg)
121
+ Figure 3: Concept descriptors. (a) Tissue concept illustration. (b) Grid concepts (s: grid number). (c-d) FH concepts (s: scale). (e) Binary saliency concepts, obtained from BASNet [25]. (f-h) Clustering concepts ( $f_i$ : ResNet output stage). The image is resized to $448 \times 448$ for better visualization.
122
+
123
+ To address that, we instantiate DenseCL [33] in ConCL by regarding the grid-prior as a form of concept, as shown in Figure 3-(b). We denote this ConCL instance as g-ConCL. Compared with DenseCL [33] (learned matching), ConCL naturally restores the positive correspondence from a reference view (precise matching Fig. $2 - x_{r}$ ). Table 1-(1-3) compares the original DenseCL [33] and ConCL-instantiated g-ConCL. The results indicate that g-ConCL with precise correspondence can boost DenseCL [33] by a large margin. Even with the simplest form of concepts, g-ConCL already has topped entries above it in Table 1. We believe other dense pre-training methods that learn the matching between grids, e.g., Self-EMD [22], should perform similarly to DenseCL [33], and g-ConCL could outperform them. Thus, we conclude that correspondence matters.
124
+
125
+ # 4.3 Natural Image Priors in Pathology Images
126
+
127
+ ConCL is a general framework for using masks as supervision to discriminate concepts. Some previous works in natural image [42,16,41,30,32] also combines masks with contrastive learning, where the masks are provided by ground truth annotation [42,32,16], or supervised/unsupervised pseudo-mask generation [16,41,30]. The mask generators can be graph-based (e.g., Felzenszwalb-Huttenlocher algorithm [7]), MCG [1], or other saliency detection models [25,23] trained on designated natural image datasets. However, those methods were originally proposed for nature images, and their success for pathology images remains unknown.
128
+
129
+ Here we instantiate ConCL by using Felzenszwalb-Huttenlocher (FH) algorithm [7] and BASNet [25] as concept generators, dubbed as fh-ConCL and bas-ConCL, respectively. FH [7] is a conventional graph-based segmentation algorithm that relies on local neighborhoods, while BASNet [25] is a deep neural network pre-trained on a curated saliency detection dataset, which only contains daily natural objects. We use these two as representatives to study if these natural image priors win twice in both natural and pathology images.
130
+
131
+ Specifically, we use the FH algorithm in the scikit-image package and set both "scale" and "size" hyper-parameters to $s$ . We use the pre-trained BASNet provided by [25]. Figure 3-(c-e) shows some examples. Table 1 reports the results.
132
+
133
+ It is not surprising that the BASNet [25] cannot generate decent concept masks (Fig. 3-(e)) for pathology images since it is pre-trained on curated saliency detection datasets. What is surprising is that bas-ConCL does yield satisfactory
134
+
135
+ results (Tab. 1-(6)). Similar observations are also found in fh-ConCLs (Tab. 1-(4,5)) that though the generated concept masks are coarse-grained, the resulted transferring performances are unexpectedly good. After inspecting more examples, we find that the generated masks maintain high coherence and integrity despite their coarse-grained nature. That said, each concept contains semantic-consistent objects or textures. For example, Figure 3-(d,e) can be seen as special cases of Figure 3-(a) that merge fine-grained semantics with coarse-grained ones. This property makes the major difference between fh-/bas-ConCLs and g-ConCLs, where the grid-concepts are less likely to have coherent semantics.
136
+
137
+ Thus, we here conclude that coherence matters and natural image priors also work in pathology images, though they mostly provide coarse-grained concepts.
138
+
139
+ # 4.4 Pathology Image Priors in Pathology Images
140
+
141
+ Can we obtain concept masks away with natural image priors? External dependency is not always wanted and sometimes may fail to provide the desired masks (e.g., Fig. 3-(e)). We thus task ourselves to find a dependency-free concept proposal method. One of the key characteristics in pathology images is that they have rich low-level patterns and tissue structures. Can we use that prior instead?
142
+
143
+ Figure 3-(f-h) shows the clustering visualization from intermediate feature maps generated by a 10-epoch warmed-up MoCo-v2 [4]. Thanks to the rich structural patterns in pathology images, we find that simply clustering over the feature maps provided by a barely trained model can already generate meaningful structural concept proposals. We thus build upon this "free lunch" and use a "bootstrap your own perception" mechanism that is similar to the "bootstrap your own latent" mechanism in BYOL [10]. ConCL generates concept proposals from the momentum key encoder's perception while simultaneously improving and refining it via the online query encoder, leading to a "bootstrapping" behavior. Thus, we denote such ConCL as bootstrapped-ConCL (b-ConCL). We provide an additional introduction to BYOL and "bootstrapping" in Appendix A.
144
+
145
+ b-ConCL. The concept generator is now instantiated as a KMeans grouper. We first pass the reference view $x_{r}$ to the key encoder to obtain a reference feature map from ResNet stage- $i$ : $f_{i}(x_{r})\in \mathbb{R}^{CHW}$ . Then, we apply K-Means to group $K$ underlying concepts. b-ConCL relies on neither external segmentation algorithms nor designated saliency detection models for natural images.
146
+
147
+ Our default setting is $K = 8$ , and clustering from $f_{4}$ or $f_{5}$ . We postpone the study of hyper-parameters, i.e., the number of clusters in KMeans, and the clustering stage $f_{i}$ to Section 5.2 and report the main results in Table 1-(7,8). We find b-ConCL tops other entries. Compared to MoCo-v2 [4], our direct baseline, b-ConCL outperforms it by $+4.5\mathrm{AP}^{bb}$ and $+3.1\mathrm{AP}^{mk}$ . Moreover, b-ConCL obtains more gains in terms of $\mathrm{AP}_{75}$ ( $+6.2\mathrm{AP}_{75}^{bb}$ , $+3.7\mathrm{AP}_{75}^{mk}$ ) compared to MoCo-v2 [4], which means it improves MoCo-v2 [4] by more accurate bounding box regression and instance mask prediction. This aligns with our motivation for ConCL since discriminating local concepts helps shape object borders.
148
+
149
+ <table><tr><td rowspan="2">Detector</td><td rowspan="2">Pretrain</td><td colspan="2">GlaS Detection</td><td colspan="2">CRAG Detection</td></tr><tr><td>APbb</td><td>APbb/75</td><td>APbb</td><td>APbb/75</td></tr><tr><td rowspan="4">MaskRCNN-C4</td><td>Rand. Init.</td><td>52.9</td><td>59.9</td><td>49.4</td><td>54.2</td></tr><tr><td>Supervised</td><td>49.1(-3.8)</td><td>55.1(-4.8)</td><td>46.1(-3.3)</td><td>50.6(-2.3)</td></tr><tr><td>MoCo-v2 [4]</td><td>53.6(+0.7)</td><td>61.8(+1.9)</td><td>48.3(-1.1)</td><td>52.6(-1.6)</td></tr><tr><td>b-ConCL</td><td>55.8(+2.9)</td><td>63.6(+3.7)</td><td>49.8(+0.4)</td><td>54.3(+0.1)</td></tr><tr><td rowspan="4">MaskRCNN-FPN</td><td>Rand. Init.</td><td>49.8</td><td>57.3</td><td>51.1</td><td>57.0</td></tr><tr><td>Supervised</td><td>50.2(+0.4)</td><td>56.9(-0.4)</td><td>49.2(-1.9)</td><td>55.2(-1.8)</td></tr><tr><td>MoCo-v2 [4]</td><td>52.3(+2.5)</td><td>60.0(+2.7)</td><td>50.0(-1.1)</td><td>55.7(-1.3)</td></tr><tr><td>b-ConCL</td><td>56.8(+7.0)</td><td>66.2(+8.9)</td><td>55.1(+4.0)</td><td>62.2(+5.2)</td></tr><tr><td rowspan="4">RetinaNet</td><td>Rand. Init.</td><td>46.4</td><td>51.0</td><td>45.2</td><td>47.6</td></tr><tr><td>Supervised</td><td>44.7(-1.7)</td><td>48.4(-2.6)</td><td>43.1(-2.1)</td><td>44.8(-2.8)</td></tr><tr><td>MoCo-v2 [4]</td><td>47.2(+0.8)</td><td>50.9(-0.1)</td><td>43.1(-2.1)</td><td>43.8(-3.8)</td></tr><tr><td>b-ConCL</td><td>52.6(+6.2)</td><td>58.6(+7.6)</td><td>48.4(+3.2)</td><td>51.9(+4.3)</td></tr></table>
150
+
151
+ Table 2: Detection performance using different detectors. Results are averaged over 5 trials.
152
+
153
+ Closing remarks. So far, we have included: i) dense contrasting matters; ii) correspondence matters; iii) coherence matters; iv) natural image priors, though they might only provide coarse-grained concepts, work in pathology images as well; and find v) a randomly initialized or barely trained convolutional neural network, thanks to the rich low-level patterns in pathology images and good network initialization, can generate good proposals that are dense, fine-grained and coherent, as shown in Figure 3. Though the coarse-grained concepts generated from natural image priors could also help tasks in our studied benchmarks, they might underperform when a fine-grained dense prediction task is given. We hope our closing remarks could be intriguing and guide future works in designing dense pre-training methods for pathology images and beyond.
154
+
155
+ # 5 More Experiments
156
+
157
+ In the previous section, we have explored how we can obtain concepts, what concepts are good, and find b-ConCL to be the best. We here conduct more experiments to study b-ConCL. Some visual comparisons are in Appendix D.
158
+
159
+ # 5.1 Robustness to Transferring Settings
160
+
161
+ Transferring with different detectors. Here we investigate the transferring performance with other detectors, i.e., Mask-RCNN-C4 (C4) [26] and RetinaNet [21]. RetinaNet is a single-stage detector. It uses ResNet-FPN backbone features as Mask-RCNN-FPN but directly generates predictions without region proposal [26]. C4 detector adopts a similar two-stage fashion as Mask-RCNN but uses the outputs of the 4-th residual block as backbone features and re-targets the 5-th block to be the detection head instead of building a new one. These three representative detectors evaluate pre-trained models under different detector architectures. Results together with Mask-RCNN-FPN's are shown in Table 2. b-ConCL performs the best with all three detectors in both datasets. Notably,
162
+
163
+ training from scratch (Rand. Init.) is one of the top competitors when the C4 detector is used. We conjecture that the pre-trained models are possibly overfitted to their pretext tasks in their 5-th blocks and thus are harder to be tuned than a randomly initialized 5-th block. In CRAG detection, only b-ConCL pretrained models consistently outperform randomly initialized models. In addition, the most significant gap between MoCo-v2[4] and b-ConCL is found in the RetinaNet detector [21]. As also noted by [22], RetinaNet [21] is a single-stage detector, where the local representations from the backbone become more important than other two-stage detectors since results are directly predicted from them. b-ConCL is tasked to discriminate local concepts, and subsequently, the learned representations could be better than other pre-training methods here.
164
+
165
+ Transferring with different schedules. To investigate if b-ConCL's lead could persist with longer fine-tuning, we fine-tune Mask-RCNN-FPN with $0.5 \times$ , $1 \times$ , $2 \times$ , $3 \times$ , and $5 \times$ schedules. Table 3 shows the results. b-ConCL maintains its noticeable gains in longer schedules in both datasets, e.g., b-ConCL achieves $56.2 \mathrm{mAP}$ with a $0.5 \times$ schedule, which is better than MoCo-v2 [4] with a $5 \times$ schedule but costs $10 \times$ less fine-tuning time. Similar observations are also found in CRAG, where the gap between b-ConCL and MoCo-v2 [4] becomes larger (see $\Delta$ row). Together, these results confirm b-ConCL's superiority across different fine-tuning schedules.
166
+
167
+ # 5.2 Ablation Study
168
+
169
+ In this section, we ablate the key factors in b-ConCL. Our default setting clusters $K = 8$ concepts from ResNet stage-4 ( $f_4(\cdot)$ ). Since b-ConCL is built on MoCo-v2 [4], we use it as our direct baseline for comparisons.
170
+
171
+ Concept loss weight $\lambda$ . We here study the generalized concept contrastive loss: $L = (1 - \lambda)L_{q} + \lambda L_{c}$ , where $\lambda \in [0,1]$ is a concept loss weight parameter. It shows a natural way to combine concept contrastive loss with instance contrastive loss. We start by asking whether instance contrastive loss is indispensable during the training process of b-ConCL. We alter the concept loss
172
+
173
+ <table><tr><td rowspan="3">Method</td><td colspan="5">GlaS dataset</td><td colspan="5">CRAG dataset</td></tr><tr><td colspan="5">Fine-tuning schedule</td><td colspan="5">Fine-tuning schedule</td></tr><tr><td>0.5×</td><td>1×</td><td>2×</td><td>3×</td><td>5×</td><td>0.5×</td><td>1×</td><td>2×</td><td>3×</td><td>5×</td></tr><tr><td>Rand. Init.</td><td>49.1</td><td>49.8</td><td>51.4</td><td>51.8</td><td>52.7</td><td>50.2</td><td>51.1</td><td>51.9</td><td>52.4</td><td>52.8</td></tr><tr><td>Supervised</td><td>48.6</td><td>50.2</td><td>51.4</td><td>52.7</td><td>54.0</td><td>50.0</td><td>49.2</td><td>50.5</td><td>50.1</td><td>50.3</td></tr><tr><td>MoCo-v2[4]</td><td>51.4</td><td>52.3</td><td>53.7</td><td>54.2</td><td>55.7</td><td>50.2</td><td>50.0</td><td>50.2</td><td>50.8</td><td>51.8</td></tr><tr><td>b-ConCL</td><td>56.2</td><td>56.8</td><td>57.7</td><td>58.3</td><td>59.0</td><td>54.8</td><td>55.1</td><td>55.4</td><td>55.6</td><td>56.0</td></tr><tr><td>Δ</td><td>+4.8</td><td>+4.5</td><td>+4.0</td><td>+4.1</td><td>+3.3</td><td>+4.6</td><td>+5.1</td><td>+5.2</td><td>+4.8</td><td>+4.2</td></tr></table>
174
+
175
+ Table 3: Detection performance under different fine-tuning schedules. Results other than $1 \times$ schedule are averaged over 3 runs. $\Delta$ row shows b-ConCL's improvement over MoCo-v2. We report $\mathrm{AP}^{bb}$ here.
176
+
177
+ <table><tr><td rowspan="2">λ</td><td colspan="2">GlaS</td><td colspan="2">CRAG</td></tr><tr><td>APbb</td><td>APbb75</td><td>APbb</td><td>APbb75</td></tr><tr><td>0.0</td><td>52.3</td><td>60.0</td><td>50.0</td><td>55.7</td></tr><tr><td>0.1</td><td>53.6</td><td>61.1</td><td>50.5</td><td>55.9</td></tr><tr><td>0.3</td><td>53.6</td><td>61.8</td><td>51.7</td><td>57.1</td></tr><tr><td>0.5</td><td>53.6</td><td>61.8</td><td>51.3</td><td>57.0</td></tr><tr><td>0.7</td><td>55.2</td><td>64.1</td><td>53.1</td><td>59.9</td></tr><tr><td>0.9</td><td>56.0</td><td>65.1</td><td>53.6</td><td>59.6</td></tr><tr><td>1.0</td><td>56.8</td><td>66.2</td><td>55.1</td><td>62.2</td></tr><tr><td colspan="2">1.0\w. 56.1</td><td>66.2</td><td>54.0</td><td>60.6</td></tr></table>
178
+
179
+ (a) Concept loss weight.
180
+
181
+ <table><tr><td rowspan="2">K</td><td colspan="2">GlaS</td><td colspan="2">CRAG</td></tr><tr><td>APbb</td><td>APbb75</td><td>APbb</td><td>APbb75</td></tr><tr><td>1</td><td>52.3</td><td>60.0</td><td>50.0</td><td>55.7</td></tr><tr><td>2</td><td>54.5</td><td>64.1</td><td>52.9</td><td>60.1</td></tr><tr><td>4</td><td>55.6</td><td>64.7</td><td>53.4</td><td>59.7</td></tr><tr><td>6</td><td>56.3</td><td>65.1</td><td>53.7</td><td>60.2</td></tr><tr><td>8</td><td>56.8</td><td>66.2</td><td>55.1</td><td>62.2</td></tr><tr><td>10</td><td>57.0</td><td>66.0</td><td>55.1</td><td>61.0</td></tr><tr><td>12</td><td>57.4</td><td>66.2</td><td>54.2</td><td>60.1</td></tr><tr><td>16</td><td>55.7</td><td>65.3</td><td>54.5</td><td>61.3</td></tr></table>
182
+
183
+ (b) Number of concepts.
184
+
185
+ <table><tr><td rowspan="2">K</td><td colspan="2">GlaS</td><td colspan="2">CRAG</td></tr><tr><td>APbb</td><td>APbb75</td><td>APbb</td><td>APbb75</td></tr><tr><td>None</td><td>52.3</td><td>60.0</td><td>50.0</td><td>55.7</td></tr><tr><td>f1(·)</td><td>55.0</td><td>65.1</td><td>53.3</td><td>60.0</td></tr><tr><td>f2(·)</td><td>55.0</td><td>64.7</td><td>53.7</td><td>60.4</td></tr><tr><td>f3(·)</td><td>56.2</td><td>66.4</td><td>53.0</td><td>59.6</td></tr><tr><td>f4(·)</td><td>56.8</td><td>66.2</td><td>55.1</td><td>62.2</td></tr><tr><td>f5(·)</td><td>56.1</td><td>65.6</td><td>56.5</td><td>63.3</td></tr></table>
186
+
187
+ (c) Clustering stage.
188
+
189
+ <table><tr><td colspan="5">GlaS Detection</td></tr><tr><td rowspan="2">Pretrain</td><td colspan="2">ResNet-18</td><td colspan="2">ResNet-50</td></tr><tr><td>APbb</td><td>APbb75</td><td>APbb</td><td>APbb75</td></tr><tr><td>Rand.</td><td>49.8</td><td>57.3</td><td>49.9</td><td>56.1</td></tr><tr><td>Sup.</td><td>50.2</td><td>56.9</td><td>47.9</td><td>54.2</td></tr><tr><td>MoCo.v2</td><td>52.3</td><td>60.0</td><td>53.1</td><td>60.5</td></tr><tr><td>b-ConCL</td><td>56.8</td><td>66.2</td><td>57.0</td><td>65.9</td></tr></table>
190
+
191
+ (d) Backbone capacities.
192
+
193
+ Table 4: Ablation Study. We study the effect of different hyper-parameters to b-ConCL. Default settings are marked in gray and MoCo-v2 baselines are marked by gray. In (a), “\w.” means no warm-up.
194
+
195
+ weight $\lambda$ , and Table 4a reports the results. We see a monotonically increasing performance as $\lambda$ increases in both datasets, which emphasizes the importance of concept loss. When no warm-up is used (last row in Tab. 4a), only a slight performance drop is observed, meaning that warm-up is not the key component of b-ConCL. Warming-up with instance loss (Eq. (2)) is a special case of b-ConCL, where at the early training stage, each instance is regarded as a concept, and we then gradually increase the number of concepts as training goes on. Thus, the overall findings in this ablation support b-ConCL's advance over MoCo-v2 [4].
196
+
197
+ Number of concepts $K$ . Here, we investigate how the number of concepts clustered during pre-training affects performance in downstream tasks. We report the results of different $K$ in Table 4b. b-ConCL performs reasonably well when $K >= 4$ , with most of performance peaking at $K = 8$ . This demonstrates the robustness of b-ConCL to the choice of $K$ . Note that the best performance for the GlaS dataset is higher than our default setting and outperforms all entries in Table 1, showing the potential room for b-ConCL.
198
+
199
+ Where to group $f_{i}(\cdot)$ . b-ConCL groups concepts from a model's intermediate feature maps. Our default setting uses feature maps from stage-4 of a ResNet [15], denoted as $f_{4}(\cdot)$ . We now ablate this choice in Table 4c. Clustering concepts
200
+
201
+ from $f_{4}(\cdot)$ and $f_{5}(\cdot)$ works similarly well across two datasets. We choose $f_{4}(\cdot)$ as the default since it achieves top two performance in both datasets under both metrics. Besides, b-ConCL exceeds MoCo-v2 [4], whichever stage it groups concepts from. This again confirms the effectiveness and robustness of b-ConCL.
202
+
203
+ Longer pre-training. We compare the pre-training efficiency of different SSL methods w.r.t. training epochs in Figure 1-(b,c) with the numerical results in Appendix D. Interestingly, we find SimCLR [3] and BYOL [10] fail to benefit from longer pre-training. This shows the disparity between pathology image data and natural image data. In the latter field, a monotonically increasing performance in downstream tasks is usually observed [16,12,10,2,3]. For MoCo-v1/v2 [12,4], DenseCL [33] and our b-ConCL, we observe the performance consistently improves as the pre-training epoch increases in GlaS dataset [28]. Note that the 200-epoch b-ConCL surpasses the 800-epoch MoCo-v2 [4] and DenseCL [33] by a large margin (Fig. 1-(b)). In the CRAG dataset, we observe all pre-training methods saturate and achieve the best performance in around 200-epoch and 400-epoch. Among them, b-ConCL is still the best (Fig. 1-(c)).
204
+
205
+ Larger model capacity. Table 4d shows the results of using a larger backbone, ResNet-50. b-ConCL maintains its leading position. For consistency to the previous ablation, a $1 \times$ schedule is also used here, which could put ResNet-50 at a disadvantage since it has more parameters to tune in a relatively short schedule.
206
+
207
+ # 6 Conclusion and Broader Impact
208
+
209
+ In this work, we have benchmarked some of the current SSL methods for dense tasks in pathology images and presented the ConCL framework. Along our exploration, we have distilled several key components to the success of transferring to dense tasks: i) dense contrasting matters, ii) correspondence matters, iii) coherence matters, and more. Finally, we ended up with a dependency-free concept generator that directly bootstraps the underlying concepts inherent in the data and learns from scratch. It was shown to be robust and competitive.
210
+
211
+ While our initial results are presented only for pre-training and fine-tuning, many applications could embrace ConCL. One example is to combine it with few-shot detection or segmentation, where clustering from feature arrays can be an approach for mining latent objects. Another example can be semi-supervised learning, where ConCL can be used as an additional branch for unlabeled data. Beyond pathology image analysis, we also hope ConCL would help in speech or tabular data, where little priors can be used. Unsupervised clustering in representation space is likely to be modality-agnostic. Learned by using contrastive learning and clustering, fine-grained "concepts" could also be mined from those data modalities.
212
+
213
+ # References
214
+
215
+ 1. Arbeláez, P., Pont-Tuset, J., Barron, J.T., Marques, F., Malik, J.: Multiscale combinatorial grouping. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 328-335 (2014)
216
+ 2. Caron, M., Misra, I., Mairal, J., Goyal, P., Bojanowski, P., Joulin, A.: Unsupervised learning of visual features by contrasting cluster assignments. arXiv preprint arXiv:2006.09882 (2020)
217
+ 3. Chen, T., Kornblith, S., Norouzi, M., Hinton, G.: A simple framework for contrastive learning of visual representations. In: International conference on machine learning. pp. 1597-1607. PMLR (2020)
218
+ 4. Chen, X., Fan, H., Girshick, R., He, K.: Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297 (2020)
219
+ 5. Chen, X., He, K.: Exploring simple siamese representation learning. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 15750-15758 (2021)
220
+ 6. Ciga, O., Xu, T., Martel, A.L.: Self supervised contrastive learning for digital histopathology. arXiv preprint arXiv:2011.13971 (2020)
221
+ 7. Felzenszwalb, P.F., Huttenlocher, D.P.: Efficient graph-based image segmentation. International journal of computer vision 59(2), 167-181 (2004)
222
+ 8. Girshick, R., Donahue, J., Darrell, T., Malik, J.: Rich feature hierarchies for accurate object detection and semantic segmentation. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 580-587 (2014)
223
+ 9. Graham, S., Chen, H., Gamper, J., Dou, Q., Heng, P.A., Snead, D., Tsang, Y.W., Rajpoot, N.: Mild-net: Minimal information loss dilated network for gland instance segmentation in colon histology images. Medical image analysis 52, 199-211 (2019)
224
+ 0. Grill, J.B., Strub, F., Altché, F., Tallec, C., Richemond, P.H., Buchatskaya, E., Doersch, C., Pires, B.A., Guo, Z.D., Azar, M.G., et al.: Bootstrap your own latent: A new approach to self-supervised learning. arXiv preprint arXiv:2006.07733 (2020)
225
+ 1. Hadsell, R., Chopra, S., LeCun, Y.: Dimensionality reduction by learning an invariant mapping. In: 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06). vol. 2, pp. 1735-1742. IEEE (2006)
226
+ 2. He, K., Fan, H., Wu, Y., Xie, S., Girshick, R.: Momentum contrast for unsupervised visual representation learning. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 9729-9738 (2020)
227
+ 3. He, K., Girshick, R., Dollar, P.: Rethinking imagenet pre-training. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 4918-4927 (2019)
228
+ 4. He, K., Gkioxari, G., Dollár, P., Girshick, R.: Mask r-cnn. In: Proceedings of the IEEE international conference on computer vision. pp. 2961-2969 (2017)
229
+ 5. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 770-778 (2016)
230
+ 6. Henaff, O.J., Koppula, S., Alayrac, J.B., Oord, A.v.d., Vinyals, O., Carreira, J.: Efficient visual pretraining with contrastive detection. arXiv preprint arXiv:2103.10957 (2021)
231
+ 7. Kather, J.N., Halama, N., Marx, A.: 100,000 histological images of human colorectal cancer and healthy tissue (Apr 2018). https://doi.org/10.5281/zenodo.1214456, https://doi.org/10.5281/zenodo.1214456
232
+
233
+ 18. Koohbanani, N.A., Unnikrishnan, B., Khurram, S.A., Krishnaswamy, P., Rajpoot, N.: Self-path: Self-supervision for classification of pathology images with limited annotations. IEEE Transactions on Medical Imaging (2021)
234
+ 19. Li, J., Zhou, P., Xiong, C., Hoi, S.C.: Prototypical contrastive learning of unsupervised representations. arXiv preprint arXiv:2005.04966 (2020)
235
+ 20. Lin, T.Y., Dólar, P., Girshick, R., He, K., Hariharan, B., Belongie, S.: Feature pyramid networks for object detection. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 2117-2125 (2017)
236
+ 21. Lin, T.Y., Goyal, P., Girshick, R., He, K., Dollar, P.: Focal loss for dense object detection. In: Proceedings of the IEEE international conference on computer vision. pp. 2980-2988 (2017)
237
+ 22. Liu, S., Li, Z., Sun, J.: Self-emd: Self-supervised object detection without imagenet. arXiv preprint arXiv:2011.13677 (2020)
238
+ 23. Nguyen, D.T., Dax, M., Mummadi, C.K., Ngo, T.P.N., Nguyen, T.H.P., Lou, Z., Brox, T.: Deepusps: Deep robust unsupervised saliency prediction with self-supervision. arXiv preprint arXiv:1909.13055 (2019)
239
+ 24. Oord, A.v.d., Li, Y., Vinyals, O.: Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748 (2018)
240
+ 25. Qin, X., Zhang, Z., Huang, C., Gao, C., Dehghan, M., Jagersand, M.: Basnet: Boundary-aware salient object detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 7479-7489 (2019)
241
+ 26. Ren, S., He, K., Girshick, R., Sun, J.: Faster r-cnn: Towards real-time object detection with region proposal networks. Advances in neural information processing systems 28, 91-99 (2015)
242
+ 27. Roh, B., Shin, W., Kim, I., Kim, S.: Spatially consistent representation learning. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 1144-1153 (2021)
243
+ 28. Sirinukunwattana, K., Pluim, J.P., Chen, H., Qi, X., Heng, P.A., Guo, Y.B., Wang, L.Y., Matuszewski, B.J., Bruni, E., Sanchez, U., et al.: Gland segmentation in colon histology images: The glas challenge contest. Medical image analysis 35, 489-502 (2017)
244
+ 29. Srinidhi, C.L., Ciga, O., Martel, A.L.: Deep neural network models for computational histopathology: A survey. Medical Image Analysis 67, 101813 (2021)
245
+ 30. Van Gansbeke, W., Vandenhende, S., Georgoulis, S., Van Gool, L.: Unsupervised semantic segmentation by contrasting object mask proposals. arXiv preprint arXiv:2102.06191 (2021)
246
+ 31. Vincent, P., Larochelle, H., Bengio, Y., Manzagol, P.A.: Extracting and composing robust features with denoising autoencoders. In: Proceedings of the 25th international conference on Machine learning. pp. 1096-1103 (2008)
247
+ 32. Wang, W., Zhou, T., Yu, F., Dai, J., Konukoglu, E., Van Gool, L.: Exploring cross-image pixel contrast for semantic segmentation. arXiv preprint arXiv:2101.11939 (2021)
248
+ 33. Wang, X., Zhang, R., Shen, C., Kong, T., Li, L.: Dense contrastive learning for self-supervised visual pre-training. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 3024-3033 (2021)
249
+ 34. Wu, Z., Xiong, Y., Yu, S.X., Lin, D.: Unsupervised feature learning via nonparametric instance discrimination. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 3733-3742 (2018)
250
+ 35. Xie, E., Ding, J., Wang, W., Zhan, X., Xu, H., Sun, P., Li, Z., Luo, P.: Detco: Unsupervised contrastive learning for object detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 8392-8401 (2021)
251
+
252
+ 36. Xie, Z., Lin, Y., Zhang, Z., Cao, Y., Lin, S., Hu, H.: Propagate yourself: Exploring pixel-level consistency for unsupervised visual representation learning. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 16684-16693 (2021)
253
+ 37. Yang, C., Wu, Z., Zhou, B., Lin, S.: Instance localization for self-supervised detection pretraining. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 3987-3996 (2021)
254
+ 38. Zbontar, J., Jing, L., Misra, I., LeCun, Y., Deny, S.: Barlow twins: Self-supervised learning via redundancy reduction. arXiv preprint arXiv:2103.03230 (2021)
255
+ 39. Zhang, R., Isola, P., Efros, A.A.: Colorful image colorization. In: European conference on computer vision. pp. 649-666. Springer (2016)
256
+ 40. Zhang, R., Isola, P., Efros, A.A.: Split-brain autoencoders: Unsupervised learning by cross-channel prediction. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. pp. 1058-1067 (2017)
257
+ 41. Zhao, N., Wu, Z., Lau, R.W., Lin, S.: Distilling localization for self-supervised representation learning. arXiv preprint arXiv:2004.06638 (2020)
258
+ 42. Zhao, X., Vemulapalli, R., Mansfield, P.A., Gong, B., Green, B., Shapira, L., Wu, Y.: Contrastive learning for label efficient semantic segmentation. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 10623-10633 (2021)
conclconceptcontrastivelearningfordensepredictionpretraininginpathologyimages/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:45d6d6c590a485382bd71443cb0254f3a83b54d67747eeb47f53c0fae44f4e5e
3
+ size 488183
conclconceptcontrastivelearningfordensepredictionpretraininginpathologyimages/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d45cba4383be6943c3153205354782283a0dbedd2b569b0670eed77f1889752f
3
+ size 385980
concurrentsubsidiarysupervisionforunsupervisedsourcefreedomainadaptation/914b8df4-7e7c-42d1-ab4c-861ea294fa85_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c59840fd7ae4c2f3e6bdfd6d88edddff7d99df439ac08c197f1231be13f92965
3
+ size 95230
concurrentsubsidiarysupervisionforunsupervisedsourcefreedomainadaptation/914b8df4-7e7c-42d1-ab4c-861ea294fa85_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99260862743d95806d6ef363be2ec48e39343a3403c1b461efb813473db0b34c
3
+ size 119248
concurrentsubsidiarysupervisionforunsupervisedsourcefreedomainadaptation/914b8df4-7e7c-42d1-ab4c-861ea294fa85_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:94fa46e7a606a9a76c86cc6431754c340aa6d832e8f1c16948e5195eba2b5dfd
3
+ size 2256114
concurrentsubsidiarysupervisionforunsupervisedsourcefreedomainadaptation/full.md ADDED
@@ -0,0 +1,380 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Concurrent Subsidiary Supervision for Unsupervised Source-Free Domain Adaptation
2
+
3
+ Jogendra Nath Kundu $^{1*}$ , Suvaansh Bhambri $^{1*}$ , Akshay Kulkarni $^{1*}$ , Hiran Sarkar $^{1}$ , Varun Jampani $^{2}$ , and R. Venkatesh Babu $^{1}$
4
+
5
+ $^{1}$ Indian Institute of Science
6
+
7
+ 2 Google Research
8
+
9
+ Abstract. The prime challenge in unsupervised domain adaptation (DA) is to mitigate the domain shift between the source and target domains. Prior DA works show that pretext tasks could be used to mitigate this domain shift by learning domain invariant representations. However, in practice, we find that most existing pretext tasks are ineffective against other established techniques. Thus, we theoretically analyze how and when a subsidiary pretext task could be leveraged to assist the goal task of a given DA problem and develop objective subsidiary task suitability criteria. Based on this criteria, we devise a novel process of sticker intervention and cast sticker classification as a supervised subsidiary DA problem concurrent to the goal task unsupervised DA. Our approach not only improves goal task adaptation performance, but also facilitates privacy-oriented source-free DA i.e. without concurrent source-target access. Experiments on the standard Office-31, Office-Home, DomainNet, and VisDA benchmarks demonstrate our superiority for both single-source and multi-source source-free DA. Our approach also complements existing non-source-free works, achieving leading performance.
10
+
11
+ # 1 Introduction
12
+
13
+ The prevalent trend in supervised deep learning systems is to assume that training and testing data follow the same distribution. However, such models often fail [6] when deployed in a new environment (target domain) due to the discrepancy in the training (source domain) and target distributions. A standard approach to deal with this problem of domain shift is Unsupervised Domain Adaptation (DA) [10,30], which aims to minimize the domain discrepancy [3] between source and target. The prime challenge in DA is to facilitate the effective utilization of the unlabeled samples while adapting to the target domain.
14
+
15
+ Drawing motivation from self-supervised pretext task literature [35,13], recent DA works [5,31] have adopted subsidiary tasks as side-objectives to improve the adaptation performance. The intuition is that subsidiary task objectives enforce learning of domain-generic representations, leading to improved domain alignment [51] and consequently, better feature clustering for unlabeled target
16
+
17
+ ![](images/e3ef417534d5036622366b9c40af653b715ad83823162f3b4e8e963da1e16fb8.jpg)
18
+ Fig. 1. We tackle A. unsupervised goal task DA by introducing B. a concurrent subsidiary supervised DA. C. Our theoretical insights reveal that subsidiary tasks having both higher TSM (X-axis) and DSM (Y-axis) are most suitable for concurrent goal-subsidiary adaptation (i.e. the shaded blue area). The proposed sticker-based tasks better suit concurrent goal-subsidiary DA among other self-supervised pretext tasks.
19
+
20
+ [31]. We aim to design a similar framework but, contrary to prior works, we adopt a novel perspective of subsidiary supervised DA for the subsidiary task concurrent to unsupervised goal task DA. Specifically, the framework involves a shared backbone with a goal classifier and a subsidiary classifier (Fig. 1A, B).
21
+
22
+ To better understand how subsidiary supervised DA objectives support goal task DA, we intend to theoretically analyze the proposed framework. While several subsidiary tasks are available in the literature, there has been little attention on identifying the desirable properties of a subsidiary task that would better aid the unsupervised DA. A recent self-supervised work [55] studied the effectiveness of pretraining with existing subsidiary tasks [35,13] on different downstream supervised settings such as fine-grained or medical image classification [37,56]. We argue that our intended theoretical analysis is necessary to understand the same for DA settings as DA presents a different set of challenges compared to downstream supervised learning paradigms.
23
+
24
+ Thus, we attempt to answer two interconnected questions,
25
+
26
+ 1. How does subsidiary supervised DA help goal task unsupervised DA?
27
+ 2. What kind of subsidiary tasks better suit concurrent goal-subsidiary $DA$ ?
28
+
29
+ For the first question, we uncover theoretical insights based on generalization bounds in DA [3,64]. These bounds define distribution shift or domain discrepancy between source and target as the worst discrepancy for a given hypothesis space. We analyze the effect of adding the subsidiary supervised DA problem on the hypothesis space of the shared backbone. Based on this, we find that a higher domain similarity between goal and subsidiary task samples leads to a lower domain discrepancy. This leads to better adaptation for concurrent goal-subsidiary DA w.r.t. naive goal DA. Further, we observe that a higher goal-subsidiary task similarity aids effective learning of both tasks with the shared backbone, which is crucial for subsidiary DA to positively impact the goal DA.
30
+
31
+ For the second question, we first devise a subsidiary-domain similarity metric (DSM) and a subsidiary-task similarity metric (TSM) to measure the domain similarity and task similarity between any subsidiary task with a given goal task.
32
+
33
+ Based on our theoretical insights, we propose a subsidiary task suitability criteria using both DSM and TSM to identify $DA$ -assistive subsidiary tasks. With this criteria, we evaluate the commonly used subsidiary tasks from the pretext task literature like rotation prediction [31], patch location [51], and jigsaw permutation prediction [5] in Fig. 1C. We observe that these existing tasks have significantly low DSM. On the other hand, dense output based tasks like colorization [22] or inpainting [38] severely lack in TSM as goal task is classification-based. Understanding these limitations, we devise a sticker-intervention that facilitates domain preservation (high DSM) and propose a range of sticker-based subsidiary tasks (Fig. 2). For general shape-based goal tasks, it turns out that sticker classification task has the best TSM among other sticker-based tasks. This yields higher adaptation performance thereby validating the proposed criteria.
34
+
35
+ To evaluate our theoretical insights and the proposed concurrent subsidiary DA, we particularly focus on source-free DA regime [23,21,17]. In this, the source and target data are not concurrently accessible while model sharing is permitted. While this challenging
36
+
37
+ Subsidiary tasks under sticker-intervention
38
+
39
+ A. Sticker location
40
+
41
+ ![](images/424f1eb16303888a575763a738a91778966c73a16dcb339348338d40acc23e6c.jpg)
42
+ Fig.2. Sticker intervention involves mixup of input with a masked sticker. We devise the following sticker-based tasks; A. locating the quadrant of the sticker, B. predicting sticker rotation, C. classifying sticker category.
43
+
44
+ B. Sticker rotation
45
+
46
+ ![](images/2be5e90313919a771af05f3cebc81aa135cdc6d010f4ad223954457407d21f9b.jpg)
47
+
48
+ C. Sticker classification
49
+
50
+ ![](images/bff5668e6bc272b4e599188556e6385341ef1f1297aa313587d755af98767fda.jpg)
51
+
52
+ ![](images/80f9e12653a2a14642e7dff953172e40d2e7050e004b0116462ced00257c6d0c.jpg)
53
+
54
+ $\left( {x - {2x}}\right) t - x{y}^{2} = \left( {x - {2x}}\right) {f}^{\prime }t$
55
+
56
+ ![](images/a594528ad25130798fc56f3cfd11173d5d819dbc258eea2e421155dcaa665736.jpg)
57
+
58
+ ![](images/b52357771a2a3622311df92e1368ade0c03eb215c0ea768ab628974e714f28af.jpg)
59
+
60
+ ![](images/628ffbe5e9b7d9e3bdfcd33d7dce1b1e12f73214883f1aac9a293df8cf5865e4.jpg)
61
+
62
+ ![](images/bd2db3984b19e3905a44927dc8d21d13352a17945739903903182afeef94c481.jpg)
63
+
64
+ ![](images/530d949ed91a7d8001f338c472a8afc75b07f6c08532e9bd41ffcf870fc1b00b.jpg)
65
+
66
+ ![](images/61900ed381b5e0c03ca1ee9559843684da0f8e9f1a7498c7fcd5b7fdef267d69.jpg)
67
+
68
+ ![](images/9a2e546a0d862d7bb270a0ba76f6fbdf5bac4318e9a52f5abe7d85c667609256.jpg)
69
+
70
+ ![](images/18ee67359aa61d0af79846b720710fadaf320a67f230a1f8c90f851ba32cbc74.jpg)
71
+
72
+ setting holds immense practical value by working within the data privacy regulations, we choose source-free DA as it can prominently highlight our advantages. The well-developed discrepancy minimization techniques, tailored to general DA scenarios, guide the adaptation more significantly than our proposed approach but cannot be used for source-free DA. Further, existing source-free works [26] rely heavily on pseudo-label based self-training on target data. Our proposed subsidiary supervised adaptation implicitly regularizes target-side self-training, leading to improved adaptation.
73
+
74
+ To summarize, our main contributions are:
75
+
76
+ - We introduce concurrent subsidiary supervised DA, for a subsidiary task, that not only improves unsupervised goal task DA but also facilitates source-free adaptation. We provide theoretical insights to analyze the impact of subsidiary DA on the domain discrepancy, and hence, the goal task DA.
77
+ - Based on our insights, we devise a subsidiary DA suitability criteria to identify $DA$ -assistive subsidiary tasks that better aid the unsupervised goal task DA. We also propose novel sticker intervention based subsidiary tasks that demonstrate the efficacy of the criteria.
78
+ - Our proposed approach achieves state-of-the-art performance on source-free single-source DA (SSDA) as well as source-free multi-source DA (MSDA) for image classification. The proposed approach also complements existing non-source-free works, achieving leading performance.
79
+
80
+ # 2 Related Work
81
+
82
+ Pretext tasks in self-supervised learning. Pretext tasks are used to learn deep feature representations from unlabeled data, in a self-supervised manner, for downstream tasks. There are several pretext tasks such as image inpainting [38], colorization [62,22,63], spatial context prediction [7], contrastive predictive coding [36], image rotation [13], and jigsaw puzzle solving [35]. Pretext tasks are commonly used for pre-training on unlabeled data followed by finetuning on labeled data. Conversely, we perform supervised DA for the pretext-like task along with the unsupervised goal task DA, resulting in a representation that aligns the domains while maintaining the goal task performance.
83
+
84
+ Source-free DA. Recently, several methods have investigated source-free DA. USFDA [19] and FS [20] investigate universal DA [61] and open-set DA [46], in a source-free setting by synthesizing training samples to make the decision boundaries compact. SHOT [26,27], NRC [59] maximize mutual information and propose pseudo-labeling, using global structure to match target features to that of a fixed source classifier. To provide adaptation supervision, 3C-GAN [23] generates labeled target-style images from a GAN. Finally, SFDA [28], UR [49], and GtA [18] are semantic segmentation specific source-free DA techniques.
85
+
86
+ Prefix task based DA. Several DA works have demonstrated the efficacy of learning meaningful representations using pretext tasks. Early works [11,12] used reconstruction as a pretext task to extract domain-invariant features. [4] captured both domain-specific and shared features by separating the feature space into domain-private and domain-shared spaces. [5] used jigsaw puzzles as a side-objective to tackle domain generalization. [51] proposed that adaptation can be accomplished by learning many self-supervision tasks at the same time. [16] suggested a cross-domain SSL strategy for adaptation with minimal source labels based on instance discrimination [57]. [15] recommended employing SSL pretext tasks like rotation prediction and patch placement prediction. [45] solved the challenge of universal domain adaptation by unsupervised clustering. [43] employed easy labels for synthetic images, such as the surface normal, depth, and instance contour, to train a network. [9] employed SSL pretext tasks like rotation prediction as part of their domain generalization technique.
87
+
88
+ # 3 Approach
89
+
90
+ In this section, we introduce required preliminaries (Sec. 3.1), followed by theoretical insights (Sec. 3.2) that motivate our training algorithm design (Sec. 3.4).
91
+
92
+ # 3.1 Preliminaries
93
+
94
+ 3.1.1 Goal task unsupervised DA. For closed set DA problem, consider a labeled source dataset $\mathcal{D}_s = \{(x_s,y_s):x_s\in \mathcal{X},y_s\in \mathcal{C}_g\}$ where $\mathcal{X}$ is the input space and $\mathcal{C}_g$ denotes the label set for the goal task. $x_{s}$ is drawn from the marginal distribution $p_{s}$ . Let $\mathcal{D}_t = \{x_t:x_t\in \mathcal{X}\}$ be an unlabeled target dataset with
95
+
96
+ $x_{t} \sim p_{t}$ . The goal is to assign labels for each target image $x_{t}$ . The usual approach [10,50,29] is to use a backbone feature extractor $h: \mathcal{X} \to \mathcal{Z}$ followed by a goal classifier $f_{g}: \mathcal{Z} \to \mathcal{C}_{g}$ (see Fig. 3A). The expected source risk with $h$ and an optimal labeling function $f_{S}: \mathcal{X} \to \mathcal{C}_{g}$ , is $\epsilon_{s}(h) = \mathbb{E}_{x \sim p_{s}}[\mathbb{1}(f_{g} \circ h(x) \neq f_{S}(x))]$ , where $(.)$ is an indicator function. Similarly, $\epsilon_{t}(h)$ is the target risk with optimal labeling function $f_{T}: \mathcal{X} \to \mathcal{C}_{g}$ . We restate the theoretical upper bound on target risk from [64]. For backbone hypothesis $h \in \mathcal{H}$ with $\mathcal{H}$ being the hypothesis space and a domain classifier $f_{d}: \mathcal{Z} \to \{0,1\}$ (0 for source, 1 for target),
97
+
98
+ $$
99
+ \begin{array}{l} \epsilon_ {t} (h) \leq \epsilon_ {s} (h) + d _ {\mathcal {H}} \left(p _ {s}, p _ {t}\right) + \lambda_ {g}; \\ \text {w h e r e}, \lambda_ {g} = \min \left\{\underset {p _ {s}} {\mathbb {E}} [ \mathbb {1} (f _ {S} (x) \neq f _ {T} (x)) ], \underset {p _ {t}} {\mathbb {E}} [ \mathbb {1} (f _ {S} (x) \neq f _ {T} (x)) ] \right\} \\ \text {a n d ,} d _ {\mathcal {H}} \left(p _ {s}, p _ {t}\right) = \sup _ {h \in \mathcal {H}} \left| \underset {x \sim p _ {s}} {\mathbb {E}} \left[ \mathbb {1} \left(f _ {d} \circ h (x) = 1\right) \right] - \underset {x \sim p _ {t}} {\mathbb {E}} \left[ \mathbb {1} \left(f _ {d} \circ h (x) = 1\right) \right] \right| \tag {1} \\ \end{array}
100
+ $$
101
+
102
+ Here, $d_{\mathcal{H}}$ is the $\mathcal{H}$ -divergence [3] that indicates the distribution shift or worst-case domain discrepancy between the two domains. $\lambda_g$ is a constant that represents the optimal cross-domain error of the labeling functions. Thus, the target risk $\epsilon_t(h)$ is upper bounded by these two terms along with the source risk $\epsilon_s(h)$ .
103
+
104
+ 3.1.2 Subsidiary supervised DA. Next, we introduce a subsidiary supervised DA problem concurrent to the goal task unsupervised DA. To this end, we aim to devise a subsidiary classification task with a new label set $\mathcal{C}_n$ . The label-set specific attributes are inflicted on $x \in \mathcal{X}$ via an intervention, to form supervised pairs. These pairs form labeled source, $(\pmb{x}_{s,n}, \pmb{y}_n) \in \mathcal{D}_{s,n}$ and labeled target, $(\pmb{x}_{t,n}, \pmb{y}_n) \in \mathcal{D}_{t,n}$ datasets. Here, the inputs $x_{s,n}$ and $x_{t,n}$ are drawn from marginal distributions $p_{s,n}$ and $p_{t,n}$ respectively. We also define the optimal labeling functions for source and target subsidiary task as $f_{S,n}: \mathcal{X} \to \mathcal{C}_n$ and $f_{T,n}: \mathcal{X} \to \mathcal{C}_n$ . Next, the prediction mapping involves the shared goal-task backbone $h$ followed by a subsidiary classifier $f_n: \mathcal{Z} \to \mathcal{C}_n$ (see Fig. 3A). Here, the source-subsidiary task error is $\epsilon_{s,n}(h) = \mathbb{E}_{x \sim p_{s,n}}[\mathbb{1}(f_n \circ h(x) \neq f_{S,n}(x))]$ . Similarly, $\epsilon_{t,n}(h)$ for target and $\lambda_n$ defined as in Eq. 1. Thus, generalization bounds for subsidiary DA with the same $\mathcal{H}$ is stated as,
105
+
106
+ $$
107
+ \epsilon_ {t, n} (h) \leq \epsilon_ {s, n} (h) + d _ {\mathcal {H}} \left(p _ {s, n}, p _ {t, n}\right) + \lambda_ {n} \tag {2}
108
+ $$
109
+
110
+ 3.1.3 Metrics. We introduce two metrics that form the basis of our insights. a) Subsidiary-Domain Similarity Metric (DSM), $\gamma_{DSM}(.,.)$ . DSM measures the similarity between two domains as the inverse of the standard $\mathcal{A}$ -distance [3]. $\mathcal{A}$ -distance can be thought of as a proxy [10] for $\mathcal{H}$ -divergence.
111
+
112
+ b) Subsidiary-Task Similarity Metric (TSM), $\gamma_{TSM}(.,.)$ . TSM measures the task similarity of a subsidiary task w.r.t. the goal task. TSM is computed using the standard linear evaluation protocol [47] borrowed from transfer learning and self-supervised literature. It is the performance of a subsidiary-task linear
113
+
114
+ ![](images/899d54d90e5369da3f1a1b8c24924ed2a923e812f55f958d5e730859ba10b519.jpg)
115
+ Fig. 3. A. Our method uses a shared backbone $h$ with goal classifier $f_{g}$ and subsidiary classifier $f_{n}$ . B. Hypothesis space analysis for only goal DA, only subsidiary DA and concurrent goal-subsidiary DA (Sec. 3.2.1). C. Sticker intervention.
116
+
117
+ ![](images/e9be961c7d09d7a3c8a8e7cc2bd2ecd5ec55b7b742b4982b5a764b95742fec24.jpg)
118
+
119
+ ![](images/5dfc4b8f24b9cde4fbe0d8c4a14e76a8067e2caa1c5c75eef08ac844cd7450aa.jpg)
120
+ C. Sticker intervention
121
+
122
+ classifier attached to a goal-task pretrained backbone feature extractor $h_{s,g}$ . Intuitively, it indicates the extent of compatibility between the two tasks.
123
+
124
+ For a dataset pair of source-goal and source-subsidiary, i.e. $(\mathcal{D}_s,\mathcal{D}_{s,n})$
125
+
126
+ $$
127
+ \gamma_ {D S M} (\mathcal {D} _ {s}, \mathcal {D} _ {s, n}) = 1 - \frac {1}{2} d _ {\mathcal {A}} (\mathcal {D} _ {s}, \mathcal {D} _ {s, n}); \quad \gamma_ {T S M} (\mathcal {D} _ {s}, \mathcal {D} _ {s, n}) = 1 - \min _ {f _ {n}} \hat {\epsilon} _ {s, n} (h _ {s, g}) \tag {3}
128
+ $$
129
+
130
+ Here, $d_{\mathcal{A}}(.,.)$ denotes $\mathcal{A}$ -distance and $\hat{\epsilon}_{s,n}(.)$ denotes empirical error for subsidiary task on source data. Note that $0 \leq \hat{\epsilon}_{s,n}(h_{s,g}) \leq 1$ while $0 \leq d_{\mathcal{A}}(\mathcal{D}_1, \mathcal{D}_2) \leq 2$ .
131
+
132
+ # 3.2 Theoretical insights
133
+
134
+ We analyze the impact of solving subsidiary supervised DA on the goal task unsupervised DA. We first consider the combined bounds (combining Eq. 1, 2),
135
+
136
+ $$
137
+ \epsilon_ {t} (h) + \epsilon_ {t, n} (h) \leq \epsilon_ {s} (h) + \epsilon_ {s, n} (h) + d _ {\mathcal {H}} \left(p _ {s}, p _ {t}\right) + d _ {\mathcal {H}} \left(p _ {s, n}, p _ {t, n}\right) + \lambda_ {g} + \lambda_ {n} \tag {4}
138
+ $$
139
+
140
+ Among the six terms on the right side, the two $\lambda$ terms are constants as they do not involve the hypothesis $h$ or hypothesis space $\mathcal{H}$ . We analyze the source error duet, $\epsilon_s(h) + \epsilon_{s,n}(h)$ , and the domain discrepancy duet $d_{\mathcal{H}}(p_s,p_t) + d_{\mathcal{H}}(p_{s,n},p_{t,n})$ .
141
+
142
+ 3.2.1 Analyzing the domain discrepancy duet (Fig. 3B). We analyze w.r.t. the domain discrepancy duet considering three configurations:
143
+
144
+ a) While performing only unsupervised goal task DA, the backbone optimization would operate on a limited hypothesis space $\mathcal{H}_g^{(uns)}\subset \mathcal{H}$ where $\mathcal{H}_g^{(uns)} = \{h\in \mathcal{H}:|\epsilon_t(h) - \epsilon_s(h)|\leq \zeta_g^{(uns)}\}$ . Here, $\zeta_g^{(uns)}$ is a threshold on the source-target error gap.
145
+ b) While performing supervised adaptation only for subsidiary domain adaptation, the optimization would operate on a limited hypothesis space $\mathcal{H}_n^{(sup)}\subset \mathcal{H}$ i.e., $\mathcal{H}_n^{(sup)} = \{h\in \mathcal{H}:|\epsilon_{t,n}(h) - \epsilon_{s,n}(h)|\leq \zeta_n^{(sup)}\}$ . Here, $\zeta_n^{(sup)}$ is a threshold on the subsidiary-task source-target error gap.
146
+
147
+ c) While concurrently performing a) unsupervised goal task DA and b) subsidiary supervised DA (i.e. the proposed approach), the optimization would operate on a limited hypothesis space $\mathcal{H}_{g,n} \subset \mathcal{H}$ . Specifically, $\mathcal{H}_{g,n} = \mathcal{H}_n^{(sup)} \cap \mathcal{H}_g^{(uns)}$ . This is because the backbone is shared between the two DA tasks and hence, would be limited to the intersection space.
148
+
149
+ Different configurations lead to different $\mathcal{H}$ -spaces and consequently, different $\mathcal{H}$ -divergences. Comparing the $\mathcal{H}$ -divergences leads us to the following insight.
150
+
151
+ Insight 1. ( $\mathcal{H}$ -divergence in concurrent goal DA and subsidiary DA) The backbone hypothesis space for concurrent unsupervised goal DA and subsidiary supervised DA, i.e. $\mathcal{H}_{g,n} = \mathcal{H}_n^{(\sup)} \cap \mathcal{H}_g^{(uns)}$ will yield a lower $\mathcal{H}$ -divergence than $\mathcal{H}_g^{(uns)}$ (hypothesis space for only unsupervised goal task DA), i.e.
152
+
153
+ $$
154
+ d _ {\mathcal {H} _ {g, n}} \left(p _ {s}, p _ {t}\right) \leq d _ {\mathcal {H} _ {g} ^ {(u n s)}} \left(p _ {s}, p _ {t}\right) \text {a n d} d _ {\mathcal {H} _ {g, n}} \left(p _ {s, n}, p _ {t, n}\right) \leq d _ {\mathcal {H} _ {g} ^ {(u n s)}} \left(p _ {s, n}, p _ {t, n}\right) \tag {5}
155
+ $$
156
+
157
+ Remarks. In Eq. 1, $d_{\mathcal{H}}(p_s,p_t)$ is the supremum over the hypothesis space $\mathcal{H}$ i.e. a worst-case measure. Since $\mathcal{H}_{g,n} \subset \mathcal{H}_g^{(uns)}$ , $\mathcal{H}_{g,n}$ would have a lower $\mathcal{H}$ -divergence as the worst-case hypothesis of $\mathcal{H}_g^{(uns)}$ may be absent in the subset $\mathcal{H}_{g,n}$ . This applies to both pairs, $(p_s,p_t)$ and $(p_{s,n},p_{t,n})$ . While a lower $\mathcal{H}$ -divergence duet leads to improved goal DA, the equality may hold when the worst hypothesis of $\mathcal{H}_g^{(uns)}$ remains in $\mathcal{H}_{g,n}$ . In such a case, concurrent DA would perform the same as naive goal DA. To this end, we put forward the following insight.
158
+
159
+ Insight 2. (When is concurrent DA strictly better than naive DA?) A subsidiary task supports the strict inequality $d_{\mathcal{H}_{g,n}}(p_s, p_t) < d_{\mathcal{H}_g^{(uns)}}(p_s, p_t)$ if with at least $(1 - \delta)$ probability, the subsidiary-domain similarity $\gamma_{DSM}(\mathcal{D}_s, \mathcal{D}_{s,n})$ exceeds a threshold $\zeta_d$ by no less than $\xi$ ; $\mathbb{P}[\gamma_{DSM}(\mathcal{D}_s, \mathcal{D}_{s,n}) \geq \zeta_d - \xi] \geq 1 - \delta$ . Remarks. In other words, the strict inequalities in Eq. 5 would hold if the DSM $\gamma_{DSM}(.,.)$ exceeds a threshold $\zeta_d$ . The supports for this insight are twofold. First, a subsidiary task may heavily alter domain information [32], e.g. jigsaw shuffling [5]. Then, the backbone will be updated using out-of-domain samples which is undesirable as such samples are unlikely for inference. This will be avoided if Insight 2 is satisfied. Second, if DSM is high, we can approximate $p_s \approx p_{s,n}$ and $p_t \approx p_{t,n}$ . Thus, more samples from subsidiary task data will be available for training the backbone to be domain-invariant (as subsidiary task uses samples from both the domains) i.e. reducing $d_{\mathcal{H}}$ against the same in naive goal DA.
160
+
161
+ 3.2.2 Analyzing the source error duet. Now we analyze w.r.t. the source error duet of Eq. 4. While the $\mathcal{H}$ -divergence is lower for concurrent goal task DA and subsidiary supervised DA, a logical concern is that simultaneous minimization of errors, i.e. $\epsilon_s(h) + \epsilon_{s,n}(h)$ , for both tasks may be difficult with the shared backbone $h$ . Further, it may happen that simultaneous training for both tasks in target domain may hamper the goal task performance as it is unsupervised. In such cases, the subsidiary task would be ill-equipped to assist the goal task adaptation. To avoid these, we propose another empirical criterion as follows.
162
+
163
+ Insight 3. (Goal and subsidiary task similarity for concurrent DA) Higher goal-subsidiary task similarity (TSM) aids effective minimization of both task errors with the shared backbone, which is crucial for subsidiary supervised DA to positively affect the goal task DA. The criterion is $\gamma_{TSM}(\mathcal{D}_s,\mathcal{D}_{s,n}) > \zeta_n$ . Remarks. Here, $\zeta_{n}$ is a threshold. The TSM $\gamma_{TSM}$ indicates the compatibility of goal task features to support the subsidiary task. Intuitively, a higher TSM implies more overlap in the discriminative features of the two tasks, which would allow better simultaneous minimization of both task errors.
164
+
165
+ Based on Insight 1, concurrent subsidiary supervised DA and goal task DA yields a lower domain discrepancy. Further, based on Insight 2, a subsidiary task can be selected such that effective minimization of both source errors is possible simultaneously. Thus, using Eq. 1, we can infer that $\sup_{h\in \mathcal{H}_{g,n}}\epsilon_t(h)\leq \sup_{h\in \mathcal{H}_g^{(uns)}}\epsilon_t(h)$ i.e. a lower target error upper bound for our approach w.r.t. naive goal task DA. Now, we summarize the criteria (Insight 2, 3).
166
+
167
+ Definition 1. (Subsidiary DA suitability criteria) A subsidiary task is termed DA-assistive i.e. suitable for subsidiary supervised DA if the sum of DSM $\gamma_{DSM}$ and TSM $\gamma_{TSM}$ exceeds a threshold $\zeta$ ,
168
+
169
+ $$
170
+ \gamma_ {D S M} \left(\mathcal {D} _ {s}, \mathcal {D} _ {s, n}\right) + \gamma_ {T S M} \left(\mathcal {D} _ {s}, \mathcal {D} _ {s, n}\right) > \zeta \tag {6}
171
+ $$
172
+
173
+ Remarks. In other words, a subsidiary task which is domain-preserving and has high task similarity w.r.t. the goal task is DA-assistive i.e. suitable for subsidiary supervised DA to aid the goal task DA. We employ this criteria empirically for a diverse set of subsidiary tasks (shown in Fig. 1C). Next, we describe the motivation for our proposed sticker intervention and corresponding subsidiary tasks as well as training algorithms tailored for source-free DA.
174
+
175
+ # 3.3 Sticker intervention based subsidiary task design
176
+
177
+ While one may consider pretext tasks from the self-supervised learning literature as candidates for subsidiary DA, almost all such tasks fail to satisfy subsidiary DA suitability criteria in Eq. 6. For instance, dense output based tasks such as colorization [62,22], inpainting [38], etc. exhibit markedly low task similarity (TSM) against the non-dense goal tasks. Further, the input intervention for certain pretext tasks such as jigsaw [5], patch-location[51], rotation [31,15], significantly alter the domain information leading to low domain similarity (DSM).
178
+
179
+ Insight 4. (Sticker-intervention based tasks well suit subsidiary DA) Sticker intervention is the process of pasting a sticker $x_{n}$ (i.e., a symbol with random texture and scale) on a given image sample $x_{s} \in \mathcal{D}_{s}$ to obtain a stickered sample, i.e. $x_{s,n} = \mathcal{T}(x_s,x_n) \in \mathcal{D}_{s,n}$ . Following this, the subsidiary task could be defined as the classification of some sticker attribute (e.g. shape, location, or orientation). Such a formalization provides effective control to maximize $\gamma_{DSM}(\mathcal{D}_s,\mathcal{D}_{s,n})$ and $\gamma_{TSM}(\mathcal{D}_s,\mathcal{D}_{s,n})$ , in line with our suitability criteria.
180
+
181
+ Remarks. The sticker intervention (Fig. 3C) facilitates domain preservation while simultaneously supporting a range of subsidiary tasks. Since the proposed sticker intervention alters only a local area of the sample, the original content is
182
+
183
+ not suppressed which in turn preserves the domain information, implying high DSM. Following this, one can ablate over a range of sticker-based tasks in order to select a suitable subsidiary task based on the given goal task. Below, we discuss some possible subsidiary tasks under the sticker intervention.
184
+
185
+ a) Sticker location (Fig. 2A). We draw motivation from patch-location [51], where the task is to classify the quadrant to which a patch-input belongs. With sticker intervened images, the task is to classify the quadrant with the sticker. Our use of whole images as input is more domain-preserving than patch-input.
186
+ b) Sticker rotation (Fig. 2B). Motivated by the image rotation task [31], we propose sticker rotation task where the rotation of the sticker has to be classified $(0^{\circ}, 90^{\circ}, 180^{\circ}$ and $270^{\circ}$ rotations possible). Note that our sticker rotation does not affect the domain information while rotating the entire image does.
187
+ c) Sticker classification (Fig. 2C). While the discriminative features in the previous two tasks were location and rotation, we propose sticker classification task with primary discriminative features as shape. In other words, the task is to classify the sticker shape (i.e., the symbol) given a stickered sample.
188
+
189
+ # 3.4 Training algorithm design under source-free constraints
190
+
191
+ For the standard DA setting with concurrent access to source and target data [10,50], the subsidiary supervised DA can be implemented simply by optimizing the subsidiary classification loss simultaneously for source and target. This would yield a lower domain discrepancy as discussed in Sec. 3.2. However, in the more practical source-free setting [23,19] where concurrent source-target access is prohibited, this simple approach would not be possible. We believe the improvements will be prominent in source-free DA based on the following insight:
192
+
193
+ Insight 5. (Subsidiary DA better suits challenging source-free DA). Existing source-free DA works heavily rely on pseudo-label or clustering based self-training on unlabeled target with no obvious alternative. The proposed subsidiary supervised adaptation helps to implicitly regularize the target-side self-training, leading to improved adaptation performance. The subsidiary DA not only aids goal DA as a result of high DSM but also preserves the goal task inductive bias as a result of high TSM, while adhering to the source-free constraints.
194
+
195
+ Remarks. The source-free setting presents new challenges which highlight the advantages of our proposed method more prominently. This is because, the performance in non-source-free DA is strongly influenced by well-developed discrepancy minimization techniques. However, these techniques cannot be leveraged in a source-free setting due to their requirement of concurrent source-target data access. Thus, we primarily operate in the source-free regime to evaluate our theoretical insights and the proposed concurrent subsidiary supervised DA problem.
196
+
197
+ We perform the training in three steps. First two steps involve pre-training of goal task and subsidiary task respectively with source data. The final step involves adapting both tasks to target domain. For clarity, we first summarize available and intervened datasets required for training and their notations.
198
+
199
+ Datasets. The goal task source data is denoted by $(x_{s},y_{s})\in \mathcal{D}_{s}$ while the corresponding unlabeled target is denoted by $x_{t}\in \mathcal{D}_{t}$ . The interveneded stickered-
200
+
201
+ ![](images/6ac93b4527658354ac627328126be3c47922fbe943a8b3a49827039a5a2fb852.jpg)
202
+ A. Source-side training
203
+
204
+ ![](images/a63e273990d653290b9bce7c48f0f2e01553bacaa5c55f14e78a2acdd01a281f.jpg)
205
+
206
+ ![](images/41f316e9a6b2954d00228f5cc7e0f67fee565410a5a22c5cc091c4f29bf7a30a.jpg)
207
+ B. Target-side training
208
+ Fig. 4. A. Source-side training involves goal pre-training (Sec. 3.4.1) and sticker pretraining (Sec. 3.4.2). B. Target-side training involves concurrent goal-task unsupervised DA and sticker-task supervised DA (Sec. 3.4.3).
209
+
210
+ source data, coupled with both goal and sticker task labels, is denoted by $(x_{s,n},y_s,y_n)\in \mathcal{D}_{s,n}$ . The corresponding stickered-target data, with only subsidiary sticker task labels, is denoted by $(x_{t,n},y_n)\in \mathcal{D}_{t,n}$ . We introduce a pseudo-OOS (out-of-source) dataset, $\mathcal{D}_s^{(od)}$ further in this section.
211
+
212
+ 3.4.1 Goal task source pre-training (Fig. 4A). We train the backbone $h$ and goal classifier $f_{g}$ with source data $\mathcal{D}_s$ and stickered-source data $\mathcal{D}_{s,n}$ :
213
+
214
+ $$
215
+ \min _ {\theta_ {h}, \theta_ {f g} (x, y) \in \mathcal {D} _ {s} \cup \mathcal {D} _ {s, n}} \mathbb {E} [ \mathcal {L} _ {s, g} ]; \quad \mathcal {L} _ {s, g} = \mathcal {L} _ {c e} (f _ {g} \circ h (x), y) \tag {7}
216
+ $$
217
+
218
+ Here, $\theta_h$ and $\theta_{f_g}$ are the parameters of $h$ and $f_g$ , $\mathcal{L}_{ce}$ is the cross-entropy loss, $y$ is the goal task label, and expectation is implemented by sampling mini-batches.
219
+
220
+ 3.4.2 Sticker task source pre-training (Fig. 4A). We pretrain the sticker classifier $f_{n}$ while inculcating the ability to reject samples out of the source distribution. Specifically, $f_{n}$ predicts a $(|\mathcal{C}_n| + 1)$ -sized vector and is trained to classify out-of-source (OOS) samples to the $(|\mathcal{C}_n| + 1)^{\mathrm{th}}$ class.
221
+
222
+ Insight 6. The OOS node in the sticker classifier implicitly behaves as a domain discriminator from adversarial alignment methods. Minimizing the OOS probability only for the target data aligns the target with the source.
223
+
224
+ Remarks. In source training, the OOS objective forces the sticker classifier to discriminate between source and OOS samples. This is done with the intuition that OOS samples simulate the role of target samples in adversarial alignment methods. This domain discriminatory knowledge will support future source-free target alignment. Concretely, the shared backbone can be adapted to the target, by minimizing OOS probability for target samples, as source knowledge is preserved by freezing $f_{g}$ . Thus, we require OOS data to prepare $f_{n}$ for adaptation.
225
+
226
+ Obtaining the OOS dataset. A naive approach is to use a dataset unrelated to the goal task label set. Conversely, we devise a pseudo-OOS dataset using only already available source samples. Mitsuzumi et al. [32] show that, beyond a
227
+
228
+ Table 1. Single-Source Domain Adaptation (SSDA) on Office-Home benchmarks. SF indicates source-free adaptation.
229
+
230
+ <table><tr><td rowspan="2">Method</td><td rowspan="2">SF</td><td colspan="13">Office-Home</td></tr><tr><td>Ar+Cl</td><td>Ar+Pr</td><td>Ar+Rw</td><td>Cl+Ar</td><td>Cl+Pr</td><td>Cl+Rw</td><td>Pr+Ar</td><td>Pr+Cl</td><td>Pr+Rw</td><td>Rw+Ar</td><td>Rw+Cl</td><td>Rw+Pr</td><td>Avg</td></tr><tr><td>FixBi [33]</td><td>✗</td><td>58.1</td><td>77.3</td><td>80.4</td><td>67.7</td><td>79.5</td><td>78.1</td><td>65.8</td><td>57.9</td><td>81.7</td><td>76.4</td><td>62.9</td><td>86.7</td><td>72.7</td></tr><tr><td>SENTRY[41]</td><td>✗</td><td>61.8</td><td>77.4</td><td>80.1</td><td>66.3</td><td>71.6</td><td>74.7</td><td>66.8</td><td>63.0</td><td>80.9</td><td>74.0</td><td>66.3</td><td>84.1</td><td>72.2</td></tr><tr><td>SCDA [24]</td><td>✗</td><td>60.7</td><td>76.4</td><td>82.8</td><td>69.8</td><td>77.5</td><td>78.4</td><td>68.9</td><td>59.0</td><td>82.7</td><td>74.9</td><td>61.8</td><td>84.5</td><td>73.1</td></tr><tr><td>SHOT [26]</td><td>✓</td><td>57.1</td><td>78.1</td><td>81.5</td><td>68.0</td><td>78.2</td><td>78.1</td><td>67.4</td><td>54.9</td><td>82.2</td><td>73.3</td><td>58.8</td><td>84.3</td><td>71.8</td></tr><tr><td>A2Net [58]</td><td>✓</td><td>58.4</td><td>79.0</td><td>82.4</td><td>67.5</td><td>79.3</td><td>78.9</td><td>68.0</td><td>56.2</td><td>82.9</td><td>74.1</td><td>60.5</td><td>85.0</td><td>72.8</td></tr><tr><td>GSFDA [60]</td><td>✓</td><td>57.9</td><td>78.6</td><td>81.0</td><td>66.7</td><td>77.2</td><td>77.2</td><td>65.6</td><td>56.0</td><td>82.2</td><td>72.0</td><td>57.8</td><td>83.4</td><td>71.3</td></tr><tr><td>CPGA [42]</td><td>✓</td><td>59.3</td><td>78.1</td><td>79.8</td><td>65.4</td><td>75.5</td><td>76.4</td><td>65.7</td><td>58.0</td><td>81.0</td><td>72.0</td><td>64.4</td><td>83.3</td><td>71.6</td></tr><tr><td>NRC [59]</td><td>✓</td><td>57.7</td><td>80.3</td><td>82.0</td><td>68.1</td><td>79.8</td><td>78.6</td><td>65.3</td><td>56.4</td><td>83.0</td><td>71.0</td><td>58.6</td><td>85.6</td><td>72.2</td></tr><tr><td>SHOT++[27]</td><td>✓</td><td>57.9</td><td>79.7</td><td>82.5</td><td>68.5</td><td>79.6</td><td>79.3</td><td>68.5</td><td>57.0</td><td>83.0</td><td>73.7</td><td>60.7</td><td>84.9</td><td>73.0</td></tr><tr><td>Ours</td><td>✓</td><td>61.0</td><td>80.4</td><td>82.5</td><td>69.1</td><td>79.9</td><td>79.5</td><td>69.1</td><td>57.8</td><td>82.7</td><td>74.5</td><td>65.1</td><td>86.4</td><td>74.0</td></tr></table>
231
+
232
+ certain grid size, shuffling grid patches makes the domain unrecognizable. Hence, we generate a pseudo-OOS dataset by shuffling grid patches of source images.
233
+
234
+ We also add stickers to shuffled images, at random, to further instill differences between source and pseudo-OOS (see Suppl). Formally, $(x_{s}^{(od)},y_{s}^{(od)})\in$ $\mathcal{D}_s^{(od)}$ where $y_{s}^{(od)}$ denotes OOS category i.e. $(|\mathcal{C}_n| + 1)^{\mathrm{th}}$ category of $f_{n}$
235
+
236
+ We train only the sticker classifier $f_{n}$ , keeping backbone $h$ and goal classifier $f_{g}$ frozen, using cross-entropy loss $\mathcal{L}_{ce}$ . With $\mathcal{L}_{s,n} = \mathcal{L}_{ce}(f_n\circ h(x_{s,n}),y_n)$ , the overall objective for stickered source data $\mathcal{D}_{s,n}$ and pseudo-OOS data $\mathcal{D}_s^{(od)}$ is,
237
+
238
+ $$
239
+ \min _ {\theta_ {f _ {n}}} \mathbb {E} _ {\mathcal {D} _ {s, n}} \left[ \mathcal {L} _ {s, n} \right] + \mathbb {E} _ {\mathcal {D} _ {s} ^ {(o d)}} \left[ \mathcal {L} _ {s} ^ {(o d)} \right]; \quad \text {w h e r e} \mathcal {L} _ {s} ^ {(o d)} = \mathcal {L} _ {c e} \left(f _ {n} \circ h \left(x _ {s} ^ {(o d)}\right), y _ {s} ^ {(o d)}\right) \tag {8}
240
+ $$
241
+
242
+ 3.4.3 Source-free target adaptation (Fig. 4B). For unsupervised goal task adaptation, we use the general self training loss $\mathcal{L}_{st}$ and diversity loss $\mathcal{L}_{div}$ [26]. See Suppl. for more details. The goal task objective is given in Eq. 9 (left),
243
+
244
+ $$
245
+ \min _ {\theta_ {h}} \underset {\mathcal {D} _ {t} \cup \mathcal {D} _ {t, n}} {\mathbb {E}} [ \mathcal {L} _ {s t} + \mathcal {L} _ {d i v} ]; \text {a n d} \min _ {\left(\theta_ {h}, \theta_ {f _ {n}}\right)} \underset {\mathcal {D} _ {t, n}} {\mathbb {E}} [ \mathcal {L} _ {t, n} ]; \mathcal {L} _ {t, n} = \mathcal {L} _ {c e} \left(f _ {n} \circ h \left(x _ {t, n}\right), y _ {n}\right) \tag {9}
246
+ $$
247
+
248
+ The goal classifier $f_{g}$ is frozen to preserve its inductive bias and only the backbone $h$ is updated for both original and stickered samples in Eq. 9 (left).
249
+
250
+ For subsidiary supervised sticker adaptation, we use a simple cross-entropy loss with sticker labels. We implicitly minimize OOS probability by maximizing label class probability. We observe that this works well and explicit minimization of OOS probability is not required. As per Insight 6, out-of-target (OOT) samples are not required. Further, using OOT samples to update the backbone could be undesirable as discussed under Insight 2. The objective is given in Eq. 9 (right). Both backbone $h$ and sticker classifier $f_{n}$ are updated as the task is supervised.
251
+
252
+ Table 2. Multi-Source Domain Adaptation (MSDA) on DomainNet and Office-Home. We outperform source-free (denoted by SF) prior arts despite not using domain labels.
253
+
254
+ <table><tr><td rowspan="2">Method</td><td rowspan="2">SF</td><td rowspan="2">w/o Domain Labels</td><td colspan="7">DomainNet</td><td colspan="5">Office-Home</td></tr><tr><td>→C</td><td>→I</td><td>→P</td><td>→Q</td><td>→R</td><td>→S</td><td>Avg</td><td>→Ar</td><td>→Cl</td><td>→Pr</td><td>→Rw</td><td>Avg</td></tr><tr><td>WAMDA [1]</td><td>X</td><td>X</td><td>59.3</td><td>21.8</td><td>52.1</td><td>9.5</td><td>65.0</td><td>47.7</td><td>42.6</td><td>71.9</td><td>61.4</td><td>84.1</td><td>82.3</td><td>74.9</td></tr><tr><td>SImpAl50 [53]</td><td>X</td><td>X</td><td>66.4</td><td>26.5</td><td>56.6</td><td>18.9</td><td>68.0</td><td>55.5</td><td>48.6</td><td>70.8</td><td>56.3</td><td>80.2</td><td>81.5</td><td>72.2</td></tr><tr><td>CMSDA [48]</td><td>X</td><td>X</td><td>70.9</td><td>26.5</td><td>57.5</td><td>21.3</td><td>68.1</td><td>59.4</td><td>50.4</td><td>71.5</td><td>67.7</td><td>84.1</td><td>82.9</td><td>76.6</td></tr><tr><td>DRT [25]</td><td>X</td><td>X</td><td>71.0</td><td>31.6</td><td>61.0</td><td>12.3</td><td>71.4</td><td>60.7</td><td>51.3</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>STEM [34]</td><td>X</td><td>X</td><td>72.0</td><td>28.2</td><td>61.5</td><td>25.7</td><td>72.6</td><td>60.2</td><td>53.4</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Source-combine</td><td>X</td><td>✓</td><td>57.0</td><td>23.4</td><td>54.1</td><td>14.6</td><td>67.2</td><td>50.3</td><td>44.4</td><td>58.0</td><td>57.3</td><td>74.2</td><td>77.9</td><td>66.9</td></tr><tr><td>SHOT [26]-Ens</td><td>✓</td><td>X</td><td>58.6</td><td>25.2</td><td>55.3</td><td>15.3</td><td>70.5</td><td>52.4</td><td>46.2</td><td>72.2</td><td>59.3</td><td>82.8</td><td>82.9</td><td>74.3</td></tr><tr><td>DECISION [2]</td><td>✓</td><td>X</td><td>61.5</td><td>21.6</td><td>54.6</td><td>18.9</td><td>67.5</td><td>51.0</td><td>45.9</td><td>74.5</td><td>59.4</td><td>84.4</td><td>83.6</td><td>75.5</td></tr><tr><td>SHOT++ [27]</td><td>✓</td><td>X</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>73.1</td><td>61.3</td><td>84.3</td><td>84.0</td><td>75.7</td></tr><tr><td>CAiDA [8]</td><td>✓</td><td>X</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>75.2</td><td>60.5</td><td>84.7</td><td>84.2</td><td>76.2</td></tr><tr><td>NRC [59]</td><td>✓</td><td>✓</td><td>65.8</td><td>24.1</td><td>56.0</td><td>16.0</td><td>69.2</td><td>53.4</td><td>47.4</td><td>70.6</td><td>60.0</td><td>84.6</td><td>83.5</td><td>74.7</td></tr><tr><td>Ours</td><td>✓</td><td>✓</td><td>70.3</td><td>25.7</td><td>57.3</td><td>17.1</td><td>69.9</td><td>57.1</td><td>49.6</td><td>75.1</td><td>64.1</td><td>86.6</td><td>84.4</td><td>77.6</td></tr></table>
255
+
256
+ # 4 Experiments
257
+
258
+ We provide the implementation details of our experiments and thoroughly evaluate our approach w.r.t. state-of-the-art prior works across multiple settings. Unless mentioned, Ours implies sticker classification as the subsidiary task.
259
+
260
+ # 4.1 Experimental setup
261
+
262
+ Datasets. We evaluate on four standard DA benchmarks; Office-31 [44], Office-Home [54], VisDA [40], and DomainNet [39]. See Suppl. for more details.
263
+
264
+ Implementation details. We use a ResNet-101 [14] backbone for VisDA, and ResNet-50 for other benchmarks. We employ the same network design as SHOT [26]. For the subsidiary classifier, we use the same architecture after ResLayer-3. The number of sticker classes is 10. See Suppl. for more details.
265
+
266
+ # 4.2 Discussion
267
+
268
+ a) Single Source Domain Adaptation (SSDA). We compare with prior source-free SSDA works in Table 1 on Office-Home. We achieve state-of-the-art results exceeding the source-free SHOT++ and non-source-free SCDA [24] by $1\%$ and $0.9\%$ respectively. See Suppl. for Office-31 and VisDA results.
269
+ b) Multi Source Domain Adaptation (MSDA). In Table 2, we compare with the source-only baseline (source-combine) and source-free works. Even without domain labels, our approach achieves state-of-the-art results, even w.r.t. non-source-free works on Office-Home $(+1\%)$ . On DomainNet, we outperform source-free works $(+2.2\%)$ with comparable results to non-source-free works.
270
+ c) Evaluating the subsidiary DA suitability criteria. We empirically evaluate DSM and TSM for our sticker-based tasks as well as existing tasks from self-supervised literature in Fig. 5A, 5B. Compared to patch location [51] and image rotation [31], sticker location and sticker rotation tasks exhibit higher
271
+
272
+ ![](images/3b68100509a0bb71b6bd0a838ce8a7548b16e3db4ae9cf460a03779c17a1d4a5.jpg)
273
+ Fig. 5. We observe higher A. domain similarity (DSM) and B. task similarity (TSM) for our sticker-based tasks compared to existing subsidiary tasks like patch-location and image-rotation. This correlates with the better MSDA performance of sticker-based tasks on Office-Home and validates our criteria (Definition 1). C. Faster and improved convergence w.r.t. prior source-free works on both SSDA and MSDA for Office-Home.
274
+
275
+ ![](images/58b23acd7fcb687faf70e5fd826acefc467f0eca737df453715789a379609601.jpg)
276
+
277
+ ![](images/21e908817db8271873321207fc636d6e1e5da792213abc1cfd445862ddc45599.jpg)
278
+
279
+ DSM and thus, are more suitable with better adaptation performance (Table 3). However, sticker classification task is the most suitable due to its higher TSM as shape is the primary discriminative features, same as in goal task. We observe a positive correlation between DA performance and both DSM and TSM, which empirically verifies our suitability criteria. In Table 3, we also compare dense output based tasks like colorization and inpainting, which give marginal gains.
280
+
281
+ d) Faster and improved convergence. Fig. 5C illustrates our better and faster convergence w.r.t. source-free prior arts for both SSDA and MSDA. The hypothesis space for concurrent subsidiary supervised DA and unsupervised goal task DA, $\mathcal{H}_{g,n}$ , is a subset of the hypothesis space for only unsupervised goal task DA, $\mathcal{H}_g^{(uns)}$ . Thus, we achieve faster convergence. Further, as per Insight 1, lower domain discrepancy leads to lower target error i.e. improved convergence.
282
+
283
+ e) Compatibility with non-source-free DA. In Table 4, we evaluate the compatibility of concurrent subsidiary supervised DA with existing non-source-free SSDA techniques [10,30,52]. MSDA results are obtained by combining the multiple sources for each target. Compared to the original reported results, all four perform better
284
+
285
+ with our proposed subsidiary DA. Note that our non-source-free variant outperforms these results (#7 in Table 5).
286
+
287
+ Table 3. Subsidiary task comparisons on Office-Home for source-free DA. Here, baseline is same as #3 in Table 5.
288
+
289
+ <table><tr><td>Method</td><td>SSDA</td><td>MSDA</td></tr><tr><td>Baseline (B)</td><td>66.2</td><td>74.3</td></tr><tr><td>B + inpainting</td><td>66.3</td><td>74.5</td></tr><tr><td>B + colorization</td><td>66.8</td><td>74.7</td></tr><tr><td>B + jigsaw</td><td>67.0</td><td>74.8</td></tr><tr><td>B + patch-loc</td><td>67.6</td><td>75.0</td></tr><tr><td>B + rotation</td><td>67.9</td><td>75.4</td></tr><tr><td>B + sticker-loc</td><td>68.8</td><td>75.5</td></tr><tr><td>B + sticker-rot</td><td>69.0</td><td>75.7</td></tr><tr><td>B + sticker-clsf</td><td>69.7</td><td>76.2</td></tr></table>
290
+
291
+ # 4.2.1 Ablation Study. Below, we discuss a thorough ablation study.
292
+
293
+ a) Effect of subsidiary supervised DA and OOS node. In Table 5, we compare the baseline i.e. only unsupervised goal task DA (#3) with the addition of only OOS classifier (#4). Here, a binary classifier is used for OOS detection. We
294
+
295
+ Table 4. Evaluating compatibility of subsidiary DA with non-source-free DA works on OfficeHome. SSDA and MSDA indicate single-source and multi-source DA.
296
+
297
+ <table><tr><td rowspan="2">Method</td><td colspan="2">Office-Home</td></tr><tr><td>SSDA</td><td>MSDA</td></tr><tr><td>CDAN [30]</td><td>65.8</td><td>69.4</td></tr><tr><td>+ Subsidiary-DA</td><td>67.1</td><td>71.2</td></tr><tr><td>SRDC [52]</td><td>71.3</td><td>73.1</td></tr><tr><td>+ Subsidiary-DA</td><td>71.9</td><td>75.2</td></tr><tr><td>FixBi [33]</td><td>72.7</td><td>-</td></tr><tr><td>+ Subsidiary-DA</td><td>73.7</td><td>-</td></tr><tr><td>CMSDA [48]</td><td>-</td><td>76.6</td></tr><tr><td>+ Subsidiary-DA</td><td>-</td><td>78.1</td></tr></table>
298
+
299
+ Table 5. Ablation analysis. Here, sticker- $w$ -OOS-clsf denotes learning with all the proposed components unlike in only-OOS-clsf (all losses except $\mathcal{L}_{s,n},\mathcal{L}_{t,n}$ ) and only-sticker-clsf (all losses except $\mathcal{L}_s^{(od)}$ ). SF denotes source-free constraint.
300
+
301
+ <table><tr><td rowspan="2"># Variation</td><td rowspan="2">SF</td><td colspan="2">Office-Home</td></tr><tr><td>SSDA</td><td>MSDA</td></tr><tr><td>1. Source-only baseline</td><td>-</td><td>60.2</td><td>66.9</td></tr><tr><td>2. + sticker-w-OOS-clsf</td><td>-</td><td>61.9</td><td>71.4</td></tr><tr><td>3. Adaptation baseline (B)</td><td>✓</td><td>66.2</td><td>74.3</td></tr><tr><td>4. B + only-OOS-clsf</td><td>✓</td><td>67.0</td><td>74.9</td></tr><tr><td>5. B + only-sticker-clsf</td><td>✓</td><td>69.7</td><td>76.2</td></tr><tr><td>6. B + sticker-w-OOS-clsf</td><td>✓</td><td>73.1</td><td>77.6</td></tr><tr><td>7. B + sticker-w-OOS-clsf</td><td>✗</td><td>74.5</td><td>78.3</td></tr></table>
302
+
303
+ observe gains of $0.8\%$ and $0.6\%$ for SSDA and MSDA respectively. This indicates that only OOS helps, but subsidiary classifier is essential for further improvements. Next, we compare the baseline (#3) with concurrent goal-subsidiary DA without using OOS (#5). We observe an improvement of $3.5\%$ and $1.9\%$ for SSDA and MSDA. Adding the OOS objective to the subsidiary supervised DA (#6 vs. #4) improves the source-target alignment as explained in Insight 6, resulting in improvements of $3.1\%$ and $1.4\%$ for SSDA and MSDA.
304
+
305
+ b) Subsidiary-goal task similarity. As per Insight 3, higher goal-subsidiary task similarity is important for effective learning of both tasks. Thus, in Table 5, we compare the source-only baseline (#1) with only subsidiary supervised DA without goal task target adaptation (#2). We observe gains of $1.7\%$ and $1.3\%$ for SSDA and MSDA respectively. This illustrates the positive correlation between sticker classification and goal task even when target goal losses are not used.
306
+
307
+ # 5 Conclusion
308
+
309
+ In this work, we introduced concurrent subsidiary supervised DA for a pretext-like task to aid the unsupervised goal task DA. We provide theoretical insights to analyze the effect of subsidiary supervised DA on the domain discrepancy and consequently on the goal task adaptation. Based on the insights, we introduce a subsidiary DA suitability criteria to determine DA-assistive subsidiary tasks that improve the goal task DA performance. We also propose a novel sticker intervention based pretext task that follows our criteria. The proposed approach outperforms prior state-of-the-art source-free SSDA and MSDA works on four standard benchmarks, establishing the usefulness of our approach.
310
+
311
+ Acknowledgments. This work was supported by MeitY (Ministry of Electronics and Information Technology) project (No. 4(16)2019-ITEA), Govt. of India and a research grant by Google.
312
+
313
+ # References
314
+
315
+ 1. Aggarwal, S., Kundu, J.N., Babu, R.V., Chakraborty, A.: WAMDA: Weighted alignment of sources for multi-source domain adaptation. In: BMVC (2020) 12
316
+ 2. Ahmed, S.M., Raychaudhuri, D.S., Paul, S., Oymak, S., Roy-Chowdhury, A.K.: Unsupervised multi-source domain adaptation without access to source data. In: CVPR (2021) 12
317
+ 3. Ben-David, S., Blitzer, J., Crammer, K., Pereira, F.: Analysis of representations for domain adaptation. In: NeurIPS (2006) 1, 2, 5
318
+ 4. Bousmalis, K., Silberman, N., Dohan, D., Erhan, D., Krishnan, D.: Unsupervised pixel-level domain adaptation with generative adversarial networks. In: CVPR (2017) 4
319
+ 5. Carlucci, F.M., D'Innocente, A., Bucci, S., Caputo, B., Tommasi, T.: Domain generalization by solving jigsaw puzzles. In: CVPR (2019) 1, 3, 4, 7, 8
320
+ 6. Chen, Y.H., Chen, W.Y., Chen, Y.T., Tsai, B.C., Frank Wang, Y.C., Sun, M.: No more discrimination: Cross city adaptation of road scene segmenters. In: ICCV (2017) 1
321
+ 7. Doersch, C., Gupta, A., Efros, A.A.: Unsupervised visual representation learning by context prediction. In: ICCV (2015) 4
322
+ 8. Dong, J., Fang, Z., Liu, A., Sun, G., Liu, T.: Confident anchor-induced multi-source free domain adaptation. In: NeurIPS (2021) 12
323
+ 9. Feng, Z., Xu, C., Tao, D.: Self-supervised representation learning from multidomain data. In: ICCV (2019) 4
324
+ 10. Ganin, Y., Ustinova, E., Ajakan, H., Germain, P., Larochelle, H., Laviolette, F., Marchand, M., Lempitsky, V.: Domain-adversarial training of neural networks. The Journal of Machine Learning Research 17(1), 2096-2030 (2016) 1, 5, 9, 13
325
+ 11. Ghifary, M., Kleijn, W.B., Zhang, M., Balduzzi, D.: Domain generalization for object recognition with multi-task autoencoders. In: ICCV (2015) 4
326
+ 12. Ghifary, M., Kleijn, W.B., Zhang, M., Balduzzi, D., Li, W.: Deep reconstruction-classification networks for unsupervised domain adaptation. In: ECCV (2016) 4
327
+ 13. Gidaris, S., Singh, P., Komodakis, N.: Unsupervised representation learning by predicting image rotations. In: ICLR (2018) 1, 2, 4
328
+ 14. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: CVPR (2016) 12
329
+ 15. Jiaolong, X., Liang, X., López, A.M.: Self-supervised domain adaptation for computer vision tasks. IEEE Access 7, 156694-156706 (2019) 4, 8
330
+ 16. Kim, D., Saito, K., Oh, T.H., Plummer, B.A., Sclaroff, S., Saenko, K.: CDS: Cross-domain self-supervised pre-training. In: ICCV (2021) 4
331
+ 17. Kundu, J.N., Kulkarni, A., Bhambri, S., Mehta, D., Kulkarni, S., Jampani, V., Babu, R.V.: Balancing discriminability and transferability for source-free domain adaptation. In: ICML (2022) 3
332
+ 18. Kundu, J.N., Kulkarni, A., Singh, A., Jampani, V., Babu, R.V.: Generalize then adapt: Source-free domain adaptive semantic segmentation. In: ICCV (2021) 4
333
+ 19. Kundu, J.N., Venkat, N., M V, R., Babu, R.V.: Universal source-free domain adaptation. In: CVPR (2020) 4, 9
334
+ 20. Kundu, J.N., Venkat, N., Revanur, A., V, R.M., Babu, R.V.: Towards inheritable models for open-set domain adaptation. In: CVPR (2020) 4
335
+ 21. Kundu, J.N., Venkatesh, R.M., Venkat, N., Revanur, A., Babu, R.V.: Class incremental domain adaptation. In: ECCV (2020) 3
336
+
337
+ 22. Larsson, G., Maire, M., Shakhnarovich, G.: Colorization as a proxy task for visual understanding. In: CVPR (2017) 3, 4, 8
338
+ 23. Li, R., Jiao, Q., Cao, W., Wong, H.S., Wu, S.: Model adaptation: Unsupervised domain adaptation without source data. In: CVPR (2020) 3, 4, 9
339
+ 24. Li, S., Xie, M., Lv, F., Liu, C.H., Liang, J., Qin, C., Li, W.: Semantic concentration for domain adaptation. In: ICCV (2021) 11, 12
340
+ 25. Li, Y., Yuan, L., Chen, Y., Wang, P., Vasconcelos, N.: Dynamic transfer for multi-source domain adaptation. In: CVPR (2021) 12
341
+ 26. Liang, J., Hu, D., Feng, J.: Do we really need to access the source data? source hypothesis transfer for unsupervised domain adaptation. In: ICML (2020) 3, 4, 11, 12
342
+ 27. Liang, J., Hu, D., Wang, Y., He, R., Feng, J.: Source data-absent unsupervised domain adaptation through hypothesis transfer and labeling transfer. IEEE Transactions on Pattern Analysis and Machine Intelligence (2021) 4, 11, 12
343
+ 28. Liu, Y., Zhang, W., Wang, J.: Source-free domain adaptation for semantic segmentation. In: CVPR (2021) 4
344
+ 29. Long, M., Cao, Y., Wang, J., Jordan, M.: Learning transferable features with deep adaptation networks. In: ICML (2015) 5
345
+ 30. Long, M., Cao, Z., Wang, J., Jordan, M.I.: Conditional adversarial domain adaptation. In: NeurIPS (2017) 1, 13, 14
346
+ 31. Mishra, S., Saenko, K., Saligrama, V.: Surprisingly simple semi-supervised domain adaptation with pretraining and consistency. In: BMVC (2021) 1, 2, 3, 8, 9, 12
347
+ 32. Mitsuzumi, Y., Irie, G., Ikami, D., Shibata, T.: Generalized domain adaptation. In: CVPR (2021) 7, 10
348
+ 33. Na, J., Jung, H., Chang, H.J., Hwang, W.: FixBi: Bridging domain spaces for unsupervised domain adaptation. In: CVPR (2021) 11, 14
349
+ 34. Nguyen, V.A., Nguyen, T., Le, T., Tran, Q.H., Phung, D.: STEM: An approach to multi-source domain adaptation with guarantees. In: ICCV (2021) 12
350
+ 35. Noroozi, M., Favaro, P.: Unsupervised learning of visual representations by solving jigsaw puzzles. In: ECCV (2016) 1, 2, 4
351
+ 36. Oord, A.v.d., Li, Y., Vinyals, O.: Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748 (2018) 4
352
+ 37. Parkhi, O.M., Vedaldi, A., Zisserman, A., Jawahar, C.V.: Cats and dogs. In: CVPR (2012) 2
353
+ 38. Pathak, D., Krahenbuhl, P., Donahue, J., Darrell, T., Efros, A.A.: Context encoders: Feature learning by inpainting. In: CVPR (2016) 3, 4, 8
354
+ 39. Peng, X., Bai, Q., Xia, X., Huang, Z., Saenko, K., Wang, B.: Moment matching for multi-source domain adaptation. In: ICCV (2019) 12
355
+ 40. Peng, X., Usman, B., Kaushik, N., Hoffman, J., Wang, D., Saenko, K.: VisDA: The visual domain adaptation challenge. arXiv preprint arXiv:1710.06924 (2017) 12
356
+ 41. Prabhu, V., Khare, S., Kartik, D., Hoffman, J.: SENTRY: Selective entropy optimization via committee consistency for unsupervised domain adaptation. In: ICCV (2021) 11
357
+ 42. Qiu, Z., Zhang, Y., Lin, H., Niu, S., Liu, Y., Du, Q., Tan, M.: Source-free domain adaptation via avatar prototype generation and adaptation. In: IJCAI (2021) 11
358
+ 43. Ren, Z., Lee, Y.J.: Cross-domain self-supervised multi-task feature learning using synthetic imagery. In: CVPR (2018) 4
359
+ 44. Saenko, K., Kulis, B., Fritz, M., Darrell, T.: Adapting visual category models to new domains. In: ECCV (2010) 12
360
+ 45. Saito, K., Kim, D., Sclaroff, S., Saenko, K.: Universal domain adaptation through self supervision. In: NeurIPS (2020) 4
361
+
362
+ 46. Saito, K., Yamamoto, S., Ushiku, Y., Harada, T.: Open set domain adaptation by backpropagation. In: ECCV (2018) 4
363
+ 47. Salman, H., Ilyas, A., Engstrom, L., Kapoor, A., Madry, A.: Do adversarially robust imagenet models transfer better? In: NeurIPS (2020) 5
364
+ 48. Scalbert, M., Vakalopoulou, M., Couzini'e-Devy, F.: Multi-source domain adaptation via supervised contrastive learning and confident consistency regularization. In: BMVC (2021) 12, 14
365
+ 49. Sivaprasad, P.T., Fleuret, F.: Uncertainty reduction for model adaptation in semantic segmentation. In: CVPR (2021) 4
366
+ 50. Sun, B., Saenko, K.: Deep CORAL: Correlation alignment for deep domain adaptation. In: ECCV (2016) 5, 9
367
+ 51. Sun, Y., Tzeng, E., Darrell, T., Efros, A.A.: Unsupervised domain adaptation through self-supervision. arXiv preprint arXiv:1909.11825 (2019) 1, 3, 4, 8, 9, 12
368
+ 52. Tang, H., Chen, K., Jia, K.: Unsupervised domain adaptation via structurally regularized deep clustering. In: CVPR (2020) 13, 14
369
+ 53. Venkat, N., Kundu, J.N., Singh, D.K., Revanur, A., Babu, R.V.: Your classifier can secretly suffice multi-source domain adaptation. In: NeurIPS (2020) 12
370
+ 54. Venkateswara, H., Eusebio, J., Chakraborty, S., Panchanathan, S.: Deep hashing network for unsupervised domain adaptation. In: CVPR (2017) 12
371
+ 55. Wallace, B., Hariharan, B.: Extending and analyzing self-supervised learning across domains. In: ECCV (2020) 2
372
+ 56. Wang, X., Peng, Y., Lu, L., Lu, Z., Bagheri, M., Summers, R.: ChestX-ray8: Hospital-scale chest x-ray database and benchmarks on weakly-supervised classification and localization of common thorax diseases. In: CVPR (2017) 2
373
+ 57. Wu, Z., Xiong, Y., Yu, S.X., Lin, D.: Unsupervised feature learning via non-parametric instance discrimination. In: CVPR (2018) 4
374
+ 58. Xia, H., Zhao, H., Ding, Z.: Adaptive adversarial network for source-free domain adaptation. In: ICCV (2021) 11
375
+ 59. Yang, S., Wang, Y., van de Weijer, J., Herranz, L., Jui, S.: Exploiting the intrinsic neighborhood structure for source-free domain adaptation. In: NeurIPS (2021) 4, 11, 12
376
+ 60. Yang, S., Wang, Y., van de Weijer, J., Herranz, L., Jui, S.: Generalized source-free domain adaptation. In: ICCV (2021) 11
377
+ 61. You, K., Long, M., Cao, Z., Wang, J., Jordan, M.I.: Universal domain adaptation. In: CVPR (2019) 4
378
+ 62. Zhang, R., Isola, P., Efros, A.A.: Colorful image colorization. In: ECCV (2016) 4, 8
379
+ 63. Zhang, R., Isola, P., Efros, A.A.: Split-brain autoencoders: Unsupervised learning by cross-channel prediction. In: CVPR (2017) 4
380
+ 64. Zhao, H., Combes, R.T.D., Zhang, K., Gordon, G.: On learning invariant representations for domain adaptation. In: ICML (2019) 2, 5
concurrentsubsidiarysupervisionforunsupervisedsourcefreedomainadaptation/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a5732542aff81390fc5fa0e55dac5da678f71d9d530f1797132e12f5d10a161
3
+ size 493696
concurrentsubsidiarysupervisionforunsupervisedsourcefreedomainadaptation/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7707686617f8b63991dfb68844e8b979db7d7085e8f4880006214f8445d85b1d
3
+ size 556479
conditionalflownerfaccurate3dmodellingwithreliableuncertaintyquantification/ee19af33-8186-41de-ab0e-fb5353f6f31f_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8040d1c93c0ec4d98d8d81855f66023c9c02eb8b2ada1450abe64ca3d14aa4f
3
+ size 88851
conditionalflownerfaccurate3dmodellingwithreliableuncertaintyquantification/ee19af33-8186-41de-ab0e-fb5353f6f31f_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54c4d1eb11fd9554b7864194ccc70c2c38f978fc23bdb138319cf93c68089988
3
+ size 112722
conditionalflownerfaccurate3dmodellingwithreliableuncertaintyquantification/ee19af33-8186-41de-ab0e-fb5353f6f31f_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a3bc4d90d8f472bc4fe81e067dfbf22aa767fa6fb85f4f85e3d2da53c5f482d0
3
+ size 7599971
conditionalflownerfaccurate3dmodellingwithreliableuncertaintyquantification/full.md ADDED
@@ -0,0 +1,315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Conditional-Flow NeRF: Accurate 3D Modelling with Reliable Uncertainty Quantification
2
+
3
+ Jianxiong Shen<sup>1</sup>, Antonio Agudo<sup>1</sup>, Francesc Moreno-Noguer<sup>1</sup>, and Adria Ruiz<sup>2</sup>
4
+
5
+ $^{1}$ Institut de Robòtica i Informàtica Industrial, CSIC-UPC, Barcelona, Spain
6
+ $^{2}$ Seedtag, Spain
7
+
8
+ Abstract. A critical limitation of current methods based on Neural Radiance Fields (NeRF) is that they are unable to quantify the uncertainty associated with the learned appearance and geometry of the scene. This information is paramount in real applications such as medical diagnosis or autonomous driving where, to reduce potentially catastrophic failures, the confidence on the model outputs must be included into the decision-making process. In this context, we introduce Conditional-Flow NeRF (CF-NeRF), a novel probabilistic framework to incorporate uncertainty quantification into NeRF-based approaches. For this purpose, our method learns a distribution over all possible radiance fields modelling the scene which is used to quantify the uncertainty associated with the modelled scene. In contrast to previous approaches enforcing strong constraints over the radiance field distribution, CF-NeRF learns it in a flexible and fully data-driven manner by coupling Latent Variable Modelling and Conditional Normalizing Flows. This strategy allows to obtain reliable uncertainty estimation while preserving model expressivity. Compared to previous state-of-the-art methods proposed for uncertainty quantification in NeRF, our experiments show that the proposed method achieves significantly lower prediction errors and more reliable uncertainty values for synthetic novel view and depth-map estimation.
9
+
10
+ Keywords: 3D, scene representation, uncertainty quantification
11
+
12
+ # 1 Introduction
13
+
14
+ Neural fields [62] have recently gained a lot of attention given its ability to encode implicit representations of complex 3D scenes using deep neural networks. Additionally, they have been shown very effective in addressing multiple problems such as 3D reconstruction [32,39], scene rendering [27,31] or human body representation [38,50]. Among different methods built upon this framework [41,5,55], Neural Radiance Fields (NeRF) [33] has obtained impressive results in generating photo-realistic views of 3D scenes and solving downstream tasks such as depth estimation [61], scene editing [26,15] or pose prediction [65,56].
15
+
16
+ Despite its increasing popularity, a critical limitation of NeRF holding back its application to real-world problems has been recently pointed out by [53]. Concretely, current NeRF-based methods are not able to quantify the uncertainty
17
+
18
+ ![](images/71d7a8573973200dfa7c410c881b6eadda26d96371e02db3f82310536c310a0b.jpg)
19
+ RGB GT
20
+
21
+ ![](images/4c570fac107053e206840e9e6eafd294dabb1fec1b3520bc613b5c77b5b89956.jpg)
22
+ RGBPred.
23
+
24
+ ![](images/adb5034a118a15b5b185af58c37a0217135778a5c35fe24084614265c1f6a12a.jpg)
25
+ RGB Uncertainty
26
+
27
+ ![](images/5baba6b8fa69b7b0c77a6b407fef4777d79d17e3b437e38ef9be37c97aa03bf1.jpg)
28
+ Depth GT
29
+ Fig.1. Ground Truth (Left), Predictions (Center) and Uncertainty Maps (Right) obtained by our proposed CF-NeRF in novel view synthesis and depth-map estimation.
30
+
31
+ ![](images/9342bf99023cfaab6187e6fcef4977c8af06ea000b7551b0eef8936c70659c24.jpg)
32
+ DepthPred.
33
+
34
+ ![](images/c8126c4d113d5a114419c8f559391641a1641fb8d7a594451828da36f6f561e1.jpg)
35
+ Depth Uncertainty
36
+
37
+ associated with the model estimates. This information is crucial in several scenarios such as robotics [28,22], medical diagnosis [52] or autonomous driving [8] where, to reduce potentially catastrophic failures, the confidence on the model outputs must be included into the decision-making process.
38
+
39
+ To address this limitation, recent works [31,53] have explored different strategies to incorporate uncertainty quantification into NeRF. Remarkably, Stochastic NeRF [53] (S-NeRF) has recently obtained state-of-the-art results by employing a probabilistic model to learn a simple distribution over radiance fields. However, in order to make this problem tractable, S-NeRF makes strong assumptions over the aforementioned distribution, thus limiting model expressivity and leading to sub-optimal results for complex 3D scenes.
40
+
41
+ In this context, we propose Conditional-Flow NeRF (CF-NeRF), a novel probabilistic framework to incorporate uncertainty quantification without sacrificing model flexibility. As a result, our approach enables both effective 3D modelling and reliable uncertainty estimates (see Fig. 1). In the following, we summarise the main technical contributions of our method:
42
+
43
+ Modelling Radiance-Density Distributions with Normalizing Flows: In contrast to S-NeRF where the radiance and density in the scene are assumed to follow simple distributions (see Fig. 2(c-Top)), our method learns them in a flexible and fully data-driven manner using conditional normalizing flows [64]. This allows CF-NeRF to learn arbitrarily complex radiance and density distributions (see Fig. 2(c-Bottom)) which have the capacity to model scenes with complex geometry and appearance.
44
+
45
+ Latent Variable Modelling for Radiance Fields Distributions: Motivated by De Finetti's Theorem [17], CF-NeRF incorporates a global latent variable in order to efficiently model the joint distribution over the radiance-density vari
46
+
47
+ ![](images/0dd010ec204f3cdb0da1534b8837877d0f2d23126f84ff16436a2e7b73db6512.jpg)
48
+ S-NeRF
49
+
50
+ ![](images/e8f911cc7465bc9daaf7951104dee6a1f088312166353618bfce4a05c36bf0c6.jpg)
51
+
52
+ ![](images/fea1eafe7edb9237375d47770f7b6bd8372ba2384cdd50b4725e3e911b6c0323.jpg)
53
+
54
+ ![](images/b9c1ff38bbb68f2cc0072d05e27d6400c4a162b20bfa8f62917c7a1e6f61c580.jpg)
55
+
56
+ ![](images/8b37f60e1fc20a6df6ddf936ae47305921e3d92e02fd7d175c09df34baec84e8.jpg)
57
+ Oms
58
+ (a) RGB image
59
+ Fig. 2. Comparison between our CF-NeRF and the previous state-of-the-art method S-NeRF [53] on (a) RGB images and (b) depth-maps. S-NeRF generates noisy results due to the strong assumptions made over the radiance field distribution. In contrast, CF-NeRF renders more realistic and smooth synthetic views. (c) Illustration of the radiance distributions that can be modelled by S-NeRF and CF-NeRF. While the first is only able to represent distributions with a simple form, CF-NeRF can model arbitrary complex distributions by using Conditional Normalizing Flows.
60
+
61
+ ![](images/c0f3c443e56d4423de0059a22fa3e8175eee506d5300a70d15303f6d2bcf1a96.jpg)
62
+
63
+ ![](images/f8dba5041ac6685447f4ed777763094b8a864d15be3c64a399a64466579c40ae.jpg)
64
+ (b) depth
65
+ (c) distribution assumption
66
+
67
+ ![](images/49a5c9cd9303e40ccc67c6a4ed843a8d8d34ebe8b5eeb9f994c7d1d9c6b70052.jpg)
68
+
69
+ ables for all the spatial locations in the scene. This contrasts with the approach followed by S-NeRF, where these variables are considered independent for different 3D coordinates. Intuitively, the independence assumption violates the fact that changes in the density and radiance between adjacent locations are usually smooth. As a consequence, S-NeRF tends to generate low-quality and noisy predictions (see Fig. 2(a,b)-Top). In contrast, the global latent variable used in CF-NeRF allows to efficiently model the complex joint distribution of these variables, leading to spatially-smooth uncertainty estimates and more realistic results (Fig. 2(a,b)-Bottom).
70
+
71
+ In our experiments, we evaluate CF-NeRF over different benchmark datasets containing scenes with increasing complexity. Our qualitative and quantitative results show that our method obtains significantly better uncertainty estimations for rendered views and predicted depth maps compared to S-NeRF and other previous methods for uncertainty quantification. Additionally, CF-NeRF provides better image quality and depth estimation precision. These results confirm that our method is able to incorporate uncertainty quantification into NeRF without sacrificing model expressivity.
72
+
73
+ # 2 Related Work
74
+
75
+ Neural Radiance Fields. NeRF [33] has become a popular approach for 3D scene modelling due to its simplicity and its impressive performance on several
76
+
77
+ tasks. By using a sparse collection of 2D views, NeRF learns a deep neural network encoding a representation of the 3D scene. This network is composed of a set of fully-connected layers that output the volume density and emitted radiance for any input 3D spatial location and 2D viewing direction in the scene. Subsequently, novel views are generated by applying volumetric rendering [16] to the estimated density and radiance values obtained by the network. Recently, several extensions [68,42,36,19,70,54,58,51,66] over NeRF have been proposed. For instance, different works have focused on accelerating NeRF training [25,57,48] or modelling dynamic scenes [44,10,47,23,40]. Despite the advances achieved at different levels, the application of current NeRF-based methods in real scenarios is still limited since they are unable to quantify the uncertainty associated with the rendered views or estimated geometry. Our proposed CF-NeRF explicitly addresses this problem and can be easily combined with most of current NeRF-based approaches.
78
+
79
+ Uncertainty Estimation in Deep Learning. Uncertainty estimation has been extensively studied in deep learning [13,7,30,59,12] and have been applied to different computer vision tasks [46,3,63]. Early works proposed to use Bayesian Neural Networks (BNN) [34,35] to estimate the uncertainty of both network weights and outputs by approximating their marginal distributions. However, training BNNs is typically difficult and computationally expensive. As a consequence, their use in large deep neural networks is limited. More recently, efficient strategies have been proposed to incorporate uncertainty estimation into deep neural networks [49,6]. Among them, MC-Dropout [11] and Deep Ensembles [20] are two of the most popular approaches given that they are agnostic to the specific network architecture [1,14,2,24]. More concretely, MC-Dropout adds stochastic dropout during inference into the intermediate network layers. By doing multiple forward passes over the same input with different dropout configurations, the variance over the obtained set of outputs is used as the output uncertainty. On the other hand, Deep Ensembles applies a similar strategy by computing a set of outputs from multiple neural networks that are independently trained using different parameters initializations. In contrast to MC-Dropout and Deep Ensembles, however, we do not train independent networks to generate the samples. Instead, CF-NeRF explicitly encodes the distribution of the radiance fields into a single probabilistic model.
80
+
81
+ Uncertainty Estimation in NeRF. Recently, some works [31,53] have attempted to incorporate uncertainty estimation into Neural Radiance Fields. NeRF-in-the-Wild (NeRF-W) [31] modelled uncertainty at pixel-level in order to detect potential transient objects such as cars or pedestrians in modelled scenes. For this purpose, NeRF-W employs a neural network to estimate an uncertainty value for each 3D spatial location. Subsequently, it computes a confidence score for each pixel in a rendered image by using an alpha-compositing strategy similar to the one used to estimate the pixel color in original NeRF. However, this approach is not theoretically grounded since there is no intuitive justification to apply the volume rendering process over uncertainty values. Additionally, NeRF-W is not able to evaluate the confidence associated with estimated depth. On the
82
+
83
+ other hand, S-NeRF [53] has achieved state-of-the-art performance in quantifying the uncertainty of novel rendered views and depth-maps. Instead of learning a single radiance field as in original NeRF [33], S-NeRF models a distribution over all the possible radiance fields explaining the scene. During inference, this distribution is used to sample multiple color or depth predictions and compute a confidence score based on their associated variance. However, S-NeRF imposes strong constraints over the radiance field distribution and, as a consequence, this limits its ability to model scenes with complex appearance and geometry. In contrast, the proposed CF-NeRF combines a conditional normalizing flow and latent variable modelling to learn arbitrary complex radiance fields distributions without any prior assumption.
84
+
85
+ Complex Distribution Modelling with Normalizing Flows. Normalizing Flows (NF) have been extensively used to model complex distributions with unknown explicit forms. For this purpose, NF uses a sequence of invertible functions to transform samples from a simple known distribution to variables following an arbitrary probability density function. Additionally, the change-of-variables formula can be used to compute the likelihood of different samples according to the transformed distribution. Given its flexibility, Normalizing Flows have been used in several 3D modelling tasks. For instance, [64,45] introduced different flow-based generative models to model 3D point cloud distributions and sample from them. More recently, [37] used a normalizing flow in order to avoid color shifts at unseen viewpoints in the context of NeRF. To the best of our knowledge, our proposed CF-NeRF is the first approach employing Normalizing Flows in order to learn radiance fields distributions for 3D scene modelling.
86
+
87
+ # 3 Deterministic and Stochastic Neural Radiance Fields
88
+
89
+ Deterministic Neural Radiance Fields. Standard NeRF [33] represents a 3D volumetric scene as $\mathcal{F} = \{(\mathbf{r}(\mathbf{x},\mathbf{d}),\alpha (\mathbf{x})): \mathbf{x}\in \mathbb{R}^3,\mathbf{d}\in \mathbb{R}^2\}$ , where $\mathcal{F}$ is a set containing the volume density $\alpha (\mathbf{x})\in \mathbb{R}^{+}$ and RGB radiance $\mathbf{r}(\mathbf{x},\mathbf{d})\in \mathbb{R}^3$ from all the spatial locations $\mathbf{x}$ and view directions $\mathbf{d}$ in the scene.
90
+
91
+ In order to implicitly model the infinite set $\mathcal{F}$ , NeRF employs a neural network $f_{\theta}(\mathbf{x},\mathbf{d})$ with parameters $\theta$ which outputs the density $\alpha$ and radiance $\mathbf{r}$ for any given input location-view pair $\{\mathbf{x},\mathbf{d}\}$ . Using this network, NeRF is able to estimate the color $\mathbf{c}(\mathbf{x}_o,\mathbf{d})$ for any given pixel defined by a 3D camera position $\mathbf{x}_o$ and view direction $\mathbf{d}$ using the volumetric rendering function:
92
+
93
+ $$
94
+ \mathbf {c} (\mathbf {x} _ {o}, \mathbf {d}) = \int_ {t _ {n}} ^ {t _ {f}} T (t) \alpha (\mathbf {x} _ {t}) \mathbf {r} (\mathbf {x} _ {t}, \mathbf {d}) d t, \mathrm {w h e r e} T (t) = \exp (- \int_ {t _ {n}} ^ {t} \alpha (\mathbf {x} _ {s}) d s), \quad (1)
95
+ $$
96
+
97
+ and where $\mathbf{x}_t = \mathbf{x}_o + t\mathbf{d}$ corresponds to 3D locations along a ray with direction $\mathbf{d}$ originated at the camera origin and intersecting with the pixel at $\mathbf{x}_o$ .
98
+
99
+ During training, NeRF optimizes the network parameters $\pmb{\theta}$ using Eq. (1) by leveraging Maximum Likelihood Estimation (MLE) over a training set $\mathcal{T}$ containing ground-truth images depicting views of the scene captured from different
100
+
101
+ camera positions. More details about NeRF and its learning procedure can be found in the original paper [33].
102
+
103
+ Stochastic Neural Radiance Fields. Deterministic NeRF is not able to provide information about the underlying uncertainty associated with the rendered views or estimated depth maps. The reason is that the network $f_{\theta}(\mathbf{x}, \mathbf{d})$ is trained using Maximum Likelihood Estimation and thus, the learning process performs a single point estimate over all the plausible radiance fields $\mathcal{F}$ given the training set $\mathcal{T}$ . As a consequence, model predictions are deterministic and it is not possible to sample multiple outputs to compute their associated variance.
104
+
105
+ To address this limitation, S-NeRF [53] employs Bayesian Learning to model the posterior distribution $p_{\theta}(\mathcal{F}|\mathcal{T})$ over all the plausible radiance fields explaining the scene given the training set. In this manner, uncertainty estimations can be obtained during inference by computing the variance over multiple predictions obtained from different radiance fields $\mathcal{F}$ sampled from this distribution.
106
+
107
+ In order to make this problem tractable, S-NeRF uses Variational Inference to approximate the posterior $p_{\theta}(\mathcal{F}|\mathcal{T})$ with a parametric distribution $q_{\theta}(\mathcal{F})$ implemented by a deep neural network. However, S-NeRF imposes two limiting constraints over $q_{\theta}(\mathcal{F})$ . Firstly, it models the radiance $\mathbf{r}$ and density $\alpha$ for each location-view pair in the scene as independent variables. In particular, the probability of a radiance field given $\mathcal{T}$ is modelled with a fully-factorized distribution:
108
+
109
+ $$
110
+ q _ {\boldsymbol {\theta}} (\mathcal {F}) = \prod_ {\mathbf {x} \in \mathbb {R} ^ {3}} \prod_ {\mathbf {d} \in \mathbb {R} ^ {2}} q _ {\boldsymbol {\theta}} (\mathbf {r} | \mathbf {x}, \mathbf {d}) q _ {\boldsymbol {\theta}} (\alpha | \mathbf {x}). \tag {2}
111
+ $$
112
+
113
+ Whereas this conditional-independence assumption simplifies the optimization process, it ignores the fact that radiance and density values in adjacent spatial locations are usually correlated. As a consequence, S-NeRF tends to render noisy and low-quality images and depth maps (see Fig. 2).
114
+
115
+ # 4 Conditional Flow-based Neural Radiance Fields
116
+
117
+ Our proposed Conditional Flow-based Neural Radiance Fields incorporates uncertainty estimation by using a similar strategy than S-NeRF. In particular, CF-NeRF learns a parametric distribution $q_{\theta}(\mathcal{F})$ approximating the posterior distribution $p(\mathcal{F}|\mathcal{T})$ over all the possible radiance fields given the training views. Different from S-NeRF, however, our method does not assume a simple and fully-factorized distribution for $q_{\theta}(\mathcal{F})$ , but it relies on Conditional Normalizing Flows and Latent Variable Modelling to preserve model expressivity. In the following, we discuss the technical details of our approach (Sec. 4.1), the optimizing process following S-NeRF (Sec. 4.2) and inference procedure used to compute the uncertainty associated with novel rendered views and depth maps (Sec. 4.3).
118
+
119
+ # 4.1 Modelling Flexible Radiance Field Distributions with CF-NeRF
120
+
121
+ Radiance Field distribution with Global Latent Variable. As discussed in Sec. 3, S-NeRF formulation assumes that radiance and density variables at
122
+
123
+ ![](images/b3eda3978cc1535acc1fb4a609736df31bdb1ecfb5fe76c0a2e92aa09ffd93f3.jpg)
124
+ Fig. 3. (Left) We use two Conditional Normalizing Flow (CNF) to sample radiance and density values from distributions $q_{\theta}(\mathbf{r}|\mathbf{x}, \mathbf{d}, \mathbf{z})$ and $q_{\theta}(\alpha|\mathbf{x}, \mathbf{z})$ , respectively. Each CNF computes a transformation of a sample from the latent distribution $q_{\psi}(\mathbf{z})$ conditioned to an embedding $\mathbf{h}$ . This embedding which is computed by an MLP with the location-view pair $(\mathbf{x}, \mathbf{d})$ as input. (Right) Each CNF is composed by a sequence of invertible transformation functions $f_{1:K}$ conditioned on $\mathbf{h}$ .
125
+
126
+ ![](images/36ba91f7987de65208cfe7c4f687948a8f3ed56ff5d0b69456e9d23b4635c2a4.jpg)
127
+
128
+ each spatial location in the field follows a fully-factorized distribution (Eq. (2)). As a consequence, they are forced to be independent from each other. This simplification was motivated by the fact that modelling the joint distribution over the infinite set of radiance and density variables in the field $\mathcal{F}$ is not trivial. To address this problem, our proposed CF-NeRF leverages De Finetti's representation theorem [17]. In particular, the theorem states that any joint distribution over sets of exchangeable variables can be written as a fully-factorized distribution conditioned on a global latent variable. Based on this observation, we define the approximate posterior $q_{\theta}(\mathcal{F})$ :
129
+
130
+ $$
131
+ q _ {\boldsymbol {\theta}} (\mathcal {F}) = \int_ {\mathbf {z}} q _ {\vartheta} (\mathbf {z}) q _ {\boldsymbol {\theta}} (\mathcal {F} | \mathbf {z}) d \mathbf {z} = \int_ {\mathbf {z}} q _ {\vartheta} (\mathbf {z}) \prod_ {\mathbf {x} \in \mathbb {R} ^ {3}} \prod_ {\mathbf {d} \in \mathbb {R} ^ {2}} q _ {\boldsymbol {\theta}} (\mathbf {r} | \mathbf {x}, \mathbf {d}, \mathbf {z}) q _ {\boldsymbol {\theta}} (\alpha | \mathbf {x}, \mathbf {z}) d \mathbf {z}, \tag {3}
132
+ $$
133
+
134
+ where the latent variable $\mathbf{z}$ is sampled from a Gaussian prior $q_{\vartheta}(\mathbf{z}) = \{\mu_z,\sigma_z\}$ with learned mean and variance. In this manner, all the 3D spatial-locations $\mathbf{x}$ and viewing-directions $\mathbf{d}$ generated from the same shared latent variable $\mathbf{z}$ and thus, they are conditionally dependent between them. This approach allows CF-NeRF to efficiently model the distribution over the radiance-density variables in the radiance field without any independence assumption. It is also worth mentioning that De Fineti's theorem has been also used in previous works learning joint distributions over sets for 3D point cloud modelling [18].
135
+
136
+ Radiance-Density Conditional Flows. Given that the radiance-density distributions can be highly complicated for complex scenes, modelling them with variants of Gaussian distributions as in Stochastic NeRF can lead to sub-optimal results. For this reason, CF-NeRF models $q_{\theta}(\mathbf{r}|\mathbf{x}, \mathbf{d}, \mathbf{z})$ and $q_{\theta}(\alpha|\mathbf{x}, \mathbf{z})$ using a Conditional Normalizing Flow (CNF) [4]. This allows to learn arbitrarily complex distributions in a fully data-driven manner without any prior assumption.
137
+
138
+ For any input location-direction pair $(\mathbf{x},\mathbf{d})$ , we use a sequence of $K$ CNFs that transform the global latent variable $\mathbf{z}$ into samples from the radiance $\mathbf{r}$ or density $\alpha$ distribution $q_{\theta}(\mathbf{r}|\mathbf{x},\mathbf{d},\mathbf{z})$ or $q_{\theta}(\alpha |\mathbf{x},\mathbf{z})$ . More formally, each flow is defined as an invertible parametric function $\mathbf{z}_k = f_k(\mathbf{z}_{k - 1},\mathbf{x},\mathbf{d})$ , where $f_{k}$ maps
139
+
140
+ ![](images/819265d6bc5ec0483ad53f7068e98de8f86a02667b3a408b1f84c51e8520f9c6.jpg)
141
+ (a) Sampling Global Prior
142
+ (b) Distribution Modelling by CNF
143
+ (c) Rendering and Optimization
144
+ Fig. 4. Illustration of our pipeline for the inference and computation of the log-likelihood on the pixel color. (a) We sample a set of variables $\mathbf{z}$ from the global latent distribution. (b) Given each spatial location $\mathbf{x}$ along a camera ray with viewing direction $\mathbf{d}$ , we can generate a set of density and radiance values by passing each $\mathbf{z}$ variable through our proposed CNF. (c) These values can be represented as a set of different density-radiance trajectories along the ray corresponding to each $\mathbf{z}$ , followed by volume rendering techniques to composite each trajectory into a RGB value. Finally, these RGB values are used to compute the log-likelihood for the pixel color and also estimate the model prediction and its associated uncertainty using their mean and variance during inference.
145
+
146
+ a random variable $\mathbf{z}_{k-1}$ into another one $\mathbf{z}_k$ with a more complex distribution. Note that the each flow $f_k$ is conditioned on the location and view direction $(\mathbf{x}, \mathbf{d})$ . Finally, $\mathbf{z}_K$ is followed by a Sigmoid and Softplus activation functions for radiance and density samples, respectively. This process is detailed in Fig. 3.
147
+
148
+ Using the introduced CNF, radiance and density probabilities $q_{\theta}(\mathbf{r}|\mathbf{x}, \mathbf{d}, \mathbf{z})$ and $q_{\theta}(\alpha|\mathbf{x}, \mathbf{z})$ can be computed with the change-of-variables formula typically used in normalizing flows as:
149
+
150
+ $$
151
+ q _ {\boldsymbol {\theta}} (\mathbf {r} | \mathbf {x}, \mathbf {d}, \mathbf {z}) = q _ {\vartheta} (\mathbf {z}) \left| \det \frac {\partial \mathbf {z}}{\partial \mathbf {r}} \right| = q _ {\vartheta} (\mathbf {z}) \left| \det \frac {\partial \mathbf {r}}{\partial \mathbf {z} _ {K}} \right| ^ {- 1} \prod_ {k = 1} ^ {K} \left| \det \frac {\partial \mathbf {z} _ {k}}{\partial \mathbf {z} _ {k - 1}} \right| ^ {- 1}, \tag {4}
152
+ $$
153
+
154
+ where $|\operatorname{det}(\partial \mathbf{z}_k / \partial \mathbf{z}_{k-1})|$ measures the Jacobian determinant of the transformation function $f_k$ . Note that $q_{\pmb{\theta}}(\alpha | \mathbf{x}, \mathbf{z})$ can be computed in a similar manner.
155
+
156
+ # 4.2 Optimizing Conditional-Flow NeRF
157
+
158
+ We adopt a Variational Bayesian approach to learn the parameters of the posterior distribution $q_{\theta}(\mathcal{F})$ defined in Eq. (3). Note that the optimized $\theta$ corresponds to the parameters of the CNFs defined in the previous section. More formally, we solve an optimization problem where we minimize the Kullback-Leibler (KL) divergence between $q_{\theta}(\mathcal{F})$ and the true posterior distribution $p(\mathcal{F}|\mathcal{T})$ of radiance fields given the training set:
159
+
160
+ $$
161
+ \begin{array}{l} \min _ {\boldsymbol {\theta}} \mathbb {K L} (q _ {\boldsymbol {\theta}} (\mathcal {F}) | | p (\mathcal {F} | \mathcal {T})) \\ = \min _ {\boldsymbol {\theta}} - \mathbb {E} _ {q _ {\boldsymbol {\theta}} (\mathcal {F})} \log p (\mathcal {T} | \mathcal {F}) + \mathbb {E} _ {q _ {\boldsymbol {\theta}} (\mathcal {F})} \log q _ {\boldsymbol {\theta}} (\mathcal {F}) - \mathbb {E} _ {q _ {\boldsymbol {\theta}} (\mathcal {F})} \log p (\mathcal {F}). \tag {5} \\ \end{array}
162
+ $$
163
+
164
+ The first term in Eq. (5) measures the expected log-likelihood of the training set $\mathcal{T}$ over the distribution of radiance fields $q_{\theta}(\mathcal{F})$ . The second term indicates the negative Entropy of the approximated posterior. Intuitively, maximizing the Entropy term allows uncertainty estimation by preventing the optimized distribution to degenerate into a deterministic function where all the probability is assigned into a single radiance field $\mathcal{F}$ . Finally, the third term corresponds to the cross-entropy between $q_{\theta}(\mathcal{F})$ and a prior over radiance fields $p(\mathcal{F})$ . Given that it is hard to choose a proper prior in this case, we assume $p(\mathcal{F})$ to follow uniform distribution and thus, this term can be ignored during optimization. In the following, we detail how the first two terms are computed during training.
165
+
166
+ Computing the log-likelihood. Assuming that the training set $\mathcal{T}$ is composed by $N$ triplets $\{\mathbf{C}_n,\mathbf{x}_n^o,\mathbf{d}_n\}$ representing the color, camera origin and view direction of a given pixel in a training image, the log-likelihood term in Eq. (5) is equivalent to: $\frac{1}{N}\sum_{n = 1}^{N}\log p(\mathbf{C}_n|\mathcal{F})$ . In order to compute an individual $p(\mathbf{C}_n|\mathcal{F})$ we use the following procedure.
167
+
168
+ Firstly, we sample a set of variables $\mathbf{z}^{1:K}$ from the global latent distribution $q_{\vartheta}(\mathbf{z})$ . Secondly, given a training triplet $\{\mathbf{C},\mathbf{x}^o,\mathbf{d}\}$ and a set of 3D spatial locations along a ray defined by $\mathbf{x}_t = \mathbf{x}_o + t\mathbf{d}$ , we sample a set of density and radiance values $\{\alpha^{1:K}\}_{t_n:t_f}$ and $\{\mathbf{r}^{1:K}\}_{t_n:t_f}$ by using the Conditional Flow introduced in Sec. 4.1. In particular, we perform a forward pass over the flow with inputs $\mathbf{z}^k$ conditioned to $\mathbf{x}_t^*$ for all $t$ . Subsequently, a set of $K$ color estimates $\hat{\mathbf{C}}_{1:K}$ are obtained by using, for every $k$ , the volume rendering formula in Eq. (1) over the sampled radiance and density values $\{\alpha^k\}_{t_n:t_f}$ and $\{\mathbf{r}^k\}_{t_n:t_f}$ , respectively. Finally, with the set of obtained color estimations $\hat{\mathbf{C}}_{1:K}$ , we use a non-parametric kernel density estimator as in [53] to approximate the log-likelihood $\log p(\mathbf{C}|\mathcal{F})$ of the pixel color. An illustration of this procedure is shown in Fig. 4.
169
+
170
+ Computing the Entropy term. In order to compute the entropy term in Eq. (5), we use a Monte Carlo approximation with $M$ samples as:
171
+
172
+ $$
173
+ \begin{array}{l} \mathbb {E} _ {q _ {\boldsymbol {\theta}} (\mathcal {F})} \log q _ {\boldsymbol {\theta}} (\mathcal {F}) = \mathbb {E} _ {q _ {\boldsymbol {\theta}} (\mathbf {z})} \prod_ {\mathbf {x} \in \mathbb {R} ^ {3}} \prod_ {\mathbf {d} \in \mathbb {R} ^ {2}} \log q _ {\boldsymbol {\theta}} (\mathbf {r} | \mathbf {x}, \mathbf {d}, \mathbf {z}) + \mathbb {E} _ {q _ {\boldsymbol {\theta}} (\mathbf {z} ^ {\alpha})} \prod_ {\mathbf {x} \in \mathbb {R} ^ {3}} \prod_ {\mathbf {d} \in \mathbb {R} ^ {2}} \log q _ {\boldsymbol {\theta}} (\alpha | \mathbf {x}, \mathbf {z}) \\ \sim \frac {1}{M} \sum_ {m = 1} ^ {M} \left(\log q _ {\boldsymbol {\theta}} \left(\mathbf {r} _ {m} \mid \mathbf {x} _ {m}, \mathbf {d} _ {m}, \mathbf {z} _ {m}\right) + \log q _ {\boldsymbol {\theta}} \left(\alpha_ {m} \mid \mathbf {x} _ {m}, \mathbf {z} _ {m}\right)\right), \tag {6} \\ \end{array}
174
+ $$
175
+
176
+ where $\mathbf{z}_m$ are obtained from the latent variable distribution $q_{\boldsymbol{\theta}}(\mathbf{z})$ and $\{\mathbf{x}_m, \mathbf{d}_m\}$ are possible 3D locations and view directions in the scene which are randomly sampled. Finally, $\alpha_m$ and $\mathbf{r}_m$ are density and radiance values obtained by applying our conditional flow with inputs $(\mathbf{z}_m, \mathbf{x}_m, \mathbf{d}_m)$ . Their probabilities $q_{\boldsymbol{\theta}}(\alpha_m | \mathbf{x}_m, \mathbf{z}_m)$ and $q_{\boldsymbol{\theta}}(\mathbf{r}_m | \mathbf{x}_m, \mathbf{d}_m, \mathbf{z}_m)$ can be computed by using Eq. (4).
177
+
178
+ # 4.3 Inference and Uncertainty Estimation
179
+
180
+ CF-NeRF allows us to quantify the uncertainty associated with rendered images and depth-maps. As described in Sec. 4.2, given any camera pose, we can obtain
181
+
182
+ a set of color estimates $\hat{\mathbf{C}}_{1:K}$ for every pixel in a rendered image. These estimates are obtained by sampling a set of random variables $\mathbf{z}_{1:K}$ from latent distribution $q_{\vartheta}(\mathbf{z})$ and applying CF-NeRF. Finally, the mean and variance of the pixel colors over the K samples are treated as the predicted color and its associated uncertainty, respectively. For depth-map generation, we sample a sequence of density values $\{\alpha_k\}_{t_n:t_f}$ along a camera ray and we compute the expected termination depth of the ray as in [33]. In this way, we obtain a set of depth-values $d_{1:K}$ for each pixel in the depth-map for the rendered image. As in the case of the RGB color, its mean and variance correspond to the estimated depth and its associated uncertainty.
183
+
184
+ # 5 Experiments
185
+
186
+ Datasets. We conduct a set of exhaustive experiments over two benchmark databases typically used to evaluate NeRF-based approaches: the LLFF dataset from the original NeRF paper [33] and the Light Field LF dataset [68,67]. The first is composed of 8 relatively simple scenes with multiple-view forward-facing images. On the other hand, from the LF dataset we use 4 scenes: Africa, Basket, Statue and Torch. The evaluation over the LF scenes is motivated by the fact that they have a longer depth range compared to the ones in LLFF and, typically, they present more complicated geometries and appearance. As a consequence, the evaluation over LLFF gives more insights into the ability of NeRF-based methods to model complex 3D scenes. Same as [53], we use a sparse number of scene views $(4\sim 5)$ for training and the last adjacent views for testing. As discussed in the cited paper, training in an extremely low-data regime is a challenging task and provides an ideal setup to evaluate the ability of the compared methods to quantify the uncertainty associated with the model predictions. While the ground truth of depth is not available in the original datasets, we compute pseudo ground truth by using the method in [61] trained on all the available views per scene.
187
+
188
+ Baselines. We compare our method with the state-of-the-art S-NeRF [53], NeRF-W [31] and two other methods, Deep-Ensembles(D.E.) [20] and MC-Dropout(Drop.) [11], which are generic approaches for uncertainty quantification in deep learning. For NeRF-W, we remove the latent embedding component of their approach and keep only the uncertainty estimation layers. For Deep-Ensembles, we train 3 different NeRF models in the ensemble in order to have a similar computational cost during training and testing compared to the rest of compared methods. In the case of MC-Dropout, we manually add one dropout layer after each odd layer in the network to sample multiple outputs using random dropout configurations. The described setup and hyper-parameters for the different baselines is the same previously employed in S-NeRF [53].
189
+
190
+ Implementations details. In order to implement CF-NeRF and the different baselines, we inherit the same network architecture and hyper-parameters than the one employed in the original $\mathrm{NeRF}^3$ implementation. In CF-NeRF,
191
+
192
+ Table 1. Quality and uncertainty quantification metrics on rendered images over the LLFF dataset. Best results are shown in bold with second best underlined.
193
+
194
+ <table><tr><td></td><td colspan="3">quality metrics</td><td colspan="3">uncertainty metrics</td></tr><tr><td></td><td>PSNR↑</td><td>SSIM↑</td><td>LPIPS↓</td><td>AUSE</td><td>RMSE↓</td><td>AUSE MAE↓</td></tr><tr><td>D.E. [20]</td><td>22.32</td><td>0.788</td><td>0.236</td><td>0.0254</td><td>0.0122</td><td>1.98</td></tr><tr><td>Drop. [11]</td><td>21.90</td><td>0.758</td><td>0.248</td><td>0.0316</td><td>0.0162</td><td>1.69</td></tr><tr><td>NeRF-W [31]</td><td>20.19</td><td>0.706</td><td>0.291</td><td>0.0268</td><td>0.0113</td><td>2.31</td></tr><tr><td>S-NeRF [53]</td><td>20.27</td><td>0.738</td><td>0.229</td><td>0.0248</td><td>0.0101</td><td>0.95</td></tr><tr><td>CF-NeRF</td><td>21.96</td><td>0.790</td><td>0.201</td><td>0.0177</td><td>0.0078</td><td>0.57</td></tr></table>
195
+
196
+ we use this architecture to compute the conditional part given $\mathbf{x}$ and $\mathbf{d}$ . Since CF-NeRF uses an additional normalizing flow following this network, we add additional layers for the rest of baselines so that they have a similar computational complexity than our method. See the supplementary material for more details on hyper-parameters of our conditional normalizing flow.
197
+
198
+ Metrics. In our experiments, we address two different tasks using the compared methods: novel view synthesis and depth-map estimation. In particular, we evaluate the quality of generated images/depth-maps and the reliability of the quantified uncertainty using the following metrics:
199
+
200
+ Quality metrics: We use standard metrics in the literature. Specifically, we report PSNR, SSIM [60], and LPIPS [69] for generated synthetic views. On the other hand, we compute RMSE, MAE and $\delta$ -threshold [9] to evaluate the quality of the generated depth-maps.
201
+
202
+ Uncertainty Quantification: To evaluate the reliability of the uncertainty estimated by each model we report two widely used metrics for this purpose. Firstly, we use the negative log likelihood (NLL) which is a proper scoring rule [21,29] and has been previously used to evaluate the quality of model uncertainty [53]. Secondly, we evaluate the compared methods using sparsification curves [46,3,43]. Concretely, given an error metric (e.g. RMSE), we obtain two lists by sorting the values of all the pixels according to their uncertainty and the computed error. By removing the top $t\% (t = 1 \sim 100)$ of the errors in each vector and repeatedly computing the average of the last subset, we can obtain the sparsification curve and the oracle curve respectively. The area between is the AUSE, which evaluates how much the uncertainty is correlated with the error.
203
+
204
+ # 5.1 Results over LLFF dataset
205
+
206
+ Following a similar experimental setup than [53], we firstly evaluate the performance of the compared methods on the simple scenes in the LLFF dataset. All the views in each scene are captured in a restricted setting where all cameras are forward-facing towards a plane, which allows to use Normalized Device Coordinates (NDC) to bound all coordinates to a very small range(0-1). In Table 1, we report the performance of the different evaluated metrics averaged over all the scenes. As can be seen, S-NeRF achieves the second best performance in terms of uncertainty quantification with quality metrics comparable to the rest of baselines. These results are consistent with the results reported in their original
207
+
208
+ Table 2. Quality and uncertainty quantification metrics on rendered images over LF dataset. Best results are shown in bold with second best underlined.
209
+
210
+ <table><tr><td rowspan="2">Scene Type</td><td rowspan="2">Methods</td><td colspan="3">Quality Metrics</td><td colspan="3">Uncertainty Metrics</td><td rowspan="2">Scene Type</td><td colspan="3">Quality Metrics</td><td colspan="3">Uncertainty Metrics</td></tr><tr><td>PSNR↑</td><td>SSIM↑</td><td>LPIPS↓</td><td>AUSE RMSE↓</td><td>AUSE MAE↓</td><td>NLL↓</td><td>PSNR↑</td><td>SSIM↑</td><td>LPIPS↓</td><td>AUSE RMSE↓</td><td>AUSE MAE↓</td><td>NLL↓</td></tr><tr><td rowspan="5">Basket</td><td>D.E. [20]</td><td>25.93</td><td>0.87</td><td>0.17</td><td>0.206</td><td>0.161</td><td>1.26</td><td></td><td>23.14</td><td>0.78</td><td>0.32</td><td>0.385</td><td>0.304</td><td>2.19</td></tr><tr><td>Drop. [11]</td><td>24.00</td><td>0.80</td><td>0.30</td><td>0.324</td><td>0.286</td><td>1.35</td><td></td><td>22.13</td><td>0.72</td><td>0.42</td><td>0.396</td><td>0.339</td><td>1.69</td></tr><tr><td>NeRF-W [31]</td><td>19.81</td><td>0.73</td><td>0.31</td><td>0.333</td><td>0.161</td><td>2.23</td><td>Afria</td><td>21.14</td><td>0.71</td><td>0.42</td><td>0.121</td><td>0.089</td><td>1.41</td></tr><tr><td>S-NeRF [53]</td><td>23.56</td><td>0.80</td><td>0.23</td><td>0.098</td><td>0.089</td><td>0.26</td><td></td><td>20.83</td><td>0.73</td><td>0.35</td><td>0.209</td><td>0.161</td><td>0.56</td></tr><tr><td>CF-NeRF</td><td>26.39</td><td>0.89</td><td>0.11</td><td>0.039</td><td>0.018</td><td>-0.90</td><td></td><td>23.84</td><td>0.83</td><td>0.23</td><td>0.077</td><td>0.054</td><td>-0.25</td></tr><tr><td rowspan="5">Statue</td><td>D.E. [20]</td><td>24.57</td><td>0.85</td><td>0.21</td><td>0.307</td><td>0.214</td><td>1.53</td><td></td><td>21.49</td><td>0.73</td><td>0.43</td><td>0.153</td><td>0.101</td><td>1.80</td></tr><tr><td>Drop. [11]</td><td>23.91</td><td>0.82</td><td>0.28</td><td>0.297</td><td>0.232</td><td>1.09</td><td></td><td>19.23</td><td>0.62</td><td>0.59</td><td>0.226</td><td>0.154</td><td>3.09</td></tr><tr><td>NeRF-W [31]</td><td>19.89</td><td>0.73</td><td>0.41</td><td>0.099</td><td>0.071</td><td>3.03</td><td>Torch</td><td>15.59</td><td>0.56</td><td>0.69</td><td>0.132</td><td>0.131</td><td>1.52</td></tr><tr><td>S-NeRF [53]</td><td>13.24</td><td>0.55</td><td>0.59</td><td>0.475</td><td>0.714</td><td>4.56</td><td></td><td>13.12</td><td>0.33</td><td>1.02</td><td>0.321</td><td>0.454</td><td>2.29</td></tr><tr><td>CF-NeRF</td><td>24.54</td><td>0.87</td><td>0.16</td><td>0.040</td><td>0.019</td><td>-0.83</td><td></td><td>23.95</td><td>0.86</td><td>0.17</td><td>0.047</td><td>0.015</td><td>-0.86</td></tr></table>
211
+
212
+ Table 3. Quality and uncertainty quantification metrics on depth estimation over the LF dataset. All the results are computed from disparity values which are reciprocal to depth. Best results are shown in bold with second best underlined.
213
+
214
+ <table><tr><td rowspan="2">Scene Type</td><td rowspan="2">Methods</td><td colspan="3">Quality Metrics</td><td colspan="3">Uncertainty Metrics</td><td rowspan="2">Scene Type</td><td colspan="3">Quality Metrics</td><td colspan="3">Uncertainty Metrics</td></tr><tr><td>RMSE↓</td><td>MAE↓</td><td>δ3↑</td><td>AUSE RMSE↓</td><td>AUSE MAE↓</td><td>NLL↓</td><td>RMSE↓</td><td>MAE↓</td><td>δ3↑</td><td>AUSE RMSE↓</td><td>AUSE MAE↓</td><td>NLL↓</td></tr><tr><td rowspan="5">Basket</td><td>D.E. [20]</td><td>0.221</td><td>0.132</td><td>0.66</td><td>0.480</td><td>0.232</td><td>7.88</td><td></td><td>0.085</td><td>0.039</td><td>0.90</td><td>0.218</td><td>0.110</td><td>3.61</td></tr><tr><td>Drop. [11]</td><td>0.241</td><td>0.153</td><td>0.43</td><td>0.297</td><td>0.157</td><td>10.96</td><td></td><td>0.216</td><td>0.141</td><td>0.31</td><td>0.544</td><td>0.503</td><td>10.36</td></tr><tr><td>NeRF-W [31]</td><td>0.214</td><td>0.179</td><td>0.41</td><td>-</td><td>-</td><td>-</td><td>Africa</td><td>0.127</td><td>0.079</td><td>0.77</td><td>-</td><td>-</td><td>-</td></tr><tr><td>S-NeRF [53]</td><td>0.417</td><td>0.401</td><td>0.23</td><td>0.305</td><td>0.312</td><td>8.75</td><td></td><td>0.239</td><td>0.155</td><td>0.36</td><td>0.234</td><td>0.252</td><td>6.55</td></tr><tr><td>CF-NeRF</td><td>0.166</td><td>0.099</td><td>0.80</td><td>0.101</td><td>0.052</td><td>6.76</td><td></td><td>0.074</td><td>0.039</td><td>0.93</td><td>0.105</td><td>0.090</td><td>2.05</td></tr><tr><td rowspan="5">Statue</td><td>D.E. [20]</td><td>0.162</td><td>0.118</td><td>0.73</td><td>0.115</td><td>0.056</td><td>7.78</td><td></td><td>0.132</td><td>0.071</td><td>0.71</td><td>0.226</td><td>0.131</td><td>5.76</td></tr><tr><td>Drop. [11]</td><td>0.197</td><td>0.128</td><td>0.59</td><td>0.164</td><td>0.109</td><td>10.89</td><td></td><td>0.263</td><td>0.173</td><td>0.06</td><td>0.982</td><td>0.809</td><td>10.84</td></tr><tr><td>NeRF-W [31]</td><td>0.276</td><td>0.218</td><td>0.55</td><td>-</td><td>-</td><td>-</td><td>Torch</td><td>0.271</td><td>0.241</td><td>0.17</td><td>-</td><td>-</td><td>-</td></tr><tr><td>S-NeRF [53]</td><td>0.751</td><td>0.709</td><td>0.26</td><td>0.353</td><td>0.386</td><td>11.51</td><td></td><td>0.274</td><td>0.236</td><td>0.14</td><td>0.770</td><td>1.013</td><td>8.75</td></tr><tr><td>CF-NeRF</td><td>0.122</td><td>0.098</td><td>0.73</td><td>0.069</td><td>0.053</td><td>7.38</td><td></td><td>0.110</td><td>0.061</td><td>0.78</td><td>0.164</td><td>0.089</td><td>4.15</td></tr></table>
215
+
216
+ paper and demonstrate that the expressivity of S-NeRF on these simple scenes is not severely limited by the imposed strong assumptions over the radiance field distribution. Nonetheless, our CF-NeRF still achieves a significant improvement over most of the metrics, showing the advantages of modelling the radiance field distribution using the proposed latent variable modelling and CNFs.
217
+
218
+ # 5.2 Results over LF dataset
219
+
220
+ To further test the performance of different approaches on larger scenes with more complex appearances and geometries, we evaluate the different methods on the LF dataset. All images in these scenes have a large depth range and are randomly captured towards the target. As a consequence, coordinates cannot be normalized with NDC.
221
+
222
+ Quantitative results. Results over rendered RGB images and estimated depthmaps for all the scenes and evaluated metrics are shown in Table 2 and Table 3, respectively. As can be seen, S-NeRF obtains poor performance in terms of quality and uncertainty estimation. This clearly shows that the imposed assumptions over the radiance fields distribution are sub-optimal in complex scenes and lead to inaccurate model predictions and unreliable uncertainty estimations. In contrast, our CF-NeRF outperforms all the previous approaches by large margins
223
+
224
+ ![](images/2ee1ee6d365bb3e3970f89a15578fbae2916af4d10f39366d55755a691027e61.jpg)
225
+ Fig. 5. Qualitative comparison between our CF-NeRF and other baselines over generated images(Top) and depth-maps(Bottom). The model prediction, its computed error with the Ground-Truth and its associated uncertainty estimation are shown respectively in each row. Larger values are shown in yellow while purple and black indicate smaller values of predicted error and uncertainty. NeRF-W is not able to generate multiple depth samples and hence cannot produce uncertainty for depth-maps. Among all these approaches, our CF-NeRF is the only approach that is able to generate both accurately rendered views and depth estimations and visually intuitive uncertainty maps which are highly correlated with the true prediction error. Refer to the supplementary materials for more visualized results.
226
+
227
+ across all the scenes and metrics both on image rendering and depth-maps estimation tasks. The better results obtained by our method can be explained because the use of latent variable modelling and conditional normalizing flows allows to learn arbitrarily complex radiance field distributions, which are necessary to model scenes with complicated appearance and geometry. This partly explains that our method achieves better performance, particularly an average $69\%$ improvement compared to the second best method Deep-Ensembles on LPIPS, which measures the perceptual similarity at the image level. On the other hand, the performance of Deep-Ensembles and MC-Dropout is largely limited by the number of the trained models or dropout samples, which cannot be increased infinitely in practical cases. In contrast, the explicitly encoding of the radiance field distribution into a single probabilistic model with CF-NeRF allows to use a higher-number of samples in a more efficient manner.
228
+
229
+ Qualitative results. In order to give more insights into the advantages of our proposed CF-NeRF, Fig. 5 shows qualitative results obtained by the compared methods on an example testing view of the LF dataset. By looking at the estimated uncertainty for RGB images, we can observe that NeRF-W obtains a higher prediction error which, additionally, is not correlated with the uncertainty estimates. On the other hand, Deep Ensembles and MC-Dropout render images with a lower predictive error compared to NeRF-W. As can be observed, however, their estimated uncertainties are noticeably not correlated with their errors. Interestingly, S-NeRF seems to obtain uncertainty estimates where the values are more correlated with the predictive error. However, the quality of the rendered image is poor, obviously shown in the background. In contrast, our CF-NeRF is the only method able to render both high-quality images and uncertainty estimates that better correlate with the prediction error.
230
+
231
+ By looking at the results for generated depth-maps, we can see that our method also obtains the most accurate depth estimates, followed by Deep Ensembles. Nonetheless, the latter generates depth maps with obvious errors in the background. Regarding the uncertainty estimation, we can observe a high correlation between the predicted error and the estimated uncertainty maps generated by our CF-NeRF. This contrasts with the rest methods which estimate low confidence values in the background of the scene inconsistent with their low prediction errors on this specific area. In conclusion, our results demonstrate the ability of our proposed method to provide both reliable uncertainty estimates and accurate model predictions.
232
+
233
+ # 6 Conclusion
234
+
235
+ We have presented CF-NeRF, a novel probabilistic model to address the problem of uncertainty quantification in 3D modelling using Neural Radiance Fields. In contrast to previous works employing models with limited expressivity, our method couples Latent Variable Modelling and Conditional Normalizing Flows in order to learn complex radiance fields distributions in a flexible and fully data-driven manner. In our experimental results, we show that this strategy allows CF-NeRF to obtain significantly better results than state-of-the-art approaches, particularly on scenes with complicated appearance and geometry. Finally, it is also worth mentioning that our proposed framework can be easily combined with other NeRF-based architectures in order to provide them with uncertainty quantification capabilities.
236
+
237
+ # Acknowledgements
238
+
239
+ This work is supported partly by the Chinese Scholarship Council (CSC) under grant (201906120031), by the Spanish government under project MoHuCo PID2020-120049RB-I00 and the Chistera project IPALM PCI2019-103386. We also thank Nvidia for hardware donation under the GPU grant program.
240
+
241
+ # References
242
+
243
+ 1. Aralikatti, R., Margam, D., Sharma, T., Thanda, A., Venkatesan, S.: Global snr estimation of speech signals using entropy and uncertainty estimates from dropout networks. In: INTERSPEECH (2018)
244
+ 2. Ashukha, A., Lyzhov, A., Molchanov, D., Vetrov, D.P.: Pitfalls of in-domain uncertainty estimation and assembling in deep learning. In: ICLR (2020)
245
+ 3. Bae, G., Budvytis, I., Cipolla, R.: Estimating and exploiting the aleatoric uncertainty in surface normal estimation. In: ICCV (2021)
246
+ 4. van den Berg, R., Hasenclever, L., Tomczak, J., Welling, M.: Sylvester normalizing flows for variational inference. In: proceedings of the Conference on Uncertainty in Artificial Intelligence (UAI) (2018)
247
+ 5. Bi, S., Xu, Z., Sunkavalli, K., Havsan, M., Hold-Geoffroy, Y., Kriegman, D.J., Ramamoorthi, R.: Deep reflectance volumes: Relightable reconstructions from multi-view photometric images. In: ECCV (2020)
248
+ 6. Blundell, C., Cornebise, J., Kavukcuoglu, K., Wierstra, D.: Weight uncertainty in neural networks. In: ICML (2015)
249
+ 7. Brachmann, E., Michel, F., Krull, A., Yang, M.Y., Gumhold, S., Rother, C.: Uncertainty-driven 6d pose estimation of objects and scenes from a single rgb image. In: CVPR (2016)
250
+ 8. Djuric, N., Radosavljevic, V., Cui, H., Nguyen, T., Chou, F.C., Lin, T.H., Singh, N., Schneider, J.G.: Uncertainty-aware short-term motion prediction of traffic actors for autonomous driving. In: WACV (2020)
251
+ 9. Eigen, D., Puhrsch, C., Fergus, R.: Depth map prediction from a single image using a multi-scale deep network. In: NIPS (2014)
252
+ 0. Gafni, G., Thies, J., Zollhöfer, M., Nießner, M.: Dynamic neural radiance fields for monocular 4D facial avatar reconstruction. In: CVPR (2021)
253
+ 1. Gal, Y., Ghahramani, Z.: Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In: ICML (2016)
254
+ 2. Geifman, Y., Uziel, G., El-Yaniv, R.: Bias-reduced uncertainty estimation for deep neural classifiers. In: ICLR (2019)
255
+ 3. Hendrycks, D., Mazeika, M., Kadavath, S., Song, D.X.: Using self-supervised learning can improve model robustness and uncertainty. In: NeurIPS (2019)
256
+ 4. Hernández, S., Vergara, D., Valdenegro-Toro, M., Jorquera, F.: Improving predictive uncertainty estimation using dropout-hamiltonian monte carlo. Soft Computing 24, 4307-4322 (2020)
257
+ 5. Jiakai, Z., Xinhang, L., Xinyi, Y., Fuqiang, Z., Yanshun, Z., Minye, W., Yingliang, Z., Lan, X., Jingyi, Y.: Editable free-viewpoint video using a layered neural representation. In: ACM SIGGRAPH (2021)
258
+ 6. Kajiya, J., von herzen, B.: Ray tracing volume densities. ACM SIGGRAPH Computer Graphics 18, 165-174 (1984)
259
+ 7. Kirsch, W.: An elementary proof of de Finetti's theorem. Statistics & Probability Letters 151(C), 84-88 (2019)
260
+ 8. Klokov, R., Boyer, E., Verbeek, J.J.: Discrete point flow networks for efficient point cloud generation. In: ECCV (2020)
261
+ 9. Kosiorek, A.R., Strathmann, H., Zoran, D., Moreno, P., Schneider, R., Mokr'a, S., Rezende, D.J.: Nerf-vae: A geometry aware 3d scene generative model. In: ICML (2021)
262
+ 20. Lakshminarayanan, B., Pritzel, A., Blundell, C.: Simple and scalable predictive uncertainty estimation using deep ensembles. In: NIPS (2017)
263
+
264
+ 21. Lakshminarayanan, B., Pritzel, A., Blundell, C.: Simple and scalable predictive uncertainty estimation using deep ensembles. In: Adv. Neural Inform. Process. Syst. (2017)
265
+ 22. Li, Y., Li, S., Sitzmann, V., Agrawal, P., Torralba, A.: 3d neural scene representations for visuomotor control. In: CoRL (2021)
266
+ 23. Li, Z., Niklaus, S., Snavely, N., Wang, O.: Neural scene flow fields for space-time view synthesis of dynamic scenes. In: CVPR (2021)
267
+ 24. Liu, J., Paisley, J.W., Kioumourtzoglou, M.A., Coull, B.: Accurate uncertainty estimation and decomposition in ensemble learning. In: NeurIPS (2019)
268
+ 25. Liu, L., Gu, J., Lin, K.Z., Chua, T.S., Theobalt, C.: Neural sparse voxel fields. In: NeurIPS (2020)
269
+ 26. Liu, S., Zhang, X., Zhang, Z., Zhang, R., Zhu, J.Y., Russell, B.: Editing conditional radiance fields. In: ICCV (2021)
270
+ 27. Lombardi, S., Simon, T., Saragih, J., Schwartz, G., Lehrmann, A., Sheikh, Y.: Neural volumes: Learning dynamic renderable volumes from images. ACM Trans. Graph. 38(4), 65:1-65:14 (Jul 2019)
271
+ 28. Long, K., Qian, C., Cortes, J., Atanasov, N.: Learning barrier functions with memory for robust safe navigation. IEEE Robotics and Automation Letters 6(3), 1-1 (2021)
272
+ 29. Loquercio, A., Segu, M., Scaramuzza, D.: A general framework for uncertainty estimation in deep learning. IEEE Robotics and Automation Letters 5(2), 3153-3160 (Apr 2020)
273
+ 30. Malinin, A., Gales, M.J.F.: Predictive uncertainty estimation via prior networks. In: NeurIPS (2018)
274
+ 31. Martin-Brualla, R., Radwan, N., Sajjadi, M.S.M., Barron, J.T., Dosovitskiy, A., Duckworth, D.: NeRF in the Wild: Neural Radiance Fields for Unconstrained Photo Collections. In: CVPR (2021)
275
+ 32. Mescheder, L., Oechsle, M., Niemeyer, M., Nowozin, S., Geiger, A.: Occupancy Networks: Learning 3d reconstruction in function space. In: CVPR (2019)
276
+ 33. Mildenhall, B., Srinivasan, P.P., Tancik, M., Barron, J.T., Ramamoorthi, R., Ng, R.: Nerf: Representing scenes as neural radiance fields for view synthesis. In: ECCV (2020)
277
+ 34. Neal, R.M.: Bayesian Learning for Neural Networks. Springer New York, NY (1995)
278
+ 35. Neapolitan, R.E.: Learning bayesian networks. In: Proceedings of the 13th ACM SIGKDD international conference on Knowledge discovery and data mining(KDD) (2007)
279
+ 36. Neff, T., Stadlbauer, P., Parger, M., Kurz, A., Mueller, J.H., Chaitanya, C.R.A., Kaplanyan, A., Steinberger, M.: Donerf: Towards real-time rendering of compact neural radiance fields using depth oracle networks. Computer Graphics Forum 40(4), 45-59 (2021)
280
+ 37. Niemeyer, M., Barron, J.T., Mildenhall, B., Sajjadi, M.S.M., Geiger, A., Radwan, N.: Regnerf: Regularizing neural radiance fields for view synthesis from sparse inputs. ArXiv abs/2112.00724 (2021)
281
+ 38. Niemeyer, M., Mescheder, L., Oechsle, M., Geiger, A.: Occupancy flow: 4d reconstruction by learning particle dynamics. In: ICCV (2019)
282
+ 39. Park, J.J., Florence, P., Straub, J., Newcombe, R.A., Lovegrove, S.: DeepSDF: Learning continuous signed distance functions for shape representation. In: CVPR (2019)
283
+ 40. Park, K., Sinha, U., Barron, J.T., Bouaziz, S., Goldman, D.B., Seitz, S.M., Martin-Brualla, R.: Nerfies: Deformable neural radiance fields. ICCV (2021)
284
+
285
+ 41. Peng, L.W., Shamsuddin, S.M.: 3d object reconstruction and representation using neural networks. In: Proceedings of the 2nd International Conference on Computer Graphics and Interactive Techniques in Australasia and South East Asia (2004)
286
+ 42. Peng, S., Dong, J., Wang, Q., Zhang, S.W., Shuai, Q., Bao, H., Zhou, X.: Animatable neural radiance fields for human body modeling. In: CVPR (2021)
287
+ 43. Poggi, M., Aleotti, F., Tosi, F., Mattoccia, S.: On the uncertainty of self-supervised monocular depth estimation. In: CVPR (2020)
288
+ 44. Pumarola, A., Corona, E., Pons-Moll, G., Moreno-Noguer, F.: D-NeRF: Neural radiance fields for dynamic scenes. In: CVPR (2021)
289
+ 45. Pumarola, A., Popov, S., Moreno-Noguer, F., Ferrari, V.: C-flow: Conditional generative flow models for images and 3d point clouds. In: CVPR (2020)
290
+ 46. Qu, C., Liu, W., Taylor, C.J.: Bayesian deep basis fitting for depth completion with uncertainty. In: ICCV (2021)
291
+ 47. Raj, A., Zollhoefer, M., Simon, T., Saragih, J., Saito, S., Hays, J., Lombardi, S.: PVA: Pixel-aligned volumetric avatars. In: CVPR (2021)
292
+ 48. Rebain, D., Jiang, W., Yazdani, S., Li, K., Yi, K.M., Tagliasacchi, A.: Derf: Decomposed radiance fields. In: CVPR (2020)
293
+ 49. Ritter, H., Botev, A., Barber, D.: A scalable laplace approximation for neural networks. In: ICLR (2018)
294
+ 50. Saito, S., Yang, J., Ma, Q., Black, M.J.: SCANimate: Weakly supervised learning of skinned clothed avatar networks. In: CVPR (2021)
295
+ 51. Schwarz, K., Liao, Y., Niemeyer, M., Geiger, A.: Graf: Generative radiance fields for 3d-aware image synthesis. In: NIPS (2020)
296
+ 52. Shamsi, A., Asgharnezhad, H., Jokandan, S.S., Khosravi, A., Kebria, P.M., Nahavandi, D., Nahavandi, S., Srinivasan, D.: An uncertainty-aware transfer learning-based framework for Covid-19 diagnosis. IEEE Transactions on Neural Networks and Learning Systems 32, 1408-1417 (2021)
297
+ 53. Shen, J., Ruiz, A., Agudo, A., Moreno-Noguer, F.: Stochastic neural radiance fields: Quantifying uncertainty in implicit 3d representations. In: 3DV (2021)
298
+ 54. Sitzmann, V., Martel, J.N.P., Bergman, A.W., Lindell, D.B., Wetzstein, G.: Implicit neural representations with periodic activation functions. In: NIPS (2020)
299
+ 55. Sitzmann, V., Zollhöfer, M., Wetzstein, G.: Scene representation networks: Continuous 3d-structure-aware neural scene representations. In: NIPS (2019)
300
+ 56. Su, S.Y., Yu, F., Zollhöfer, M., Rhodin, H.: A-nerf: Articulated neural radiance fields for learning human shape, appearance, and pose. In: NIPS (2021)
301
+ 57. Tancik, M., Mildenhall, B., Wang, T., Schmidt, D., Srinivasan, P.P., Barron, J.T., Ng, R.: Learned initializations for optimizing coordinate-based neural representations. In: CVPR (2021)
302
+ 58. Tancik, M., Srinivasan, P.P., Mildenhall, B., Fridovich-Keil, S., Raghavan, N., Singhal, U., Ramamoorthi, R., Barron, J.T., Ng, R.: Fourier features let networks learn high frequency functions in low dimensional domains. In: NIPS (2020)
303
+ 59. Teye, M., Azizpour, H., Smith, K.: Bayesian uncertainty estimation for batch normalized deep networks. In: ICML (2018)
304
+ 60. Wang, Z., Simoncelli, E., Bovik, A.: Multiscale structural similarity for image quality assessment. In: The Thrity-Seventh Asilomar Conference on Signals, Systems Computers, 2003. vol. 2, pp. 1398-1402 Vol.2 (2003)
305
+ 61. Wei, Y., Liu, S., Rao, Y., Zhao, W., Lu, J., Zhou, J.: Nerfingmvs: Guided optimization of neural radiance fields for indoor multi-view stereo. In: ICCV (2021)
306
+ 62. Xie, Y., Takikawa, T., Saito, S., Litany, O., Yan, S., Khan, N., Tombari, F., Tompkin, J., Sitzmann, V., Sridhar, S.: Neural fields in visual computing and beyond (2021)
307
+
308
+ 63. Xu, H., Zhou, Z., Wang, Y., Kang, W., Sun, B., Li, H., Qiao, Y.: Digging into uncertainty in self-supervised multi-view stereo. In: ICCV (2021)
309
+ 64. Yang, G., Huang, X., Hao, Z., Liu, M.Y., Belongie, S.J., Hariharan, B.: Pointflow: 3d point cloud generation with continuous normalizing flows. In: ICCV (2019)
310
+ 65. Yen-Chen, L., Florence, P., Barron, J.T., Rodriguez, A., Isola, P., Lin, T.Y.: iNeRF: Inverting neural radiance fields for pose estimation. In: IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) (2021)
311
+ 66. Yu, A., Ye, V., Tancik, M., Kanazawa, A.: pixelnerf: Neural radiance fields from one or few images. In: CVPR (2021)
312
+ 67. Yücer, K., Sorkine-Hornung, A., Wang, O., Sorkine-Hornung, O.: Efficient 3d object segmentation from densely sampled light fields with applications to 3d reconstruction. ACM Trans. Graph. 35(3) (2016)
313
+ 68. Zhang, K., Riegler, G., Snavely, N., Koltun, V.: Nerf++: Analyzing and improving neural radiance fields. ArXiv abs/2010.07492 (2020)
314
+ 69. Zhang, R., Isola, P., Efros, A.A., Shechtman, E., Wang, O.: The unreasonable effectiveness of deep features as a perceptual metric. In: CVPR (2018)
315
+ 70. Zhu, L., Mousavian, A., Xiang, Y., Mazhar, H., van Eenbergen, J., Debnath, S., Fox, D.: Rgb-d local implicit function for depth completion of transparent objects. In: CVPR (2021)
conditionalflownerfaccurate3dmodellingwithreliableuncertaintyquantification/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c09fdf8a5fcc842a2db56bfe4135757c839dff6ad7298be872c825d1b1ae2d1c
3
+ size 546776
conditionalflownerfaccurate3dmodellingwithreliableuncertaintyquantification/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a31b54aa2991cf4a32e7292de64752bdf5df15807500b808da7bb7c14cefa09
3
+ size 476534
conditionalstrokerecoveryforfinegrainedsketchbasedimageretrieval/8c2c337d-79b1-4f7a-91a9-6a96e46eb39e_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f61c486c63fde6f7f4f56597700dcf3b21cfaadcac6ff17cdc2e65d2c8afb52c
3
+ size 78892
conditionalstrokerecoveryforfinegrainedsketchbasedimageretrieval/8c2c337d-79b1-4f7a-91a9-6a96e46eb39e_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:897eac859790efae8430e6bea912b5bb431dd551bdea4c5af794c1e6256d7b5b
3
+ size 96659